@fuzdev/fuz_app 0.155.0 → 0.156.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 +27 -14
- package/dist/actions/action_codegen.d.ts +10 -3
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +52 -13
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +13 -11
- package/dist/actions/action_rpc.d.ts +4 -3
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +4 -3
- package/dist/actions/action_spec.d.ts +102 -206
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +18 -96
- 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.map +1 -1
- package/dist/actions/broadcast_api.js +6 -5
- package/dist/actions/compile_action_registry.d.ts +11 -6
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/compile_action_registry.js +15 -9
- package/dist/actions/perform_action.d.ts +4 -4
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +11 -11
- package/dist/auth/CLAUDE.md +1 -1
- package/dist/auth/account_action_specs.d.ts +50 -23
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +18 -8
- package/dist/auth/account_route_schema.d.ts +10 -10
- package/dist/auth/account_schema.d.ts +21 -21
- package/dist/auth/actor_lookup_action_specs.d.ts +7 -7
- package/dist/auth/actor_search_action_specs.d.ts +6 -6
- package/dist/auth/admin_action_specs.d.ts +98 -98
- package/dist/auth/app_settings_schema.d.ts +2 -2
- package/dist/auth/audit_log_route_schema.d.ts +1 -1
- package/dist/auth/audit_log_schema.d.ts +44 -44
- package/dist/auth/auth_guard_resolver.d.ts +2 -2
- package/dist/auth/auth_guard_resolver.js +2 -2
- package/dist/auth/bootstrap_route_schema.d.ts +4 -4
- package/dist/auth/cell_action_specs.d.ts +241 -241
- package/dist/auth/cell_actions.js +3 -3
- package/dist/auth/cell_audit_action_specs.d.ts +14 -14
- package/dist/auth/cell_audit_metadata.d.ts +6 -6
- package/dist/auth/cell_field_action_specs.d.ts +38 -38
- package/dist/auth/cell_field_audit_metadata.d.ts +4 -4
- package/dist/auth/cell_grant_action_specs.d.ts +61 -61
- package/dist/auth/cell_grant_audit_metadata.d.ts +10 -10
- package/dist/auth/cell_item_action_specs.d.ts +50 -50
- package/dist/auth/cell_item_audit_metadata.d.ts +5 -5
- package/dist/auth/invite_schema.d.ts +6 -6
- package/dist/auth/role_grant_offer_action_specs.d.ts +120 -120
- package/dist/auth/role_grant_offer_notifications.d.ts +66 -66
- package/dist/auth/role_grant_offer_schema.d.ts +6 -6
- package/dist/auth/self_service_role_action_specs.d.ts +2 -2
- package/dist/auth/signup_route_schema.d.ts +2 -2
- package/dist/http/CLAUDE.md +9 -8
- package/dist/http/auth_shape.d.ts +54 -17
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +104 -52
- package/dist/http/error_schemas.d.ts +6 -4
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +4 -9
- package/dist/http/jsonrpc_errors.d.ts +11 -4
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +11 -4
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +2 -1
- package/dist/http/route_spec.d.ts +3 -2
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +20 -8
- package/dist/http/schema_helpers.d.ts +24 -20
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +24 -19
- package/dist/primitive_schemas.d.ts +10 -3
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +10 -2
- package/dist/primitive_schemas_fuz.d.ts +69 -0
- package/dist/primitive_schemas_fuz.d.ts.map +1 -0
- package/dist/primitive_schemas_fuz.js +49 -0
- package/dist/realtime/sse.d.ts +3 -3
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +4 -4
- package/dist/schema_issues.d.ts +91 -4
- package/dist/schema_issues.d.ts.map +1 -1
- package/dist/schema_issues.js +262 -1
- package/dist/schema_meta.d.ts +24 -8
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +31 -10
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +2 -1
- package/dist/testing/CLAUDE.md +17 -11
- package/dist/testing/adversarial_input_cases.d.ts +18 -23
- package/dist/testing/adversarial_input_cases.d.ts.map +1 -1
- package/dist/testing/adversarial_input_cases.js +51 -46
- package/dist/testing/cross_backend/action_manifest.d.ts +2 -1
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +3 -3
- package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.js +3 -8
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +5 -4
- package/dist/testing/cross_backend/cross_rpc.d.ts +4 -2
- package/dist/testing/cross_backend/cross_rpc.d.ts.map +1 -1
- package/dist/testing/cross_backend/cross_rpc.js +6 -4
- package/dist/testing/cross_backend/rpc_success_fixtures.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +3 -2
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +8 -8
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +4 -3
- 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 -8
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +18 -15
- package/dist/testing/schema_generators.d.ts +75 -40
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +273 -99
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +4 -3
- package/dist/ui/admin_accounts_state.svelte.d.ts +10 -10
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_invites_state.svelte.d.ts +1 -1
- package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
- package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/role_grant_offers_state.svelte.d.ts +6 -6
- package/dist/zod.d.ts +23 -5
- package/dist/zod.d.ts.map +1 -1
- package/dist/zod.js +2 -2
- package/package.json +6 -6
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
-
/**
|
|
3
|
-
* Schema-walk generation of adversarial inputs — payloads that must fail
|
|
4
|
-
* validation.
|
|
5
|
-
*
|
|
6
|
-
* Focused cases: one representative wrong-type value per field, one format
|
|
7
|
-
* violation per constrained field, one null and one missing case per required
|
|
8
|
-
* field, plus whole-body structural attacks (non-object body, extra unknown
|
|
9
|
-
* keys). Hono-free, so the cross-process suites reuse the generators the
|
|
10
|
-
* in-process `describe_adversarial_input` and `describe_rpc_attack_surface_tests`
|
|
11
|
-
* run.
|
|
12
|
-
*
|
|
13
|
-
* @module
|
|
14
|
-
*/
|
|
15
|
-
import { z } from 'zod';
|
|
16
2
|
import { ERROR_INVALID_REQUEST_BODY, ERROR_INVALID_JSON_BODY } from '../http/error_schemas.js';
|
|
3
|
+
import { type ValidationSchema } from '../schema_issues.js';
|
|
17
4
|
/** One adversarial body for an input schema, and the error code it owes. */
|
|
18
5
|
export interface InputTestCase {
|
|
19
6
|
label: string;
|
|
@@ -78,25 +65,29 @@ export interface InputTestCaseOptions {
|
|
|
78
65
|
* emitted only when the field refuses its value, so no case is accidentally
|
|
79
66
|
* valid.
|
|
80
67
|
*
|
|
81
|
-
*
|
|
68
|
+
* A void or null input takes no body and gets no cases; an input of neither
|
|
69
|
+
* library, or one that is no object schema, throws rather than yielding none.
|
|
70
|
+
*
|
|
71
|
+
* @param input_schema - the input schema to attack, Zod or `@fuzdev/fuz_schema`
|
|
82
72
|
* @param options - a base body to seed the cases, and a label for errors
|
|
83
|
-
* @throws Error if the
|
|
73
|
+
* @throws Error if the input is of neither library or is neither void, null,
|
|
74
|
+
* nor an object schema, or if the base body fails `input_schema` — a seeded
|
|
84
75
|
* base the schema refuses, or a generated one that surfaces broken
|
|
85
76
|
* generation logic — naming the issues rather than producing nonsense
|
|
86
77
|
* adversarial cases.
|
|
87
78
|
*/
|
|
88
|
-
export declare const generate_input_test_cases: (input_schema:
|
|
79
|
+
export declare const generate_input_test_cases: (input_schema: ValidationSchema, options?: InputTestCaseOptions) => Array<InputTestCase>;
|
|
89
80
|
/**
|
|
90
81
|
* The `error.data.reason` an RPC refusal of `test_case` owes: the declared
|
|
91
82
|
* `invalid_reason` of the field it breaks, resolved as the dispatcher resolves
|
|
92
83
|
* a failure on that field (`resolve_invalid_reason`), or `undefined` — no
|
|
93
84
|
* reason — for an undeclared field or a whole-body case.
|
|
94
85
|
*
|
|
95
|
-
* @param input_schema - the input schema the case was generated from
|
|
86
|
+
* @param input_schema - the input schema the case was generated from, Zod or `@fuzdev/fuz_schema`
|
|
96
87
|
* @param test_case - a case `generate_input_test_cases` produced from it
|
|
97
88
|
* @returns the owed reason, or `undefined` when the refusal carries none
|
|
98
89
|
*/
|
|
99
|
-
export declare const expected_invalid_reason: (input_schema:
|
|
90
|
+
export declare const expected_invalid_reason: (input_schema: ValidationSchema, test_case: InputTestCase) => string | undefined;
|
|
100
91
|
/**
|
|
101
92
|
* Generate adversarial test cases for a route's params schema.
|
|
102
93
|
*
|
|
@@ -105,9 +96,11 @@ export declare const expected_invalid_reason: (input_schema: z.ZodType, test_cas
|
|
|
105
96
|
* params accept any string value, and only a violation the field refuses.
|
|
106
97
|
* Each case breaks one field of a valid params record.
|
|
107
98
|
*
|
|
108
|
-
* @
|
|
99
|
+
* @param params_schema - the params schema, a Zod or `@fuzdev/fuz_schema` object schema
|
|
100
|
+
* @throws Error if no valid params record can be generated, or `params_schema`
|
|
101
|
+
* is no object schema or of neither library
|
|
109
102
|
*/
|
|
110
|
-
export declare const generate_params_test_cases: (params_schema:
|
|
103
|
+
export declare const generate_params_test_cases: (params_schema: ValidationSchema) => Array<ParamsTestCase>;
|
|
111
104
|
/**
|
|
112
105
|
* Generate adversarial test cases for a route's query schema.
|
|
113
106
|
*
|
|
@@ -118,7 +111,9 @@ export declare const generate_params_test_cases: (params_schema: z.ZodObject) =>
|
|
|
118
111
|
*
|
|
119
112
|
* Each case breaks one field of a valid query record.
|
|
120
113
|
*
|
|
121
|
-
* @
|
|
114
|
+
* @param query_schema - the query schema, a Zod or `@fuzdev/fuz_schema` object schema
|
|
115
|
+
* @throws Error if no valid query record can be generated, or `query_schema`
|
|
116
|
+
* is no object schema or of neither library
|
|
122
117
|
*/
|
|
123
|
-
export declare const generate_query_test_cases: (query_schema:
|
|
118
|
+
export declare const generate_query_test_cases: (query_schema: ValidationSchema) => Array<QueryTestCase>;
|
|
124
119
|
//# sourceMappingURL=adversarial_input_cases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial_input_cases.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_input_cases.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"adversarial_input_cases.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_input_cases.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,EAAE,0BAA0B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gB,KAAG,KAAK,CAAC,aAAa,CAkC7F,CAAC"}
|
|
@@ -12,12 +12,12 @@ import './assert_dev_env.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
-
import { z } from 'zod';
|
|
16
|
-
import { zod_unwrap_to_object, zod_extract_fields } from '../zod.js';
|
|
17
15
|
import { resolve_invalid_reason } from '../schema_meta.js';
|
|
18
|
-
import { is_null_schema } from '../http/schema_helpers.js';
|
|
19
16
|
import { ERROR_INVALID_REQUEST_BODY, ERROR_INVALID_JSON_BODY } from '../http/error_schemas.js';
|
|
20
|
-
import {
|
|
17
|
+
import { format_issues, parse_any } from '../schema_issues.js';
|
|
18
|
+
import { detect_format, detect_json_schema_format, generate_valid_object, generate_valid_object_with_field, generate_valid_string_param, to_body_input, to_field_json_schema, to_object_schema_view } from './schema_generators.js';
|
|
19
|
+
/** Whether `schema` accepts `value`, a parse of either library (`parse_any`). */
|
|
20
|
+
const accepts = (schema, value) => parse_any(schema, value).ok;
|
|
21
21
|
// --- Payload generation ---
|
|
22
22
|
/** One wrong-type value per base type — one representative is sufficient. */
|
|
23
23
|
const wrong_type_for = (base_type) => {
|
|
@@ -96,37 +96,39 @@ const off_grid_in_range = (json, value, step) => {
|
|
|
96
96
|
* emitted only when the field refuses its value, so no case is accidentally
|
|
97
97
|
* valid.
|
|
98
98
|
*
|
|
99
|
-
*
|
|
99
|
+
* A void or null input takes no body and gets no cases; an input of neither
|
|
100
|
+
* library, or one that is no object schema, throws rather than yielding none.
|
|
101
|
+
*
|
|
102
|
+
* @param input_schema - the input schema to attack, Zod or `@fuzdev/fuz_schema`
|
|
100
103
|
* @param options - a base body to seed the cases, and a label for errors
|
|
101
|
-
* @throws Error if the
|
|
104
|
+
* @throws Error if the input is of neither library or is neither void, null,
|
|
105
|
+
* nor an object schema, or if the base body fails `input_schema` — a seeded
|
|
102
106
|
* base the schema refuses, or a generated one that surfaces broken
|
|
103
107
|
* generation logic — naming the issues rather than producing nonsense
|
|
104
108
|
* adversarial cases.
|
|
105
109
|
*/
|
|
106
110
|
export const generate_input_test_cases = (input_schema, options) => {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (!object_schema)
|
|
111
|
+
const for_label = options?.label === undefined ? '' : ` for '${options.label}'`;
|
|
112
|
+
const view = to_body_input(input_schema, `adversarial_input: the input${for_label}`);
|
|
113
|
+
if (!view)
|
|
111
114
|
return [];
|
|
112
|
-
const fields =
|
|
115
|
+
const { fields } = view;
|
|
113
116
|
const cases = [];
|
|
114
|
-
const for_label = options?.label === undefined ? '' : ` for '${options.label}'`;
|
|
115
117
|
// the base object every case breaks one field of — must pass validation itself
|
|
116
118
|
let base;
|
|
117
119
|
if (options?.base) {
|
|
118
120
|
base = { ...options.base };
|
|
119
|
-
const base_result = input_schema
|
|
120
|
-
if (!base_result.
|
|
121
|
+
const base_result = parse_any(input_schema, base);
|
|
122
|
+
if (!base_result.ok) {
|
|
121
123
|
throw new Error(`adversarial_input: the seeded base${for_label} fails validation — ` +
|
|
122
|
-
`fix the base for: ${
|
|
124
|
+
`fix the base for: ${format_issues(base_result.issues)}`);
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
else {
|
|
126
|
-
const generated = generate_valid_object(
|
|
127
|
-
if (!generated.result.
|
|
128
|
+
const generated = generate_valid_object(input_schema, input_schema);
|
|
129
|
+
if (!generated.result.ok) {
|
|
128
130
|
throw new Error(`adversarial_input: generated base object fails validation${for_label} — ` +
|
|
129
|
-
`fix generate_valid_value for: ${
|
|
131
|
+
`fix generate_valid_value for: ${format_issues(generated.result.issues)}`);
|
|
130
132
|
}
|
|
131
133
|
base = generated.value;
|
|
132
134
|
}
|
|
@@ -137,9 +139,8 @@ export const generate_input_test_cases = (input_schema, options) => {
|
|
|
137
139
|
expected_error: ERROR_INVALID_JSON_BODY
|
|
138
140
|
});
|
|
139
141
|
// whole-body structural: extra unknown key (enforces strictObject)
|
|
140
|
-
// only emit if the schema rejects unknown keys (
|
|
141
|
-
|
|
142
|
-
if (!extra_key_result.success) {
|
|
142
|
+
// only emit if the schema rejects unknown keys (a `z.strictObject`, a fuz_schema `object`)
|
|
143
|
+
if (!accepts(input_schema, { ...base, __adversarial_extra: 'rejected' })) {
|
|
143
144
|
cases.push({
|
|
144
145
|
label: 'extra unknown key',
|
|
145
146
|
body: { ...base, __adversarial_extra: 'should_be_rejected' },
|
|
@@ -147,11 +148,11 @@ export const generate_input_test_cases = (input_schema, options) => {
|
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
150
|
for (const field of fields) {
|
|
150
|
-
const field_schema =
|
|
151
|
+
const field_schema = view.field_schema(field.name);
|
|
151
152
|
// the valid body every case on this field changes only the field of: the
|
|
152
153
|
// base, or for a field the base omits, one that carries it — so the case
|
|
153
154
|
// can't also break an object-level rule (exactly one of, both or neither)
|
|
154
|
-
const field_base = generate_valid_object_with_field(
|
|
155
|
+
const field_base = generate_valid_object_with_field(input_schema, input_schema, base, field);
|
|
155
156
|
// every per-field case breaks the field, so the field itself must refuse
|
|
156
157
|
// its value — a candidate it accepts (a `z.coerce` field given a wrong
|
|
157
158
|
// type, a pattern that admits the violation string) is no invalid case.
|
|
@@ -159,7 +160,7 @@ export const generate_input_test_cases = (input_schema, options) => {
|
|
|
159
160
|
// back to the base; a value case — a format or a bound — is built only on
|
|
160
161
|
// a body that is valid but for the field, or it tests no bound at all
|
|
161
162
|
const push_field_case = (label, value, kind) => {
|
|
162
|
-
if (field_schema
|
|
163
|
+
if (accepts(field_schema, value))
|
|
163
164
|
return;
|
|
164
165
|
const body_base = field_base ?? (kind === 'type' ? base : null);
|
|
165
166
|
if (!body_base)
|
|
@@ -173,8 +174,8 @@ export const generate_input_test_cases = (input_schema, options) => {
|
|
|
173
174
|
};
|
|
174
175
|
// the field's valid value the value cases start from
|
|
175
176
|
const valid_value = field_base?.[field.name];
|
|
176
|
-
// missing required field (skip fields with defaults —
|
|
177
|
-
if (field.required && !field.has_default && !field_schema
|
|
177
|
+
// missing required field (skip fields with defaults — the parse fills them)
|
|
178
|
+
if (field.required && !field.has_default && !accepts(field_schema, undefined)) {
|
|
178
179
|
const without = {};
|
|
179
180
|
for (const [k, v] of Object.entries(base)) {
|
|
180
181
|
if (k !== field.name)
|
|
@@ -286,7 +287,7 @@ export const generate_input_test_cases = (input_schema, options) => {
|
|
|
286
287
|
* a failure on that field (`resolve_invalid_reason`), or `undefined` — no
|
|
287
288
|
* reason — for an undeclared field or a whole-body case.
|
|
288
289
|
*
|
|
289
|
-
* @param input_schema - the input schema the case was generated from
|
|
290
|
+
* @param input_schema - the input schema the case was generated from, Zod or `@fuzdev/fuz_schema`
|
|
290
291
|
* @param test_case - a case `generate_input_test_cases` produced from it
|
|
291
292
|
* @returns the owed reason, or `undefined` when the refusal carries none
|
|
292
293
|
*/
|
|
@@ -302,19 +303,19 @@ export const expected_invalid_reason = (input_schema, test_case) => test_case.fi
|
|
|
302
303
|
* @throws Error if a field has no string it accepts, or the record fails the
|
|
303
304
|
* schema, naming the issues
|
|
304
305
|
*/
|
|
305
|
-
const generate_string_record_base = (schema, kind) => {
|
|
306
|
+
const generate_string_record_base = (schema, view, kind) => {
|
|
306
307
|
const base = {};
|
|
307
|
-
for (const field of
|
|
308
|
-
const value = generate_valid_string_param(field,
|
|
308
|
+
for (const field of view.fields) {
|
|
309
|
+
const value = generate_valid_string_param(field, view.field_schema(field.name));
|
|
309
310
|
if (value === null) {
|
|
310
311
|
throw new Error(`adversarial_input: no generated ${kind} value passes field '${field.name}'`);
|
|
311
312
|
}
|
|
312
313
|
base[field.name] = value;
|
|
313
314
|
}
|
|
314
|
-
const result = schema
|
|
315
|
-
if (!result.
|
|
315
|
+
const result = parse_any(schema, base);
|
|
316
|
+
if (!result.ok) {
|
|
316
317
|
throw new Error(`adversarial_input: generated ${kind} base fails validation — ` +
|
|
317
|
-
`fix generate_valid_string_param for: ${
|
|
318
|
+
`fix generate_valid_string_param for: ${format_issues(result.issues)}`);
|
|
318
319
|
}
|
|
319
320
|
return base;
|
|
320
321
|
};
|
|
@@ -326,19 +327,21 @@ const generate_string_record_base = (schema, kind) => {
|
|
|
326
327
|
* params accept any string value, and only a violation the field refuses.
|
|
327
328
|
* Each case breaks one field of a valid params record.
|
|
328
329
|
*
|
|
329
|
-
* @
|
|
330
|
+
* @param params_schema - the params schema, a Zod or `@fuzdev/fuz_schema` object schema
|
|
331
|
+
* @throws Error if no valid params record can be generated, or `params_schema`
|
|
332
|
+
* is no object schema or of neither library
|
|
330
333
|
*/
|
|
331
334
|
export const generate_params_test_cases = (params_schema) => {
|
|
332
|
-
const
|
|
335
|
+
const view = to_object_schema_view(params_schema, 'adversarial_input: the params schema');
|
|
333
336
|
const cases = [];
|
|
334
|
-
const base_params = generate_string_record_base(params_schema, 'params');
|
|
335
|
-
for (const field of fields) {
|
|
336
|
-
const field_schema =
|
|
337
|
+
const base_params = generate_string_record_base(params_schema, view, 'params');
|
|
338
|
+
for (const field of view.fields) {
|
|
339
|
+
const field_schema = view.field_schema(field.name);
|
|
337
340
|
const format = detect_format(field_schema);
|
|
338
341
|
if (!format)
|
|
339
342
|
continue; // unconstrained string — any value passes
|
|
340
343
|
const violation = format_violation(format);
|
|
341
|
-
if (violation && !field_schema
|
|
344
|
+
if (violation && !accepts(field_schema, violation.value)) {
|
|
342
345
|
cases.push({
|
|
343
346
|
label: `${violation.label}: param ${field.name}`,
|
|
344
347
|
params: { ...base_params, [field.name]: violation.value }
|
|
@@ -357,16 +360,18 @@ export const generate_params_test_cases = (params_schema) => {
|
|
|
357
360
|
*
|
|
358
361
|
* Each case breaks one field of a valid query record.
|
|
359
362
|
*
|
|
360
|
-
* @
|
|
363
|
+
* @param query_schema - the query schema, a Zod or `@fuzdev/fuz_schema` object schema
|
|
364
|
+
* @throws Error if no valid query record can be generated, or `query_schema`
|
|
365
|
+
* is no object schema or of neither library
|
|
361
366
|
*/
|
|
362
367
|
export const generate_query_test_cases = (query_schema) => {
|
|
363
|
-
const
|
|
368
|
+
const view = to_object_schema_view(query_schema, 'adversarial_input: the query schema');
|
|
364
369
|
const cases = [];
|
|
365
|
-
const base_query = generate_string_record_base(query_schema, 'query');
|
|
366
|
-
for (const field of fields) {
|
|
367
|
-
const field_schema =
|
|
370
|
+
const base_query = generate_string_record_base(query_schema, view, 'query');
|
|
371
|
+
for (const field of view.fields) {
|
|
372
|
+
const field_schema = view.field_schema(field.name);
|
|
368
373
|
// missing required field
|
|
369
|
-
if (field.required && !field.has_default && !field_schema
|
|
374
|
+
if (field.required && !field.has_default && !accepts(field_schema, undefined)) {
|
|
370
375
|
const without = {};
|
|
371
376
|
for (const [k, v] of Object.entries(base_query)) {
|
|
372
377
|
if (k !== field.name)
|
|
@@ -382,7 +387,7 @@ export const generate_query_test_cases = (query_schema) => {
|
|
|
382
387
|
if (!format)
|
|
383
388
|
continue;
|
|
384
389
|
const violation = format_violation(format);
|
|
385
|
-
if (violation && !field_schema
|
|
390
|
+
if (violation && !accepts(field_schema, violation.value)) {
|
|
386
391
|
cases.push({
|
|
387
392
|
label: `${violation.label}: query ${field.name}`,
|
|
388
393
|
query: { ...base_query, [field.name]: violation.value }
|
|
@@ -33,6 +33,7 @@ import '../assert_dev_env.js';
|
|
|
33
33
|
import { z } from 'zod';
|
|
34
34
|
import { type RouteAuth } from '../../http/auth_shape.js';
|
|
35
35
|
import { RateLimitKey } from '../../http/error_schemas.js';
|
|
36
|
+
import type { ValidationSchema } from '../../schema_issues.js';
|
|
36
37
|
import type { RequestResponseActionSpec } from '../../actions/action_spec.js';
|
|
37
38
|
/**
|
|
38
39
|
* One method's normalized RPC metadata — the cross-impl-comparable unit.
|
|
@@ -106,7 +107,7 @@ export type ActionManifest = z.infer<typeof ActionManifest>;
|
|
|
106
107
|
*/
|
|
107
108
|
export declare const action_manifest_entry: (spec: {
|
|
108
109
|
readonly method: string;
|
|
109
|
-
readonly input:
|
|
110
|
+
readonly input: ValidationSchema;
|
|
110
111
|
readonly auth: RouteAuth;
|
|
111
112
|
readonly side_effects: boolean;
|
|
112
113
|
readonly rate_limit?: RateLimitKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action_manifest.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/action_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAE9E;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;kBAqB9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,kEAAkE;AAClE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAM5D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"action_manifest.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/action_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAE9E;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;kBAqB9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,kEAAkE;AAClE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAM5D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;CACnC,KAAG,mBASF,CAAC;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GACjC,OAAO,aAAa,CACnB,IAAI,CAAC,yBAAyB,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CAAC,CAC5F,KACC,cAED,CAAC"}
|
|
@@ -47,9 +47,9 @@ export const ActionManifestEntry = z.strictObject({
|
|
|
47
47
|
/** RPC method name (`spec.method`). */
|
|
48
48
|
method: z.string(),
|
|
49
49
|
/**
|
|
50
|
-
* `'void'` when the input is `z.void()`
|
|
51
|
-
* `'object'` — the
|
|
52
|
-
* enforces. A `z.strictObject({})` input is `'object'`.
|
|
50
|
+
* `'void'` when the input is a void schema (`is_void_schema`: `z.void()`
|
|
51
|
+
* or fuz_schema `s.void`, a parameterless method), else `'object'` — the
|
|
52
|
+
* Rust spine's declared `InputShape`, which its dispatcher enforces. A `z.strictObject({})` input is `'object'`.
|
|
53
53
|
*/
|
|
54
54
|
input: z.enum(['void', 'object']),
|
|
55
55
|
/** `true` when the action declares `side_effects` (mutation; POST-only on the RPC transport). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_crud.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cell_crud.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"cell_crud.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cell_crud.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA2E9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AA4D1E,eAAO,MAAM,8BAA8B,GAC1C,SAAS,uCAAuC,KAC9C,IA4uBF,CAAC"}
|
|
@@ -55,6 +55,7 @@ import '../assert_dev_env.js';
|
|
|
55
55
|
*/
|
|
56
56
|
import { describe, assert } from 'vitest';
|
|
57
57
|
import { jsonrpc_error_messages } from '../../http/jsonrpc_errors.js';
|
|
58
|
+
import { WireIssue } from '../../schema_issues.js';
|
|
58
59
|
import { CELL_KIND_LENGTH_MAX, CELL_LIST_LIMIT_MAX, CellCreateOutput, CellDeleteOutput, CellGetOutput, CellListOutput, CellUpdateOutput } from '../../auth/cell_action_specs.js';
|
|
59
60
|
import { test_if } from './capabilities.js';
|
|
60
61
|
import { cross_rpc_call, error_reason, expect_output } from './cross_rpc.js';
|
|
@@ -80,9 +81,7 @@ const INVALID_PARAMS_MESSAGE = jsonrpc_error_messages.invalid_params().message;
|
|
|
80
81
|
/**
|
|
81
82
|
* Assert `r` is a schema refusal: 400 `invalid_params` with the generic
|
|
82
83
|
* message and no `data`, save the issues a TS spine adds under DEV alone —
|
|
83
|
-
* an array of
|
|
84
|
-
* issue has a string `code` and `message`; a fuz_schema issue a string
|
|
85
|
-
* `kind`, and a `message` only when one was set.
|
|
84
|
+
* an array of `WireIssue`s, and never a `reason`.
|
|
86
85
|
*/
|
|
87
86
|
const assert_schema_refusal = (r, label) => {
|
|
88
87
|
const detail = `${label}: got ${r.status} ${JSON.stringify(r.error ?? r.result)}`;
|
|
@@ -98,11 +97,7 @@ const assert_schema_refusal = (r, label) => {
|
|
|
98
97
|
const { issues } = data;
|
|
99
98
|
assert.ok(Array.isArray(issues), `${detail} — DEV-only issues that are no array`);
|
|
100
99
|
for (const issue of issues) {
|
|
101
|
-
|
|
102
|
-
assert.ok(typeof issue === 'object' &&
|
|
103
|
-
issue !== null &&
|
|
104
|
-
((typeof code === 'string' && typeof message === 'string') ||
|
|
105
|
-
(typeof kind === 'string' && (message === undefined || typeof message === 'string'))), `${detail} — a DEV-only issue that is no Zod or fuz_schema issue`);
|
|
100
|
+
assert.ok(WireIssue.safeParse(issue).success, `${detail} — a DEV-only issue that is no WireIssue`);
|
|
106
101
|
}
|
|
107
102
|
};
|
|
108
103
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance_table.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/conformance_table.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8C9B,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAOnE,OAAO,EAMN,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC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CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC5D;AAED,4EAA4E;AAC5E,MAAM,MAAM,qBAAqB,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAC3E;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GACjC,GAAG,eAAe,EAClB,SAAS,0BAA0B,KACjC,OAAO,CAAC,uBAAuB,CAuFjC,CAAC;AA8NF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,uBAAuB,KAAG,IAuEnF,CAAC"}
|
|
@@ -51,6 +51,7 @@ import { is_response_for } from '../transports/ws_client.js';
|
|
|
51
51
|
import { SCOPED_TOKEN_ADMITTED_METHOD } from './conformance_case.js';
|
|
52
52
|
import { mint_narrowed_api_token } from './narrowed_api_token.js';
|
|
53
53
|
import { xfail_until } from './xfail.js';
|
|
54
|
+
import { parse_any } from '../../schema_issues.js';
|
|
54
55
|
/**
|
|
55
56
|
* Resolve the endpoints a conformance case's RPC method is looked up in: the
|
|
56
57
|
* declared `rpc_endpoints`, then `live_rpc_endpoints`. `find_rpc_action`
|
|
@@ -587,8 +588,8 @@ const assert_rpc_case = (c, action, sent) => {
|
|
|
587
588
|
if (is_success_status(c.expect.status)) {
|
|
588
589
|
assert.ok(res.ok, `${c.name}: expected success (${c.expect.status}) but got error ${JSON.stringify(res.ok ? undefined : res.error)}`);
|
|
589
590
|
assert.strictEqual(res.status, c.expect.status, `${c.name}: status`);
|
|
590
|
-
const parsed = action.spec.output
|
|
591
|
-
assert.ok(parsed.
|
|
591
|
+
const parsed = parse_any(action.spec.output, res.result);
|
|
592
|
+
assert.ok(parsed.ok, `${c.name}: result does not match spec.output: ${JSON.stringify(parsed.ok ? undefined : parsed.issues)}`);
|
|
592
593
|
if (c.expect.fields)
|
|
593
594
|
assert_fields(res.result, c.expect.fields, c.name);
|
|
594
595
|
return { status: res.status, body: res.result };
|
|
@@ -615,8 +616,8 @@ const assert_rest_case = (c, route, sent) => {
|
|
|
615
616
|
const { status, body } = sent;
|
|
616
617
|
assert.strictEqual(status, c.expect.status, `${c.name}: status`);
|
|
617
618
|
if (is_success_status(c.expect.status)) {
|
|
618
|
-
const parsed = route.output
|
|
619
|
-
assert.ok(parsed.
|
|
619
|
+
const parsed = parse_any(route.output, body);
|
|
620
|
+
assert.ok(parsed.ok, `${c.name}: body does not match route output: ${JSON.stringify(parsed.ok ? undefined : parsed.issues)}`);
|
|
620
621
|
}
|
|
621
622
|
else if (c.expect.error_reason !== undefined) {
|
|
622
623
|
const error = body?.error;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
+
import type { Schema } from '@fuzdev/fuz_schema/schema.ts';
|
|
3
4
|
import type { FetchTransport } from '../transports/fetch_transport.js';
|
|
4
5
|
/** Minimal JSON-RPC envelope shape the suites read off responses. */
|
|
5
6
|
export interface RpcResult {
|
|
@@ -34,7 +35,8 @@ export declare const cross_rpc_call: (transport: FetchTransport, path: string, m
|
|
|
34
35
|
export declare const error_reason: (r: RpcResult) => unknown;
|
|
35
36
|
/**
|
|
36
37
|
* Assert the call succeeded and the `result` matches the verb's declared
|
|
37
|
-
* output schema — the wire-shape parity gate.
|
|
38
|
+
* output schema, Zod or `@fuzdev/fuz_schema` — the wire-shape parity gate.
|
|
39
|
+
* Returns the parsed output.
|
|
38
40
|
*/
|
|
39
|
-
export declare const expect_output: <T>(r: RpcResult, schema: z.ZodType<T>) => T;
|
|
41
|
+
export declare const expect_output: <T>(r: RpcResult, schema: z.ZodType<T> | Schema<T, any>) => T;
|
|
40
42
|
//# sourceMappingURL=cross_rpc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross_rpc.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cross_rpc.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAgB9B,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"cross_rpc.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cross_rpc.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAgB9B,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAG3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,qEAAqE;AACrE,MAAM,WAAW,SAAS;IACzB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC9F;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,GAC1B,WAAW,cAAc,EACzB,MAAM,MAAM,EACZ,QAAQ,MAAM,EACd,QAAQ,OAAO,EACf,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC7B,OAAO,CAAC,SAAS,CAmBnB,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,YAAY,GAAI,GAAG,SAAS,KAAG,OAG/B,CAAC;AAEd;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,KAAG,CAUtF,CAAC"}
|
|
@@ -13,6 +13,7 @@ import '../assert_dev_env.js';
|
|
|
13
13
|
*/
|
|
14
14
|
import { assert } from 'vitest';
|
|
15
15
|
import { create_rpc_post_init } from '../rpc_helpers.js';
|
|
16
|
+
import { parse_any } from '../../schema_issues.js';
|
|
16
17
|
/** How much of a non-envelope reply body `cross_rpc_call`'s error quotes. */
|
|
17
18
|
const BODY_HEAD_LENGTH = 200;
|
|
18
19
|
/**
|
|
@@ -56,11 +57,12 @@ export const error_reason = (r) => r.error && typeof r.error.data === 'object' &
|
|
|
56
57
|
: undefined;
|
|
57
58
|
/**
|
|
58
59
|
* Assert the call succeeded and the `result` matches the verb's declared
|
|
59
|
-
* output schema — the wire-shape parity gate.
|
|
60
|
+
* output schema, Zod or `@fuzdev/fuz_schema` — the wire-shape parity gate.
|
|
61
|
+
* Returns the parsed output.
|
|
60
62
|
*/
|
|
61
63
|
export const expect_output = (r, schema) => {
|
|
62
64
|
assert.ok(r.ok, `expected success, got ${JSON.stringify(r.error)}`);
|
|
63
|
-
const parsed = schema
|
|
64
|
-
assert.ok(parsed.
|
|
65
|
-
return parsed.
|
|
65
|
+
const parsed = parse_any(schema, r.result);
|
|
66
|
+
assert.ok(parsed.ok, `result does not match output schema: ${parsed.ok ? '' : JSON.stringify(parsed.issues)} (got ${JSON.stringify(r.result)})`);
|
|
67
|
+
return parsed.value;
|
|
66
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc_success_fixtures.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/rpc_success_fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqC9B,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc_success_fixtures.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/rpc_success_fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqC9B,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAQlF,uDAAuD;AACvD,MAAM,WAAW,8BAA8B;IAC9C,gGAAgG;IAChG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iCAAiC,GAC7C,UAAS,8BAAmC,KAC1C,kBAwHF,CAAC"}
|
|
@@ -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;
|
|
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;AAmF9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C,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;IACvC,wFAAwF;IACxF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,4FAA4F;IAC5F,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CAChC;AA0BD;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,0BAA0B,KAAG,IA0StF,CAAC"}
|
|
@@ -64,6 +64,7 @@ import { account_delete_action_spec, admin_session_revoke_all_action_spec } from
|
|
|
64
64
|
import { ROLE_ADMIN } from '../../auth/role_schema.js';
|
|
65
65
|
import { AUDIT_LOG_SSE_MAX_PER_SCOPE, audit_log_event_specs } from '../../realtime/audit_log_sse.js';
|
|
66
66
|
import { SSE_CONNECTED_COMMENT } from '../../realtime/sse_constants.js';
|
|
67
|
+
import { parse_any } from '../../schema_issues.js';
|
|
67
68
|
import { create_sse_transport } from '../transports/sse_transport.js';
|
|
68
69
|
import { create_rpc_post_init } from '../rpc_helpers.js';
|
|
69
70
|
import { DEFAULT_TEST_PASSWORD } from '../test_credentials.js';
|
|
@@ -82,8 +83,8 @@ const assert_audit_data_frame = (frame) => {
|
|
|
82
83
|
assert.strictEqual(typeof payload.method, 'string', 'audit data frame method must be a string');
|
|
83
84
|
const spec = audit_log_event_specs.find((s) => s.method === payload.method);
|
|
84
85
|
assert.ok(spec, `no EventSpec declared for audit method '${String(payload.method)}'`);
|
|
85
|
-
const result = spec.params
|
|
86
|
-
assert.ok(result.
|
|
86
|
+
const result = parse_any(spec.params, payload.params);
|
|
87
|
+
assert.ok(result.ok, `audit data frame params mismatch for '${String(payload.method)}': ${result.ok ? '' : JSON.stringify(result.issues)}`);
|
|
87
88
|
};
|
|
88
89
|
/**
|
|
89
90
|
* Register the cross-process SSE round-trip suite. Its cases run over a
|
|
@@ -131,27 +131,27 @@ export declare const testing_reset_action_spec: {
|
|
|
131
131
|
}, z.core.$strict>;
|
|
132
132
|
readonly output: z.ZodObject<{
|
|
133
133
|
account: z.ZodObject<{
|
|
134
|
-
id: z.
|
|
134
|
+
id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
135
135
|
username: z.ZodString;
|
|
136
136
|
}, z.core.$strict>;
|
|
137
137
|
actor: z.ZodObject<{
|
|
138
|
-
id: z.
|
|
138
|
+
id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
139
139
|
}, z.core.$strict>;
|
|
140
140
|
api_token: z.ZodString;
|
|
141
141
|
session_cookie: z.ZodString;
|
|
142
142
|
extra_accounts: z.ZodArray<z.ZodObject<{
|
|
143
143
|
account: z.ZodObject<{
|
|
144
|
-
id: z.
|
|
144
|
+
id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
145
145
|
username: z.ZodString;
|
|
146
146
|
}, z.core.$strict>;
|
|
147
147
|
actor: z.ZodObject<{
|
|
148
|
-
id: z.
|
|
148
|
+
id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
149
149
|
}, z.core.$strict>;
|
|
150
150
|
api_token: z.ZodString;
|
|
151
151
|
session_cookie: z.ZodString;
|
|
152
152
|
}, z.core.$strict>>;
|
|
153
153
|
extra_actors: z.ZodArray<z.ZodObject<{
|
|
154
|
-
id: z.
|
|
154
|
+
id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
155
155
|
name: z.ZodString;
|
|
156
156
|
}, z.core.$strict>>;
|
|
157
157
|
}, z.core.$strict>;
|
|
@@ -246,7 +246,7 @@ export declare const testing_mint_session_action_spec: {
|
|
|
246
246
|
};
|
|
247
247
|
readonly side_effects: true;
|
|
248
248
|
readonly input: z.ZodObject<{
|
|
249
|
-
account_id: z.
|
|
249
|
+
account_id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
250
250
|
expires_in_seconds: z.ZodNumber;
|
|
251
251
|
}, z.core.$strict>;
|
|
252
252
|
readonly output: z.ZodObject<{
|
|
@@ -299,7 +299,7 @@ export declare const testing_put_fact_action_spec: {
|
|
|
299
299
|
readonly input: z.ZodObject<{
|
|
300
300
|
content: z.ZodString;
|
|
301
301
|
content_type: z.ZodOptional<z.ZodString>;
|
|
302
|
-
holder: z.ZodOptional<z.
|
|
302
|
+
holder: z.ZodOptional<z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>>;
|
|
303
303
|
external_url: z.ZodOptional<z.ZodString>;
|
|
304
304
|
}, z.core.$strict>;
|
|
305
305
|
readonly output: z.ZodObject<{
|
|
@@ -535,7 +535,7 @@ export declare const testing_shorten_credential_expiry_action_spec: {
|
|
|
535
535
|
};
|
|
536
536
|
readonly side_effects: true;
|
|
537
537
|
readonly input: z.ZodObject<{
|
|
538
|
-
account_id: z.
|
|
538
|
+
account_id: z.ZodUUID & z.ZodType<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">, string>>;
|
|
539
539
|
seconds: z.ZodNumber;
|
|
540
540
|
}, z.core.$strict>;
|
|
541
541
|
readonly output: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/integration_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAU7B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"integration_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/integration_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAU7B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAC3B,OAAO,KAAK,CAAC,SAAS,CAAC,EACvB,QAAQ,MAAM,EACd,MAAM,MAAM,KACV,SAAS,GAAG,S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