@fuzdev/fuz_app 0.86.0 → 0.88.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 (106) hide show
  1. package/dist/actions/action_rpc.js +1 -1
  2. package/dist/actions/register_action_ws.js +1 -1
  3. package/dist/auth/CLAUDE.md +15 -0
  4. package/dist/auth/account_actions.js +1 -1
  5. package/dist/auth/account_route_schema.d.ts +146 -0
  6. package/dist/auth/account_route_schema.d.ts.map +1 -0
  7. package/dist/auth/account_route_schema.js +141 -0
  8. package/dist/auth/account_routes.d.ts +0 -79
  9. package/dist/auth/account_routes.d.ts.map +1 -1
  10. package/dist/auth/account_routes.js +15 -110
  11. package/dist/auth/audit_log_route_schema.d.ts +32 -0
  12. package/dist/auth/audit_log_route_schema.d.ts.map +1 -0
  13. package/dist/auth/audit_log_route_schema.js +36 -0
  14. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  15. package/dist/auth/audit_log_routes.js +2 -12
  16. package/dist/auth/bearer_auth.js +1 -1
  17. package/dist/auth/bootstrap_route_schema.d.ts +85 -0
  18. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -0
  19. package/dist/auth/bootstrap_route_schema.js +56 -0
  20. package/dist/auth/bootstrap_routes.d.ts +0 -20
  21. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  22. package/dist/auth/bootstrap_routes.js +4 -35
  23. package/dist/auth/signup_route_schema.d.ts +53 -0
  24. package/dist/auth/signup_route_schema.d.ts.map +1 -0
  25. package/dist/auth/signup_route_schema.js +59 -0
  26. package/dist/auth/signup_routes.d.ts +0 -26
  27. package/dist/auth/signup_routes.d.ts.map +1 -1
  28. package/dist/auth/signup_routes.js +8 -40
  29. package/dist/http/CLAUDE.md +2 -1
  30. package/dist/http/client_ip.d.ts +15 -0
  31. package/dist/http/client_ip.d.ts.map +1 -0
  32. package/dist/http/client_ip.js +13 -0
  33. package/dist/http/proxy.d.ts +0 -7
  34. package/dist/http/proxy.d.ts.map +1 -1
  35. package/dist/http/proxy.js +0 -7
  36. package/dist/realtime/sse.d.ts +0 -2
  37. package/dist/realtime/sse.d.ts.map +1 -1
  38. package/dist/realtime/sse.js +1 -2
  39. package/dist/realtime/sse_constants.d.ts +17 -0
  40. package/dist/realtime/sse_constants.d.ts.map +1 -0
  41. package/dist/realtime/sse_constants.js +16 -0
  42. package/dist/testing/CLAUDE.md +6 -3
  43. package/dist/testing/admin_integration.d.ts.map +1 -1
  44. package/dist/testing/admin_integration.js +1 -1
  45. package/dist/testing/app_server.d.ts +0 -15
  46. package/dist/testing/app_server.d.ts.map +1 -1
  47. package/dist/testing/app_server.js +1 -15
  48. package/dist/testing/audit_completeness.d.ts.map +1 -1
  49. package/dist/testing/audit_completeness.js +1 -1
  50. package/dist/testing/cross_backend/account_lifecycle.d.ts +5 -5
  51. package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
  52. package/dist/testing/cross_backend/account_lifecycle.js +1 -1
  53. package/dist/testing/cross_backend/actor_lookup.d.ts +5 -5
  54. package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
  55. package/dist/testing/cross_backend/actor_search.d.ts +3 -3
  56. package/dist/testing/cross_backend/actor_search.d.ts.map +1 -1
  57. package/dist/testing/cross_backend/app_settings.d.ts +3 -3
  58. package/dist/testing/cross_backend/app_settings.d.ts.map +1 -1
  59. package/dist/testing/cross_backend/body_size.d.ts +10 -0
  60. package/dist/testing/cross_backend/body_size.d.ts.map +1 -0
  61. package/dist/testing/cross_backend/body_size.js +137 -0
  62. package/dist/testing/cross_backend/body_size_smuggling.d.ts +10 -0
  63. package/dist/testing/cross_backend/body_size_smuggling.d.ts.map +1 -0
  64. package/dist/testing/cross_backend/body_size_smuggling.js +138 -0
  65. package/dist/testing/cross_backend/cell_cross_helpers.d.ts +0 -11
  66. package/dist/testing/cross_backend/cell_cross_helpers.d.ts.map +1 -1
  67. package/dist/testing/cross_backend/cell_crud.d.ts +2 -2
  68. package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
  69. package/dist/testing/cross_backend/cell_crud.js +1 -1
  70. package/dist/testing/cross_backend/cell_grant_role.d.ts +2 -2
  71. package/dist/testing/cross_backend/cell_grant_role.d.ts.map +1 -1
  72. package/dist/testing/cross_backend/cell_grant_role.js +1 -1
  73. package/dist/testing/cross_backend/cell_relations.d.ts +2 -2
  74. package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
  75. package/dist/testing/cross_backend/cell_relations.js +1 -1
  76. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  77. package/dist/testing/cross_backend/conformance_table.js +8 -6
  78. package/dist/testing/cross_backend/fact_serving.d.ts +2 -3
  79. package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
  80. package/dist/testing/cross_backend/in_process_setup.d.ts +143 -0
  81. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -0
  82. package/dist/testing/cross_backend/in_process_setup.js +166 -0
  83. package/dist/testing/cross_backend/origin.d.ts +5 -5
  84. package/dist/testing/cross_backend/origin.d.ts.map +1 -1
  85. package/dist/testing/cross_backend/ready.d.ts +2 -7
  86. package/dist/testing/cross_backend/ready.d.ts.map +1 -1
  87. package/dist/testing/cross_backend/setup.d.ts +54 -135
  88. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  89. package/dist/testing/cross_backend/setup.js +11 -171
  90. package/dist/testing/cross_backend/sse_round_trip.js +1 -1
  91. package/dist/testing/cross_backend/testing_backdoor.d.ts +2 -2
  92. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  93. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  94. package/dist/testing/cross_backend/testing_reset_actions.js +2 -1
  95. package/dist/testing/integration.js +2 -2
  96. package/dist/testing/middleware.d.ts.map +1 -1
  97. package/dist/testing/middleware.js +2 -1
  98. package/dist/testing/sse_round_trip.d.ts +1 -1
  99. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  100. package/dist/testing/sse_round_trip.js +1 -1
  101. package/dist/testing/stubs.d.ts.map +1 -1
  102. package/dist/testing/stubs.js +7 -9
  103. package/dist/testing/test_credentials.d.ts +23 -0
  104. package/dist/testing/test_credentials.d.ts.map +1 -0
  105. package/dist/testing/test_credentials.js +22 -0
  106. package/package.json +2 -2
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Read the resolved client IP off the Hono context.
3
+ *
4
+ * Split from `proxy.ts` (which pulls `hono/utils/ipaddr` for trusted-proxy
5
+ * CIDR matching) so dispatch + route modules that only need to *read* the IP
6
+ * stay free of that value import — and the cross-process test surface that
7
+ * imports them stays free of the optional `hono` peer. The IP itself is set on
8
+ * the context by the trusted-proxy middleware in `proxy.ts`.
9
+ *
10
+ * @module
11
+ */
12
+ /** Client IP resolved by the trusted-proxy middleware, or `'unknown'` if unset. */
13
+ export const get_client_ip = (c) => c.get('client_ip') || 'unknown';
@@ -154,11 +154,4 @@ export declare const create_proxy_middleware: (options: ProxyOptions) => Middlew
154
154
  * @param options - trusted proxy configuration
155
155
  */
156
156
  export declare const create_proxy_middleware_spec: (options: ProxyOptions) => MiddlewareSpec;
157
- /**
158
- * Read the resolved client IP from the Hono context.
159
- *
160
- * Returns `'unknown'` if the proxy middleware has not run or no IP is available.
161
- * Set by `create_proxy_middleware`.
162
- */
163
- export declare const get_client_ip: (c: Context) => string;
164
157
  //# sourceMappingURL=proxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,OAAO,EAAE,iBAAiB,EAAC,MAAM,MAAM,CAAC;AAErD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAGzD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY,GAAI,IAAI,MA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AAC,KAAG,OAqBvE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,iBAAiB,GAC7B,eAAe,MAAM,EACrB,SAAS,KAAK,CAAC,WAAW,CAAC,KACzB,MAAM,GAAG,SA0BX,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,GAAI,SAAS,YAAY,KAAG,iBAyC/D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GAAI,SAAS,YAAY,KAAG,cAInE,CAAC"}
@@ -298,10 +298,3 @@ export const create_proxy_middleware_spec = (options) => ({
298
298
  path: '*',
299
299
  handler: create_proxy_middleware(options),
300
300
  });
301
- /**
302
- * Read the resolved client IP from the Hono context.
303
- *
304
- * Returns `'unknown'` if the proxy middleware has not run or no IP is available.
305
- * Set by `create_proxy_middleware`.
306
- */
307
- export const get_client_ip = (c) => c.get('client_ip') || 'unknown';
@@ -53,8 +53,6 @@ export declare const create_sse_response: <T = unknown>(c: Context, log: Logger)
53
53
  response: Response;
54
54
  stream: SseStream<T>;
55
55
  };
56
- /** SSE comment sent on connect to flush headers through proxies. Exported for test assertions. */
57
- export declare const SSE_CONNECTED_COMMENT = ": connected\n\n";
58
56
  /** Spec for a push event — declares params schema, description, and channel. */
59
57
  export interface EventSpec {
60
58
  /** Event method name, used as the JSON-RPC notification `method`. */
@@ -1 +1 @@
1
- {"version":3,"file":"sse.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/realtime/sse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IACrC,mDAAmD;IACnD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;GAUG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,SAAS,eAAe,EACrE,aAAa;IAAC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;CAAC,EAC5D,aAAa,KAAK,CAAC,SAAS,CAAC,EAC7B,KAAK,MAAM,KACT;IAAC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;CAmBhD,CAAC"}
@@ -9,6 +9,7 @@
9
9
  import { streamSSE } from 'hono/streaming';
10
10
  import { z } from 'zod';
11
11
  import { DEV } from 'esm-env';
12
+ import { SSE_CONNECTED_COMMENT } from './sse_constants.js';
12
13
  /**
13
14
  * Create an SSE response for a Hono context.
14
15
  *
@@ -74,8 +75,6 @@ export const create_sse_response = (c, log) => {
74
75
  });
75
76
  return { response, stream: sse_stream };
76
77
  };
77
- /** SSE comment sent on connect to flush headers through proxies. Exported for test assertions. */
78
- export const SSE_CONNECTED_COMMENT = `: connected\n\n`;
79
78
  /**
80
79
  * Create a broadcaster that validates events in DEV mode.
81
80
  *
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Hono-free SSE wire constants.
3
+ *
4
+ * Split from `sse.ts` (which pulls `hono/streaming` via `streamSSE`) so the
5
+ * stream-framing constants are importable by cross-process test suites
6
+ * asserting on the wire without dragging in the in-process Hono SSE
7
+ * implementation.
8
+ *
9
+ * @module
10
+ */
11
+ /**
12
+ * The comment line written immediately on SSE stream open. Flushes headers +
13
+ * confirms the connection is live before the first real event. Cross-process
14
+ * SSE tests assert the stream emits this on connect.
15
+ */
16
+ export declare const SSE_CONNECTED_COMMENT = ": connected\n\n";
17
+ //# sourceMappingURL=sse_constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sse_constants.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/realtime/sse_constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,oBAAoB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Hono-free SSE wire constants.
3
+ *
4
+ * Split from `sse.ts` (which pulls `hono/streaming` via `streamSSE`) so the
5
+ * stream-framing constants are importable by cross-process test suites
6
+ * asserting on the wire without dragging in the in-process Hono SSE
7
+ * implementation.
8
+ *
9
+ * @module
10
+ */
11
+ /**
12
+ * The comment line written immediately on SSE stream open. Flushes headers +
13
+ * confirms the connection is live before the first real event. Cross-process
14
+ * SSE tests assert the stream emits this on connect.
15
+ */
16
+ export const SSE_CONNECTED_COMMENT = `: connected\n\n`;
@@ -1043,9 +1043,12 @@ stays **off** `create_spine_surface_spec`, and these dedicated suites are the
1043
1043
  cell validators (`describe_standard_cross_process_tests`' generic round-trip
1044
1044
  never sees them). Both parse every success response against the verb's Zod
1045
1045
  **output** schema, so a TS↔Rust envelope drift fails the suite — not just a
1046
- payload-field drift. Call-site primitives (`rpc_call` / `error_reason` /
1047
- `expect_output` + the shared `CellCrossTestOptions`) live in
1048
- `cross_backend/cell_cross_helpers.ts`.
1046
+ payload-field drift. Call-site primitives (`cross_rpc_call` / `error_reason` /
1047
+ `expect_output`) live in `cross_backend/cell_cross_helpers.ts`; the shared
1048
+ options shape is `RpcPathCrossSuiteOptions` from `cross_backend/setup.ts` (the
1049
+ neutral base every RPC-dispatched imperative cross suite aliases — origin,
1050
+ body-size, actor lookup/search, account lifecycle, app settings, testing
1051
+ backdoor, cell).
1049
1052
 
1050
1053
  - **`describe_cell_crud_cross_tests`** (gates on `capabilities.cell_crud`) —
1051
1054
  the create → get → update → delete → list lifecycle threading the id, plus
@@ -1 +1 @@
1
- {"version":3,"file":"admin_integration.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/admin_integration.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAgC7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAA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AA0B,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD;;;;OAIG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B,uCAAuC;IACvC,YAAY,EAAE,mBAAmB,CAAC;IAClC,uFAAuF;IACvF,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,4GAA4G;IAC5G,KAAK,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,aAAa,EAAE,uBAAuB,CAAC;IACvC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAiBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yCAAyC,GACrD,SAAS,mCAAmC,KAC1C,IAi3BF,CAAC"}
@@ -28,7 +28,7 @@ import './assert_dev_env.js';
28
28
  import { describe, test, assert, afterAll } from 'vitest';
29
29
  import { ROLE_ADMIN } from '../auth/role_schema.js';
30
30
  import { GRANT_PATH_ADMIN } from '../auth/grant_path_schema.js';
31
- import { DEFAULT_TEST_PASSWORD } from './app_server.js';
31
+ import { DEFAULT_TEST_PASSWORD } from './test_credentials.js';
32
32
  import { role_grant_offer_and_accept } from './role_grant_helpers.js';
33
33
  import { find_auth_route } from './integration_helpers.js';
34
34
  import { ErrorCoverageCollector, assert_error_coverage, DEFAULT_INTEGRATION_ERROR_COVERAGE, } from './error_coverage.js';
@@ -34,21 +34,6 @@ import type { RpcEndpointsSuiteOption } from './rpc_helpers.js';
34
34
  export declare const stub_password_deps: PasswordHashDeps;
35
35
  /** 64-hex-char test cookie secret — deterministic, never used in production. */
36
36
  export declare const TEST_COOKIE_SECRET: string;
37
- /**
38
- * Default password for bootstrapped test accounts. Shared between the
39
- * in-process keeper bootstrap (`bootstrap_test_keeper`,
40
- * `create_test_account_with_credentials`, `create_test_app_server`,
41
- * `TestApp.create_account`) and the cross-process bootstrap
42
- * (`cross_backend/setup.ts`). The two paths MUST agree — when they
43
- * diverged during the 3d cross-process lift, ~20 login tests 401'd
44
- * silently against the cross-process backend because the per-test
45
- * fixture minted accounts under a different default than the
46
- * integration suite's hardcoded login bodies expected. Consumers
47
- * hardcoding the literal string in test bodies should import this
48
- * constant instead so a future divergence becomes a typecheck miss
49
- * rather than a runtime password mismatch.
50
- */
51
- export declare const DEFAULT_TEST_PASSWORD = "test-password-123";
52
37
  /**
53
38
  * Options for `bootstrap_test_keeper` and `create_test_account_with_credentials`.
54
39
  *
@@ -1 +1 @@
1
- {"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/app_server.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAGjD,OAAO,EAA2B,KAAK,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAE1E,OAAO,KAAK,EAAC,EAAE,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAU1D,OAAO,EAA8B,KAAK,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAiB,KAAK,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAwB,KAAK,UAAU,EAAE,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACnG,OAAO,EAEN,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC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AK,CAAC,SAAS,CAAC,CAAC;IAC9B,0EAA0E;IAC1E,sBAAsB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnF,4EAA4E;IAC5E,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,6BAA6B,GACzC,SAAS,gCAAgC,KACvC,OAAO,CAAC,mBAAmB,CAuE7B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import './assert_dev_env.js';
2
2
  import { z } from 'zod';
3
3
  import { Logger } from '@fuzdev/fuz_util/log.js';
4
+ import { DEFAULT_TEST_PASSWORD } from './test_credentials.js';
4
5
  import { ROLE_KEEPER } from '../auth/role_schema.js';
5
6
  import { create_validated_keyring } from '../auth/keyring.js';
6
7
  import { generate_api_token } from '../auth/api_token.js';
@@ -28,21 +29,6 @@ export const stub_password_deps = {
28
29
  };
29
30
  /** 64-hex-char test cookie secret — deterministic, never used in production. */
30
31
  export const TEST_COOKIE_SECRET = 'a'.repeat(64);
31
- /**
32
- * Default password for bootstrapped test accounts. Shared between the
33
- * in-process keeper bootstrap (`bootstrap_test_keeper`,
34
- * `create_test_account_with_credentials`, `create_test_app_server`,
35
- * `TestApp.create_account`) and the cross-process bootstrap
36
- * (`cross_backend/setup.ts`). The two paths MUST agree — when they
37
- * diverged during the 3d cross-process lift, ~20 login tests 401'd
38
- * silently against the cross-process backend because the per-test
39
- * fixture minted accounts under a different default than the
40
- * integration suite's hardcoded login bodies expected. Consumers
41
- * hardcoding the literal string in test bodies should import this
42
- * constant instead so a future divergence becomes a typecheck miss
43
- * rather than a runtime password mismatch.
44
- */
45
- export const DEFAULT_TEST_PASSWORD = 'test-password-123';
46
32
  // Module-level PGlite factory for create_test_app_server when no db is provided.
47
33
  // Shares the WASM instance cache from test_db.ts, avoiding redundant cold starts
48
34
  // within the same vitest worker thread. Schema is reset on each create() call.
@@ -1 +1 @@
1
- {"version":3,"file":"audit_completeness.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/audit_completeness.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AA4B7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAS9D,OAAO,EAKN,KAAK,uBAAuB,EAC5B,MAAM,kBAAkB,CAAC;AA2B1B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAC,SAAS,EAAc,MAAM,0BAA0B,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;;;;OAKG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;;;OAMG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B,uCAAuC;IACvC,YAAY,EAAE,mBAAmB,CAAC;IAClC,yEAAyE;IACzE,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC;;;OAGG;IACH,aAAa,EAAE,uBAAuB,CAAC;CACvC;AA8FD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iCAAiC,GAAI,SAAS,4BAA4B,KAAG,IAomBzF,CAAC"}
1
+ {"version":3,"file":"audit_completeness.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/audit_completeness.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AA4B7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAU9D,OAAO,EAKN,KAAK,uBAAuB,EAC5B,MAAM,kBAAkB,CAAC;AA2B1B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAC,SAAS,EAAc,MAAM,0BAA0B,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;;;;OAKG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;;;;;OAMG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B,uCAAuC;IACvC,YAAY,EAAE,mBAAmB,CAAC;IAClC,yEAAyE;IACzE,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC;;;OAGG;IACH,aAAa,EAAE,uBAAuB,CAAC;CACvC;AA8FD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iCAAiC,GAAI,SAAS,4BAA4B,KAAG,IAomBzF,CAAC"}
@@ -25,7 +25,7 @@ import './assert_dev_env.js';
25
25
  import { describe, test, assert } from 'vitest';
26
26
  import { ROLE_ADMIN } from '../auth/role_schema.js';
27
27
  import { AUDIT_EVENT_TYPES, } from '../auth/audit_log_schema.js';
28
- import { DEFAULT_TEST_PASSWORD } from './app_server.js';
28
+ import { DEFAULT_TEST_PASSWORD } from './test_credentials.js';
29
29
  import { find_auth_route } from './integration_helpers.js';
30
30
  import { rpc_call_for_spec, require_rpc_endpoint_path, resolve_rpc_endpoints_for_setup, } from './rpc_helpers.js';
31
31
  import { role_grant_offer_and_accept } from './role_grant_helpers.js';
@@ -1,10 +1,10 @@
1
1
  import '../assert_dev_env.js';
2
- import { type CellCrossTestOptions } from './cell_cross_helpers.js';
2
+ import type { RpcPathCrossSuiteOptions } from './setup.js';
3
3
  /**
4
- * Options for the account-lifecycle parity suite. Shares the shape of the
5
- * cell suites (`setup_test` / `capabilities` / `rpc_path`); reuses
6
- * `CellCrossTestOptions` rather than minting a structural duplicate.
4
+ * Options for the account-lifecycle parity suite. The standard
5
+ * RPC-dispatched cross-suite shape (`setup_test` / `capabilities` /
6
+ * `rpc_path`); aliases `RpcPathCrossSuiteOptions` rather than duplicating.
7
7
  */
8
- export type AccountLifecycleCrossTestOptions = CellCrossTestOptions;
8
+ export type AccountLifecycleCrossTestOptions = RpcPathCrossSuiteOptions;
9
9
  export declare const describe_account_lifecycle_cross_tests: (options: AccountLifecycleCrossTestOptions) => void;
10
10
  //# sourceMappingURL=account_lifecycle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account_lifecycle.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/account_lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiC9B,OAAO,EAIN,KAAK,oBAAoB,EACzB,MAAM,yBAAyB,CAAC;AAGjC;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,oBAAoB,CAAC;AAEpE,eAAO,MAAM,sCAAsC,GAClD,SAAS,gCAAgC,KACvC,IA+TF,CAAC"}
1
+ {"version":3,"file":"account_lifecycle.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/account_lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkC9B,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAGzD;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG,wBAAwB,CAAC;AAExE,eAAO,MAAM,sCAAsC,GAClD,SAAS,gCAAgC,KACvC,IA+TF,CAAC"}
@@ -21,7 +21,7 @@ import { describe, assert } from 'vitest';
21
21
  import { AccountDeleteOutput, AccountUndeleteOutput, AccountPurgeOutput, AdminAccountListOutput, AuditLogListOutput, ERROR_CANNOT_DELETE_KEEPER, } from '../../auth/admin_action_specs.js';
22
22
  import { ERROR_ACCOUNT_NOT_FOUND, ERROR_AUTHENTICATION_REQUIRED } from '../../http/error_schemas.js';
23
23
  import { test_if } from './capabilities.js';
24
- import { cross_rpc_call, error_reason, expect_output, } from './cell_cross_helpers.js';
24
+ import { cross_rpc_call, error_reason, expect_output } from './cell_cross_helpers.js';
25
25
  import { SPINE_RPC_PATH } from './default_spine_surface.js';
26
26
  export const describe_account_lifecycle_cross_tests = (options) => {
27
27
  const { setup_test, capabilities } = options;
@@ -1,10 +1,10 @@
1
1
  import '../assert_dev_env.js';
2
- import type { CellCrossTestOptions } from './cell_cross_helpers.js';
2
+ import type { RpcPathCrossSuiteOptions } from './setup.js';
3
3
  /**
4
- * Options for the actor-lookup parity suite. Shares the shape of the cell /
5
- * origin suites (`setup_test` / `capabilities` / `rpc_path`); reuses
6
- * `CellCrossTestOptions` rather than minting a structural duplicate.
4
+ * Options for the actor-lookup parity suite. The standard RPC-dispatched
5
+ * cross-suite shape (`setup_test` / `capabilities` / `rpc_path`); aliases
6
+ * the shared `RpcPathCrossSuiteOptions` rather than minting a duplicate.
7
7
  */
8
- export type ActorLookupCrossTestOptions = CellCrossTestOptions;
8
+ export type ActorLookupCrossTestOptions = RpcPathCrossSuiteOptions;
9
9
  export declare const describe_actor_lookup_cross_tests: (options: ActorLookupCrossTestOptions) => void;
10
10
  //# sourceMappingURL=actor_lookup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor_lookup.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/actor_lookup.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqC9B,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAGlE;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,CAAC;AAS/D,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IAkDxF,CAAC"}
1
+ {"version":3,"file":"actor_lookup.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/actor_lookup.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqC9B,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAGzD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AASnE,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IAkDxF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import '../assert_dev_env.js';
2
- import type { CellCrossTestOptions } from './cell_cross_helpers.js';
3
- /** Options for the actor-search parity suite (shares the cell/origin shape). */
4
- export type ActorSearchCrossTestOptions = CellCrossTestOptions;
2
+ import type { RpcPathCrossSuiteOptions } from './setup.js';
3
+ /** Options for the actor-search parity suite (the standard RPC-dispatched shape). */
4
+ export type ActorSearchCrossTestOptions = RpcPathCrossSuiteOptions;
5
5
  export declare const describe_actor_search_cross_tests: (options: ActorSearchCrossTestOptions) => void;
6
6
  //# sourceMappingURL=actor_search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor_search.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/actor_search.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA2C9B,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAGlE,gFAAgF;AAChF,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,CAAC;AAS/D,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IAyDxF,CAAC"}
1
+ {"version":3,"file":"actor_search.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/actor_search.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA2C9B,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAGzD,qFAAqF;AACrF,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AASnE,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IAyDxF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import '../assert_dev_env.js';
2
- import type { CellCrossTestOptions } from './cell_cross_helpers.js';
3
- /** Options for the app-settings effect suite (shares the cell/origin shape). */
4
- export type AppSettingsCrossTestOptions = CellCrossTestOptions;
2
+ import type { RpcPathCrossSuiteOptions } from './setup.js';
3
+ /** Options for the app-settings effect suite (the standard RPC-dispatched shape). */
4
+ export type AppSettingsCrossTestOptions = RpcPathCrossSuiteOptions;
5
5
  export declare const describe_app_settings_cross_tests: (options: AppSettingsCrossTestOptions) => void;
6
6
  //# sourceMappingURL=app_settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app_settings.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/app_settings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAsC9B,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAGlE,gFAAgF;AAChF,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,CAAC;AAiB/D,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IA8DxF,CAAC"}
1
+ {"version":3,"file":"app_settings.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/app_settings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAsC9B,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAGzD,qFAAqF;AACrF,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AAiBnE,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IA8DxF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import '../assert_dev_env.js';
2
+ import type { RpcPathCrossSuiteOptions } from './setup.js';
3
+ /**
4
+ * Options for the body-size parity suite — the standard RPC-dispatched
5
+ * cross-suite shape (`setup_test` / `capabilities` / `rpc_path`); aliases the
6
+ * shared `RpcPathCrossSuiteOptions` rather than minting a duplicate.
7
+ */
8
+ export type BodySizeCrossTestOptions = RpcPathCrossSuiteOptions;
9
+ export declare const describe_body_size_cross_tests: (options: BodySizeCrossTestOptions) => void;
10
+ //# sourceMappingURL=body_size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body_size.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/body_size.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA6D9B,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAGzD;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAmDhE,eAAO,MAAM,8BAA8B,GAAI,SAAS,wBAAwB,KAAG,IA0ClF,CAAC"}
@@ -0,0 +1,137 @@
1
+ import '../assert_dev_env.js';
2
+ /**
3
+ * Cross-backend parity suite for the request body-size limit.
4
+ *
5
+ * `create_app_server` (TS) and the Rust spine both cap the request body at a
6
+ * 1 MiB default (`DEFAULT_MAX_BODY_SIZE` / `fuz_http`'s
7
+ * `DEFAULT_BODY_LIMIT_BYTES`) and reject oversized payloads with `413` and the
8
+ * canonical flat REST body `{error: 'payload_too_large'}` — *before* auth,
9
+ * origin, or dispatch run (middleware step 4). Each impl unit-tests this in
10
+ * isolation, but nothing fires an oversized POST over the wire, so the
11
+ * cross-impl agreement on the status + body shape (and on the exact `>` cap
12
+ * boundary, not an off-by-one divergence) was unpinned. Three cases:
13
+ *
14
+ * - **over-limit POST (cap + 1 byte) → 413** `payload_too_large`, refused
15
+ * before any handler runs (the limit fires ahead of origin verification + the
16
+ * dispatcher, so an over-cap body is rejected regardless of how well-formed it
17
+ * is). Exactly one byte over — both impls reject on a strict `>`, so this is
18
+ * the tight upper boundary, and staying just over keeps it clear of any
19
+ * larger framework-default limit that would answer with a different body.
20
+ * - **at-limit POST (exactly the cap) → not 413** — one byte under the
21
+ * rejection threshold passes the size gate and reaches the dispatcher (the
22
+ * downstream status is irrelevant; only "not size-rejected" is asserted). The
23
+ * boundary sibling of the case above.
24
+ * - **under-limit POST (small) → 200** — a small, well-formed authenticated
25
+ * `account_verify` envelope sails through to a successful handler response,
26
+ * the positive control that the route works for normal traffic.
27
+ *
28
+ * **Real-socket connection hazard (cross-process only).** When the server caps
29
+ * the body it answers 413 and closes the connection *before* the client
30
+ * finishes uploading — correct HTTP, since an unread request body can't share a
31
+ * keep-alive socket. The client's pool can then hand that now-dead socket to
32
+ * the very next request (observed as `other side closed`). So every request
33
+ * here goes through `fetch_retrying_once`: a request that inherits the poisoned
34
+ * socket retries onto a fresh connection, which both keeps the suite
35
+ * deterministic *and* evicts the dead socket so it can't strand a later cross
36
+ * suite in the same process. In-process (`app.request`) has no socket, so the
37
+ * hazard is cross-process-only and the retry never fires there.
38
+ *
39
+ * Like origin/payload rejection, this is middleware-level flat REST — not the
40
+ * JSON-RPC envelope the conformance-table runner expects — so it's an
41
+ * imperative suite, not a `conformance_table` row. Runs both legs via the
42
+ * shared `{setup_test, capabilities}` protocol: the in-process leg
43
+ * (`auth/body_size_parity.db.test.ts`, plain `gro test`) and the cross-process
44
+ * leg (`cross_backend/body_size.cross.test.ts`, the TS spine binaries + Rust
45
+ * `testing_spine_stub` over real HTTP). The body-size limit is on every spine,
46
+ * so the suite is ungated.
47
+ *
48
+ * Cited property: `docs/security.md` §"Body Size Limiting".
49
+ *
50
+ * `$lib`-free by contract (relative specifiers only), like the sibling
51
+ * cross-backend suites.
52
+ *
53
+ * @module
54
+ */
55
+ import { describe, test, assert } from 'vitest';
56
+ import { account_verify_action_spec } from '../../auth/account_action_specs.js';
57
+ import { ERROR_PAYLOAD_TOO_LARGE } from '../../http/error_schemas.js';
58
+ import { SPINE_RPC_PATH } from './default_spine_surface.js';
59
+ /**
60
+ * The shared 1 MiB default both impls ship (`DEFAULT_MAX_BODY_SIZE` in TS,
61
+ * `DEFAULT_BODY_LIMIT_BYTES` in `fuz_http`). Kept as a local cross-impl
62
+ * contract value rather than imported from either impl — the boundary it
63
+ * pins is the shared default, and a change to either is a deliberate
64
+ * cross-impl decision that would revisit this suite regardless.
65
+ */
66
+ const BODY_LIMIT_DEFAULT_BYTES = 1024 * 1024;
67
+ /**
68
+ * Build an `account_verify` JSON-RPC envelope whose serialized length is
69
+ * *exactly* `target_bytes`, by growing a `params.pad` string to fill. Every
70
+ * character is ASCII, so the string length equals the UTF-8 byte length equals
71
+ * the `Content-Length` the transport sends — which is what the body-size
72
+ * middleware measures. `account_verify` takes no params, but at/over the cap
73
+ * the size check fires before input validation, so the padded shape is never
74
+ * reached on the rejection path.
75
+ */
76
+ const sized_envelope = (id, target_bytes) => {
77
+ const method = account_verify_action_spec.method;
78
+ const base = JSON.stringify({ jsonrpc: '2.0', method, id, params: { pad: '' } });
79
+ const pad = 'x'.repeat(Math.max(0, target_bytes - base.length));
80
+ return JSON.stringify({ jsonrpc: '2.0', method, id, params: { pad } });
81
+ };
82
+ /** A small, well-formed nullary `account_verify` body — well under the cap. */
83
+ const small_envelope = (id) => JSON.stringify({ jsonrpc: '2.0', method: account_verify_action_spec.method, id });
84
+ /**
85
+ * Issue a request, retrying once if the call *throws* (vs. returning a
86
+ * response). A request handed the keep-alive socket the server closed on an
87
+ * oversized-body rejection fails at the transport layer before any response;
88
+ * one retry opens a fresh connection (and drops the dead socket from the
89
+ * pool). Keyed on "threw at all" rather than a specific error code so it holds
90
+ * across the node / deno / bun cross runtimes, which surface different errors.
91
+ */
92
+ const fetch_retrying_once = async (transport, path, init) => {
93
+ try {
94
+ return await transport(path, init);
95
+ }
96
+ catch {
97
+ return await transport(path, init);
98
+ }
99
+ };
100
+ export const describe_body_size_cross_tests = (options) => {
101
+ const { setup_test } = options;
102
+ const rpc_path = options.rpc_path ?? SPINE_RPC_PATH;
103
+ /** POST `body` to the RPC path as the keeper, retry-once on a dead socket. */
104
+ const post = (fixture, body) => fetch_retrying_once(fixture.transport, rpc_path, {
105
+ method: 'POST',
106
+ headers: { ...fixture.create_session_headers(), 'content-type': 'application/json' },
107
+ body,
108
+ });
109
+ describe('body-size limit parity', () => {
110
+ test('over-limit POST (cap + 1) → 413 payload_too_large (refused before dispatch)', async () => {
111
+ const fixture = await setup_test();
112
+ // Keeper session cookie + the transport's default allowed Origin, so
113
+ // neither auth nor origin is the cause — only the body size. One byte
114
+ // over the cap: both impls reject on a strict `>`.
115
+ const res = await post(fixture, sized_envelope('over-limit', BODY_LIMIT_DEFAULT_BYTES + 1));
116
+ assert.strictEqual(res.status, 413, 'a body one byte over the cap must be rejected with 413');
117
+ const body = (await res.json().catch(() => undefined));
118
+ assert.strictEqual(body?.error, ERROR_PAYLOAD_TOO_LARGE);
119
+ });
120
+ test('at-limit POST (exactly the cap) → not size-rejected', async () => {
121
+ const fixture = await setup_test();
122
+ // Exactly at the cap is one byte under the `>` threshold, so it clears
123
+ // the size gate and reaches the dispatcher. Whatever the dispatcher
124
+ // then returns, it must not be the 413 — that's the lower boundary.
125
+ const res = await post(fixture, sized_envelope('at-limit', BODY_LIMIT_DEFAULT_BYTES));
126
+ assert.notStrictEqual(res.status, 413, 'a body exactly at the cap must not be size-rejected');
127
+ });
128
+ test('under-limit POST (small) → 200', async () => {
129
+ const fixture = await setup_test();
130
+ // Small well-formed body: clears the cap and reaches the
131
+ // `account_verify` handler, the positive control that normal traffic
132
+ // passes (and the 413 above is size-gated, not a blanket rejection).
133
+ const res = await post(fixture, small_envelope('under-limit'));
134
+ assert.strictEqual(res.status, 200, 'an under-limit authenticated request must pass');
135
+ });
136
+ });
137
+ };
@@ -0,0 +1,10 @@
1
+ import '../assert_dev_env.js';
2
+ /** Options for the smuggling probe — needs the raw URL, not a transport. */
3
+ export interface BodySizeSmugglingCrossTestOptions {
4
+ /** Base URL the spawned backend is reachable at (e.g. `http://localhost:1178`). */
5
+ readonly base_url: string;
6
+ /** RPC endpoint path to target. Default `/api/rpc`. */
7
+ readonly rpc_path?: string;
8
+ }
9
+ export declare const describe_body_size_smuggling_cross_tests: (options: BodySizeSmugglingCrossTestOptions) => void;
10
+ //# sourceMappingURL=body_size_smuggling.d.ts.map
@@ -0,0 +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;AAkD9B,4EAA4E;AAC5E,MAAM,WAAW,iCAAiC;IACjD,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC3B;AAqDD,eAAO,MAAM,wCAAwC,GACpD,SAAS,iCAAiC,KACxC,IA4DF,CAAC"}