OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
ralph(M12-011): Test split: packages/db and apps/api onto bun test with the isolated test databases preloaded, apps/start on its own vitest, root `test` runs everything, vitest dropped where nothing uses it, counts before/after recorded
ralphca59a60cc801
diff --git a/apps/api/bunfig.toml b/apps/api/bunfig.tomlnew file mode 100644index 000000000..4f8e1b513--- /dev/null+++ b/apps/api/bunfig.toml@@ -0,0 +1,12 @@+# `bun test` configuration for @openpanel/api.++[test]+# Runs once per test FILE under `--isolate`, not once per run — `bun test` has+# no `globalSetup`. The preload is the successor to `test/global-setup.ts`:+# it pins DATABASE_URL / CLICKHOUSE_URL at the ISOLATED test databases and+# bootstraps them. Shared with packages/db; both must stay idempotent.+preload = ["../../test/bun-preload.ts"]++# --isolate is chosen deliberately (ADR-010) and it CANNOT be set here: on Bun+# 1.4.0 `[test] isolate` is silently ignored, as is any unknown key in this+# table. The flag lives on the `test` script in package.json.diff --git a/apps/api/package.json b/apps/api/package.jsonindex 91fff36b8..9fa958fba 100644--- a/apps/api/package.json+++ b/apps/api/package.json@@ -11,8 +11,7 @@"e2e:sessions": "LOG_LEVEL=warn dotenv -e ../../.env -- jiti e2e/session-e2e.ts","e2e:sessions:stress": "LOG_LEVEL=warn dotenv -e ../../.env -- jiti e2e/session-stress.ts","e2e:legacy-jobs": "bash e2e/legacy-job-proof.sh",- "test": "vitest",- "test:run": "vitest run",+ "test": "bun test --isolate","typecheck": "tsc --noEmit"},"dependencies": {@@ -29,7 +28,7 @@"@faker-js/faker": "^9.0.1","@openpanel/tsconfig": "workspace:*","@types/uuid": "^10.0.0",- "typescript": "catalog:",- "vitest": "^1.0.0"+ "bun-types": "1.4.0",+ "typescript": "catalog:"}}diff --git a/apps/api/src/config/env.test.ts b/apps/api/src/config/env.test.tsindex cbdab607b..86a945e5c 100644--- a/apps/api/src/config/env.test.ts+++ b/apps/api/src/config/env.test.ts@@ -1,4 +1,4 @@-import { describe, expect, it } from 'vitest';+import { describe, expect, it } from 'bun:test';import {concurrencyEnvKey,concurrencyOverride,@@ -12,7 +12,7 @@ const base = { ROLE: 'worker' } as NodeJS.ProcessEnv;describe('ROLE', () => {it('defaults to api and accepts the three roles', () => {expect(loadConfig({}).ROLE).toBe('api');- for (const role of ['api', 'worker', 'all']) {+ for (const role of ['api', 'worker', 'all'] as const) {expect(loadConfig({ ROLE: role }).ROLE).toBe(role);}});diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.jsonindex 7c29b89c2..c937fc270 100644--- a/apps/api/tsconfig.json+++ b/apps/api/tsconfig.json@@ -6,7 +6,11 @@"@/*": ["./src/*"]},"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",- "strictNullChecks": true+ "strictNullChecks": true,+ // `bun test` is the runner (ADR-010): src/config/env.test.ts and the+ // shared ../../test preload import `bun:test`, which only `bun-types`+ // declares.+ "types": ["bun-types"]},"include": [".", "../../test"],"exclude": ["node_modules", "dist"]diff --git a/apps/api/vitest.config.ts b/apps/api/vitest.config.tsdeleted file mode 100644index f87a2039f..000000000--- a/apps/api/vitest.config.ts+++ /dev/null@@ -1,3 +0,0 @@-import { getSharedVitestConfig } from '../../vitest.shared';--export default getSharedVitestConfig({ __dirname });diff --git a/apps/start/package.json b/apps/start/package.jsonindex 2e79d55e6..336cdb412 100644--- a/apps/start/package.json+++ b/apps/start/package.json@@ -10,6 +10,7 @@"cf-typegen": "wrangler types","build": "pnpm with-env vite build","serve": "vite preview",+ "test": "vitest run","format": "biome format","lint": "biome lint","check": "biome check",diff --git a/apps/start/vitest.config.ts b/apps/start/vitest.config.tsnew file mode 100644index 000000000..372818e5d--- /dev/null+++ b/apps/start/vitest.config.ts@@ -0,0 +1,20 @@+import * as path from 'node:path';+import { defineConfig } from 'vitest/config';++/**+ * `apps/start` keeps vitest (ADR-010: "vitest stays for apps/start") and its+ * own `vitest ^3.0.5` devDependency. This file exists so it keeps it on its+ * own terms: without a vitest config, vitest loads `vite.config.ts`, whose+ * Cloudflare / TanStack Start / Sentry plugin chain is a dev-server and build+ * pipeline that a unit test has no use for.+ */+export default defineConfig({+ resolve: {+ alias: {+ '@': path.resolve(import.meta.dirname, 'src'),+ },+ },+ test: {+ include: ['src/**/*.test.{ts,tsx}'],+ },+});diff --git a/docs/TECH_DEBT.md b/docs/TECH_DEBT.mdindex 65ea89aaa..64a29211e 100644--- a/docs/TECH_DEBT.md+++ b/docs/TECH_DEBT.md@@ -1368,3 +1368,158 @@ shutdown, 2026-09-07.`typecheck`, `check`, `check:workspace`, `check:deps` and `fix` run across thewhole workspace (`pnpm -r` / no filter) and name no specific package, so theyare not in this table.++## Test split (M12-011)++Measured on this box (4 cores, local Postgres/ClickHouse/Redis) by the agent+implementing M12-011, on 2026-09-07, at HEAD `bcf07cbc` with a clean tree.+Every number below is from a run recorded in this section — none is inherited.++### BEFORE++**`pnpm test`** (`vitest run`, root `vitest.workspace.ts` = `['packages/*','apps/*','!apps/start']`):+**7 files, 178 tests, 178 passed, 0 failed, 0 skipped — 10.19s.**++| Workspace | Files | Tests | Runner |+|---|---:|---:|---|+| `@openpanel/db` | 4 | 101 | vitest (own `vitest.config.ts` → `vitest.shared.ts`) |+| `@openpanel/api` | 1 | 13 | vitest (own `vitest.config.ts` → `vitest.shared.ts`) |+| `@openpanel/redis` | 1 | 29 | vitest, **root config only** — no per-package config, no `test` script, no `vitest` devDependency |+| `@openpanel/payments` | 1 | 35 | vitest, **root config only** — same |+| **total** | **7** | **178** | |++The task survey recorded db (5 files) and api (1) as "the only vitest suites+left". That is wrong in both directions: db has **4** test files, not 5, and+`packages/redis` + `packages/payments` are two more vitest suites, 64 tests+between them, which only ever run because the root workspace globs `packages/*`+and the root manifest carries the `vitest` devDependency. Neither is inside+M12-011's scope globs. See *The redis/payments constraint* below.++**`cd packages/core && bun test`** (bare, as the verification list spells it —+the package's own script is `bun test --isolate`):+**154 files, 1487 tests, 1475 pass / 12 skip / 0 fail — 45.82s.**++**`apps/start`**: `src/utils/math.test.ts`, **1 file, 2 tests, run by nothing.**+Measured, not assumed, in both directions:++- `pnpm --filter start test` → prints nothing, **exit 0** (pnpm treats a missing+ script in a filtered run as a no-op, so this reads green while testing zero).+- `cd apps/start && pnpm run test` → `[ERR_PNPM_NO_SCRIPT] Missing script: test`,+ exit 1.+- the root workspace file negates `apps/start`, so `pnpm test` never sees it.++### AFTER++Same box, same day, tree as this task leaves it. `pnpm test` is now a chain of+five `&&`-joined legs (root `package.json`); it exited **0**.++| Suite | Runner | Files | Tests | Result | Wall |+|---|---|---:|---:|---|---:|+| `@openpanel/core` | `bun test --isolate` | 154 | 1487 | 1475 pass / 12 skip / 0 fail | 88.12s |+| `@openpanel/db` | `bun test --isolate` | 4 | 101 | 101 pass / 0 fail | 10.47s |+| `@openpanel/api` | `bun test --isolate` | 1 | 13 | 13 pass / 0 fail | 4.40s |+| `apps/start` | `vitest run` (own config) | 1 | 2 | 2 pass | 1.22s |+| `redis` + `payments` | root `vitest run` | 2 | 64 | 64 pass | 0.44s |+| **`pnpm test` total** | | **162** | **1667** | **RC 0** | |++Per suite, before → after. Nothing shrank:++| Suite | Files before → after | Tests before → after |+|---|---|---|+| `@openpanel/db` | 4 → 4 | 101 → 101 |+| `@openpanel/api` | 1 → 1 | 13 → 13 |+| `@openpanel/redis` | 1 → 1 | 29 → 29 |+| `@openpanel/payments` | 1 → 1 | 35 → 35 |+| `@openpanel/core` | 154 → 154 | 1487 → 1487 (now **inside** `pnpm test`; before, only reachable by `cd`) |+| `apps/start` | 0 running → 1 | 0 running → 2 |+| **`pnpm test`** | **7 → 162** | **178 → 1667** |++The two `+` deltas are the point of the task: `packages/core`'s 1487 tests and+`apps/start`'s 2 were both invisible to `pnpm test` (and therefore to+`full.sh`) and now are not. No test was weakened, skipped or deleted — the+per-suite rows are equal everywhere else.++Standalone, as the verification list spells them:++| Command | Result | Wall |+|---|---|---:|+| `pnpm install --frozen-lockfile` | up to date, RC 0 | 0.4s |+| `cd packages/db && bun test` (bare) | 4 files, 101 pass / 0 fail / 0 skip | 2.74s |+| `cd apps/api && bun test` (bare) | 1 file, 13 pass / 0 fail | 3.77s |+| `cd apps/start && pnpm run test` | 1 file, 2 pass | 1.22s |+| `cd packages/core && bun test` (bare) | 154 files, 1475 pass / 12 skip / 0 fail | 47.34s |+| `pnpm run typecheck` | 17 passes, 0 fails, RC 0 | |+| `verification/full.sh` | **FULL: green**, RC 0, zero `FAIL:`, zero `BLOCKED`, goldens `137/137` | |++### What the preload had to do that `globalSetup` did not++`bunfig.toml`'s `[test] preload` has no once-per-run mode. Measured on Bun+1.4.0 in `packages/db` (4 test files): bare `bun test` → **1** preload;+`bun test --isolate` → **4** preloads, all in **one pid**, strictly sequential;+`bun test --parallel=4` → 4 preloads across 3 pids. Under `--isolate` neither+`globalThis` nor `process.env` survives from one preload to the next, so there+is no in-process channel to dedupe through — the only workable shape is the one+the ADR-010 note asked for: idempotent, and serialised by that sequencing.+`test/bun-preload.ts` is therefore run per file, and each run costs (measured+once, warm): import 333ms, `bootstrapTestDatabases` 1190ms, fixture load+1102ms, teardown 1045ms. That is where `packages/db`'s 2.7s bare run becomes+10.5s under `--isolate`.++Two things the move surfaced, neither of them a weakened test:++- **`pinTestDatabases()` is called twice**, at preload and again inside the+ `afterAll` teardown — exactly as `test/global-setup.ts` called it in both+ `setup` and `teardown`. vitest ran teardown in the parent process, which no+ test could reach; bun runs it in the test file's own realm, *after*+ `sql.round-robin.clickhouse.test.ts` has deliberately repointed+ `CLICKHOUSE_URL` at a dead node. Without the re-pin the teardown's+ `DELETE FROM ...` goes to `127.0.0.1:1` and the hook fails.+- **`sql.round-robin.clickhouse.test.ts` now restores `CLICKHOUSE_URL`** after+ the client module has read it. Under a bare `bun test` all four files share+ one global, and the dead-node-first URL leaked into+ `sql.clickhouse.test.ts`'s reachability probe: **22 of its tests silently+ skipped** (`79 pass / 22 skip`) before the restore, 101/101 after. This is one+ of the three coupling hazards ADR-010 named when it chose `--isolate`; the+ restore makes both modes agree.++### bun:test types the assertion, vitest did not++Two edits were type-level only; no assertion changed.++- `bun-types` (`1.4.0`, pinned as core pins it) joins `packages/db` and+ `apps/api` devDependencies, and each `tsconfig.json` names it in `types`+ (`bun:test` is declared nowhere else). ADR-017 row 7 authorises this addition.+- bun's `expect` has an `(actual?: never) => Matchers<undefined>` overload,+ which makes the argument position a **contextual inference site**.+ `sql.clickhouse.test.ts`'s local `value<T>()` helper, called bare, therefore+ resolved `T` to `never` and every `toBe` below it failed to compile; it now+ returns `unknown`. And `expect(config.ROLE).toBe(role)` in `env.test.ts`+ needs `as const` on the literal array, because bun's `toBe(expected: T)` is+ typed where vitest's was `any`.++### The redis/payments constraint — read this before deleting more vitest++The task's removal criterion is conditional: the root vitest artefacts go+"when nothing there uses them any more". Two suites still do.+`packages/redis/cachable.test.ts` and+`packages/payments/src/subscription-state.test.ts` have **no `test` script and+no `vitest` devDependency of their own** — they ran only because the root+workspace globbed `packages/*` and the root manifest carried `vitest`. Neither+package is inside M12-011's scope globs, so converting them was not this task's+to do. Deleting the root `vitest` devDependency and `vitest.workspace.ts`+anyway would have dropped 64 passing tests out of `pnpm test`, which the+before/after table above exists to prevent.++So: `vitest.config.ts`, `vitest.shared.ts`, `test/global-setup.ts`,+`test/test-setup.ts`, `packages/core/vitest.config.ts`,+`packages/db/vitest.config.ts` and `apps/api/vitest.config.ts` are **deleted**,+and `apps/api`'s `vitest ^1.0.0` devDependency with them.+`vitest.workspace.ts` survives, rewritten from a glob to the explicit list+`['packages/redis', 'packages/payments']`, and the root `vitest` devDependency+survives to run it. **Next step, when someone owns those two packages:** port+both to `bun:test`, delete `vitest.workspace.ts` and the root `vitest`+devDependency, and drop the last `&& vitest run` from the root `test` script.++Also left alone, out of scope: `CLAUDE.md:31` and `.claude/CLAUDE.md:25` still+describe `pnpm test` as "vitest run — packages/* and apps/* (excluding+apps/start, packages/core)", which this task made false.diff --git a/package.json b/package.jsonindex c2271226c..cab4cabe6 100644--- a/package.json+++ b/package.json@@ -7,7 +7,7 @@"author": "Carl-Gerhard Lindesvärd","packageManager": "[email protected]","scripts": {- "test": "vitest run",+ "test": "pnpm --filter @openpanel/core run test && pnpm --filter @openpanel/db run test && pnpm --filter @openpanel/api run test && pnpm --filter start run test && vitest run","gen:bots": "pnpm -r --filter core gen:bots","gen:referrers": "pnpm -r --filter core gen:referrers","dock:up": "docker compose up -d",diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.tsdeleted file mode 100644index 9c9f79b81..000000000--- a/packages/core/vitest.config.ts+++ /dev/null@@ -1,8 +0,0 @@-import { defineConfig } from 'vitest/config';--// core's tests are bun:test (ADR-010) and vitest cannot import 'bun:test'.-// The root vitest workspace globs `packages/*`, so this package opts itself-// out here rather than at the root. Run them with `bun test --isolate`.-export default defineConfig({- test: { include: [] },-});diff --git a/packages/db/bunfig.toml b/packages/db/bunfig.tomlnew file mode 100644index 000000000..e5b825517--- /dev/null+++ b/packages/db/bunfig.toml@@ -0,0 +1,12 @@+# `bun test` configuration for @openpanel/db.++[test]+# Runs once per test FILE under `--isolate`, not once per run — `bun test` has+# no `globalSetup`. The preload is the successor to `test/global-setup.ts`:+# it pins DATABASE_URL / CLICKHOUSE_URL at the ISOLATED test databases and+# bootstraps them. Shared with apps/api; both must stay idempotent.+preload = ["../../test/bun-preload.ts"]++# --isolate is chosen deliberately (ADR-010) and it CANNOT be set here: on Bun+# 1.4.0 `[test] isolate` is silently ignored, as is any unknown key in this+# table. The flag lives on the `test` script in package.json.diff --git a/packages/db/package.json b/packages/db/package.jsonindex 431c09b31..654678339 100644--- a/packages/db/package.json+++ b/packages/db/package.json@@ -10,7 +10,7 @@"migrate:deploy:db": "pnpm with-env prisma migrate deploy","migrate:deploy": "pnpm migrate:deploy:db && pnpm migrate:deploy:code","duplicate-events": "pnpm with-env jiti ./scripts/find-duplicate-events.ts",- "test": "vitest run",+ "test": "bun test --isolate","typecheck": "tsc --noEmit","with-env": "dotenv -e ../../.env -c --"},@@ -30,6 +30,7 @@"devDependencies": {"@openpanel/tsconfig": "workspace:*","@types/node": "catalog:",+ "bun-types": "1.4.0","prisma": "^6.14.0","typescript": "catalog:"}diff --git a/packages/db/src/clickhouse/round-robin.test.ts b/packages/db/src/clickhouse/round-robin.test.tsindex 07bdb325d..73d0faba4 100644--- a/packages/db/src/clickhouse/round-robin.test.ts+++ b/packages/db/src/clickhouse/round-robin.test.ts@@ -1,4 +1,4 @@-import { describe, expect, it } from 'vitest';+import { describe, expect, it } from 'bun:test';import {type ErrorClass,classifyError,diff --git a/packages/db/src/clickhouse/sql.clickhouse.test.ts b/packages/db/src/clickhouse/sql.clickhouse.test.tsindex 5caaf8f75..467c06571 100644--- a/packages/db/src/clickhouse/sql.clickhouse.test.ts+++ b/packages/db/src/clickhouse/sql.clickhouse.test.ts@@ -1,4 +1,4 @@-import { describe, expect, it } from 'vitest';+import { describe, expect, it } from 'bun:test';import { sql } from './sql';/**@@ -115,11 +115,20 @@ const describeAgainstClickhouse = describe.skipIf(!clickhouseReachable);const escapeRegExp = (literal: string) =>literal.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');-const value = async <T>(+/**+ * Returns `unknown` rather than a generic `T` on purpose. bun:test's `expect`+ * has an `(actual?: never)` overload, which makes the argument position a+ * contextual inference site: a generic helper called bare there resolves its+ * parameter to `never`, and every `toBe(...)` below then fails to compile+ * against `Matchers<undefined>`. vitest's `expect(actual: any)` applied no+ * such pressure. Each assertion states the expected value itself, so nothing+ * is lost by widening here.+ */+const value = async (query: Parameters<typeof chQuery>[0],settings?: Parameters<typeof chQuery>[1]-) => {- const rows = await chQuery<{ value: T }>(query, settings);+): Promise<unknown> => {+ const rows = await chQuery<{ value: unknown }>(query, settings);return rows[0]?.value;};diff --git a/packages/db/src/clickhouse/sql.round-robin.clickhouse.test.ts b/packages/db/src/clickhouse/sql.round-robin.clickhouse.test.tsindex 26cd38191..34eb3629b 100644--- a/packages/db/src/clickhouse/sql.round-robin.clickhouse.test.ts+++ b/packages/db/src/clickhouse/sql.round-robin.clickhouse.test.ts@@ -1,4 +1,4 @@-import { describe, expect, it } from 'vitest';+import { describe, expect, it } from 'bun:test';import { sql } from './sql';/**@@ -58,6 +58,9 @@ async function deadNodeIsRefused(): Promise<boolean> {const clickhouseReachable = await bootstrapTestDatabase();const failoverIsReal = await deadNodeIsRefused();+/** What the preload pinned, so the mutation below can be undone. */+const PINNED_CLICKHOUSE_URL = process.env.CLICKHOUSE_URL;+// ./client reads these once, at module evaluation.process.env.CLICKHOUSE_URL = `${DEAD_NODE_URL}/${CLICKHOUSE_TEST_DATABASE},${LIVE_NODE_URL}`;process.env.CLICKHOUSE_REQUEST_TIMEOUT_MS = String(@@ -69,6 +72,12 @@ process.env.CLICKHOUSE_UNHEALTHY_MARK_MS = '0';const { chQuery, chQueryWithMeta } = await import('./client');+// The client has read them; put the process back the way the preload left it.+// Under `--isolate` nothing else can see this realm, but a bare `bun test`+// shares one global across files and the dead-node-first URL would then reach+// whichever file evaluates next — silently skipping its ClickHouse suite.+process.env.CLICKHOUSE_URL = PINNED_CLICKHOUSE_URL;+const HOSTILE = `it's a "quoted" \\ backslash {p1:String} }brace{`;const describeAgainstClickhouse = describe.skipIf(diff --git a/packages/db/src/clickhouse/sql.test.ts b/packages/db/src/clickhouse/sql.test.tsindex 08e315c05..add927154 100644--- a/packages/db/src/clickhouse/sql.test.ts+++ b/packages/db/src/clickhouse/sql.test.ts@@ -1,4 +1,4 @@-import { describe, expect, it } from 'vitest';+import { describe, expect, it } from 'bun:test';import { type SqlFragment, SqlIdentifierError, sql, toStatement } from './sql';describe('sql tag — slot typing (R1)', () => {diff --git a/packages/db/tsconfig.json b/packages/db/tsconfig.jsonindex f3ed8e8e0..52cbb6d5f 100644--- a/packages/db/tsconfig.json+++ b/packages/db/tsconfig.json@@ -6,7 +6,11 @@"@/*": ["./src/*"]},"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",- "strictNullChecks": true+ "strictNullChecks": true,+ // `bun test` is the runner (ADR-010): the test files import `bun:test`,+ // which only `bun-types` declares. Listing it explicitly opts out of the+ // automatic @types/* sweep, so `node` is named back in.+ "types": ["bun-types", "node"]},"include": [".", "./src/types.ts"],"exclude": ["node_modules"]diff --git a/packages/db/vitest.config.ts b/packages/db/vitest.config.tsdeleted file mode 100644index f87a2039f..000000000--- a/packages/db/vitest.config.ts+++ /dev/null@@ -1,3 +0,0 @@-import { getSharedVitestConfig } from '../../vitest.shared';--export default getSharedVitestConfig({ __dirname });diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex d6829d42c..bd1fcafba 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -117,12 +117,12 @@ importers:'@types/uuid':specifier: ^10.0.0version: 10.0.0+ bun-types:+ specifier: 1.4.0+ version: 1.4.0typescript:specifier: 'catalog:'version: 5.9.3- vitest:- specifier: ^1.0.0- version: 1.6.1(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])apps/public:dependencies:@@ -1034,6 +1034,9 @@ importers:'@types/node':specifier: 'catalog:'version: 24.10.1+ bun-types:+ specifier: 1.4.0+ version: 1.4.0prisma:specifier: ^6.14.0version: 6.14.0([email protected])([email protected])@@ -3082,12 +3085,6 @@ packages:cpu: [ppc64]os: [aix]- '@esbuild/[email protected]':- resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==}- engines: {node: '>=12'}- cpu: [ppc64]- os: [aix]-'@esbuild/[email protected]':resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==}engines: {node: '>=18'}@@ -3118,12 +3115,6 @@ packages:cpu: [arm64]os: [android]- '@esbuild/[email protected]':- resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==}- engines: {node: '>=12'}- cpu: [arm64]- os: [android]-'@esbuild/[email protected]':resolution: {integrity: sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==}engines: {node: '>=18'}@@ -3154,12 +3145,6 @@ packages:cpu: [arm]os: [android]- '@esbuild/[email protected]':- resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==}- engines: {node: '>=12'}- cpu: [arm]- os: [android]-'@esbuild/[email protected]':resolution: {integrity: sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==}engines: {node: '>=18'}@@ -3190,12 +3175,6 @@ packages:cpu: [x64]os: [android]- '@esbuild/[email protected]':- resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==}- engines: {node: '>=12'}- cpu: [x64]- os: [android]-'@esbuild/[email protected]':resolution: {integrity: sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==}engines: {node: '>=18'}@@ -3226,12 +3205,6 @@ packages:cpu: [arm64]os: [darwin]- '@esbuild/[email protected]':- resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==}- engines: {node: '>=12'}- cpu: [arm64]- os: [darwin]-'@esbuild/[email protected]':resolution: {integrity: sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==}engines: {node: '>=18'}@@ -3262,12 +3235,6 @@ packages:cpu: [x64]os: [darwin]- '@esbuild/[email protected]':- resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==}- engines: {node: '>=12'}- cpu: [x64]- os: [darwin]-'@esbuild/[email protected]':resolution: {integrity: sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==}engines: {node: '>=18'}@@ -3298,12 +3265,6 @@ packages:cpu: [arm64]os: [freebsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==}- engines: {node: '>=12'}- cpu: [arm64]- os: [freebsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==}engines: {node: '>=18'}@@ -3334,12 +3295,6 @@ packages:cpu: [x64]os: [freebsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==}- engines: {node: '>=12'}- cpu: [x64]- os: [freebsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==}engines: {node: '>=18'}@@ -3370,12 +3325,6 @@ packages:cpu: [arm64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==}- engines: {node: '>=12'}- cpu: [arm64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==}engines: {node: '>=18'}@@ -3406,12 +3355,6 @@ packages:cpu: [arm]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==}- engines: {node: '>=12'}- cpu: [arm]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==}engines: {node: '>=18'}@@ -3442,12 +3385,6 @@ packages:cpu: [ia32]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==}- engines: {node: '>=12'}- cpu: [ia32]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==}engines: {node: '>=18'}@@ -3478,12 +3415,6 @@ packages:cpu: [loong64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==}- engines: {node: '>=12'}- cpu: [loong64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==}engines: {node: '>=18'}@@ -3514,12 +3445,6 @@ packages:cpu: [mips64el]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==}- engines: {node: '>=12'}- cpu: [mips64el]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==}engines: {node: '>=18'}@@ -3550,12 +3475,6 @@ packages:cpu: [ppc64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==}- engines: {node: '>=12'}- cpu: [ppc64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==}engines: {node: '>=18'}@@ -3586,12 +3505,6 @@ packages:cpu: [riscv64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==}- engines: {node: '>=12'}- cpu: [riscv64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==}engines: {node: '>=18'}@@ -3622,12 +3535,6 @@ packages:cpu: [s390x]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==}- engines: {node: '>=12'}- cpu: [s390x]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==}engines: {node: '>=18'}@@ -3658,12 +3565,6 @@ packages:cpu: [x64]os: [linux]- '@esbuild/[email protected]':- resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==}- engines: {node: '>=12'}- cpu: [x64]- os: [linux]-'@esbuild/[email protected]':resolution: {integrity: sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==}engines: {node: '>=18'}@@ -3712,12 +3613,6 @@ packages:cpu: [x64]os: [netbsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==}- engines: {node: '>=12'}- cpu: [x64]- os: [netbsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==}engines: {node: '>=18'}@@ -3766,12 +3661,6 @@ packages:cpu: [x64]os: [openbsd]- '@esbuild/[email protected]':- resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==}- engines: {node: '>=12'}- cpu: [x64]- os: [openbsd]-'@esbuild/[email protected]':resolution: {integrity: sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==}engines: {node: '>=18'}@@ -3814,12 +3703,6 @@ packages:cpu: [x64]os: [sunos]- '@esbuild/[email protected]':- resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==}- engines: {node: '>=12'}- cpu: [x64]- os: [sunos]-'@esbuild/[email protected]':resolution: {integrity: sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==}engines: {node: '>=18'}@@ -3850,12 +3733,6 @@ packages:cpu: [arm64]os: [win32]- '@esbuild/[email protected]':- resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==}- engines: {node: '>=12'}- cpu: [arm64]- os: [win32]-'@esbuild/[email protected]':resolution: {integrity: sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==}engines: {node: '>=18'}@@ -3886,12 +3763,6 @@ packages:cpu: [ia32]os: [win32]- '@esbuild/[email protected]':- resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==}- engines: {node: '>=12'}- cpu: [ia32]- os: [win32]-'@esbuild/[email protected]':resolution: {integrity: sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==}engines: {node: '>=18'}@@ -3922,12 +3793,6 @@ packages:cpu: [x64]os: [win32]- '@esbuild/[email protected]':- resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==}- engines: {node: '>=12'}- cpu: [x64]- os: [win32]-'@esbuild/[email protected]':resolution: {integrity: sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==}engines: {node: '>=18'}@@ -9426,9 +9291,6 @@ packages:vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0vue: ^3.2.25- '@vitest/[email protected]':- resolution: {integrity: sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==}-'@vitest/[email protected]':resolution: {integrity: sha512-7FTQQuuLKmN1Ig/h+h/GO+44Q1IlglPlR2es4ab7Yvfx+Uk5xsv+Ykk+MEt/M2Yn/xGmzaLKxGw2lgy2bwuYqg==}@@ -9446,27 +9308,15 @@ packages:'@vitest/[email protected]':resolution: {integrity: sha512-i6FDiBeJUGLDKADw2Gb01UtUNb12yyXAqC/mmRWuYl+m/U9GS7s8us5ONmGkGpUUo7/iAYzI2ePVfOZTYvUifA==}- '@vitest/[email protected]':- resolution: {integrity: sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==}-'@vitest/[email protected]':resolution: {integrity: sha512-Tae+ogtlNfFei5DggOsSUvkIaSuVywujMj6HzR97AHK6XK8i3BuVyIifWAm/sE3a15lF5RH9yQIrbXYuo0IFyA==}- '@vitest/[email protected]':- resolution: {integrity: sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==}-'@vitest/[email protected]':resolution: {integrity: sha512-XVa5OPNTYUsyqG9skuUkFzAeFnEzDp8hQu7kZ0N25B1+6KjGm4hWLtURyBbsIAOekfWQ7Wuz/N/XXzgYO3deWQ==}- '@vitest/[email protected]':- resolution: {integrity: sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==}-'@vitest/[email protected]':resolution: {integrity: sha512-x6w+ctOEmEXdWaa6TO4ilb7l9DxPR5bwEb6hILKuxfU1NqWT2mpJD9NJN7t3OTfxmVlOMrvtoFJGdgyzZ605lQ==}- '@vitest/[email protected]':- resolution: {integrity: sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==}-'@vitest/[email protected]':resolution: {integrity: sha512-2Ltrpht4OmHO9+c/nmHtF09HWiyWdworqnHIwjfvDyWjuwKbdkcS9AnhsDn+8E2RM4x++foD1/tNuLPVvWG1Rg==}@@ -9610,10 +9460,6 @@ packages:peerDependencies:acorn: ^6.0.0 || ^7.0.0 || ^8.0.0- resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}- engines: {node: '>=0.4.0'}-resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==}engines: {node: '>=0.4.0'}@@ -9781,9 +9627,6 @@ packages:resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==}- resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}-resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}engines: {node: '>=12'}@@ -10218,10 +10061,6 @@ packages:resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}- resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==}- engines: {node: '>=4'}-resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==}engines: {node: '>=12'}@@ -10265,9 +10104,6 @@ packages:resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==}- resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==}-resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}engines: {node: '>= 16'}@@ -11044,10 +10880,6 @@ packages:resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==}- resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==}- engines: {node: '>=6'}-resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}engines: {node: '>=6'}@@ -11174,10 +11006,6 @@ packages:resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}- resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}-resolution: {integrity: sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==}engines: {node: '>=0.3.1'}@@ -11460,11 +11288,6 @@ packages:engines: {node: '>=12'}hasBin: true- resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}- engines: {node: '>=12'}- hasBin: true-resolution: {integrity: sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==}engines: {node: '>=18'}@@ -12223,9 +12046,6 @@ packages:resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==}engines: {node: '>=18'}- resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==}-resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}engines: {node: '>= 0.4'}@@ -13523,10 +13343,6 @@ packages:resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==}engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}- resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==}- engines: {node: '>=14'}-resolution: {integrity: sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==}engines: {node: '>=14'}@@ -13642,9 +13458,6 @@ packages:resolution: {integrity: sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==}- resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}-resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==}@@ -14786,10 +14599,6 @@ packages:resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}engines: {node: '>=10'}- resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==}- engines: {node: '>=18'}-resolution: {integrity: sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw==}engines: {node: '>=20'}@@ -14960,9 +14769,6 @@ packages:resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}- resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}-resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==}engines: {node: '>= 14.16'}@@ -16720,9 +16526,6 @@ packages:resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==}engines: {node: '>=14.16'}- resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==}-resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==}@@ -16992,10 +16795,6 @@ packages:resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==}engines: {node: '>=12.0.0'}- resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==}- engines: {node: '>=14.0.0'}-resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==}engines: {node: ^18.0.0 || >=20.0.0}@@ -17004,10 +16803,6 @@ packages:resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==}engines: {node: '>=14.0.0'}- resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==}- engines: {node: '>=14.0.0'}-resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==}engines: {node: '>=14.0.0'}@@ -17159,10 +16954,6 @@ packages:resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==}engines: {node: '>=4'}- resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==}- engines: {node: '>=4'}-resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==}engines: {node: '>=10'}@@ -17760,11 +17551,6 @@ packages:peerDependencies:vite: ^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0- resolution: {integrity: sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==}- engines: {node: ^18.0.0 || >=20.0.0}- hasBin: true-resolution: {integrity: sha512-uHV4plJ2IxCl4u1up1FQRrqclylKAogbtBfOTwcuJ28xFi+89PZ57BRh+naIRvH70HPwxy5QHYzg1OrEaC7AbA==}engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}@@ -17836,37 +17622,6 @@ packages:vite:optional: true- resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==}- engines: {node: ^18.0.0 || >=20.0.0}- hasBin: true- peerDependencies:- '@types/node': ^18.0.0 || >=20.0.0- less: '*'- lightningcss: ^1.21.0- sass: '*'- sass-embedded: '*'- stylus: '*'- sugarss: '*'- terser: ^5.4.0- peerDependenciesMeta:- '@types/node':- optional: true- less:- optional: true- lightningcss:- optional: true- sass:- optional: true- sass-embedded:- optional: true- stylus:- optional: true- sugarss:- optional: true- terser:- optional: true-resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==}engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}@@ -18003,31 +17758,6 @@ packages:vite:optional: true- resolution: {integrity: sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==}- engines: {node: ^18.0.0 || >=20.0.0}- hasBin: true- peerDependencies:- '@edge-runtime/vm': '*'- '@types/node': ^18.0.0 || >=20.0.0- '@vitest/browser': 1.6.1- '@vitest/ui': 1.6.1- happy-dom: '*'- jsdom: '*'- peerDependenciesMeta:- '@edge-runtime/vm':- optional: true- '@types/node':- optional: true- '@vitest/browser':- optional: true- '@vitest/ui':- optional: true- happy-dom:- optional: true- jsdom:- optional: true-resolution: {integrity: sha512-188iM4hAHQ0km23TN/adso1q5hhwKqUpv+Sd6p5sOuh6FhQnRNW3IsiIpvxqahtBabsJ2SLZgmGSpcYK4wQYJw==}engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}@@ -21989,9 +21719,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22007,9 +21734,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22025,9 +21749,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22043,9 +21764,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22061,9 +21779,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22079,9 +21794,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22097,9 +21809,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22115,9 +21824,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22133,9 +21839,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22151,9 +21854,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22169,9 +21869,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22187,9 +21884,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22205,9 +21899,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22223,9 +21914,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22241,9 +21929,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22259,9 +21944,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22277,9 +21959,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22304,9 +21983,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22331,9 +22007,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22355,9 +22028,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22373,9 +22043,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22391,9 +22058,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -22409,9 +22073,6 @@ snapshots:'@esbuild/[email protected]':optional: true- '@esbuild/[email protected]':- optional: true-'@esbuild/[email protected]':optional: true@@ -29053,12 +28714,6 @@ snapshots:vite: 7.3.0(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vue: 3.5.25([email protected])- '@vitest/[email protected]':- dependencies:- '@vitest/spy': 1.6.1- '@vitest/utils': 1.6.1- chai: 4.5.0-'@vitest/[email protected]':dependencies:'@vitest/spy': 3.1.3@@ -29078,44 +28733,21 @@ snapshots:dependencies:tinyrainbow: 2.0.0- '@vitest/[email protected]':- dependencies:- '@vitest/utils': 1.6.1- p-limit: 5.0.0- pathe: 1.1.2-'@vitest/[email protected]':dependencies:'@vitest/utils': 3.1.3pathe: 2.0.3- '@vitest/[email protected]':- dependencies:- magic-string: 0.30.21- pathe: 1.1.2- pretty-format: 29.7.0-'@vitest/[email protected]':dependencies:'@vitest/pretty-format': 3.1.3magic-string: 0.30.21pathe: 2.0.3- '@vitest/[email protected]':- dependencies:- tinyspy: 2.2.1-'@vitest/[email protected]':dependencies:tinyspy: 3.0.2- '@vitest/[email protected]':- dependencies:- diff-sequences: 29.6.3- estree-walker: 3.0.3- loupe: 2.3.7- pretty-format: 29.7.0-'@vitest/[email protected]':dependencies:'@vitest/pretty-format': 3.1.3@@ -29325,8 +28957,6 @@ snapshots:dependencies:acorn: 8.15.0- [email protected]: {}-@@ -29493,8 +29123,6 @@ snapshots:- [email protected]: {}-@@ -29993,7 +29621,7 @@ snapshots:dependencies:- '@types/node': 20.19.24+ '@types/node': 24.10.1dependencies:@@ -30146,16 +29774,6 @@ snapshots:- dependencies:- assertion-error: 1.1.0- check-error: 1.0.3- deep-eql: 4.1.4- get-func-name: 2.0.2- loupe: 2.3.7- pathval: 1.1.1- type-detect: 4.1.0-dependencies:assertion-error: 2.0.1@@ -30195,10 +29813,6 @@ snapshots:- dependencies:- get-func-name: 2.0.2-@@ -31013,10 +30627,6 @@ snapshots:dependencies:character-entities: 2.0.2- dependencies:- type-detect: 4.1.0-@@ -31144,8 +30754,6 @@ snapshots:dependencies:dequal: 2.0.3- [email protected]: {}-@@ -31534,32 +31142,6 @@ snapshots:'@esbuild/win32-ia32': 0.19.12'@esbuild/win32-x64': 0.19.12- optionalDependencies:- '@esbuild/aix-ppc64': 0.21.5- '@esbuild/android-arm': 0.21.5- '@esbuild/android-arm64': 0.21.5- '@esbuild/android-x64': 0.21.5- '@esbuild/darwin-arm64': 0.21.5- '@esbuild/darwin-x64': 0.21.5- '@esbuild/freebsd-arm64': 0.21.5- '@esbuild/freebsd-x64': 0.21.5- '@esbuild/linux-arm': 0.21.5- '@esbuild/linux-arm64': 0.21.5- '@esbuild/linux-ia32': 0.21.5- '@esbuild/linux-loong64': 0.21.5- '@esbuild/linux-mips64el': 0.21.5- '@esbuild/linux-ppc64': 0.21.5- '@esbuild/linux-riscv64': 0.21.5- '@esbuild/linux-s390x': 0.21.5- '@esbuild/linux-x64': 0.21.5- '@esbuild/netbsd-x64': 0.21.5- '@esbuild/openbsd-x64': 0.21.5- '@esbuild/sunos-x64': 0.21.5- '@esbuild/win32-arm64': 0.21.5- '@esbuild/win32-ia32': 0.21.5- '@esbuild/win32-x64': 0.21.5-optionalDependencies:'@esbuild/aix-ppc64': 0.25.11@@ -32584,8 +32166,6 @@ snapshots:- [email protected]: {}-dependencies:call-bind-apply-helpers: 1.0.2@@ -34065,11 +33645,6 @@ snapshots:- dependencies:- mlly: 1.8.0- pkg-types: 1.3.1-dependencies:mlly: 1.8.0@@ -34171,10 +33746,6 @@ snapshots:- dependencies:- get-func-name: 2.0.2-@@ -36077,10 +35648,6 @@ snapshots:dependencies:yocto-queue: 0.1.0- dependencies:- yocto-queue: 1.2.2-dependencies:yocto-queue: 1.2.2@@ -36252,8 +35819,6 @@ snapshots:- [email protected]: {}-@@ -38427,10 +37992,6 @@ snapshots:- dependencies:- js-tokens: 9.0.1-dependencies:js-tokens: 9.0.1@@ -38743,14 +38304,10 @@ snapshots:fdir: 6.5.0([email protected])picomatch: 4.0.4- [email protected]: {}-- [email protected]: {}-@@ -38877,8 +38434,6 @@ snapshots:- [email protected]: {}-@@ -39436,24 +38991,6 @@ snapshots:dependencies:vite: 7.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- [email protected](@types/[email protected])([email protected])([email protected])([email protected]):- dependencies:- cac: 6.7.14- debug: 4.4.3([email protected])- pathe: 1.1.2- picocolors: 1.1.1- transitivePeerDependencies:- - '@types/node'- - less- - lightningcss- - sass- - sass-embedded- - stylus- - sugarss- - supports-color- - terser-[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:cac: 6.7.14@@ -39548,17 +39085,6 @@ snapshots:- supports-color- typescript- dependencies:- esbuild: 0.21.5- postcss: 8.5.6- rollup: 4.52.5- optionalDependencies:- '@types/node': 24.10.1- fsevents: 2.3.3- lightningcss: 1.30.2- terser: 5.27.1-[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:esbuild: 0.25.11@@ -39618,41 +39144,6 @@ snapshots:optionalDependencies:vite: 7.3.5(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])- [email protected](@types/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]):- dependencies:- '@vitest/expect': 1.6.1- '@vitest/runner': 1.6.1- '@vitest/snapshot': 1.6.1- '@vitest/spy': 1.6.1- '@vitest/utils': 1.6.1- acorn-walk: 8.3.2- chai: 4.5.0- debug: 4.4.3([email protected])- execa: 8.0.1- local-pkg: 0.5.1- magic-string: 0.30.21- pathe: 1.1.2- picocolors: 1.1.1- std-env: 3.10.0- strip-literal: 2.1.1- tinybench: 2.9.0- tinypool: 0.8.4- vite-node: 1.6.1(@types/[email protected])([email protected])([email protected])([email protected])- why-is-node-running: 2.3.0- optionalDependencies:- '@types/node': 24.10.1- jsdom: 26.1.0([email protected])- transitivePeerDependencies:- - less- - lightningcss- - sass- - sass-embedded- - stylus- - sugarss- - supports-color- - terser-[email protected](@types/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:'@vitest/expect': 3.1.3diff --git a/test/bun-preload.ts b/test/bun-preload.tsnew file mode 100644index 000000000..534c796f1--- /dev/null+++ b/test/bun-preload.ts@@ -0,0 +1,73 @@+/**+ * `bun test` preload for `packages/db` and `apps/api` — the successor to+ * `test/global-setup.ts`, which vitest ran once per run and bun has no+ * equivalent for.+ *+ * Two jobs, in this order:+ *+ * 1. **Pin the infrastructure URLs at the ISOLATED test databases**+ * (TESTFIX-001). This is a safety property, not a convenience: no test may+ * reach the application's own `openpanel` databases, which on this box hold+ * a copy of production — fixture teardown there mutates the dataset the+ * migration goldens are diffed against, and a delete against a 318M-row+ * table does not finish inside a test timeout. `test/databases.ts` is the+ * single source of truth for the strings.+ * 2. **Bootstrap those databases and load the shared fixture**, tearing it+ * down again when the file's tests finish.+ *+ * `preload` runs once per test FILE under `--isolate` (measured on Bun 1.4.0:+ * 4 files, 4 preloads, one pid, strictly sequential — and neither `globalThis`+ * nor `process.env` survives between them, so there is no in-process channel+ * to dedupe through). Everything here is therefore written to be idempotent+ * and is serialised by that sequencing: `bootstrapTestDatabases` is idempotent+ * by construction, and setup/teardown are paired around a single file's tests+ * so no file can observe another's teardown.+ *+ * The imports below are deliberately dynamic and deliberately below the env+ * pins: `packages/db`'s ClickHouse module constructs its clients at import+ * time, so a static import would capture the pre-pin `CLICKHOUSE_URL`.+ */++import { afterAll } from 'bun:test';+import {+ TEST_CLICKHOUSE_URL,+ TEST_DATABASE_URL,+ TEST_REDIS_URL,+} from './databases';++export const TEST_PROJECT_ID = 'integration-test';+export const TEST_ORG_ID = 'integration-org';++/**+ * Called twice, exactly as `test/global-setup.ts` called it in both `setup`+ * and `teardown`. The second call is not redundant: a test file may rewrite+ * `CLICKHOUSE_URL` for its own purposes — `sql.round-robin.clickhouse.test.ts`+ * points it at a dead node first, on purpose — and the fixture helpers read+ * the variable at call time, so teardown must re-pin before it deletes rows.+ */+function pinTestDatabases() {+ process.env.DATABASE_URL = TEST_DATABASE_URL;+ process.env.CLICKHOUSE_URL = TEST_CLICKHOUSE_URL;+ process.env.REDIS_URL = TEST_REDIS_URL;+ process.env.SELF_HOSTED = 'true';+}++pinTestDatabases();++const { bootstrapTestDatabases } = await import('./bootstrap-databases');+const {+ setupFixtures,+ setupPostgresFixtures,+ teardownFixtures,+ teardownPostgresFixtures,+} = await import('./fixtures');++await bootstrapTestDatabases();+await setupPostgresFixtures(TEST_PROJECT_ID, TEST_ORG_ID);+await setupFixtures(TEST_PROJECT_ID);++afterAll(async () => {+ pinTestDatabases();+ await teardownFixtures(TEST_PROJECT_ID);+ await teardownPostgresFixtures(TEST_PROJECT_ID, TEST_ORG_ID);+});diff --git a/test/global-setup.ts b/test/global-setup.tsdeleted file mode 100644index c12768a76..000000000--- a/test/global-setup.ts+++ /dev/null@@ -1,32 +0,0 @@-import { bootstrapTestDatabases } from './bootstrap-databases';-import { TEST_CLICKHOUSE_URL, TEST_DATABASE_URL } from './databases';-import {- setupFixtures,- setupPostgresFixtures,- teardownFixtures,- teardownPostgresFixtures,-} from './fixtures';--export { FIXTURE } from './fixtures';-export const TEST_PROJECT_ID = 'integration-test';-export const TEST_ORG_ID = 'integration-org';--// globalSetup runs in the parent process before vitest workers start,-// so vitest's `env` config is not applied — set the same pins explicitly.-function pinTestDatabases() {- process.env.DATABASE_URL = TEST_DATABASE_URL;- process.env.CLICKHOUSE_URL = TEST_CLICKHOUSE_URL;-}--export async function setup() {- pinTestDatabases();- await bootstrapTestDatabases();- await setupPostgresFixtures(TEST_PROJECT_ID, TEST_ORG_ID);- await setupFixtures(TEST_PROJECT_ID);-}--export async function teardown() {- pinTestDatabases();- await teardownFixtures(TEST_PROJECT_ID);- await teardownPostgresFixtures(TEST_PROJECT_ID, TEST_ORG_ID);-}diff --git a/test/test-setup.ts b/test/test-setup.tsdeleted file mode 100644index 056557f80..000000000--- a/test/test-setup.ts+++ /dev/null@@ -1,27 +0,0 @@-/**- * Shared afterAll cleanup registered via setupFiles in vitest.shared.ts.- *- * Closes the ClickHouse keep-alive pool and disconnects Prisma after every- * test file so worker threads can exit cleanly.- *- * Uses dynamic imports + try-catch so this is safe in packages that mock- * these modules or don't use real connections.- */-import { afterAll } from 'vitest';--afterAll(async () => {- await Promise.allSettled([- (async () => {- const { originalCh } = await import(- '../packages/db/src/clickhouse/client'- );- if (typeof originalCh?.close === 'function') {- await originalCh.close();- }- })(),- (async () => {- const { db } = await import('../packages/db/src/prisma-client');- await db.$disconnect();- })(),- ]);-});diff --git a/vitest.config.ts b/vitest.config.tsdeleted file mode 100644index bd99c6f76..000000000--- a/vitest.config.ts+++ /dev/null@@ -1,7 +0,0 @@-import { defineConfig } from 'vitest/config';--export default defineConfig({- test: {- globalSetup: ['./test/global-setup.ts'],- },-});diff --git a/vitest.shared.ts b/vitest.shared.tsdeleted file mode 100644index f16743a34..000000000--- a/vitest.shared.ts+++ /dev/null@@ -1,44 +0,0 @@-import * as path from 'node:path';-import { defineConfig } from 'vitest/config';-import {- TEST_CLICKHOUSE_URL,- TEST_DATABASE_URL,- TEST_REDIS_URL,-} from './test/databases';--// Absolute path to the root test-setup — used as setupFiles so every package-// gets connection-pool cleanup without needing a per-package file.-const rootTestSetup = (dirname: string) => path.resolve(dirname, '../../test/test-setup.ts');--export const getSharedVitestConfig = ({- __dirname: dirname,-}: {- __dirname: string;-}) => {- return defineConfig({- resolve: {- alias: {- '@': path.resolve(dirname, 'src'),- },- },- test: {- setupFiles: [rootTestSetup(dirname)],- env: {- // Always point at the local, ISOLATED test databases — never- // production, and never the application's own databases, regardless- // of .env. See test/databases.ts.- DATABASE_URL: TEST_DATABASE_URL,- CLICKHOUSE_URL: TEST_CLICKHOUSE_URL,- REDIS_URL: TEST_REDIS_URL,- SELF_HOSTED: 'true',- },- include: ['**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],- browser: {- name: 'chromium',- provider: 'playwright',- headless: true,- },- fakeTimers: { toFake: undefined },- },- });-};diff --git a/vitest.workspace.ts b/vitest.workspace.tsindex 1809144db..80eaaadbd 100644--- a/vitest.workspace.ts+++ b/vitest.workspace.ts@@ -1 +1,17 @@-export default ['packages/*', 'apps/*', '!apps/start'];+/**+ * The workspaces that still run on vitest.+ *+ * M12-011 moved `packages/core`, `packages/db` and `apps/api` onto `bun test`+ * (ADR-010) and gave `apps/start` its own vitest config and `test` script, so+ * all four run from their own package. What is left here is the two suites+ * that have never had a `test` script or a `vitest` devDependency of their own+ * and only ever ran because the previous glob was `packages/*`:+ * `packages/redis/cachable.test.ts` (29 tests) and+ * `packages/payments/src/subscription-state.test.ts` (35 tests).+ *+ * Both are outside M12-011's scope. This is an explicit list rather than a+ * glob so that a new package does not silently join the vitest side of the+ * split — the direction of travel is `bun test` (see docs/TECH_DEBT.md,+ * "Test split (M12-011)").+ */+export default ['packages/redis', 'packages/payments'];