@fuzdev/fuz_app 0.128.0 → 0.129.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 (87) hide show
  1. package/dist/actions/register_action_ws.d.ts +0 -1
  2. package/dist/actions/register_action_ws.d.ts.map +1 -1
  3. package/dist/auth/CLAUDE.md +1 -1
  4. package/dist/auth/actor_lookup_action_specs.d.ts +2 -2
  5. package/dist/auth/actor_lookup_action_specs.js +2 -2
  6. package/dist/auth/audit_emitter.d.ts +14 -7
  7. package/dist/auth/audit_emitter.d.ts.map +1 -1
  8. package/dist/auth/audit_emitter.js +6 -8
  9. package/dist/auth/bearer_auth.d.ts +3 -2
  10. package/dist/auth/bearer_auth.d.ts.map +1 -1
  11. package/dist/auth/bearer_auth.js +3 -2
  12. package/dist/auth/request_context.d.ts +1 -1
  13. package/dist/auth/request_context.js +1 -1
  14. package/dist/auth/token_scope.d.ts +4 -2
  15. package/dist/auth/token_scope.d.ts.map +1 -1
  16. package/dist/auth/token_scope.js +10 -2
  17. package/dist/http/CLAUDE.md +3 -4
  18. package/dist/http/auth_shape.d.ts +3 -2
  19. package/dist/http/auth_shape.d.ts.map +1 -1
  20. package/dist/http/auth_shape.js +3 -2
  21. package/dist/http/common_routes.d.ts +1 -14
  22. package/dist/http/common_routes.d.ts.map +1 -1
  23. package/dist/http/common_routes.js +1 -19
  24. package/dist/http/ip_canonical.d.ts +1 -1
  25. package/dist/http/ip_canonical.js +1 -1
  26. package/dist/realtime/sse_auth_guard.d.ts +3 -1
  27. package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
  28. package/dist/realtime/sse_auth_guard.js +3 -1
  29. package/dist/server/app_server.d.ts +118 -7
  30. package/dist/server/app_server.d.ts.map +1 -1
  31. package/dist/server/app_server.js +136 -91
  32. package/dist/server/surface_route.d.ts +32 -0
  33. package/dist/server/surface_route.d.ts.map +1 -0
  34. package/dist/server/surface_route.js +46 -0
  35. package/dist/testing/CLAUDE.md +17 -12
  36. package/dist/testing/app_server.d.ts +39 -4
  37. package/dist/testing/app_server.d.ts.map +1 -1
  38. package/dist/testing/app_server.js +84 -68
  39. package/dist/testing/audit_completeness.js +1 -1
  40. package/dist/testing/audit_drift_guard.d.ts +1 -1
  41. package/dist/testing/cross_backend/default_spine_surface.d.ts +2 -2
  42. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  43. package/dist/testing/cross_backend/default_spine_surface.js +5 -2
  44. package/dist/testing/cross_backend/identity_parity.js +1 -1
  45. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
  46. package/dist/testing/cross_backend/in_process_setup.js +4 -1
  47. package/dist/testing/cross_backend/method_coverage.d.ts +1 -1
  48. package/dist/testing/cross_backend/method_coverage.d.ts.map +1 -1
  49. package/dist/testing/cross_backend/method_coverage.js +2 -2
  50. package/dist/testing/cross_backend/peer_ping_ws.d.ts +1 -1
  51. package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
  52. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +1 -1
  53. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
  54. package/dist/testing/cross_backend/setup.d.ts +4 -4
  55. package/dist/testing/cross_backend/setup.js +1 -1
  56. package/dist/testing/cross_backend/sse_round_trip.d.ts +1 -1
  57. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  58. package/dist/testing/cross_backend/testing_reset_actions.d.ts +24 -14
  59. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  60. package/dist/testing/cross_backend/testing_reset_actions.js +40 -32
  61. package/dist/testing/cross_backend/testing_server_bun.d.ts +1 -1
  62. package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
  63. package/dist/testing/cross_backend/testing_server_bun.js +80 -64
  64. package/dist/testing/cross_backend/testing_server_core.d.ts +10 -4
  65. package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
  66. package/dist/testing/cross_backend/testing_server_deno.d.ts +1 -1
  67. package/dist/testing/cross_backend/testing_server_deno.d.ts.map +1 -1
  68. package/dist/testing/cross_backend/testing_server_deno.js +1 -1
  69. package/dist/testing/cross_backend/testing_server_node.d.ts +1 -1
  70. package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
  71. package/dist/testing/cross_backend/testing_server_node.js +2 -2
  72. package/dist/testing/cross_backend/ws_round_trip.d.ts +1 -1
  73. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  74. package/dist/testing/cross_backend/ws_round_trip.js +11 -9
  75. package/dist/testing/stubs.d.ts +45 -7
  76. package/dist/testing/stubs.d.ts.map +1 -1
  77. package/dist/testing/stubs.js +60 -31
  78. package/dist/testing/ws_round_trip.d.ts +1 -3
  79. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  80. package/dist/ui/AdminSurface.svelte +3 -1
  81. package/dist/ui/AdminSurface.svelte.d.ts.map +1 -1
  82. package/dist/ui/CLAUDE.md +3 -1
  83. package/dist/ui/async_slot.svelte.d.ts +4 -4
  84. package/dist/ui/async_slot.svelte.js +4 -4
  85. package/dist/ui/keyed_async_slot.svelte.d.ts +4 -4
  86. package/dist/ui/keyed_async_slot.svelte.js +3 -3
  87. package/package.json +1 -1
@@ -185,26 +185,13 @@ const _build_test_backend = async (options) => {
185
185
  if (!keyring_result.ok) {
186
186
  throw new Error(`Test keyring failed: ${keyring_result.errors.join(', ')}`);
187
187
  }
188
- let backend;
188
+ let db;
189
+ let db_name;
189
190
  if (existing_db) {
190
191
  // Reset singleton config row from a previous test (harmless on fresh pglite).
191
192
  await existing_db.query('UPDATE app_settings SET open_signup = false, updated_at = NULL, updated_by = NULL WHERE open_signup = true OR updated_at IS NOT NULL');
192
- const audit = audit_factory({ db: existing_db, log: test_log });
193
- backend = {
194
- db_type,
195
- db_name: 'test',
196
- migration_results: [], // migrations ran in the factory's init_schema
197
- close: async () => { },
198
- deps: {
199
- keyring: keyring_result.keyring,
200
- password,
201
- db: existing_db,
202
- log: test_log,
203
- audit,
204
- connection_closer: create_realtime_closer(),
205
- ...fs_stubs
206
- }
207
- };
193
+ db = existing_db;
194
+ db_name = 'test';
208
195
  }
209
196
  else {
210
197
  // In-memory PGlite via cached factory — reuses the WASM instance from `testing/db.ts`
@@ -213,30 +200,52 @@ const _build_test_backend = async (options) => {
213
200
  // copy of `testing/db.ts` — under the `db` project's `isolate: false` +
214
201
  // `fileParallelism: false` that is once for the whole run.
215
202
  // `migration_namespaces` selects an auth+extras factory; auth-only is the default.
216
- // `db_type` below names PGlite unconditionally: a run that installs a substitute
217
- // factory (`set_substitute_db_factory`) before this module loads gets that driver
218
- // here, and no caller reads this field to pick behavior — it is reported, not
219
- // dispatched on.
220
- const db = await resolve_fallback_factory(migration_namespaces).create();
221
- const audit = audit_factory({ db, log: test_log });
222
- backend = {
223
- db_type: 'pglite-memory',
224
- db_name: '(memory)',
225
- migration_results: [],
226
- close: async () => { },
227
- deps: {
228
- keyring: keyring_result.keyring,
229
- password,
230
- db,
231
- log: test_log,
232
- audit,
233
- connection_closer: create_realtime_closer(),
234
- ...fs_stubs
235
- }
236
- };
203
+ db = await resolve_fallback_factory(migration_namespaces).create();
204
+ db_name = '(memory)';
237
205
  }
206
+ const backend = {
207
+ // a supplied `db` reports the caller's `db_type`; the auto-created one names
208
+ // PGlite unconditionally — a run that installs a substitute factory
209
+ // (`set_substitute_db_factory`) before this module loads gets that driver
210
+ // here, and no caller reads this field to pick behavior: it is reported,
211
+ // not dispatched on
212
+ db_type: existing_db ? db_type : 'pglite-memory',
213
+ db_name,
214
+ // the factory's init ran the migrations, for a supplied `db` and the auto-created one alike
215
+ migration_results: [],
216
+ close: async () => { },
217
+ deps: {
218
+ keyring: keyring_result.keyring,
219
+ password,
220
+ db,
221
+ log: test_log,
222
+ audit: audit_factory({ db, log: test_log }),
223
+ connection_closer: create_realtime_closer(),
224
+ ...fs_stubs
225
+ }
226
+ };
238
227
  return { backend, keyring: keyring_result.keyring };
239
228
  };
229
+ /**
230
+ * Create an app server with a bootstrapped account for testing.
231
+ *
232
+ * Sets up:
233
+ * - Auth tables (via cached PGlite factory, or reuses existing `db`)
234
+ * - A keeper account with hashed password
235
+ * - Role role_grants for each role in `options.roles`
236
+ * - An API token for Bearer auth
237
+ * - A session with a signed cookie value
238
+ *
239
+ * Uses `stub_password_deps` by default — deterministic hashing that works
240
+ * correctly for login/logout tests without Argon2 overhead.
241
+ *
242
+ * @param options - session options and optional overrides
243
+ * @returns a `TestAppServer` ready for HTTP testing
244
+ * @mutates the underlying database — when `db` is supplied, first resets the
245
+ * `app_settings` row (`open_signup`, `updated_at`, `updated_by`); in either
246
+ * branch inserts an account, actor, role role_grants, API token, and session
247
+ * row, and flips `bootstrap_lock.bootstrapped` (`bootstrap_test_keeper`).
248
+ */
240
249
  export const create_test_app_server = async (options) => {
241
250
  const { session_options, password = stub_password_deps, username = 'keeper', password_value = DEFAULT_TEST_PASSWORD, roles = [ROLE_KEEPER] } = options;
242
251
  const { backend, keyring } = await _build_test_backend(options);
@@ -257,18 +266,40 @@ export const create_test_app_server = async (options) => {
257
266
  };
258
267
  };
259
268
  /**
260
- * The `create_app_server` options both test-app builders share — a fresh
261
- * object per call, spread ahead of the per-builder options and `app_options`.
269
+ * The loopback `create_app_server` options an in-process test server takes:
270
+ * `localhost` origins allowed, the loopback proxy trusted (so
271
+ * `X-Forwarded-For` sets the client IP), and an empty env schema. A fresh
272
+ * object per call — spread it ahead of the options a test varies.
262
273
  */
263
- const test_app_server_base_options = () => ({
274
+ export const create_loopback_app_server_options = () => ({
264
275
  allowed_origins: [/^http:\/\/localhost/],
265
276
  proxy: { trusted_proxies: ['127.0.0.1'], get_connection_ip: () => '127.0.0.1' },
266
- env_schema: z.object({}),
277
+ env_schema: z.object({})
278
+ });
279
+ /**
280
+ * The `create_app_server` options both test-app builders share — a fresh
281
+ * object per call, spread ahead of the per-builder options and `app_options`.
282
+ */
283
+ const test_app_options = () => ({
284
+ ...create_loopback_app_server_options(),
267
285
  // every limiter off unless `app_options` passes one — a rate-limit test
268
286
  // enables just the limiter it pins
269
287
  rate_limiters: 'disabled_for_testing',
270
288
  await_pending_effects: true
271
289
  });
290
+ /** Build request headers carrying `session_cookie` in the `cookie_name` cookie. */
291
+ const create_session_headers_builder = (cookie_name, session_cookie) => (extra) => ({
292
+ host: 'localhost',
293
+ origin: 'http://localhost:5173',
294
+ cookie: `${cookie_name}=${session_cookie}`,
295
+ ...extra
296
+ });
297
+ /** Build request headers carrying `api_token` as a Bearer token. */
298
+ const create_bearer_headers_builder = (api_token) => (extra) => ({
299
+ host: 'localhost',
300
+ authorization: `Bearer ${api_token}`,
301
+ ...extra
302
+ });
272
303
  /**
273
304
  * Create a fully assembled test app with a Hono server, middleware, and routes.
274
305
  *
@@ -296,7 +327,7 @@ export const create_test_app = async (options) => {
296
327
  keeper_account_id: test_server.account.id
297
328
  };
298
329
  const result = await create_app_server({
299
- ...test_app_server_base_options(),
330
+ ...test_app_options(),
300
331
  backend: test_server,
301
332
  session_options: options.session_options,
302
333
  daemon_token_state,
@@ -311,17 +342,8 @@ export const create_test_app = async (options) => {
311
342
  const { app, surface_spec } = result;
312
343
  const { cookie_name } = options.session_options;
313
344
  const { password = stub_password_deps } = options;
314
- const create_session_headers = (extra) => ({
315
- host: 'localhost',
316
- origin: 'http://localhost:5173',
317
- cookie: `${cookie_name}=${test_server.session_cookie}`,
318
- ...extra
319
- });
320
- const create_bearer_headers = (extra) => ({
321
- host: 'localhost',
322
- authorization: `Bearer ${test_server.api_token}`,
323
- ...extra
324
- });
345
+ const create_session_headers = create_session_headers_builder(cookie_name, test_server.session_cookie);
346
+ const create_bearer_headers = create_bearer_headers_builder(test_server.api_token);
325
347
  const create_daemon_token_headers = (extra) => ({
326
348
  host: 'localhost',
327
349
  [DAEMON_TOKEN_HEADER]: test_daemon_token,
@@ -342,22 +364,14 @@ export const create_test_app = async (options) => {
342
364
  });
343
365
  return {
344
366
  ...bootstrapped,
345
- create_session_headers: (extra) => ({
346
- host: 'localhost',
347
- origin: 'http://localhost:5173',
348
- cookie: `${cookie_name}=${bootstrapped.session_cookie}`,
349
- ...extra
350
- }),
351
- create_bearer_headers: (extra) => ({
352
- host: 'localhost',
353
- authorization: `Bearer ${bootstrapped.api_token}`,
354
- ...extra
355
- })
367
+ create_session_headers: create_session_headers_builder(cookie_name, bootstrapped.session_cookie),
368
+ create_bearer_headers: create_bearer_headers_builder(bootstrapped.api_token)
356
369
  };
357
370
  };
358
371
  return {
359
372
  app,
360
373
  backend: test_server,
374
+ server: result,
361
375
  surface_spec,
362
376
  surface: surface_spec.surface,
363
377
  route_specs: surface_spec.route_specs,
@@ -416,8 +430,9 @@ export const create_test_app_for_bootstrap = async (options) => {
416
430
  }
417
431
  };
418
432
  const { backend } = await _build_test_backend({ ...options, fs_stubs });
419
- // Daemon token state isn't reachable pre-bootstrap (no keeper account)
420
- // but the field is required by AppServerOptions; pass a placeholder.
433
+ // No keeper account exists pre-bootstrap, so no daemon token can authenticate
434
+ // — a placeholder, passed so the daemon-token middleware mounts as it does
435
+ // under `create_test_app` and the two surfaces match.
421
436
  const daemon_token_state = {
422
437
  current_token: generate_daemon_token(),
423
438
  previous_token: null,
@@ -425,7 +440,7 @@ export const create_test_app_for_bootstrap = async (options) => {
425
440
  keeper_account_id: null
426
441
  };
427
442
  const result = await create_app_server({
428
- ...test_app_server_base_options(),
443
+ ...test_app_options(),
429
444
  backend,
430
445
  session_options,
431
446
  daemon_token_state,
@@ -442,6 +457,7 @@ export const create_test_app_for_bootstrap = async (options) => {
442
457
  return {
443
458
  app: result.app,
444
459
  backend,
460
+ server: result,
445
461
  surface_spec: result.surface_spec,
446
462
  surface: result.surface_spec.surface,
447
463
  route_specs: result.surface_spec.route_specs,
@@ -51,7 +51,7 @@ const create_admin_observer = (fixture) => fixture.create_account({ username: 'a
51
51
  * future-proofs against tests with more emissions; per-test
52
52
  * `auth_integration_truncate_tables` keeps the table empty between cases.
53
53
  *
54
- * `observer` is a dedicated admin account (see {@link create_admin_observer})
54
+ * `observer` is a dedicated admin account (see `create_admin_observer`)
55
55
  * — its credentials are never the subject of the mutation under test, so the
56
56
  * read works uniformly across every flow including session-revoking ones.
57
57
  */
@@ -22,7 +22,7 @@ import type { AuditLogInput } from '../auth/audit_log_schema.js';
22
22
  */
23
23
  export declare const install_audit_drift_guard: () => void;
24
24
  /**
25
- * Pair returned by {@link create_recording_audit_emitter} — the
25
+ * Pair returned by `create_recording_audit_emitter` — the
26
26
  * `AuditEmitter` to inject as `deps.audit`, plus the shared `calls`
27
27
  * array that records every captured emission. Both fields are live —
28
28
  * callers read `calls` after exercising the handler to assert on the
@@ -47,7 +47,7 @@ export declare const spine_session_options: SessionOptions<string>;
47
47
  * (`admin_account_list.grantable_roles` carries it on both spines).
48
48
  */
49
49
  export declare const spine_roles: RoleSchemaResult;
50
- /** Options for {@link spine_rpc_endpoints}. */
50
+ /** Options for `spine_rpc_endpoints`. */
51
51
  export interface SpineRpcEndpointsOptions {
52
52
  /**
53
53
  * WS notification sender threaded into the role-grant-offer sub-factory for
@@ -97,7 +97,7 @@ export declare const spine_rpc_endpoints: (ctx: AppServerContext, options?: Spin
97
97
  export declare const create_spine_route_specs: (ctx: AppServerContext) => Array<RouteSpec>;
98
98
  /**
99
99
  * The spine's `/ready` route spec — the column-presence schema-drift deploy
100
- * gate, reading {@link SPINE_EXPECTED_SCHEMA_URL}. Mounted **live** by the TS
100
+ * gate, reading `SPINE_EXPECTED_SCHEMA_URL`. Mounted **live** by the TS
101
101
  * spine binary (in `build_spine_app`) and the in-process readiness parity leg,
102
102
  * but kept **off** the declared surface (`create_spine_surface_spec`) like the
103
103
  * fact-serving / ws / sse behaviors — `describe_ready_cross_tests` (gated on
@@ -1 +1 @@
1
- {"version":3,"file":"default_spine_surface.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_spine_surface.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEtF,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI1F,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAe3E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAAwC,CAAC;AAElG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,gBAGxB,CAAC;AAEH,+CAA+C;AAC/C,MAAM,WAAW,wBAAwB;IACxC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACzD;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,GAC/B,KAAK,gBAAgB,EACrB,UAAU,wBAAwB,KAChC,KAAK,CAAC,eAAe,CAQvB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GAAI,KAAK,gBAAgB,KAAG,KAAK,CAAC,SAAS,CAgC/E,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,MAAM,KAAG,SAC+B,CAAC;AAE7F;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,QAAO,cAM1C,CAAC"}
1
+ {"version":3,"file":"default_spine_surface.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_spine_surface.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,C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-presence schema-drift deploy
105
- * gate, reading {@link SPINE_EXPECTED_SCHEMA_URL}. Mounted **live** by the TS
105
+ * gate, reading `SPINE_EXPECTED_SCHEMA_URL`. Mounted **live** by the TS
106
106
  * spine binary (in `build_spine_app`) and the in-process readiness parity leg,
107
107
  * but kept **off** the declared surface (`create_spine_surface_spec`) like the
108
108
  * fact-serving / ws / sse behaviors — `describe_ready_cross_tests` (gated on
@@ -124,5 +124,8 @@ export const create_spine_surface_spec = () => create_test_app_surface_spec({
124
124
  session_options: spine_session_options,
125
125
  create_route_specs: create_spine_route_specs,
126
126
  rpc_endpoints: spine_rpc_endpoints,
127
- bootstrap: { mode: 'surface_only' }
127
+ bootstrap: { mode: 'surface_only' },
128
+ // both spine binaries mount the daemon-token layer (the TS one rotates a
129
+ // token on disk); `GET /api/surface` stays off, the default on both
130
+ daemon_token: true
128
131
  });
@@ -279,7 +279,7 @@ export const describe_identity_parity_cross_tests = (options) => {
279
279
  const signup = (fixture, username, password = DEFAULT_TEST_PASSWORD) => post_json(fixture, signup_path, { username, password });
280
280
  /**
281
281
  * Assert an attempt settled to `status` **and** carried the flat-REST error
282
- * reason that status implies on every spine (see {@link REASON_BY_STATUS}) —
282
+ * reason that status implies on every spine (see `REASON_BY_STATUS`) —
283
283
  * a body-shape check, not just a status check, so a backend can't pass by
284
284
  * returning the right status with the wrong/leaky body.
285
285
  */
@@ -1 +1 @@
1
- {"version":3,"file":"in_process_setup.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/in_process_setup.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqB9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AA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({
157
157
  // Mirror what `create_test_app` → `create_app_server` will mount.
158
158
  // Both helpers read from the top-level `bootstrap` slot so surface
159
159
  // and live app stay in sync by construction.
160
- bootstrap: options.bootstrap
160
+ bootstrap: options.bootstrap,
161
+ surface_route: options.app_options?.surface_route,
162
+ // `create_test_app` always passes a `daemon_token_state`
163
+ daemon_token: true
161
164
  }),
162
165
  capabilities: in_process_capabilities,
163
166
  session_options: options.session_options,
@@ -39,7 +39,7 @@ export interface MethodCoverageEntry {
39
39
  /** Optional free-text note printed nowhere — documentation for the reader. */
40
40
  readonly note?: string;
41
41
  }
42
- /** Inputs for {@link assert_rpc_method_coverage}. */
42
+ /** Inputs for `assert_rpc_method_coverage`. */
43
43
  export interface RpcMethodCoverageInput {
44
44
  /** Every method the live RPC endpoint mounts (`action.spec.method`). */
45
45
  readonly live_methods: ReadonlyArray<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"method_coverage.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/method_coverage.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,kBAAkB;AAC7B;;;;GAIG;AACD,UAAU,CAAC;;;;GAIV,GACD,aAAa,CAAC;;;;GAIb,GACD,UAAU,CAAC;AAEd,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,mBAAmB,CAAC;IAChD;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qDAAqD;AACrD,MAAM,WAAW,sBAAsB;IACtC,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACtD,yDAAyD;IACzD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACxC;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,sBAAsB,KAAG,IAyF1E,CAAC"}
1
+ {"version":3,"file":"method_coverage.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/method_coverage.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,kBAAkB;AAC7B;;;;GAIG;AACD,UAAU,CAAC;;;;GAIV,GACD,aAAa,CAAC;;;;GAIb,GACD,UAAU,CAAC;AAEd,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,mBAAmB,CAAC;IAChD;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+CAA+C;AAC/C,MAAM,WAAW,sBAAsB;IACtC,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,wEAAwE;IACxE,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACtD,yDAAyD;IACzD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACxC;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,sBAAsB,KAAG,IAyF1E,CAAC"}
@@ -14,8 +14,8 @@ import '../assert_dev_env.js';
14
14
  * actually claimed by a suite — so a newly mounted-but-untested method could
15
15
  * ship silently.
16
16
  *
17
- * {@link assert_rpc_method_coverage} closes that gap: it diffs the live method
18
- * set against a {@link MethodCoverageEntry} manifest (both directions — a
17
+ * `assert_rpc_method_coverage` closes that gap: it diffs the live method
18
+ * set against a `MethodCoverageEntry` manifest (both directions — a
19
19
  * mounted-but-unclaimed method *and* a stale manifest row both fail loud) and
20
20
  * checks each entry's tier is consistent with the declared surface + the
21
21
  * backdoor prefix. The manifest becomes the forcing function — a new method
@@ -1,7 +1,7 @@
1
1
  import '../assert_dev_env.js';
2
2
  import { type BackendCapabilities } from './capabilities.js';
3
3
  import type { SetupTest } from './setup.js';
4
- /** Configuration for {@link describe_peer_ping_ws_tests}. */
4
+ /** Configuration for `describe_peer_ping_ws_tests`. */
5
5
  export interface PeerPingWsTestOptions {
6
6
  /** Per-test fixture producer (`default_cross_process_setup(handle, ...)`). */
7
7
  readonly setup_test: SetupTest;
@@ -1 +1 @@
1
- {"version":3,"file":"peer_ping_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/peer_ping_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkD9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAuB5C,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACrC,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,SAAS,qBAAqB,KAAG,IA8O5E,CAAC"}
1
+ {"version":3,"file":"peer_ping_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/peer_ping_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkD9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAuB5C,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACrC,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,SAAS,qBAAqB,KAAG,IA8O5E,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import '../assert_dev_env.js';
2
2
  import { type BackendCapabilities } from './capabilities.js';
3
3
  import type { SetupTest } from './setup.js';
4
- /** Configuration for {@link describe_role_grant_offer_notification_ws_tests}. */
4
+ /** Configuration for `describe_role_grant_offer_notification_ws_tests`. */
5
5
  export interface RoleGrantOfferNotificationWsTestOptions {
6
6
  /** Per-test fixture producer (`default_cross_process_setup(handle, ...)`). */
7
7
  readonly setup_test: SetupTest;
@@ -1 +1 @@
1
- {"version":3,"file":"role_grant_offer_notification_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_notification_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqE9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAmC,MAAM,YAAY,CAAC;AAK7E,iFAAiF;AACjF,MAAM,WAAW,uCAAuC;IACvD,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC3D,SAAS,uCAAuC,KAC9C,IAuWF,CAAC"}
1
+ {"version":3,"file":"role_grant_offer_notification_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/role_grant_offer_notification_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqE9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAmC,MAAM,YAAY,CAAC;AAK7E,2EAA2E;AAC3E,MAAM,WAAW,uCAAuC;IACvD,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+CAA+C,GAC3D,SAAS,uCAAuC,KAC9C,IAuWF,CAAC"}
@@ -327,7 +327,7 @@ export interface BootstrappedBackendHandle extends BackendHandle {
327
327
  */
328
328
  export type ReconstructedBootstrappedBackendHandle = Omit<BootstrappedBackendHandle, 'child' | 'teardown'>;
329
329
  /**
330
- * Serializable subset of {@link BootstrappedBackendHandle} suitable for
330
+ * Serializable subset of `BootstrappedBackendHandle` suitable for
331
331
  * vitest's `project.provide()` — vitest 4 hard-rejects non-serializable
332
332
  * values, so the live `child: ChildProcess` + `teardown: () => Promise<void>`
333
333
  * + `keeper_transport: FetchTransport` (closure) must stay in the
@@ -335,8 +335,8 @@ export type ReconstructedBootstrappedBackendHandle = Omit<BootstrappedBackendHan
335
335
  * (`config`, `daemon_token`, `keeper_account`, `keeper_actor`,
336
336
  * `keeper_cookies`) round-trip through structured clone fine.
337
337
  *
338
- * `globalSetup` calls {@link serialize_bootstrapped_handle} before
339
- * `project.provide`; test files call {@link reconstruct_bootstrapped_handle}
338
+ * `globalSetup` calls `serialize_bootstrapped_handle` before
339
+ * `project.provide`; test files call `reconstruct_bootstrapped_handle`
340
340
  * on the injected value to rebuild a usable handle (without `child` /
341
341
  * `teardown` — lifecycle stays with `globalSetup`).
342
342
  */
@@ -354,7 +354,7 @@ export interface SerializableBootstrappedBackendHandle {
354
354
  export declare const serialize_bootstrapped_handle: (handle: BootstrappedBackendHandle) => SerializableBootstrappedBackendHandle;
355
355
  /**
356
356
  * Rebuild a usable handle from the serialized subset. Synthesizes a
357
- * fresh {@link FetchTransport} primed with the keeper's `Set-Cookie`
357
+ * fresh `FetchTransport` primed with the keeper's `Set-Cookie`
358
358
  * values so `_testing_reset` and other keeper-authenticated calls work.
359
359
  * The returned shape omits `child` and `teardown` — lifecycle stays
360
360
  * with `globalSetup`; tests that try to teardown themselves wouldn't
@@ -67,7 +67,7 @@ export const serialize_bootstrapped_handle = (handle) => ({
67
67
  });
68
68
  /**
69
69
  * Rebuild a usable handle from the serialized subset. Synthesizes a
70
- * fresh {@link FetchTransport} primed with the keeper's `Set-Cookie`
70
+ * fresh `FetchTransport` primed with the keeper's `Set-Cookie`
71
71
  * values so `_testing_reset` and other keeper-authenticated calls work.
72
72
  * The returned shape omits `child` and `teardown` — lifecycle stays
73
73
  * with `globalSetup`; tests that try to teardown themselves wouldn't
@@ -1,7 +1,7 @@
1
1
  import '../assert_dev_env.js';
2
2
  import { type BackendCapabilities } from './capabilities.js';
3
3
  import type { SetupTest } from './setup.js';
4
- /** Configuration for {@link describe_cross_process_sse_tests}. */
4
+ /** Configuration for `describe_cross_process_sse_tests`. */
5
5
  export interface CrossProcessSseTestOptions {
6
6
  /**
7
7
  * Per-test fixture producer (`default_cross_process_setup(handle)`). Each
@@ -1 +1 @@
1
- {"version":3,"file":"sse_round_trip.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/sse_round_trip.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8E9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK5C,kEAAkE;AAClE,MAAM,WAAW,0BAA0B;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AA0BD;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,0BAA0B,KAAG,IA2PtF,CAAC"}
1
+ {"version":3,"file":"sse_round_trip.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/sse_round_trip.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8E9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAK5C,4DAA4D;AAC5D,MAAM,WAAW,0BAA0B;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AA0BD;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,0BAA0B,KAAG,IA2PtF,CAAC"}
@@ -2,7 +2,7 @@ import '../assert_dev_env.js';
2
2
  /**
3
3
  * Test-binary RPC actions for cross-process integration tests.
4
4
  *
5
- * Six daemon-token-authed actions, bundled by `create_testing_actions`:
5
+ * The daemon-token-authed actions bundled by `create_testing_actions`:
6
6
  * **`_testing_reset`** (DB wipe + keeper re-seed), **`_testing_drain_effects`**
7
7
  * (audit barrier), **`_testing_mint_session`** (forge an
8
8
  * expired-by-construction server-side session for the expiry conformance
@@ -31,11 +31,11 @@ import '../assert_dev_env.js';
31
31
  * new keeper + secondary credentials return as the action output so
32
32
  * the per-test fixture closes over them.
33
33
  *
34
- * The redesign converges in-process and cross-process keeper
35
- * lifetimes: both modes now run against a freshly bootstrapped keeper
36
- * per test. Mutation-cascade tests (password change, revoke-all,
37
- * hardcoded-username signup uniqueness) and direct keeper-vs-admin
38
- * probes work uniformly cross-process.
34
+ * In-process and cross-process keeper lifetimes match: both modes run
35
+ * against a freshly bootstrapped keeper per test, so mutation-cascade
36
+ * tests (password change, revoke-all, hardcoded-username signup
37
+ * uniqueness) and direct keeper-vs-admin probes work uniformly
38
+ * cross-process.
39
39
  *
40
40
  * **Keeper ≠ admin.** The `keeper` and `admin` roles are independent.
41
41
  * Keeper authorizes daemon-token / bootstrap paths; admin authorizes
@@ -47,9 +47,8 @@ import '../assert_dev_env.js';
47
47
  * via `extra_accounts: [{username, roles: [ROLE_KEEPER]}]` so the
48
48
  * account is seeded at this same bootstrap-equivalent step.
49
49
  *
50
- * **No free-form runtime bypass.** Earlier drafts considered a separate
51
- * `_testing_seed_role_grant` action for arbitrary direct grants; that
52
- * was rejected because a runtime bypass would let tests skip the
50
+ * **No free-form runtime bypass.** There is no action for arbitrary
51
+ * direct role grants: a runtime bypass would let tests skip the
53
52
  * production consent flow's side-effects (audit emit, WS fan-out) and
54
53
  * silently mask bugs in those paths. The bypass that does exist —
55
54
  * `extra_accounts` — is framed as bootstrap-time seeding, the same
@@ -449,6 +448,18 @@ export declare const testing_action_manifest_action_spec: {
449
448
  readonly async: true;
450
449
  readonly description: string;
451
450
  };
451
+ /**
452
+ * Build the `_testing_action_manifest` action over a backend's full live RPC
453
+ * mount. The handler closes over a manifest computed once at assembly time
454
+ * from every `mounted` spec except the protocol methods (`PROTOCOL_METHODS`)
455
+ * **plus this action's own spec** — the manifest action is itself a live
456
+ * method, so it must appear in the dump it serves. `mounted` excludes it
457
+ * (it's appended to the mount *after* the rest is assembled, in
458
+ * `build_full_spine_rpc_actions`), so its static spec is folded in here; the
459
+ * Rust mirror folds in its own descriptor the same way.
460
+ *
461
+ * @param mounted - every other action on the backend's live RPC mount
462
+ */
452
463
  export declare const create_testing_action_manifest_action: (mounted: ReadonlyArray<RpcAction>) => RpcAction;
453
464
  /** Options for `create_testing_actions`. */
454
465
  export interface CreateTestingActionsOptions {
@@ -460,9 +471,10 @@ export interface CreateTestingActionsOptions {
460
471
  */
461
472
  readonly session_options: SessionOptions<string>;
462
473
  /**
463
- * Daemon-token runtime state — the reset action mutates
464
- * `state.keeper_account_id` to point at the freshly seeded keeper
465
- * after the old row is wiped. Pass the same `DaemonTokenState`
474
+ * Daemon-token runtime state — the reset action points
475
+ * `state.keeper_account_id` at the freshly seeded keeper once its
476
+ * transaction commits (a post-commit effect, so a reset that rolls back
477
+ * leaves the previous keeper cached). Pass the same `DaemonTokenState`
466
478
  * instance the daemon-token middleware reads.
467
479
  */
468
480
  readonly daemon_token_state: DaemonTokenState;
@@ -496,6 +508,4 @@ export interface CreateTestingActionsOptions {
496
508
  * without updating this handler fails CI.
497
509
  */
498
510
  export declare const create_testing_actions: (deps: AppDeps, options: CreateTestingActionsOptions) => Array<RpcAction>;
499
- /** Set of auth-namespace tables `_testing_reset` wipes. Mirrored by the coverage test. */
500
- export declare const testing_reset_wiped_tables: string[];
501
511
  //# sourceMappingURL=testing_reset_actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing_reset_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_reset_actions.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,6BAA6B,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;;;;;;;;;;;;;;CAaF,CAAC;AAyB/C,eAAO,MAAM,qCAAqC,GACjD,SAAS,aAAa,CAAC,SAAS,CAAC,KAC/B,SAMF,CAAC;AAEF,4CAA4C;AAC5C,MAAM,WAAW,2BAA2B;IAC3C;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACjD;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;IAC9C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACxD;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,GAClC,MAAM,OAAO,EACb,SAAS,2BAA2B,KAClC,KAAK,CAAC,SAAS,CAsIjB,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B,UAAmC,CAAC"}
1
+ {"version":3,"file":"testing_reset_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/testing_reset_actions.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAMzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gBAAg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