Files
meshtastic-web/e2e/global-teardown.ts
T
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Dan DitomasoHunter Thornsberry
aec3ad9ed3 chore(deps-dev): bump oxfmt from 0.58.0 to 0.59.0 (#1306)
* chore(deps-dev): bump oxfmt from 0.58.0 to 0.59.0

Bumps [oxfmt](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt) from 0.58.0 to 0.59.0.
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxfmt/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxfmt_v0.59.0/npm/oxfmt)

---
updated-dependencies:
- dependency-name: oxfmt
  dependency-version: 0.59.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix formatting issues for oxfmt 0.59.0

* fix: add vitest.config.ts for packages/ui to avoid unplugin-dts TypeScript 7 crash

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Dan Ditomaso <dan.ditomaso@gmail.com>
Co-authored-by: Hunter Thornsberry <hunter@hunterthornsberry.com>
2026-07-22 12:43:26 -04:00

25 lines
979 B
TypeScript

import { execSync } from "node:child_process";
/**
* Tears the mesh down only on explicit request (E2E_DOCKER_DOWN=1); otherwise it
* is left running so repeated local runs are fast and node identities are stable.
*
* In CI we deliberately do NOT remove the containers here — the workflow dumps
* device logs on failure and then runs `docker compose down` as a final step, so
* removing them in this teardown would race (and discard) that log capture.
*/
const MODE = process.env.E2E_DEVICE_MODE ?? "docker";
const COMPOSE_FILE = "e2e/device/docker-compose.yml";
export default async function globalTeardown(): Promise<void> {
if (MODE !== "docker") return;
if (process.env.E2E_DOCKER_DOWN === "1") {
console.log("[e2e] tearing down meshtasticd mesh ...");
execSync(`docker compose -f ${COMPOSE_FILE} down -v`, { stdio: "inherit" });
} else {
console.log(
"[e2e] leaving meshtasticd mesh running (set E2E_DOCKER_DOWN=1 to stop).",
);
}
}