@fuzdev/fuz_app 0.169.0 → 0.170.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.
- package/dist/actions/CLAUDE.md +17 -19
- package/dist/actions/action_codegen.d.ts +25 -18
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +83 -67
- package/dist/actions/action_event.d.ts +0 -8
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +7 -6
- package/dist/actions/action_event_data.d.ts +4 -4
- package/dist/actions/action_rpc.d.ts +1 -1
- package/dist/actions/action_rpc.js +1 -1
- package/dist/actions/action_spec.d.ts +8 -10
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +1 -1
- package/dist/actions/action_types.d.ts +4 -4
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +2 -2
- package/dist/actions/broadcast_api.d.ts +2 -2
- package/dist/actions/broadcast_api.js +4 -4
- package/dist/actions/compile_action_registry.d.ts +6 -7
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/compile_action_registry.js +8 -9
- package/dist/actions/perform_action.d.ts +6 -6
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +11 -10
- package/dist/actions/socket.svelte.d.ts +1 -1
- package/dist/actions/socket.svelte.js +2 -2
- package/dist/auth/CLAUDE.md +11 -11
- package/dist/auth/admin_action_specs.d.ts +24 -24
- package/dist/auth/audit_emitter.d.ts +6 -7
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +11 -22
- package/dist/auth/audit_log_ddl.d.ts +1 -1
- package/dist/auth/audit_log_ddl.js +1 -1
- package/dist/auth/audit_log_queries.d.ts +0 -13
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +3 -3
- package/dist/auth/audit_log_schema.d.ts +14 -15
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +1 -1
- package/dist/auth/auth_ddl.d.ts +1 -1
- package/dist/auth/auth_ddl.js +1 -1
- package/dist/auth/cell_action_specs.d.ts +54 -54
- package/dist/auth/cell_actions.d.ts +2 -2
- package/dist/auth/cell_actions.js +5 -5
- package/dist/auth/request_context.js +2 -2
- package/dist/auth/role_grant_offer_action_specs.d.ts +6 -6
- package/dist/auth/role_grant_offer_ddl.d.ts +1 -1
- package/dist/auth/role_grant_offer_ddl.js +1 -1
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +2 -3
- package/dist/auth/self_service_role_actions.d.ts +1 -1
- package/dist/auth/self_service_role_actions.js +1 -1
- package/dist/env/env_schemas.d.ts +1 -2
- package/dist/env/env_schemas.d.ts.map +1 -1
- package/dist/env/env_schemas.js +3 -4
- package/dist/http/CLAUDE.md +29 -31
- package/dist/http/auth_shape.d.ts +14 -32
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +14 -49
- package/dist/http/error_schemas.d.ts +18 -18
- package/dist/http/jsonrpc_helpers.js +1 -1
- package/dist/http/route_error_check.d.ts +2 -2
- package/dist/http/route_error_check.d.ts.map +1 -1
- package/dist/http/route_error_check.js +2 -3
- package/dist/http/route_errors.d.ts +4 -4
- package/dist/http/route_errors.d.ts.map +1 -1
- package/dist/http/route_errors.js +0 -13
- package/dist/http/route_spec.d.ts +33 -36
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +21 -22
- package/dist/http/schema_helpers.d.ts +75 -67
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +54 -77
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +6 -8
- package/dist/primitive_schemas.d.ts +9 -17
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +9 -17
- package/dist/realtime/sse.d.ts +3 -3
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +2 -2
- package/dist/schema_issues.d.ts +39 -147
- package/dist/schema_issues.d.ts.map +1 -1
- package/dist/schema_issues.js +39 -352
- package/dist/schema_meta.d.ts +63 -136
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +37 -184
- package/dist/sensitivity.d.ts +3 -5
- package/dist/sensitivity.d.ts.map +1 -1
- package/dist/sensitivity.js +3 -5
- package/dist/testing/CLAUDE.md +20 -22
- package/dist/testing/adversarial_headers.js +2 -2
- package/dist/testing/adversarial_input_cases.d.ts +19 -18
- package/dist/testing/adversarial_input_cases.d.ts.map +1 -1
- package/dist/testing/adversarial_input_cases.js +29 -42
- package/dist/testing/assertions.d.ts +2 -2
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/assertions.js +3 -3
- package/dist/testing/cross_backend/account_lifecycle.js +2 -2
- package/dist/testing/cross_backend/action_manifest.d.ts +10 -9
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +4 -3
- package/dist/testing/cross_backend/cell_crud.js +1 -1
- package/dist/testing/cross_backend/conformance_rpc_auth.d.ts +0 -62
- package/dist/testing/cross_backend/conformance_rpc_auth.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +3 -3
- package/dist/testing/cross_backend/cross_rpc.d.ts +3 -4
- package/dist/testing/cross_backend/cross_rpc.d.ts.map +1 -1
- package/dist/testing/cross_backend/cross_rpc.js +4 -4
- package/dist/testing/cross_backend/differential.js +2 -2
- package/dist/testing/cross_backend/identity_parity.js +9 -9
- package/dist/testing/cross_backend/origin_conformance.d.ts +9 -9
- package/dist/testing/cross_backend/query_shape.js +1 -1
- package/dist/testing/cross_backend/rpc_success_fixtures.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +1 -1
- package/dist/testing/cross_backend/setup.d.ts +25 -3
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +4 -4
- package/dist/testing/cross_backend/sse_round_trip.js +2 -2
- package/dist/testing/cross_backend/testing_origin_check.d.ts +4 -4
- package/dist/testing/cross_backend/token_lifetime.js +3 -3
- package/dist/testing/cross_backend/wire_shapes.js +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +1 -1
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +1 -1
- package/dist/testing/integration.js +2 -2
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +2 -2
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +2 -2
- package/dist/testing/rpc_attack_surface.js +1 -1
- package/dist/testing/rpc_envelope_cases.d.ts +3 -3
- package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
- package/dist/testing/rpc_envelope_cases.js +1 -1
- package/dist/testing/rpc_helpers.d.ts +12 -14
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +9 -10
- package/dist/testing/schema_generators.d.ts +67 -60
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +150 -145
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +2 -2
- package/dist/testing/surface_invariants.d.ts +1 -1
- package/dist/testing/surface_invariants.js +1 -1
- package/dist/ui/form_state.svelte.d.ts +1 -1
- package/dist/ui/form_state.svelte.js +1 -1
- package/package.json +5 -7
- package/dist/zod.d.ts +0 -116
- package/dist/zod.d.ts.map +0 -1
- package/dist/zod.js +0 -218
- package/dist/zod_schemas.d.ts +0 -100
- package/dist/zod_schemas.d.ts.map +0 -1
- package/dist/zod_schemas.js +0 -157
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/integration_helpers.ts"],"names":[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W,EAC3B,eAAe,WAAW,KACxB,MAAM,CAAC,MAAM,EAAE,MAAM,CAavB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC7B,MAAM,SAAS,EACf,QAAQ,oBAAoB,EAC5B,gBAAgB,WAAW,EAC3B,eAAe,WAAW,KACxB,MAAM,CAAC,MAAM,EAAE,MAAM,CACoE,CAAC;AAE7F;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,6BAA6B,GACzC,WAAW,aAAa,EACxB,cAAc,OAAO,KACnB,OAAiD,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,EAAE,QAAQ,OAAO,KAAG,OACQ,CAAC"}
|
|
@@ -5,13 +5,13 @@ import './assert_dev_env.js';
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import { assert } from 'vitest';
|
|
8
|
+
import { parse } from '@fuzdev/fuz_schema/schema.ts';
|
|
8
9
|
import { is_null_schema } from '../http/schema_helpers.js';
|
|
9
10
|
import { get_route_error_map } from '../http/route_errors.js';
|
|
10
11
|
import { is_public_auth } from '../http/auth_shape.js';
|
|
11
12
|
import { ERROR_AUTHENTICATION_REQUIRED } from '../http/error_schemas.js';
|
|
12
13
|
import { ROLE_ADMIN } from '../auth/role_schema.js';
|
|
13
14
|
import { create_test_request_headers } from './test_origin.js';
|
|
14
|
-
import { parse_any } from '../schema_issues.js';
|
|
15
15
|
import { decode_route_path, find_mounted_route, is_json_response, to_mounted_routes } from '../http/route_error_check.js';
|
|
16
16
|
import { assert_error_response_declared } from './assertions.js';
|
|
17
17
|
/** Each spec list's compiled routes, so a list is compiled once. */
|
|
@@ -145,7 +145,7 @@ export const assert_response_matches_spec = async (route_specs, method, path, re
|
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
147
|
if (response.ok) {
|
|
148
|
-
const result =
|
|
148
|
+
const result = parse(spec.output, body);
|
|
149
149
|
if (!result.ok) {
|
|
150
150
|
throw new Error(`Output schema mismatch for ${method} ${path} (${response.status}): ${JSON.stringify(result.issues)}`);
|
|
151
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,EAAE,EAA0B,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,EAAE,EAA0B,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAqB5B,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAOtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoB7D,gEAAgE;AAChE,MAAM,WAAW,qBAAqB;IACrC,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,oEAAoE;IACpE,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,iDAAiD;IACjD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4CAA4C;IAC5C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,0CAA0C;IAC1C,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,+DAA+D;IAC/D,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,gFAAgF;IACh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;IAAE,GAAG,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAoErC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACtC,YAAY,MAAM,EAClB,OAAO,KAAK,CAAC,kBAAkB,CAAC,KAC9B,IAuGF,CAAC;AAIF,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,sDAAsD;AACtD,MAAM,WAAW,0BAA0B;IAC1C,iDAAiD;IACjD,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC;CACpD;AAED,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACtC,GAAG,EAAE,IAAI,CAAC;IACV,aAAa,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACxC,eAAe,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1C,qBAAqB,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAChD,2BAA2B,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACtD,0BAA0B,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;CACrD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,GAC5C,UAAU,0BAA0B,KAClC,sBA4DF,CAAC"}
|
|
@@ -16,6 +16,7 @@ import './assert_dev_env.js';
|
|
|
16
16
|
import { vi, test, assert, describe } from 'vitest';
|
|
17
17
|
import { Hono } from 'hono';
|
|
18
18
|
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
19
|
+
import { parse } from '@fuzdev/fuz_schema/schema.ts';
|
|
19
20
|
import { create_bearer_auth_middleware } from '../auth/bearer_auth.js';
|
|
20
21
|
import { AUTH_MIDDLEWARE_PATH, ORIGIN_MIDDLEWARE_PATH } from '../auth/middleware.js';
|
|
21
22
|
import { query_validate_api_token } from '../auth/api_token_queries.js';
|
|
@@ -28,7 +29,6 @@ import { REQUEST_CONTEXT_KEY } from '../auth/request_context.js';
|
|
|
28
29
|
import { RESOLVED_AUTH_KEY, TEST_CONTEXT_PRESET, TEST_CONTEXT_PRESET_KEY } from '../hono_context.js';
|
|
29
30
|
import { get_resolved_auth } from '../auth/resolved_auth.js';
|
|
30
31
|
import { create_test_resolved_auth } from './resolved_auth.js';
|
|
31
|
-
import { parse_any } from '../schema_issues.js';
|
|
32
32
|
// Mock the query modules so test cases can control return values.
|
|
33
33
|
// vi.mock() is hoisted by vitest, so these run before any imports resolve.
|
|
34
34
|
vi.mock('../auth/api_token_queries.js', () => ({
|
|
@@ -177,7 +177,7 @@ export const describe_bearer_auth_cases = (suite_name, cases) => {
|
|
|
177
177
|
if (tc.expected_error) {
|
|
178
178
|
assert.strictEqual(body.error, tc.expected_error.code);
|
|
179
179
|
assert.strictEqual(res.status, tc.expected_error.status);
|
|
180
|
-
const parsed =
|
|
180
|
+
const parsed = parse(tc.expected_error.schema, body);
|
|
181
181
|
assert.ok(parsed.ok, `error body fails its schema: ${JSON.stringify(body)}`);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -221,7 +221,7 @@ const describe_rpc_adversarial_params = (options) => {
|
|
|
221
221
|
continue;
|
|
222
222
|
describe(endpoint.path, () => {
|
|
223
223
|
for (const method of methods_with_input) {
|
|
224
|
-
// look up the source RpcAction for the
|
|
224
|
+
// look up the source RpcAction for the input schema
|
|
225
225
|
const action = find_rpc_action(rpc_endpoint_specs, endpoint.path, method.name);
|
|
226
226
|
if (!action) {
|
|
227
227
|
test(`${method.name} — missing RpcAction source spec`, () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
+
import type { AnySchema } from '@fuzdev/fuz_schema/schema.ts';
|
|
2
3
|
import type { AppSurfaceRpcEndpoint, AppSurfaceRpcMethod } from '../http/surface.js';
|
|
3
4
|
import type { JsonrpcErrorCode, JsonrpcRequestId } from '../http/jsonrpc.js';
|
|
4
|
-
import type { ValidationSchema } from '../schema_issues.js';
|
|
5
5
|
import { type InputTestCase, type InputTestCaseOptions } from './adversarial_input_cases.js';
|
|
6
6
|
/** The request id every envelope case sends where it sends one. */
|
|
7
7
|
export declare const RPC_ENVELOPE_PROBE_ID = "envelope_probe";
|
|
@@ -104,11 +104,11 @@ export declare const assert_rpc_envelope_refusal: (status: number, body: unknown
|
|
|
104
104
|
* (`invalid_request`) before params validation runs, and the envelope cases
|
|
105
105
|
* cover it. Every case returned owes 400 `invalid_params`.
|
|
106
106
|
*
|
|
107
|
-
* @param input - the method's input schema
|
|
107
|
+
* @param input - the method's input schema
|
|
108
108
|
* @param options - a valid base `params` to seed the cases (`InputTestCaseOptions.base`),
|
|
109
109
|
* and the method name for error messages
|
|
110
110
|
* @returns the cases, each a `params` object
|
|
111
111
|
* @throws Error if the base `params`, seeded or generated, fails the input schema
|
|
112
112
|
*/
|
|
113
|
-
export declare const generate_rpc_params_test_cases: (input:
|
|
113
|
+
export declare const generate_rpc_params_test_cases: (input: AnySchema, options?: InputTestCaseOptions) => Array<InputTestCase>;
|
|
114
114
|
//# sourceMappingURL=rpc_envelope_cases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc_envelope_cases.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_envelope_cases.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc_envelope_cases.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_envelope_cases.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAe7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA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AAC;AAEzF,wFAAwF;AACxF,eAAO,MAAM,2BAA2B,GAAI,QAAQ,MAAM,KAAG,MACL,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,yBAAyB,GACrC,UAAU,qBAAqB,EAC/B,UAAS,sBAA2B,KAClC,KAAK,CAAC,eAAe,CA0KvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GACnC,eAAe,MAAM,EACrB,GAAG,eAAe,EAClB,UAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAClC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAUgD,CAAC;AAEpF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GACvC,QAAQ,MAAM,EACd,MAAM,OAAO,EACb,GAAG,eAAe,KAChB,IAUF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,8BAA8B,GAC1C,OAAO,SAAS,EAChB,UAAU,oBAAoB,KAC5B,KAAK,CAAC,aAAa,CAGpB,CAAC"}
|
|
@@ -237,7 +237,7 @@ export const assert_rpc_envelope_refusal = (status, body, c) => {
|
|
|
237
237
|
* (`invalid_request`) before params validation runs, and the envelope cases
|
|
238
238
|
* cover it. Every case returned owes 400 `invalid_params`.
|
|
239
239
|
*
|
|
240
|
-
* @param input - the method's input schema
|
|
240
|
+
* @param input - the method's input schema
|
|
241
241
|
* @param options - a valid base `params` to seed the cases (`InputTestCaseOptions.base`),
|
|
242
242
|
* and the method name for error messages
|
|
243
243
|
* @returns the cases, each a `params` object
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
-
import type
|
|
3
|
-
import { type Schema } from '@fuzdev/fuz_schema/schema.ts';
|
|
2
|
+
import { type Schema, type Infer, type AnySchema } from '@fuzdev/fuz_schema/schema.ts';
|
|
4
3
|
import { type JsonrpcErrorCode } from '../http/jsonrpc.js';
|
|
5
4
|
import type { RequestResponseActionSpec } from '../actions/action_spec.js';
|
|
6
5
|
import type { RpcAction } from '../actions/action_types.js';
|
|
7
6
|
import type { AppSurfaceRpcEndpoint, AppSurfaceRpcMethod, RpcEndpointSpec } from '../http/surface.js';
|
|
8
7
|
import type { AppServerContext } from '../server/app_server_context.js';
|
|
9
8
|
import type { SessionOptions } from '../auth/session_cookie.js';
|
|
10
|
-
import { type ValidationOutput, type ValidationSchema } from '../schema_issues.js';
|
|
11
9
|
/**
|
|
12
10
|
* Union accepted by the suite-level `rpc_endpoints` option — eager array or
|
|
13
11
|
* a factory that takes an `AppServerContext` and returns endpoint specs. The
|
|
@@ -48,7 +46,7 @@ export declare const resolve_rpc_endpoints_for_setup: (rpc_endpoints: RpcEndpoin
|
|
|
48
46
|
* @param params - params (omit for parameterless methods; `null` is also
|
|
49
47
|
* stripped for ergonomic call sites — JSON-RPC 2.0 §4.2
|
|
50
48
|
* forbids `"params": null` on the wire, and `create_rpc_endpoint`
|
|
51
|
-
* rejects `
|
|
49
|
+
* rejects `literal(null)` action input schemas at registration).
|
|
52
50
|
* Tests that need to construct a literal `"params": null`
|
|
53
51
|
* envelope (e.g. asserting envelope-level rejection) should
|
|
54
52
|
* build the body inline rather than route through this helper.
|
|
@@ -93,9 +91,9 @@ export declare const assert_jsonrpc_error_response: (body: unknown, expected_cod
|
|
|
93
91
|
* is provided, also validates the `result` field against the declared
|
|
94
92
|
* output schema — matching the REST round-trip's `assert_response_matches_spec`.
|
|
95
93
|
*
|
|
96
|
-
* @param output_schema - optional
|
|
94
|
+
* @param output_schema - optional schema to validate the `result` field against
|
|
97
95
|
*/
|
|
98
|
-
export declare const assert_jsonrpc_success_response: (body: unknown, output_schema?:
|
|
96
|
+
export declare const assert_jsonrpc_success_response: (body: unknown, output_schema?: AnySchema) => void;
|
|
99
97
|
/**
|
|
100
98
|
* Minimal transport surface — the duck type `Hono.request` already satisfies.
|
|
101
99
|
* Extracted so test setups that want an in-process / WS / mock path can plug
|
|
@@ -153,7 +151,7 @@ export interface RpcCallArgs {
|
|
|
153
151
|
method: string;
|
|
154
152
|
/**
|
|
155
153
|
* Params for the call. Omit (or pass `undefined`) for parameterless
|
|
156
|
-
* (`
|
|
154
|
+
* (`s.void`) methods — the helper drops `params` from the envelope
|
|
157
155
|
* either way. See `create_rpc_post_init` for the null-stripping
|
|
158
156
|
* affordance and JSON-RPC 2.0 §4.2's prohibition on `params: null`.
|
|
159
157
|
*/
|
|
@@ -240,7 +238,7 @@ export type RpcCallResultForSpec<TSpec extends RequestResponseActionSpec> = {
|
|
|
240
238
|
ok: true;
|
|
241
239
|
status: number;
|
|
242
240
|
headers: Record<string, string>;
|
|
243
|
-
result:
|
|
241
|
+
result: Infer<TSpec['output']>;
|
|
244
242
|
} | {
|
|
245
243
|
ok: false;
|
|
246
244
|
status: number;
|
|
@@ -256,12 +254,12 @@ export type RpcCallForSpecArgs<TSpec extends RequestResponseActionSpec> = Omit<R
|
|
|
256
254
|
/** Action spec whose `method` drives the envelope and whose `input`/`output` types pin params + result. */
|
|
257
255
|
spec: TSpec;
|
|
258
256
|
/** Params, typed against `spec.input`. */
|
|
259
|
-
params:
|
|
257
|
+
params: Infer<TSpec['input']>;
|
|
260
258
|
};
|
|
261
259
|
/**
|
|
262
260
|
* Typed wrapper over `rpc_call` — binds `params` and the success `result` to
|
|
263
|
-
* the output types of `spec.input` and `spec.output` (`
|
|
264
|
-
* the generic
|
|
261
|
+
* the output types of `spec.input` and `spec.output` (`Infer`) via
|
|
262
|
+
* the generic.
|
|
265
263
|
*
|
|
266
264
|
* Success results are validated at runtime against `spec.output` (same
|
|
267
265
|
* contract as `rpc_call_typed`); a mismatch throws. Error responses come
|
|
@@ -281,10 +279,10 @@ export declare const rpc_call_for_spec: <TSpec extends RequestResponseActionSpec
|
|
|
281
279
|
* assert on specific error shapes.
|
|
282
280
|
*
|
|
283
281
|
* @throws Error if the response is a JSON-RPC error, if `rpc_call` throws
|
|
284
|
-
* on an envelope violation, or if the result fails `output_schema` (
|
|
285
|
-
*
|
|
282
|
+
* on an envelope violation, or if the result fails `output_schema` (parsed with
|
|
283
|
+
* `parse`).
|
|
286
284
|
*/
|
|
287
|
-
export declare const rpc_call_typed: <T>(args: RpcCallArgs, output_schema:
|
|
285
|
+
export declare const rpc_call_typed: <T>(args: RpcCallArgs, output_schema: Schema<T, any>) => Promise<T>;
|
|
288
286
|
/**
|
|
289
287
|
* Find the `RpcAction` for a method within a set of RPC endpoint specs.
|
|
290
288
|
* Returns both the endpoint path and the matched action. `undefined` when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAa7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"rpc_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAa7B,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAElG,OAAO,EAIN,KAAK,gBAAgB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EACX,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAClC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,gBAAgB,KA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AAW,EACX,QAAQ,GAAG,QAAQ,CACnB,GAAG;IACH,2GAA2G;IAC3G,IAAI,EAAE,KAAK,CAAC;IACZ,0CAA0C;IAC1C,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,GAAU,KAAK,SAAS,yBAAyB,EAC9E,MAAM,kBAAkB,CAAC,KAAK,CAAC,KAC7B,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAoBrC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAU,CAAC,EACrC,MAAM,WAAW,EACjB,eAAe,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,KAC3B,OAAO,CAAC,CAAC,CAkBX,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC3B,eAAe,aAAa,CAAC,eAAe,CAAC,EAC7C,QAAQ,MAAM,KACZ;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG,SAOxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC3B,eAAe,aAAa,CAAC,qBAAqB,CAAC,EACnD,QAAQ,MAAM,KACZ;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,mBAAmB,CAAA;CAAE,GAAG,SAOvD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,GACrC,eAAe,aAAa,CAAC,eAAe,CAAC,KAC3C,MAcF,CAAC"}
|
|
@@ -13,7 +13,6 @@ import { is, parse } from '@fuzdev/fuz_schema/schema.ts';
|
|
|
13
13
|
import { JSONRPC_VERSION, JsonrpcErrorResponse, JsonrpcResponse } from '../http/jsonrpc.js';
|
|
14
14
|
import { create_stub_app_server_context } from './stubs.js';
|
|
15
15
|
import { TEST_ORIGIN } from './test_origin.js';
|
|
16
|
-
import { parse_any } from '../schema_issues.js';
|
|
17
16
|
/**
|
|
18
17
|
* Resolve a suite's `rpc_endpoints` option to an array for setup-time
|
|
19
18
|
* inspection (path lookup, action presence checks).
|
|
@@ -62,7 +61,7 @@ export const resolve_rpc_endpoints_for_setup = (rpc_endpoints, session_options)
|
|
|
62
61
|
* @param params - params (omit for parameterless methods; `null` is also
|
|
63
62
|
* stripped for ergonomic call sites — JSON-RPC 2.0 §4.2
|
|
64
63
|
* forbids `"params": null` on the wire, and `create_rpc_endpoint`
|
|
65
|
-
* rejects `
|
|
64
|
+
* rejects `literal(null)` action input schemas at registration).
|
|
66
65
|
* Tests that need to construct a literal `"params": null`
|
|
67
66
|
* envelope (e.g. asserting envelope-level rejection) should
|
|
68
67
|
* build the body inline rather than route through this helper.
|
|
@@ -131,13 +130,13 @@ export const assert_jsonrpc_error_response = (body, expected_code) => {
|
|
|
131
130
|
* is provided, also validates the `result` field against the declared
|
|
132
131
|
* output schema — matching the REST round-trip's `assert_response_matches_spec`.
|
|
133
132
|
*
|
|
134
|
-
* @param output_schema - optional
|
|
133
|
+
* @param output_schema - optional schema to validate the `result` field against
|
|
135
134
|
*/
|
|
136
135
|
export const assert_jsonrpc_success_response = (body, output_schema) => {
|
|
137
136
|
const result = parse(JsonrpcResponse, body);
|
|
138
137
|
assert.ok(result.ok, `not a valid JSON-RPC success response: ${JSON.stringify(body)}`);
|
|
139
138
|
if (output_schema) {
|
|
140
|
-
const output_result =
|
|
139
|
+
const output_result = parse(output_schema, result.value.result);
|
|
141
140
|
if (!output_result.ok) {
|
|
142
141
|
assert.fail(`JSON-RPC result does not match output schema: ${JSON.stringify(output_result.issues)}`);
|
|
143
142
|
}
|
|
@@ -278,8 +277,8 @@ export const rpc_call = async (args) => parse_rpc_call_result(await rpc_call_raw
|
|
|
278
277
|
export const rpc_call_non_browser = (args) => rpc_call({ ...args, suppress_default_origin: true });
|
|
279
278
|
/**
|
|
280
279
|
* Typed wrapper over `rpc_call` — binds `params` and the success `result` to
|
|
281
|
-
* the output types of `spec.input` and `spec.output` (`
|
|
282
|
-
* the generic
|
|
280
|
+
* the output types of `spec.input` and `spec.output` (`Infer`) via
|
|
281
|
+
* the generic.
|
|
283
282
|
*
|
|
284
283
|
* Success results are validated at runtime against `spec.output` (same
|
|
285
284
|
* contract as `rpc_call_typed`); a mismatch throws. Error responses come
|
|
@@ -297,7 +296,7 @@ export const rpc_call_for_spec = async (args) => {
|
|
|
297
296
|
if (!res.ok) {
|
|
298
297
|
return res;
|
|
299
298
|
}
|
|
300
|
-
const parsed =
|
|
299
|
+
const parsed = parse(spec.output, res.result);
|
|
301
300
|
if (!parsed.ok) {
|
|
302
301
|
throw new Error(`rpc_call_for_spec(${spec.method}) result did not match spec.output: ${JSON.stringify(parsed.issues)}`);
|
|
303
302
|
}
|
|
@@ -315,15 +314,15 @@ export const rpc_call_for_spec = async (args) => {
|
|
|
315
314
|
* assert on specific error shapes.
|
|
316
315
|
*
|
|
317
316
|
* @throws Error if the response is a JSON-RPC error, if `rpc_call` throws
|
|
318
|
-
* on an envelope violation, or if the result fails `output_schema` (
|
|
319
|
-
*
|
|
317
|
+
* on an envelope violation, or if the result fails `output_schema` (parsed with
|
|
318
|
+
* `parse`).
|
|
320
319
|
*/
|
|
321
320
|
export const rpc_call_typed = async (args, output_schema) => {
|
|
322
321
|
const res = await rpc_call(args);
|
|
323
322
|
if (!res.ok) {
|
|
324
323
|
throw new Error(`rpc_call_typed(${args.method}) returned error: code=${res.error.code} message=${res.error.message} data=${JSON.stringify(res.error.data)}`);
|
|
325
324
|
}
|
|
326
|
-
const parsed =
|
|
325
|
+
const parsed = parse(output_schema, res.result);
|
|
327
326
|
if (!parsed.ok) {
|
|
328
327
|
throw new Error(`rpc_call_typed(${args.method}) result did not match output schema: ${JSON.stringify(parsed.issues)}`);
|
|
329
328
|
}
|
|
@@ -1,40 +1,49 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Schema-driven value generation helpers for testing.
|
|
4
|
+
*
|
|
5
|
+
* Walks `@fuzdev/fuz_schema` schemas to generate valid values for route
|
|
6
|
+
* params, request bodies, and URL paths. Used by adversarial input,
|
|
7
|
+
* adversarial 404, and round-trip validation test suites. A value that is no
|
|
8
|
+
* schema throws, and so does an input no body can be generated for, rather
|
|
9
|
+
* than yielding no body.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import { type AnySchema, type SchemaResult } from '@fuzdev/fuz_schema/schema.ts';
|
|
14
|
+
import { type SchemaFieldInfo } from '../http/schema_helpers.js';
|
|
4
15
|
/**
|
|
5
16
|
* The JSON Schema of a field's input side — where its format, pattern and
|
|
6
|
-
* bounds live.
|
|
17
|
+
* bounds live.
|
|
7
18
|
*
|
|
8
|
-
* Rendered with `io: 'input'`, so a field carrying a
|
|
19
|
+
* Rendered with `io: 'input'`, so a field carrying a `transform` in a pipe
|
|
9
20
|
* (`Username`) still yields the constraints its input is checked against;
|
|
10
21
|
* the default output side throws on a transform. A pipe yields its input
|
|
11
22
|
* side only, so constraints of the stage after it are not here. A
|
|
12
|
-
*
|
|
13
|
-
*
|
|
23
|
+
* `nullable` field renders as `anyOf: [{…}, {type: 'null'}]`, or a bare
|
|
24
|
+
* type as `type: [type, 'null']`;
|
|
14
25
|
* its one non-null branch or type is returned, so the bounds, pattern and
|
|
15
26
|
* `type` read the same as on the bare field. A union of two or more non-null
|
|
16
27
|
* branches returns the whole schema — its branches' bounds are no single
|
|
17
28
|
* field's bounds.
|
|
18
29
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* generators build from it is checked against the field itself before it's
|
|
25
|
-
* used. What an emitter refuses even then (a fuz_schema entry named like a
|
|
30
|
+
* It renders with `unrepresentable: 'any'`: a part JSON Schema can't say (a
|
|
31
|
+
* `check` or a `bigint`) is left out or `{}`, and the bounds around it still
|
|
32
|
+
* read, so a `pipe(string, max_length(n), check(…))` keeps its `maxLength` —
|
|
33
|
+
* every case the generators build from it is checked against the field itself
|
|
34
|
+
* before it's used. What the emitter refuses even then (an entry named like a
|
|
26
35
|
* member of `Object.prototype`, metadata that isn't JSON) throws: a mistake in
|
|
27
36
|
* the schema, not a gap in JSON Schema.
|
|
28
37
|
*
|
|
29
|
-
* A
|
|
30
|
-
*
|
|
31
|
-
*
|
|
38
|
+
* A `check` is never here: JSON Schema can't express one, so a bound a check
|
|
39
|
+
* enforces (a code-point length, a cross-field rule) generates no boundary
|
|
40
|
+
* case.
|
|
32
41
|
*
|
|
33
42
|
* @param field_schema - the field to read
|
|
34
43
|
* @returns the field's input-side JSON Schema
|
|
35
44
|
* @throws Error when the emitter refuses `field_schema` with `unrepresentable: 'any'`
|
|
36
45
|
*/
|
|
37
|
-
export declare const to_field_json_schema: (field_schema:
|
|
46
|
+
export declare const to_field_json_schema: (field_schema: AnySchema) => Record<string, unknown>;
|
|
38
47
|
/**
|
|
39
48
|
* The format constraint a field's input-side JSON Schema carries: its
|
|
40
49
|
* `format` (e.g. `'uuid'`, `'email'`), `'pattern'` for a regex, or `null`.
|
|
@@ -51,39 +60,37 @@ export declare const detect_json_schema_format: (json: Record<string, unknown>)
|
|
|
51
60
|
* (`to_field_json_schema`). Returns the format string (e.g. `'uuid'`,
|
|
52
61
|
* `'email'`), `'pattern'` for a regex, or `null`.
|
|
53
62
|
*/
|
|
54
|
-
export declare const detect_format: (field_schema:
|
|
55
|
-
/** An object schema's fields and the schema of each
|
|
63
|
+
export declare const detect_format: (field_schema: AnySchema) => string | null;
|
|
64
|
+
/** An object schema's fields and the schema of each. */
|
|
56
65
|
export interface ObjectSchemaView {
|
|
57
66
|
/** The fields, in declaration order. */
|
|
58
67
|
fields: Array<SchemaFieldInfo>;
|
|
59
68
|
/** The schema of the field named `name`, or `undefined` when there is none. */
|
|
60
|
-
field_schema: (name: string) =>
|
|
69
|
+
field_schema: (name: string) => AnySchema | undefined;
|
|
61
70
|
}
|
|
62
71
|
/**
|
|
63
|
-
* The fields of an object schema
|
|
64
|
-
*
|
|
65
|
-
* (`
|
|
66
|
-
* schema whose innermost layer is an object schema (`get_schema_entries`,
|
|
67
|
-
* `get_schema_fields`).
|
|
72
|
+
* The fields of an object schema and the schema of each, through its
|
|
73
|
+
* wrappers: a schema whose innermost layer is an object schema
|
|
74
|
+
* (`get_schema_entries`, `get_schema_fields`).
|
|
68
75
|
*
|
|
69
|
-
* @param schema - an object schema, possibly wrapped
|
|
76
|
+
* @param schema - an object schema, possibly wrapped
|
|
70
77
|
* @param label - names the schema in the error
|
|
71
|
-
* @throws Error naming `label` when `schema` is no object schema, or
|
|
78
|
+
* @throws Error naming `label` when `schema` is no object schema, or no schema
|
|
72
79
|
*/
|
|
73
|
-
export declare const to_object_schema_view: (schema:
|
|
80
|
+
export declare const to_object_schema_view: (schema: AnySchema, label: string) => ObjectSchemaView;
|
|
74
81
|
/**
|
|
75
82
|
* Generate a valid-ish value for a field based on its base type.
|
|
76
83
|
*
|
|
77
|
-
* @param field - the field's info, from `to_object_schema_view`
|
|
78
|
-
* @param field_schema - the field's schema
|
|
84
|
+
* @param field - the field's info, from `to_object_schema_view`
|
|
85
|
+
* @param field_schema - the field's schema
|
|
79
86
|
* @returns the value, checked by the caller against the whole schema
|
|
80
87
|
*/
|
|
81
|
-
export declare const generate_valid_value: (field: SchemaFieldInfo, field_schema:
|
|
88
|
+
export declare const generate_valid_value: (field: SchemaFieldInfo, field_schema: AnySchema) => unknown;
|
|
82
89
|
/** What `generate_valid_object` returns: the object and its last parse. */
|
|
83
90
|
export interface GeneratedObject {
|
|
84
91
|
value: Record<string, unknown>;
|
|
85
|
-
/** The last `
|
|
86
|
-
result:
|
|
92
|
+
/** The last `parse` of `value` against the schema — the caller decides whether a failure throws. */
|
|
93
|
+
result: SchemaResult<unknown>;
|
|
87
94
|
}
|
|
88
95
|
/**
|
|
89
96
|
* Generate a valid object for an object schema: its required and defaulted
|
|
@@ -98,16 +105,15 @@ export interface GeneratedObject {
|
|
|
98
105
|
* Shared by the top-level body generators and `generate_valid_value`'s
|
|
99
106
|
* nested-object case, so a refined object validates the same way at any depth.
|
|
100
107
|
*
|
|
101
|
-
* @param object_schema - the object whose fields are generated:
|
|
102
|
-
*
|
|
108
|
+
* @param object_schema - the object whose fields are generated: an object
|
|
109
|
+
* schema, possibly wrapped
|
|
103
110
|
* @param schema - the schema the object must satisfy, refinements included
|
|
104
111
|
* (`object_schema` or a schema wrapping it)
|
|
105
|
-
* @returns the generated object and its last `
|
|
112
|
+
* @returns the generated object and its last `parse` result — the caller
|
|
106
113
|
* decides whether a failure throws
|
|
107
|
-
* @throws Error when `object_schema` is no object schema, or
|
|
108
|
-
* of neither library
|
|
114
|
+
* @throws Error when `object_schema` is no object schema, or no schema
|
|
109
115
|
*/
|
|
110
|
-
export declare const generate_valid_object: (object_schema:
|
|
116
|
+
export declare const generate_valid_object: (object_schema: AnySchema, schema: AnySchema) => GeneratedObject;
|
|
111
117
|
/**
|
|
112
118
|
* A valid object that carries `field`, built from `base`, a valid object of
|
|
113
119
|
* `object_schema` — the body a case breaking `field` changes, so the case
|
|
@@ -118,43 +124,44 @@ export declare const generate_valid_object: (object_schema: ValidationSchema, sc
|
|
|
118
124
|
* replaces `base`'s optional fields, refilled the same way around it (an
|
|
119
125
|
* exactly-one-of rule: adding `slug` means dropping `id`).
|
|
120
126
|
*
|
|
121
|
-
* @param object_schema - the object schema `base` is an instance of,
|
|
122
|
-
*
|
|
127
|
+
* @param object_schema - the object schema `base` is an instance of,
|
|
128
|
+
* possibly wrapped
|
|
123
129
|
* @param schema - the schema the object must satisfy, refinements included
|
|
124
130
|
* @param base - a valid object, the generated or seeded base
|
|
125
131
|
* @param field - the field the object must carry
|
|
126
132
|
* @returns the object, or `null` when no object the generator can build
|
|
127
133
|
* carries the field and passes `schema`
|
|
128
|
-
* @throws Error when `object_schema` is no object schema, or
|
|
129
|
-
* of neither library
|
|
134
|
+
* @throws Error when `object_schema` is no object schema, or no schema
|
|
130
135
|
*/
|
|
131
|
-
export declare const generate_valid_object_with_field: (object_schema:
|
|
136
|
+
export declare const generate_valid_object_with_field: (object_schema: AnySchema, schema: AnySchema, base: Record<string, unknown>, field: SchemaFieldInfo) => Record<string, unknown> | null;
|
|
132
137
|
/**
|
|
133
138
|
* A string a URL-sourced field accepts — a route param or a query value, which
|
|
134
139
|
* arrive as strings whatever the schema parses them into. The nil UUID for a
|
|
135
140
|
* UUID field; else the first the field accepts of `test_value`, the generated
|
|
136
141
|
* valid value written as a string, `1`, `0`, `true` and `false`, the field's
|
|
137
|
-
* JSON Schema `default` or lower bound written as a string
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
142
|
+
* JSON Schema `default` or lower bound written as a string, each
|
|
143
|
+
* `min_value` and `max_value` bound anywhere in the schema written as an
|
|
144
|
+
* integer (a string parsed into an integer whose range excludes the small
|
|
145
|
+
* candidates, `to_numeric_bounds`), and a string synthesized from the field's
|
|
146
|
+
* constraints.
|
|
147
|
+
*
|
|
148
|
+
* @param field - the field's info, from `to_object_schema_view`
|
|
149
|
+
* @param field_schema - the field's schema
|
|
143
150
|
* @returns the string, or `null` when no candidate passes
|
|
144
151
|
*/
|
|
145
|
-
export declare const generate_valid_string_param: (field: SchemaFieldInfo, field_schema:
|
|
152
|
+
export declare const generate_valid_string_param: (field: SchemaFieldInfo, field_schema: AnySchema) => string | null;
|
|
146
153
|
/**
|
|
147
154
|
* The input a body is generated for: `null` for a void or null input
|
|
148
155
|
* (`is_void_schema`, `is_null_schema`), which takes no body, else its object
|
|
149
156
|
* view (`to_object_schema_view`).
|
|
150
157
|
*
|
|
151
|
-
* @param input_schema - a route's or action's input schema
|
|
158
|
+
* @param input_schema - a route's or action's input schema
|
|
152
159
|
* @param label - names the input in the error
|
|
153
|
-
* @throws Error naming `label` when the input is
|
|
160
|
+
* @throws Error naming `label` when the input is no schema, or is
|
|
154
161
|
* neither void, null, nor an object schema — no body can be generated for
|
|
155
162
|
* it, and no body is not the same as one the generator can't build
|
|
156
163
|
*/
|
|
157
|
-
export declare const to_body_input: (input_schema:
|
|
164
|
+
export declare const to_body_input: (input_schema: AnySchema, label: string) => ObjectSchemaView | null;
|
|
158
165
|
/**
|
|
159
166
|
* The `Content-Type` a well-formed request to a route sends: `application/json`,
|
|
160
167
|
* or `application/octet-stream` for a `raw_body` route. Every `POST` route
|
|
@@ -211,25 +218,25 @@ export type RouteParamValues = Readonly<Record<string, Readonly<Record<string, s
|
|
|
211
218
|
* (`''`, `.`, `..`) is refused by name.
|
|
212
219
|
*
|
|
213
220
|
* @param path - the route's path template
|
|
214
|
-
* @param params_schema - the route's params schema,
|
|
221
|
+
* @param params_schema - the route's params schema, an object schema
|
|
215
222
|
* @param param_values - the route's supplied param values by name, its entry of `RouteParamValues`
|
|
216
|
-
* @throws Error when `params_schema` is no object schema, or
|
|
223
|
+
* @throws Error when `params_schema` is no object schema, or no schema;
|
|
217
224
|
* when `param_values` names no param of the path; when a supplied value is
|
|
218
225
|
* `''`, `.` or `..`, or holds a lone surrogate, which can't be encoded; and
|
|
219
226
|
* when a `{re}` param's value is one its pattern refuses, naming the route
|
|
220
227
|
* and the param
|
|
221
228
|
*/
|
|
222
|
-
export declare const resolve_valid_path: (path: string, params_schema?:
|
|
229
|
+
export declare const resolve_valid_path: (path: string, params_schema?: AnySchema, param_values?: Readonly<Record<string, string>>) => string;
|
|
223
230
|
/**
|
|
224
231
|
* Generate a valid request body for a route's or action's input schema.
|
|
225
232
|
*
|
|
226
|
-
* @param input_schema - the input schema
|
|
233
|
+
* @param input_schema - the input schema
|
|
227
234
|
* @returns a generated body that passes the schema, or `undefined` for a void
|
|
228
235
|
* or null input, which takes no body
|
|
229
|
-
* @throws Error if the input is
|
|
236
|
+
* @throws Error if the input is no schema, or is neither void, null,
|
|
230
237
|
* nor an object schema, or if the generated body fails the input — catching
|
|
231
238
|
* broken `generate_valid_value` logic early with the parse's issues instead
|
|
232
239
|
* of a confusing 400 in downstream tests
|
|
233
240
|
*/
|
|
234
|
-
export declare const generate_valid_body: (input_schema:
|
|
241
|
+
export declare const generate_valid_body: (input_schema: AnySchema) => Record<string, unknown> | undefined;
|
|
235
242
|
//# sourceMappingURL=schema_generators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema_generators.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/schema_generators.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"schema_generators.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/schema_generators.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;GAUG;AAEH,OAAO,EAEN,KAAK,SAAS,EAEd,KAAK,YAAY,EACjB,MAAM,8BAA8B,CAAC;AAQtC,OAAO,EAAkC,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AASjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,oBAAoB,GAAI,cAAc,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAgBpF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GAAI,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM,GAAG,IAWlF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,cAAc,SAAS,KAAG,MAAM,GAAG,IACH,CAAC;AA8H/D,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAChC,wCAAwC;IACxC,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC/B,+EAA+E;IAC/E,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC;CACtD;AAuBD;;;;;;;;GAQG;AACH,eAAO,MAAM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