@fuzdev/fuz_app 0.166.0 → 0.167.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 +1 -1
- package/dist/actions/action_codegen.d.ts +10 -1
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +17 -8
- package/dist/auth/CLAUDE.md +10 -8
- package/dist/auth/cell_action_specs.d.ts +6092 -1092
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +96 -97
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +1 -0
- package/dist/auth/cell_audit_action_specs.d.ts +301 -69
- package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_audit_action_specs.js +21 -16
- package/dist/auth/cell_audit_actions.js +2 -2
- package/dist/auth/cell_audit_events.d.ts +2 -2
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.d.ts +93 -30
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +15 -14
- package/dist/auth/cell_authorize.d.ts +3 -3
- package/dist/auth/cell_authorize.js +3 -3
- package/dist/auth/cell_data_schema.d.ts +17 -9
- package/dist/auth/cell_data_schema.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.js +9 -7
- package/dist/auth/cell_field_action_specs.d.ts +697 -130
- package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_field_action_specs.js +25 -27
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +2 -0
- package/dist/auth/cell_field_audit_metadata.d.ts +49 -13
- package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_field_audit_metadata.js +6 -6
- package/dist/auth/cell_grant_action_specs.d.ts +1044 -208
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +36 -33
- package/dist/auth/cell_grant_actions.js +2 -2
- package/dist/auth/cell_grant_audit_metadata.d.ts +188 -40
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +12 -11
- package/dist/auth/cell_item_action_specs.d.ts +949 -175
- package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_item_action_specs.js +30 -34
- package/dist/auth/cell_item_actions.js +1 -1
- package/dist/auth/cell_item_audit_metadata.d.ts +68 -19
- package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_item_audit_metadata.js +9 -9
- package/dist/auth/cell_relation_list_limit.d.ts +1 -2
- package/dist/auth/cell_relation_list_limit.d.ts.map +1 -1
- package/dist/auth/cell_relation_list_limit.js +3 -8
- package/dist/db/cell_moderation.d.ts +6 -7
- package/dist/db/cell_moderation.d.ts.map +1 -1
- package/dist/db/cell_moderation.js +6 -7
- package/dist/testing/cross_backend/cell_crud.js +2 -2
- package/dist/testing/cross_backend/cell_relations.js +2 -2
- package/package.json +1 -1
package/dist/actions/CLAUDE.md
CHANGED
|
@@ -141,7 +141,7 @@ and options on each function's TSDoc.
|
|
|
141
141
|
- `generate_frontend_actions_api` — typed `FrontendActionsApi` interface. A void or null input of either library (`is_void_schema`, `is_null_schema`) emits `input?: void`; otherwise each method's `input?:` follows `action_input_is_optional` (parsed with `parse_any`) — the schema accepts `undefined`, or accepts `{}` and is not marked `.meta({empty_input_handler_guarded: true})` (`SchemaFieldMeta`, read by `is_empty_input_handler_guarded` in `schema_meta.ts` — set on `cell_get`, `cell_field_list` and `cell_item_list`, whose `{}` reaches a handler guard that refuses it with a declared reason, so their input stays required; a consumer marks its own the same way); an input-shape invariant test reads the same rule.
|
|
142
142
|
- `generate_action_method_enums` — up to nine `z.enum` + `z.infer` pairs.
|
|
143
143
|
- `generate_typed_action_event_alias` — fixed-shape `TypedActionEvent<TMethod, TPhase, TStep>` alias.
|
|
144
|
-
- `generate_action_specs_record` — `ActionSpecs` runtime const +
|
|
144
|
+
- `generate_action_specs_record` — `ActionSpecs` runtime const + type + `action_specs` array. The const is annotated with the type (`readonly` members), so a consumer's declaration emit names the type instead of writing every spec's schema types out, which past enough specs is TS7056. The type is an alias, not an interface: an alias has an implicit index signature, so `Object.values(ActionSpecs)` stays typed and `action_specs` checks each spec against `ActionSpecUnion` (over an interface it is `any[]`).
|
|
145
145
|
- `generate_action_inputs_outputs` — `ActionInputs` + `ActionOutputs` runtime consts + interfaces, each schema typed as its output: `z.infer<typeof …>` for a Zod schema, fuz_schema's `Infer<typeof …>` for a `@fuzdev/fuz_schema` one, importing `z` and `Infer` only when a schema of that library is present; a schema of neither throws naming the method.
|
|
146
146
|
- `generate_action_event_datas` — `ActionEventDatas` interface; per-spec variants.
|
|
147
147
|
- `generate_frontend_action_handlers` — `FrontendActionHandlers` interface (Tier 2 only).
|
|
@@ -173,10 +173,19 @@ export declare const generate_typed_action_event_alias: (imports: ImportBuilder,
|
|
|
173
173
|
metatypes_path?: string;
|
|
174
174
|
}) => string;
|
|
175
175
|
/**
|
|
176
|
-
* Emit the `ActionSpecs` runtime const +
|
|
176
|
+
* Emit the `ActionSpecs` runtime const + type + the `action_specs:
|
|
177
177
|
* Array<ActionSpecUnion>` value bundling every spec. Adds the `* as specs`
|
|
178
178
|
* namespace import + the `ActionSpecUnion` type import.
|
|
179
179
|
*
|
|
180
|
+
* The const is annotated with the type, whose members are `readonly` like an
|
|
181
|
+
* `as const` literal's. Inferred, its type is every spec's schema types
|
|
182
|
+
* written out, and a consumer compiled with `declaration: true` hits TS7056
|
|
183
|
+
* once its spec list is long enough; declared, it serializes as the type's
|
|
184
|
+
* name. The type is an alias and not an interface: an alias has an implicit
|
|
185
|
+
* index signature, so `Object.values(ActionSpecs)` stays typed by the specs
|
|
186
|
+
* and `action_specs` checks each against `ActionSpecUnion`, where over an
|
|
187
|
+
* interface it is `any[]`.
|
|
188
|
+
*
|
|
180
189
|
* @param options.qualify_spec - per-spec qualified identifier callback for
|
|
181
190
|
* multi-source consumers (e.g. ``(s) => `admin_specs.${s.method}_action_spec` ``).
|
|
182
191
|
* When set, the helper emits the callback's return value instead of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action_codegen.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_codegen.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAG1E;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,+CAAgD,CAAC;AAErF,8FAA8F;AAC9F,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI5E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,GAAI,QAAQ,MAAM,KAAG,MAAM,IAAI,oBACrC,CAAC;AAEjC,UAAU,UAAU;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAa;;IACzB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAa;IAE1D;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAQrC;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAOrD,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IA6Bt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AC;IACpB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC9B,KAAG,MAYH,CAAC"}
|
|
@@ -595,10 +595,19 @@ type TypedActionEvent<
|
|
|
595
595
|
> = ActionEvent<TMethod, TPhase, TStep> & {readonly data: ActionEventDatas[TMethod]};`;
|
|
596
596
|
};
|
|
597
597
|
/**
|
|
598
|
-
* Emit the `ActionSpecs` runtime const +
|
|
598
|
+
* Emit the `ActionSpecs` runtime const + type + the `action_specs:
|
|
599
599
|
* Array<ActionSpecUnion>` value bundling every spec. Adds the `* as specs`
|
|
600
600
|
* namespace import + the `ActionSpecUnion` type import.
|
|
601
601
|
*
|
|
602
|
+
* The const is annotated with the type, whose members are `readonly` like an
|
|
603
|
+
* `as const` literal's. Inferred, its type is every spec's schema types
|
|
604
|
+
* written out, and a consumer compiled with `declaration: true` hits TS7056
|
|
605
|
+
* once its spec list is long enough; declared, it serializes as the type's
|
|
606
|
+
* name. The type is an alias and not an interface: an alias has an implicit
|
|
607
|
+
* index signature, so `Object.values(ActionSpecs)` stays typed by the specs
|
|
608
|
+
* and `action_specs` checks each against `ActionSpecUnion`, where over an
|
|
609
|
+
* interface it is `any[]`.
|
|
610
|
+
*
|
|
602
611
|
* @param options.qualify_spec - per-spec qualified identifier callback for
|
|
603
612
|
* multi-source consumers (e.g. ``(s) => `admin_specs.${s.method}_action_spec` ``).
|
|
604
613
|
* When set, the helper emits the callback's return value instead of
|
|
@@ -616,8 +625,8 @@ export const generate_action_specs_record = (specs, imports, options) => {
|
|
|
616
625
|
* Action specifications indexed by method name.
|
|
617
626
|
* These represent the complete action spec definitions.
|
|
618
627
|
*/
|
|
619
|
-
export const ActionSpecs = {}
|
|
620
|
-
export
|
|
628
|
+
export const ActionSpecs: ActionSpecs = {};
|
|
629
|
+
export type ActionSpecs = {};
|
|
621
630
|
|
|
622
631
|
export const action_specs: Array<ActionSpecUnion> = Object.values(ActionSpecs);`;
|
|
623
632
|
}
|
|
@@ -626,18 +635,18 @@ export const action_specs: Array<ActionSpecUnion> = Object.values(ActionSpecs);`
|
|
|
626
635
|
.map((s) => `\t${to_action_property_key(s.method)}: ${qualify(s)},`)
|
|
627
636
|
.join('\n');
|
|
628
637
|
const type_lines = filtered
|
|
629
|
-
.map((s) => `\
|
|
638
|
+
.map((s) => `\treadonly ${to_action_property_key(s.method)}: typeof ${qualify(s)};`)
|
|
630
639
|
.join('\n');
|
|
631
640
|
return `/**
|
|
632
641
|
* Action specifications indexed by method name.
|
|
633
642
|
* These represent the complete action spec definitions.
|
|
634
643
|
*/
|
|
635
|
-
export const ActionSpecs = {
|
|
644
|
+
export const ActionSpecs: ActionSpecs = {
|
|
636
645
|
${value_lines}
|
|
637
|
-
}
|
|
638
|
-
export
|
|
646
|
+
};
|
|
647
|
+
export type ActionSpecs = {
|
|
639
648
|
${type_lines}
|
|
640
|
-
}
|
|
649
|
+
};
|
|
641
650
|
|
|
642
651
|
export const action_specs: Array<ActionSpecUnion> = Object.values(ActionSpecs);`;
|
|
643
652
|
};
|
package/dist/auth/CLAUDE.md
CHANGED
|
@@ -271,15 +271,16 @@ Generic-only — no app vocabulary on the wire; per-kind shape is the
|
|
|
271
271
|
consumer's `validate_data(kind, data)` callback on `CellActionDeps`, which
|
|
272
272
|
accepts or throws and never rewrites (the handler stores the caller's `data`).
|
|
273
273
|
|
|
274
|
-
- `auth/cell_data_schema.ts` — `CellData` base (`
|
|
275
|
-
optional `label` / `summary`); per-kind
|
|
274
|
+
- `auth/cell_data_schema.ts` — `CellData` base (a `@fuzdev/fuz_schema`
|
|
275
|
+
`loose_object` with optional `label` / `summary`); a per-kind schema spreads
|
|
276
|
+
its `def` (`loose_object({...CellData.def, ...})`). **`kind` is
|
|
276
277
|
not in `data`** — it is a top-level `cell.kind` column (peer to
|
|
277
278
|
`visibility` / `path`), the write-once capability/identity axis; a stray
|
|
278
279
|
`kind` inside `data` is rejected fail-loud (`ERROR_CELL_KIND_IN_DATA`).
|
|
279
280
|
- `auth/cell_action_specs.ts` — `CellVisibility` enum, `CellPath` brand,
|
|
280
281
|
`CELL_KIND_LENGTH_MAX` (64 — the wire `kind` on `cell_create` and the
|
|
281
282
|
`cell_list` filter; the tag is copied into the cell's audit rows),
|
|
282
|
-
`CellJson`, `CellPolicy` (a root's contribution policy, `
|
|
283
|
+
`CellJson`, `CellPolicy` (a root's contribution policy, a `loose_object`), the
|
|
283
284
|
generic verb specs (`cell_create / get / update / delete / list / clone /
|
|
284
285
|
moderate / policy_set`), error reasons, and `all_cell_action_specs`
|
|
285
286
|
(spreads in the grant / field / item / audit registries so codegen + UI
|
|
@@ -291,7 +292,8 @@ moderate / policy_set`), error reasons, and `all_cell_action_specs`
|
|
|
291
292
|
- `auth/cell_grant_action_specs.ts` / `cell_field_action_specs.ts` /
|
|
292
293
|
`cell_item_action_specs.ts` / `cell_audit_action_specs.ts` — the
|
|
293
294
|
`cell_grant_*` / `cell_field_*` / `cell_item_*` / `cell_audit_list`
|
|
294
|
-
specs + their wire JSON shapes.
|
|
295
|
+
specs + their wire JSON shapes. Every cell wire schema is
|
|
296
|
+
`@fuzdev/fuz_schema`.
|
|
295
297
|
- `auth/cell_authorize.ts` — pure predicates over
|
|
296
298
|
`(RequestContext | null, CellRow, grants)`: `can_view_cell`,
|
|
297
299
|
`can_edit_cell`, and `can_manage_cell` (= admin ‖ owner, where owner is
|
|
@@ -415,8 +417,8 @@ root_id, root_policy}` than `validate_data` and returns a `CellCreateVerdict`
|
|
|
415
417
|
Distinct from `create_cell_actions` (the CRUD-only factory it bundles).
|
|
416
418
|
- `auth/cell_audit_metadata.ts` + `cell_grant_audit_metadata.ts` +
|
|
417
419
|
`cell_field_audit_metadata.ts` + `cell_item_audit_metadata.ts` — audit
|
|
418
|
-
metadata envelopes (IDs only),
|
|
419
|
-
consumer's `create_audit_log_config`.
|
|
420
|
+
metadata envelopes (IDs only), `@fuzdev/fuz_schema` `loose_object`s,
|
|
421
|
+
registered via `extra_events:` on the consumer's `create_audit_log_config`.
|
|
420
422
|
- `auth/cell_audit_events.ts` — `cell_audit_events`, the canonical
|
|
421
423
|
`event_type → metadata` map bundling every cell-domain audit event.
|
|
422
424
|
Consumers spread it into `extra_events` to register the whole layer in
|
|
@@ -483,8 +485,8 @@ than read back — the `expires_at` on `account_token_create`'s output — use
|
|
|
483
485
|
`to_iso8601_seconds` (`timestamp.ts`), so the mint and the later
|
|
484
486
|
`account_token_list` read agree byte for byte.
|
|
485
487
|
|
|
486
|
-
The `*Json` schemas type these as `
|
|
487
|
-
also satisfies — so the shape is pinned behaviorally by
|
|
488
|
+
The `*Json` schemas type these as `Timestamp` (`iso_datetime`), which a
|
|
489
|
+
millisecond stamp also satisfies — so the shape is pinned behaviorally by
|
|
488
490
|
`assert_iso8601_seconds` (`testing/cross_backend/wire_shapes.ts`) inside the
|
|
489
491
|
shared suites, on both backends.
|
|
490
492
|
|