@fuzdev/fuz_app 0.174.0 → 0.176.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +3 -2
  2. package/dist/actions/CLAUDE.md +10 -8
  3. package/dist/actions/action_codegen.js +3 -3
  4. package/dist/actions/ws_outbound_writer.d.ts +8 -8
  5. package/dist/actions/ws_outbound_writer.d.ts.map +1 -1
  6. package/dist/actions/ws_outbound_writer.js +8 -11
  7. package/dist/auth/keyring.d.ts +1 -1
  8. package/dist/auth/keyring.js +1 -1
  9. package/dist/db/CLAUDE.md +9 -0
  10. package/dist/db/fact_disk_storage.d.ts +3 -2
  11. package/dist/db/fact_disk_storage.d.ts.map +1 -1
  12. package/dist/db/fact_disk_storage.js +2 -1
  13. package/dist/db/postgres_url.d.ts +95 -0
  14. package/dist/db/postgres_url.d.ts.map +1 -0
  15. package/dist/db/postgres_url.js +167 -0
  16. package/dist/dev/setup.d.ts +101 -33
  17. package/dist/dev/setup.d.ts.map +1 -1
  18. package/dist/dev/setup.js +174 -71
  19. package/dist/env/dotenv.d.ts +1 -1
  20. package/dist/env/dotenv.d.ts.map +1 -1
  21. package/dist/env/dotenv.js +2 -3
  22. package/dist/http/CLAUDE.md +1 -1
  23. package/dist/http/body_limit.d.ts +10 -16
  24. package/dist/http/body_limit.d.ts.map +1 -1
  25. package/dist/http/body_limit.js +10 -16
  26. package/dist/runtime/deps.d.ts +81 -45
  27. package/dist/runtime/deps.d.ts.map +1 -1
  28. package/dist/runtime/deps.js +7 -2
  29. package/dist/runtime/mock.d.ts +63 -16
  30. package/dist/runtime/mock.d.ts.map +1 -1
  31. package/dist/runtime/mock.js +75 -35
  32. package/dist/runtime/node.d.ts +3 -2
  33. package/dist/runtime/node.d.ts.map +1 -1
  34. package/dist/runtime/node.js +20 -72
  35. package/dist/runtime/process_id.d.ts +24 -0
  36. package/dist/runtime/process_id.d.ts.map +1 -0
  37. package/dist/runtime/process_id.js +27 -0
  38. package/dist/runtime/secure_file.d.ts +8 -30
  39. package/dist/runtime/secure_file.d.ts.map +1 -1
  40. package/dist/runtime/secure_file.js +23 -51
  41. package/dist/server/app_server.d.ts +2 -2
  42. package/dist/server/static.d.ts +1 -1
  43. package/dist/testing/CLAUDE.md +28 -27
  44. package/dist/testing/cross_backend/backend_config.d.ts +7 -7
  45. package/dist/testing/cross_backend/backend_config.d.ts.map +1 -1
  46. package/dist/testing/cross_backend/bench/bench_report.d.ts +2 -2
  47. package/dist/testing/cross_backend/bench/bench_report.js +2 -2
  48. package/dist/testing/cross_backend/body_size_smuggling.d.ts.map +1 -1
  49. package/dist/testing/cross_backend/body_size_smuggling.js +1 -4
  50. package/dist/testing/cross_backend/bootstrap_backend.d.ts +1 -1
  51. package/dist/testing/cross_backend/capabilities.d.ts +2 -2
  52. package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts +2 -2
  53. package/dist/testing/cross_backend/create_cross_backend_global_setup.js +1 -1
  54. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +2 -2
  55. package/dist/testing/cross_backend/default_backend_configs.d.ts +1 -1
  56. package/dist/testing/cross_backend/default_backend_configs.js +4 -4
  57. package/dist/testing/cross_backend/differential.d.ts +2 -2
  58. package/dist/testing/cross_backend/differential.js +6 -6
  59. package/dist/testing/cross_backend/fact_serving.js +1 -1
  60. package/dist/testing/cross_backend/make_cross_backend_project.d.ts +2 -2
  61. package/dist/testing/cross_backend/make_cross_backend_project.js +1 -1
  62. package/dist/testing/cross_backend/origin_conformance.json +1 -1
  63. package/dist/testing/cross_backend/postgres_database.d.ts +7 -21
  64. package/dist/testing/cross_backend/postgres_database.d.ts.map +1 -1
  65. package/dist/testing/cross_backend/postgres_database.js +24 -35
  66. package/dist/testing/cross_backend/testing_reset_actions.js +1 -1
  67. package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
  68. package/dist/testing/cross_backend/testing_server_bun.js +10 -12
  69. package/dist/testing/cross_backend/testing_server_core.d.ts +13 -17
  70. package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
  71. package/dist/testing/cross_backend/testing_server_core.js +1 -1
  72. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts +7 -17
  73. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  74. package/dist/testing/cross_backend/ts_spine_backend_config.js +0 -51
  75. package/dist/testing/cross_backend/ws_outbound_overflow.js +2 -2
  76. package/dist/testing/daemon_info.d.ts +11 -6
  77. package/dist/testing/daemon_info.d.ts.map +1 -1
  78. package/dist/testing/daemon_info.js +11 -8
  79. package/dist/testing/middleware_gate_probes.js +2 -2
  80. package/package.json +11 -16
  81. package/dist/runtime/deno.d.ts +0 -21
  82. package/dist/runtime/deno.d.ts.map +0 -1
  83. package/dist/runtime/deno.js +0 -191
  84. package/dist/testing/cross_backend/testing_server_deno.d.ts +0 -5
  85. package/dist/testing/cross_backend/testing_server_deno.d.ts.map +0 -1
  86. package/dist/testing/cross_backend/testing_server_deno.js +0 -38
@@ -25,8 +25,8 @@ export interface CompareCrossImplOptions {
25
25
  }
26
26
  /**
27
27
  * Welch-test verdict for every non-reference backend vs the reference, per
28
- * scenario. With deno + node + rust and `reference: 'deno'` you get
29
- * `node vs deno` and `rust vs deno` for each scenario.
28
+ * scenario. With node + bun + rust and `reference: 'node'` you get
29
+ * `bun vs node` and `rust vs node` for each scenario.
30
30
  */
31
31
  export declare const compare_cross_impl: (result: CrossImplBenchResult, options?: CompareCrossImplOptions) => Array<CrossImplComparisonEntry>;
32
32
  /**
@@ -17,8 +17,8 @@ export const format_cross_impl_markdown = (result) => result.scenarios
17
17
  .join('\n\n');
18
18
  /**
19
19
  * Welch-test verdict for every non-reference backend vs the reference, per
20
- * scenario. With deno + node + rust and `reference: 'deno'` you get
21
- * `node vs deno` and `rust vs deno` for each scenario.
20
+ * scenario. With node + bun + rust and `reference: 'node'` you get
21
+ * `bun vs node` and `rust vs node` for each scenario.
22
22
  */
23
23
  export const compare_cross_impl = (result, options) => {
24
24
  const reference = options?.reference ?? result.backends[0];
@@ -1 +1 @@
1
- {"version":3,"file":"body_size_smuggling.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/body_size_smuggling.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAuE9B,4EAA4E;AAC5E,MAAM,WAAW,iCAAiC;IACjD,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,wCAAwC,GACpD,SAAS,iCAAiC,KACxC,IA4GF,CAAC"}
1
+ {"version":3,"file":"body_size_smuggling.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/body_size_smuggling.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAoE9B,4EAA4E;AAC5E,MAAM,WAAW,iCAAiC;IACjD,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,eAAO,MAAM,wCAAwC,GACpD,SAAS,iCAAiC,KACxC,IA4GF,CAAC"}
@@ -23,9 +23,6 @@ import '../assert_dev_env.js';
23
23
  * - **Bun** closes at once too, honouring that header. Bun 1.4.3 is the tested
24
24
  * floor: an older Bun kept the connection after the 413 and served the next
25
25
  * request (correctly framed), which fails this suite.
26
- * - **Deno** closes once the whole declared body has arrived, which this
27
- * probe's single write delivers; a client that withholds the body holds a
28
- * Deno connection open, and no request behind the body is served either way.
29
26
  * - **hyper** (the Rust spine) closes at once.
30
27
  *
31
28
  * The oversized body is rejected *with* a 413 on every backend — pinned
@@ -41,7 +38,7 @@ import '../assert_dev_env.js';
41
38
  * request carrying both headers — the shape a request-smuggling attack hands a
42
39
  * server and a proxy that disagree on which one frames the body — with a
43
40
  * `GET` pipelined behind it. What the backends share is the outcome, not the
44
- * status: the request is refused with `400` (the Node, Deno and Bun parsers)
41
+ * status: the request is refused with `400` (the Node and Bun parsers)
45
42
  * or answered as its chunked body reads (hyper, which drops the
46
43
  * `Content-Length`), and either way the server **closes the connection** and
47
44
  * the pipelined request is **never served**. The status of the one response
@@ -9,7 +9,7 @@ import '../assert_dev_env.js';
9
9
  * import {bootstrap_backend} from '@fuzdev/fuz_app/testing/cross_backend/bootstrap_backend.ts';
10
10
  *
11
11
  * export default async function ({provide}) {
12
- * const bootstrapped = await bootstrap_backend(deno_backend_config());
12
+ * const bootstrapped = await bootstrap_backend(node_backend_config());
13
13
  * provide('backend_handle', bootstrapped);
14
14
  * return async () => {
15
15
  * await bootstrapped.teardown();
@@ -135,7 +135,7 @@ export interface BackendCapabilities {
135
135
  * those frames are in the backend's hands before it can have admitted
136
136
  * anything.
137
137
  *
138
- * `true` for Node (`ws`), Deno, and the Rust spine (hyper hands the
138
+ * `true` for Node (`ws`) and the Rust spine (hyper hands the
139
139
  * leftover bytes to the upgraded stream); `false` for a Bun backend that
140
140
  * upgrades after an asynchronous check, as one behind auth does — `Bun.serve`
141
141
  * answers such a request `400` (observed on Bun 1.4.3). A backend
@@ -197,7 +197,7 @@ export interface BackendCapabilities {
197
197
  *
198
198
  * `false` on Node: `@hono/node-ws` writes a refused upgrade to the raw
199
199
  * socket with `Content-Length: 0`, dropping the response body. `true` on
200
- * Deno, Bun, and the Rust spine, which send the response as built.
200
+ * Bun and the Rust spine, which send the response as built.
201
201
  */
202
202
  readonly ws_refusal_body: boolean;
203
203
  /**
@@ -14,10 +14,10 @@ import '../assert_dev_env.js';
14
14
  * ```ts
15
15
  * import {create_cross_backend_global_setup} from
16
16
  * '@fuzdev/fuz_app/testing/cross_backend/create_cross_backend_global_setup.ts';
17
- * import {deno_backend_config, rust_backend_config} from './my_backend_config.js';
17
+ * import {node_backend_config, rust_backend_config} from './my_backend_config.js';
18
18
  *
19
19
  * export default create_cross_backend_global_setup({
20
- * configs: {deno: deno_backend_config, rust: rust_backend_config},
20
+ * configs: {node: node_backend_config, rust: rust_backend_config},
21
21
  * ensure_databases: true,
22
22
  * before_spawn: {rust: () => prepare_cargo_binary(my_cargo_binary)},
23
23
  * });
@@ -6,7 +6,7 @@ import { serialize_bootstrapped_handle } from './setup.js';
6
6
  * Default project-name → backend-name reduction: strips the
7
7
  * `cross_backend_` prefix plus an optional `ts_` discriminator (the TS
8
8
  * canonical backends carry it to distinguish JS runtimes). So
9
- * `cross_backend_ts_deno` → `deno` and `cross_backend_rust` → `rust`.
9
+ * `cross_backend_ts_node` → `node` and `cross_backend_rust` → `rust`.
10
10
  */
11
11
  const DEFAULT_PROJECT_NAME_PREFIX = /^cross_backend_(?:ts_)?/;
12
12
  const default_cross_backend_global_setup_deps = {
@@ -18,10 +18,10 @@ import '../assert_dev_env.js';
18
18
  * ```ts
19
19
  * import {create_dual_spawn_global_setup} from
20
20
  * '@fuzdev/fuz_app/testing/cross_backend/create_dual_spawn_global_setup.ts';
21
- * import {deno_backend_config, rust_backend_config} from './my_backend_config.js';
21
+ * import {node_backend_config, rust_backend_config} from './my_backend_config.js';
22
22
  *
23
23
  * export default create_dual_spawn_global_setup({
24
- * configs: {a: deno_backend_config, b: rust_backend_config},
24
+ * configs: {a: node_backend_config, b: rust_backend_config},
25
25
  * });
26
26
  * ```
27
27
  *
@@ -109,7 +109,7 @@ export interface MakeDefaultTsBackendConfigOptions {
109
109
  readonly daemon_token_dir_env?: string;
110
110
  }
111
111
  /**
112
- * Shared builder for TS-family backends (Deno + Node). Owns the common
112
+ * Shared builder for TS-family backends (Node + Bun). Owns the common
113
113
  * env baseline (NODE_ENV, HOST, PORT, in-memory pglet, cookie keys,
114
114
  * bootstrap token path) so per-backend factories only declare what
115
115
  * genuinely differs.
@@ -4,7 +4,7 @@ import '../assert_dev_env.js';
4
4
  *
5
5
  * Two consumer-facing factories — `make_default_ts_backend_config`
6
6
  * and `make_default_rust_backend_config` — own the common shape
7
- * for the JS-runtime (Deno/Node on V8) and Rust families respectively.
7
+ * for the JS-runtime (Node, Bun) and Rust families respectively.
8
8
  * Per-backend factories in consumer projects compose a small
9
9
  * declaration against one of these and add consumer-specific env vars
10
10
  * via `extra_env`.
@@ -113,13 +113,13 @@ export const ts_default_capabilities = Object.freeze({
113
113
  // `GET /api/account/status` is bundled into `create_account_route_specs`, so
114
114
  // every TS backend mounting account routes serves it.
115
115
  account_status: true,
116
- // Node (`ws`) and Deno hand frames pipelined with the upgrade request to the
116
+ // Node (`ws`) hands frames pipelined with the upgrade request to the
117
117
  // socket. A Bun-served backend overrides to `false` (see the bun spine
118
118
  // config) — `Bun.serve` answers such a request `400` when the upgrade
119
119
  // follows an asynchronous check.
120
120
  ws_handshake_pipelining: true,
121
121
  // `@hono/node-ws` drops a refused upgrade's body, so a Node-served backend
122
- // sends none. A Deno- or Bun-served one overrides to `true`.
122
+ // sends none. A Bun-served one overrides to `true`.
123
123
  ws_refusal_body: false
124
124
  });
125
125
  /**
@@ -151,7 +151,7 @@ const build_default_bootstrap = (paths, overrides) => ({
151
151
  ...overrides
152
152
  });
153
153
  /**
154
- * Shared builder for TS-family backends (Deno + Node). Owns the common
154
+ * Shared builder for TS-family backends (Node + Bun). Owns the common
155
155
  * env baseline (NODE_ENV, HOST, PORT, in-memory pglet, cookie keys,
156
156
  * bootstrap token path) so per-backend factories only declare what
157
157
  * genuinely differs.
@@ -9,8 +9,8 @@ import type { WsEndpointTarget } from './ws_endpoint.js';
9
9
  /**
10
10
  * Headers every HTTP request the differential sends carries, beneath the
11
11
  * principal's: `accept-encoding: identity`, so each backend answers
12
- * uncompressed and a runtime's own compression (`Deno.serve` compresses for a
13
- * request that accepts gzip) never reads as a header difference.
12
+ * uncompressed and a runtime's own compression (for a request that accepts
13
+ * gzip) never reads as a header difference.
14
14
  */
15
15
  export declare const DIFFERENTIAL_REQUEST_HEADERS: Readonly<Record<string, string>>;
16
16
  /** One side of the differential. */
@@ -21,10 +21,10 @@ import '../assert_dev_env.js';
21
21
  *
22
22
  * Every HTTP request asks for an uncompressed response
23
23
  * (`DIFFERENTIAL_REQUEST_HEADERS`): content negotiation is the transport's,
24
- * not the app's — Deno's `Deno.serve` compresses a response whose request
25
- * accepts gzip, as Node's `fetch` sends by default, while other servers send
26
- * it as is — so letting a server choose would read as a `content-encoding` and
27
- * `vary` difference on every case.
24
+ * not the app's — a server may compress a response whose request accepts
25
+ * gzip, as Node's `fetch` sends by default, while another sends it as is — so
26
+ * letting a server choose would read as a `content-encoding` and `vary`
27
+ * difference on every case.
28
28
  *
29
29
  * A difference that is tracked and accepted goes in the **known-divergence
30
30
  * ledger** (`KnownDivergence`), matched by case names or by methods, naming
@@ -52,8 +52,8 @@ import { diff_differential_responses, differential_path_covers, format_different
52
52
  /**
53
53
  * Headers every HTTP request the differential sends carries, beneath the
54
54
  * principal's: `accept-encoding: identity`, so each backend answers
55
- * uncompressed and a runtime's own compression (`Deno.serve` compresses for a
56
- * request that accepts gzip) never reads as a header difference.
55
+ * uncompressed and a runtime's own compression (for a request that accepts
56
+ * gzip) never reads as a header difference.
57
57
  */
58
58
  export const DIFFERENTIAL_REQUEST_HEADERS = {
59
59
  'accept-encoding': 'identity'
@@ -123,7 +123,7 @@ const assert_masked_404 = (got, label) => {
123
123
  assert.strictEqual(got.status, 404, `${label} did not 404`);
124
124
  assert.strictEqual(got.text, '', `${label}: a masked 404 has no body`);
125
125
  // TODO: the content type isn't pinned — the Node TS spine answers the
126
- // bodyless 404 with `text/plain; charset=UTF-8`, Deno, Bun and Rust with none
126
+ // bodyless 404 with `text/plain; charset=UTF-8`, Bun and Rust with none
127
127
  };
128
128
  export const describe_fact_serving_cross_tests = (options) => {
129
129
  const { setup_test, setup_test_multi_actor, capabilities } = options;
@@ -12,7 +12,7 @@
12
12
  * ```ts
13
13
  * const cross_backend_projects = process.env.FUZ_TEST_CROSS_BACKEND
14
14
  * ? [
15
- * make_cross_backend_project({name: 'cross_backend_ts_deno', global_setup: GLOBAL_SETUP}),
15
+ * make_cross_backend_project({name: 'cross_backend_ts_node', global_setup: GLOBAL_SETUP}),
16
16
  * make_cross_backend_project({name: 'cross_backend_rust', global_setup: GLOBAL_SETUP}),
17
17
  * ]
18
18
  * : [];
@@ -32,7 +32,7 @@ export interface CrossBackendProjectOptions {
32
32
  * vitest project name. `create_cross_backend_global_setup` derives the
33
33
  * backend name from it (by default stripping a `cross_backend_(ts_)?`
34
34
  * prefix), so name projects `cross_backend_<backend>` (e.g.
35
- * `cross_backend_rust`, `cross_backend_ts_deno`).
35
+ * `cross_backend_rust`, `cross_backend_ts_node`).
36
36
  */
37
37
  readonly name: string;
38
38
  /**
@@ -12,7 +12,7 @@
12
12
  * ```ts
13
13
  * const cross_backend_projects = process.env.FUZ_TEST_CROSS_BACKEND
14
14
  * ? [
15
- * make_cross_backend_project({name: 'cross_backend_ts_deno', global_setup: GLOBAL_SETUP}),
15
+ * make_cross_backend_project({name: 'cross_backend_ts_node', global_setup: GLOBAL_SETUP}),
16
16
  * make_cross_backend_project({name: 'cross_backend_rust', global_setup: GLOBAL_SETUP}),
17
17
  * ]
18
18
  * : [];
@@ -1625,7 +1625,7 @@
1625
1625
  "patterns": "http://localhost:5173",
1626
1626
  "origin": "http://localhost:5173, http://localhost:5173",
1627
1627
  "allowed": false,
1628
- "note": "a duplicated Origin as Node and Deno join it"
1628
+ "note": "a duplicated Origin as the runtimes join it"
1629
1629
  },
1630
1630
  {
1631
1631
  "patterns": "http://localhost:5173",
@@ -19,14 +19,6 @@ export declare const is_postgres_url: (url: string) => boolean;
19
19
  * @returns the URL naming `database` on the same server
20
20
  */
21
21
  export declare const with_database_name: (database_url: string, database: string) => string;
22
- /**
23
- * The URL `createdb` connects through to create a database on the server
24
- * `server_url` names — the same URL with its database replaced by `postgres`.
25
- *
26
- * @param server_url - a `postgres://` URL on the target server
27
- * @returns the URL of that server's `postgres` maintenance database
28
- */
29
- export declare const to_maintenance_database_url: (server_url: string) => string;
30
22
  /**
31
23
  * A database URL fit to print: the password, when there is one, replaced —
32
24
  * in the userinfo and in the `password` query parameter `pg` and libpq also
@@ -37,15 +29,6 @@ export declare const to_maintenance_database_url: (server_url: string) => string
37
29
  * @returns the URL with any password replaced by `REDACTED`
38
30
  */
39
31
  export declare const redact_database_url: (database_url: string) => string;
40
- /**
41
- * Whether `createdb`'s stderr is its refusal of a database that already
42
- * exists — Postgres's `database "<name>" already exists`, which `createdb`
43
- * prints after `database creation failed: ERROR:`.
44
- *
45
- * @param stderr - what `createdb` wrote to stderr
46
- * @param database - the database it was asked to create
47
- */
48
- export declare const is_createdb_already_exists: (stderr: string, database: string) => boolean;
49
32
  /** Dependencies of `ensure_database` — the warning a failed `createdb` is reported with. */
50
33
  export interface EnsureDatabaseDeps {
51
34
  readonly warn: (message: string) => void;
@@ -55,10 +38,13 @@ export interface EnsureDatabaseDeps {
55
38
  *
56
39
  * Which server it lands on depends on `server_url`. Given one, the database is
57
40
  * created on the server that URL names: `createdb` connects through the URL
58
- * with its database swapped for the `postgres` maintenance database, so host,
59
- * port, role and query parameters all come from the URL, and a password goes
60
- * to `createdb` in its environment, never its arguments. Without one,
61
- * `createdb` reads the libpq environment (`PGHOST` / `PGPORT` / `PGUSER`).
41
+ * with its database swapped for the maintenance database
42
+ * (`to_maintenance_database_url`), so host, port, role and query parameters
43
+ * all come from the URL, and a password goes to `createdb` in its environment
44
+ * (`to_postgres_password_env`), never its arguments. Without one, `createdb`
45
+ * reads the libpq environment (`PGHOST` / `PGPORT` / `PGUSER`). The argv is
46
+ * `to_createdb_args`'s: `--no-password`, so it never waits on a prompt, and
47
+ * `--` ahead of the name.
62
48
  *
63
49
  * Idempotent and never throws: a database that already exists is the quiet
64
50
  * success case (`is_createdb_already_exists`). Any other failure — no
@@ -1 +1 @@
1
- {"version":3,"file":"postgres_database.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/postgres_database.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAoB9B,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAAyC,CAAC;AAEjG;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,OACyB,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,EAAE,UAAU,MAAM,KAAG,MAI3E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,YAAY,MAAM,KAAG,MACtB,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM,KAAG,MAK1D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,KAAG,OACrB,CAAC;AAE1D,4FAA4F;AAC5F,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,GAC3B,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,OAAM,kBAAiD,KACrD,OAyBF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GACnC,cAAc,MAAM,EACpB,OAAO,kBAAkB,KACvB,OAMF,CAAC;AAEF,0CAA0C;AAC1C,MAAM,WAAW,yBAAyB;IACzC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,GAChC,cAAc,MAAM,EACpB,SAAS,yBAAyB,KAChC,OAAO,CAAC,IAAI,CAqCd,CAAC"}
1
+ {"version":3,"file":"postgres_database.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/postgres_database.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkC9B,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAAyC,CAAC;AAEjG;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,OACyB,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,EAAE,UAAU,MAAM,KAAG,MAI3E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM,KAAG,MAM1D,CAAC;AAEF,4FAA4F;AAC5F,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,eAAe,GAC3B,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,OAAM,kBAAiD,KACrD,OAuBF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GACnC,cAAc,MAAM,EACpB,OAAO,kBAAkB,KACvB,OAMF,CAAC;AAEF,0CAA0C;AAC1C,MAAM,WAAW,yBAAyB;IACzC;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,GAChC,cAAc,MAAM,EACpB,SAAS,yBAAyB,KAChC,OAAO,CAAC,IAAI,CAuCd,CAAC"}
@@ -9,11 +9,19 @@ import '../assert_dev_env.js';
9
9
  * `ensure_database_for_url`), so a test role without `CREATEDB` is never
10
10
  * required by default.
11
11
  *
12
+ * `ensure_database` runs `createdb` from `PATH` with the test process's
13
+ * environment through a synchronous `execFileSync`, unlike the dev helpers in
14
+ * `dev/setup.ts`, which take program factories from a task root: it runs in a
15
+ * vitest global setup, which is no task root and has no spawn of its own to
16
+ * build a handle from. Its argv and password environment come from the same
17
+ * `db/postgres_url.ts` the dev helpers use.
18
+ *
12
19
  * @module
13
20
  */
14
21
  import { execFileSync } from 'node:child_process';
15
22
  import { create_db } from '../../db/create_db.js';
16
23
  import { pg_error_code } from '../../db/pg_error.js';
24
+ import { is_createdb_already_exists, rewrite_query_pairs, to_createdb_args, to_maintenance_database_url, to_postgres_password_env } from '../../db/postgres_url.js';
17
25
  /** The URL protocols a Postgres connection string carries. */
18
26
  export const POSTGRES_URL_PROTOCOLS = new Set(['postgres:', 'postgresql:']);
19
27
  /**
@@ -38,14 +46,6 @@ export const with_database_name = (database_url, database) => {
38
46
  url.pathname = `/${database}`;
39
47
  return url.href;
40
48
  };
41
- /**
42
- * The URL `createdb` connects through to create a database on the server
43
- * `server_url` names — the same URL with its database replaced by `postgres`.
44
- *
45
- * @param server_url - a `postgres://` URL on the target server
46
- * @returns the URL of that server's `postgres` maintenance database
47
- */
48
- export const to_maintenance_database_url = (server_url) => with_database_name(server_url, 'postgres');
49
49
  /**
50
50
  * A database URL fit to print: the password, when there is one, replaced —
51
51
  * in the userinfo and in the `password` query parameter `pg` and libpq also
@@ -59,19 +59,10 @@ export const redact_database_url = (database_url) => {
59
59
  const url = new URL(database_url);
60
60
  if (url.password)
61
61
  url.password = 'REDACTED';
62
- if (url.searchParams.has('password'))
63
- url.searchParams.set('password', 'REDACTED');
62
+ // the raw pairs, so every other parameter prints as written
63
+ rewrite_query_pairs(url, (pair, key) => (key === 'password' ? 'password=REDACTED' : pair));
64
64
  return url.href;
65
65
  };
66
- /**
67
- * Whether `createdb`'s stderr is its refusal of a database that already
68
- * exists — Postgres's `database "<name>" already exists`, which `createdb`
69
- * prints after `database creation failed: ERROR:`.
70
- *
71
- * @param stderr - what `createdb` wrote to stderr
72
- * @param database - the database it was asked to create
73
- */
74
- export const is_createdb_already_exists = (stderr, database) => stderr.includes(`database "${database}" already exists`);
75
66
  const default_ensure_database_deps = {
76
67
  warn: (message) => console.warn(message)
77
68
  };
@@ -80,10 +71,13 @@ const default_ensure_database_deps = {
80
71
  *
81
72
  * Which server it lands on depends on `server_url`. Given one, the database is
82
73
  * created on the server that URL names: `createdb` connects through the URL
83
- * with its database swapped for the `postgres` maintenance database, so host,
84
- * port, role and query parameters all come from the URL, and a password goes
85
- * to `createdb` in its environment, never its arguments. Without one,
86
- * `createdb` reads the libpq environment (`PGHOST` / `PGPORT` / `PGUSER`).
74
+ * with its database swapped for the maintenance database
75
+ * (`to_maintenance_database_url`), so host, port, role and query parameters
76
+ * all come from the URL, and a password goes to `createdb` in its environment
77
+ * (`to_postgres_password_env`), never its arguments. Without one, `createdb`
78
+ * reads the libpq environment (`PGHOST` / `PGPORT` / `PGUSER`). The argv is
79
+ * `to_createdb_args`'s: `--no-password`, so it never waits on a prompt, and
80
+ * `--` ahead of the name.
87
81
  *
88
82
  * Idempotent and never throws: a database that already exists is the quiet
89
83
  * success case (`is_createdb_already_exists`). Any other failure — no
@@ -97,18 +91,13 @@ const default_ensure_database_deps = {
97
91
  * @returns whether the database exists now (created, or already there)
98
92
  */
99
93
  export const ensure_database = (database, server_url, deps = default_ensure_database_deps) => {
100
- const args = [database];
101
- const env = { ...process.env };
102
- if (server_url !== undefined) {
103
- const url = new URL(to_maintenance_database_url(server_url));
104
- // any local user can read the process list
105
- const password = url.searchParams.get('password') ?? decodeURIComponent(url.password);
106
- if (password)
107
- env.PGPASSWORD = password;
108
- url.password = '';
109
- url.searchParams.delete('password');
110
- args.unshift(`--maintenance-db=${url.href}`);
94
+ const password_env = server_url === undefined ? {} : to_postgres_password_env(server_url);
95
+ if (password_env === null) {
96
+ deps.warn(`ensure_database: createdb ${database} not run — the URL's password has a malformed percent-escape`);
97
+ return false;
111
98
  }
99
+ const args = to_createdb_args(database, server_url);
100
+ const env = { ...process.env, ...password_env };
112
101
  try {
113
102
  execFileSync('createdb', args, { stdio: ['ignore', 'ignore', 'pipe'], env, encoding: 'utf-8' });
114
103
  return true;
@@ -180,7 +169,7 @@ export const empty_owned_database = async (database_url, options) => {
180
169
  }
181
170
  catch (error) {
182
171
  // 3D000 invalid_catalog_name — the server answered, the database is missing
183
- const maintenance_url = redact_database_url(to_maintenance_database_url(database_url));
172
+ const maintenance_url = redact_database_url(to_maintenance_database_url(database_url, owned_name));
184
173
  const fix = pg_error_code(error) === '3D000'
185
174
  ? `the database does not exist and \`createdb\` did not create it — run ` +
186
175
  `\`createdb --maintenance-db=${maintenance_url} ${owned_name}\` to see why ` +
@@ -70,7 +70,7 @@ import '../assert_dev_env.js';
70
70
  * full event chain.
71
71
  *
72
72
  * Production safety: this module lives under `cross_backend/` and starts
73
- * with `import '../assert_dev_env.js';` — production bundles either
73
+ * with `import '../assert_dev_env.ts';` — production bundles either
74
74
  * tree-shake the module out or throw at startup. The Rust mirror
75
75
  * (`fuz_testing` crate) ships a parallel action; `cargo xtask
76
76
  * check-release` blocks `fuz_testing` from entering production dep
@@ -1 +1 @@
1
- {"version":3,"file":"testing_server_bun.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_server_bun.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8B9B,OAAO,KAAK,EAAe,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AA0BlF,4CAA4C;AAC5C,eAAO,MAAM,0BAA0B,QAAO,oBAoE7C,CAAC"}
1
+ {"version":3,"file":"testing_server_bun.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_server_bun.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA4B9B,OAAO,KAAK,EAAe,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AA0BlF,4CAA4C;AAC5C,eAAO,MAAM,0BAA0B,QAAO,oBAoE7C,CAAC"}
@@ -4,10 +4,9 @@ import '../assert_dev_env.js';
4
4
  *
5
5
  * Binds `Bun.serve` and `@hono/bun`'s module-level `upgradeWebSocket` +
6
6
  * `websocket` handler. The shared `testing/cross_backend/testing_server_core.ts` owns the rest.
7
- * Third sibling to `testing/cross_backend/testing_server_node.ts` / `testing/cross_backend/testing_server_deno.ts` —
8
- * together the three isolate the JS-runtime axis (Node V8 / Deno V8 / Bun
9
- * JSC) on identical TS surfaces, and the Rust spine binary covers the
10
- * cross-language axis.
7
+ * Sibling to `testing/cross_backend/testing_server_node.ts` — together the two
8
+ * isolate the JS-runtime axis (Node V8 / Bun JSC) on identical TS surfaces,
9
+ * and the Rust spine binary covers the cross-language axis.
11
10
  *
12
11
  * Needs the optional `@hono/bun` peer dep (the Bun counterpart to Node's
13
12
  * `@hono/node-server` + `@hono/node-ws`); `Bun.serve` is built in.
@@ -15,9 +14,8 @@ import '../assert_dev_env.js';
15
14
  * implements the `node:fs` / `node:process` surface `RuntimeDeps` +
16
15
  * `testing/daemon_info.ts` touch.
17
16
  *
18
- * `Bun.serve` is declared locally (mirroring `testing/cross_backend/testing_server_deno.ts`'s
19
- * `Deno` declaration) so this module typechecks under fuz_app's Node-based
20
- * config without `@types/bun`. It is only ever *run* under Bun.
17
+ * `Bun.serve` is declared locally so this module typechecks under fuz_app's
18
+ * Node-based config without `@types/bun`. It is only ever *run* under Bun.
21
19
  *
22
20
  * @module
23
21
  */
@@ -43,8 +41,8 @@ export const create_bun_testing_adapter = () => {
43
41
  runtime_label: 'Bun',
44
42
  runtime: create_node_runtime(),
45
43
  get_connection_ip: (c) => getConnInfo(c).remote.address,
46
- // Bun's WS upgrade is module-level and stateless (like Deno) — no
47
- // post-serve attach. The `websocket` handler is threaded into `serve`
44
+ // Bun's WS upgrade is module-level and stateless — no post-serve
45
+ // attach. The `websocket` handler is threaded into `serve`
48
46
  // below, where `Bun.serve` wants it, carrying the frame cap.
49
47
  prepare_websocket: (options) => {
50
48
  max_message_bytes = options?.max_message_bytes ?? DEFAULT_WS_MAX_MESSAGE_BYTES;
@@ -84,11 +82,11 @@ export const create_bun_testing_adapter = () => {
84
82
  // spawning harness blocks on a child that never exits (observed as a
85
83
  // multi-minute hang needing SIGKILL). The force-close still tears the
86
84
  // live sockets down; the `exit(0)` the core fires immediately after
87
- // does the real teardown a few ms later. Node/Deno don't need this —
88
- // their `shutdown()`/`close()` resolve normally. The `.catch` guards a
85
+ // does the real teardown a few ms later. Node doesn't need this — its
86
+ // `close()` resolves normally. The `.catch` guards a
89
87
  // future Bun that rejects rather than hangs; if a future Bun resolves
90
88
  // the promise after a server-initiated close, revert to
91
- // `await server.stop(true)` to mirror the Node/Deno adapters.
89
+ // `await server.stop(true)` to mirror the Node adapter.
92
90
  shutdown: () => {
93
91
  void Promise.resolve(server.stop(true)).catch(() => { });
94
92
  return Promise.resolve();
@@ -10,9 +10,8 @@ import '../assert_dev_env.js';
10
10
  * WS attach, graceful shutdown — and delegates the runtime-boundary
11
11
  * primitives (HTTP serve, WS upgrade construction, signals, pid, exit) to a
12
12
  * `TestingServerAdapter`. The shipped adapters are
13
- * `testing/cross_backend/testing_server_node.ts` (`@hono/node-server` + `@hono/node-ws`),
14
- * `testing/cross_backend/testing_server_deno.ts` (`Deno.serve` + `@hono/deno`), and
15
- * `testing/cross_backend/testing_server_bun.ts` (`Bun.serve` + `@hono/bun`).
13
+ * `testing/cross_backend/testing_server_node.ts` (`@hono/node-server` + `@hono/node-ws`)
14
+ * and `testing/cross_backend/testing_server_bun.ts` (`Bun.serve` + `@hono/bun`).
16
15
  *
17
16
  * The app itself — routes, RPC, DB, `_testing_reset`, WS endpoints — is the
18
17
  * caller's `StartTestingServerOptions.build_app` seam, so this core
@@ -26,8 +25,8 @@ import '../assert_dev_env.js';
26
25
  * **NEVER ships in a release.** This module lives under `cross_backend/` and
27
26
  * opens with `import '../assert_dev_env.js';`, which throws on
28
27
  * production-bundle load. The runtime adapters reach for the optional
29
- * `@hono/node-server` / `@hono/node-ws` peer deps; only test binaries import
30
- * them.
28
+ * `@hono/node-server` / `@hono/node-ws` / `@hono/bun` peer deps; only test
29
+ * binaries import them.
31
30
  *
32
31
  * @module
33
32
  */
@@ -59,12 +58,10 @@ export interface PrepareWebsocketOptions {
59
58
  * past its cap `ws` closes with no reason and Bun drops the socket without a
60
59
  * close frame, so the headroom leaves a message just over the limit to the
61
60
  * per-message check `register_action_ws` makes, while a grossly oversized
62
- * one is still refused before it is buffered whole. Deno ignores it — its
63
- * upgrade takes no frame cap — leaving that per-message check alone. Every
64
- * runtime closes a message just over the limit with
65
- * `WS_CLOSE_MESSAGE_TOO_BIG`. The default sits far below `ws`'s own 100 MiB
66
- * and Bun's 16 MiB, so a build raising an endpoint's cap must pass it here
67
- * too.
61
+ * one is still refused before it is buffered whole. Both close a message
62
+ * just over the limit with `WS_CLOSE_MESSAGE_TOO_BIG`. The default sits far
63
+ * below `ws`'s own 100 MiB and Bun's 16 MiB, so a build raising an
64
+ * endpoint's cap must pass it here too.
68
65
  *
69
66
  * @default DEFAULT_WS_MAX_MESSAGE_BYTES
70
67
  */
@@ -77,8 +74,7 @@ export interface PrepareWebsocketOptions {
77
74
  * `create_app_server` as `AppServerOptions.create_upgrade_websocket`.
78
75
  * `attach_to_server` runs after `serve()` returns a `ServeHandle` —
79
76
  * Node uses it for `injectWebSocket(server)`, and it does nothing when the
80
- * factory was never called (no `ws_endpoints`); Deno and Bun leave it
81
- * undefined.
77
+ * factory was never called (no `ws_endpoints`); Bun leaves it undefined.
82
78
  */
83
79
  export interface PreparedWebsocket {
84
80
  create_upgrade_websocket: (app: Hono) => UpgradeWebSocket;
@@ -86,14 +82,14 @@ export interface PreparedWebsocket {
86
82
  }
87
83
  /**
88
84
  * Runtime adapter contract for the test-binary entry. Each adapter
89
- * (`testing/cross_backend/testing_server_node.ts`, `testing/cross_backend/testing_server_deno.ts`,
85
+ * (`testing/cross_backend/testing_server_node.ts`,
90
86
  * `testing/cross_backend/testing_server_bun.ts`) implements this and hands the shape to
91
87
  * `start_testing_server`.
92
88
  */
93
89
  export interface TestingServerAdapter {
94
- /** Human-readable runtime label for log output (e.g. `"Node"`, `"Deno"`). */
90
+ /** Human-readable runtime label for log output (e.g. `"Node"`, `"Bun"`). */
95
91
  runtime_label: string;
96
- /** `RuntimeDeps` capability bundle from `create_node_runtime` / `create_deno_runtime`. */
92
+ /** `RuntimeDeps` capability bundle from `create_node_runtime`. */
97
93
  runtime: RuntimeDeps;
98
94
  /** Extract the raw TCP connection IP from a Hono context. */
99
95
  get_connection_ip: (c: Context) => string | undefined;
@@ -138,7 +134,7 @@ export interface BuiltTestingApp {
138
134
  }
139
135
  /** Options for `start_testing_server`. */
140
136
  export interface StartTestingServerOptions {
141
- /** Runtime-boundary adapter (Node or Deno). */
137
+ /** Runtime-boundary adapter (Node or Bun). */
142
138
  adapter: TestingServerAdapter;
143
139
  /**
144
140
  * Daemon-info namespace — the app name the `daemon.json` is
@@ -1 +1 @@
1
- {"version":3,"file":"testing_server_core.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_server_core.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAU,KAAK,MAAM,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,4DAA4D;AAC5D,MAAM,WAAW,uBAAuB;IACvC;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IACjC,wBAAwB,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,gBAAgB,CAAC;IAC1D,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACjD;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACpC,6EAA6E;IAC7E,aAAa,EAAE,MAAM,CAAC;IACtB,0FAA0F;IAC1F,OAAO,EAAE,WAAW,CAAC;IACrB,6DAA6D;IAC7D,iBAAiB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;IACtD,8EAA8E;IAC9E,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,uBAAuB,KAAK,iBAAiB,CAAC;IAC5E,wEAAwE;IACxE,KAAK,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,WAAW,CAAC;IAC1F,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,yBAAyB,EAAE,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAClE,oEAAoE;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC;CAC9B;AAED,wEAAwE;AACxE,MAAM,WAAW,sBAAsB;IACtC;;;;;;;;OAQG;IACH,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,uBAAuB,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,gBAAgB,CAAC;CAC1F;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC/B,mFAAmF;IACnF,GAAG,EAAE,IAAI,CAAC;IACV;;;;OAIG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,0CAA0C;AAC1C,MAAM,WAAW,yBAAyB;IACzC,+CAA+C;IAC/C,OAAO,EAAE,oBAAoB,CAAC;IAC9B;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACzE,0EAA0E;IAC1E,GAAG,CAAC,EAAE,UAAU,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,OAGpD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAAU,SAAS,yBAAyB,KAAG,OAAO,CAAC,IAAI,CAkE3F,CAAC"}
1
+ {"version":3,"file":"testing_server_core.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_server_core.ts"],"names":[],"mappings":"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"}
@@ -35,7 +35,7 @@ export const start_testing_server = async (options) => {
35
35
  }
36
36
  const stale = await read_daemon_info(runtime, daemon_name);
37
37
  if (stale) {
38
- if (await is_daemon_running(runtime, stale.pid)) {
38
+ if (is_daemon_running(runtime, stale.pid)) {
39
39
  log.warn('found running server', stale);
40
40
  }
41
41
  else {