@rotorsoft/act 2.1.15 → 2.1.16

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.
@@ -35,10 +35,7 @@ import { type EventGate } from "../internal/pii.js";
35
35
  import type { LaneConfig, Registry } from "../types/index.js";
36
36
  /** What one pass over an event's schema resolves. @internal */
37
37
  export type EventTags = {
38
- /**
39
- * Keys marked `sensitive(...)`, top level (and across union variants), with
40
- * the schema each declares.
41
- */
38
+ /** Keys marked `sensitive(...)`, with the schema each declares (see `pii_schemas`). */
42
39
  readonly sensitive: Readonly<Record<string, z.ZodType>>;
43
40
  /**
44
41
  * Revives the dates in a stored `data` payload, or `undefined` when the
@@ -52,13 +49,8 @@ export type EventTags = {
52
49
  readonly pii_date_reviver: ((pii: unknown) => unknown) | undefined;
53
50
  };
54
51
  /**
55
- * Resolve an event's schema in a single pass.
56
- *
57
- * Sensitive markers are read at the top level only — the documented carve-out
58
- * (`internal/sensitive.ts`), since the write path splits whole top-level keys. A union
59
- * event has no top-level shape, so its variants are walked and unioned: a key
60
- * sensitive in any variant must be split, because the stored payload could be
61
- * that variant.
52
+ * Resolve an event's schema in a single pass. Its sensitive fields come from
53
+ * `pii_schemas`, which owns how far the marker reaches.
62
54
  *
63
55
  * @internal
64
56
  */
@@ -1 +1 @@
1
- {"version":3,"file":"event-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/event-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,SAAS,EAKf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAS,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrE,+DAA+D;AAC/D,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAA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QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,kEAAkE;IAClE,QAAQ,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/C,oEAAoE;IACpE,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClD,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtD,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C,kFAAkF;IAClF,QAAQ,CAAC,oBAAoB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACrD,CAAC;AAOF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACjC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,EAChC,MAAM,EAAE,YAAY,GACnB,WAAW,CAkJb"}
@@ -12,8 +12,10 @@ import type { z } from "zod";
12
12
  *
13
13
  * A union event has no top-level shape, so the options are walked and merged:
14
14
  * a key sensitive in any variant must be split, because the stored payload
15
- * could be that variant.
16
- * The first variant to declare a key wins, which only matters to a caller that
15
+ * could be that variant. An event declared as an intersection, a `z.lazy()` or
16
+ * a pipe (`.transform()`, `.pipe()`) is walked through to the objects it is
17
+ * made of, the same way.
18
+ * The first schema to declare a key wins, which only matters to a caller that
17
19
  * wants the schema rather than the name.
18
20
  *
19
21
  * Returning the schemas rather than just the names is what lets a caller do
@@ -1 +1 @@
1
- {"version":3,"file":"sensitive.d.ts","sourceRoot":"","sources":["../../../src/internal/sensitive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqB7B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAmBxE"}
1
+ {"version":3,"file":"sensitive.d.ts","sourceRoot":"","sources":["../../../src/internal/sensitive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqB7B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAgBxE"}
@@ -24,6 +24,12 @@ export declare const inner_of: (def: Def) => z.ZodType | undefined;
24
24
  * - `z.lazy()` holds what its getter returns.
25
25
  */
26
26
  export declare function wrapped(schema: unknown): z.ZodType[];
27
+ /**
28
+ * The schemas whose fields make up an object-like schema that isn't an object
29
+ * itself: both sides of an intersection, or what a wrapper holds
30
+ * ({@link wrapped}).
31
+ */
32
+ export declare function parts_of(schema: unknown): z.ZodType[];
27
33
  /**
28
34
  * True when `test` holds for the schema or any schema it wraps, at any depth.
29
35
  * Each schema is visited once, so a lazy schema that returns itself ends.
@@ -1 +1 @@
1
- {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../src/internal/zod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,0EAA0E;AAC1E,KAAK,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AAEpC,iEAAiE;AACjE,eAAO,MAAM,MAAM,WAAY,OAAO,KAAG,GAAG,GAAG,SACc,CAAC;AAiB9D,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,QAAS,GAAG,KAAG,CAAC,CAAC,OAAO,GAAG,SACa,CAAC;AAE9D;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAOpD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,GAC1B,OAAO,CAST;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAYlD"}
1
+ {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../src/internal/zod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,0EAA0E;AAC1E,KAAK,GAAG,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AAEpC,iEAAiE;AACjE,eAAO,MAAM,MAAM,WAAY,OAAO,KAAG,GAAG,GAAG,SACc,CAAC;AAiB9D,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,QAAS,GAAG,KAAG,CAAC,CAAC,OAAO,GAAG,SACa,CAAC;AAE9D;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAOpD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAGrD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,GAC1B,OAAO,CAST;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAYlD"}
@@ -49,8 +49,8 @@ export type SchemaRegister<TSchemaReg> = {
49
49
  * references like `Registry<any, any, any>` keep working.
50
50
  * @property actions - Map of action names to state definitions.
51
51
  * @property events - Map of event names to event registration info.
52
- * @property sensitive_fields - Lookup of the top-level `sensitive(...)`-marked
53
- * fields of an action or an event, by name (the two never share one).
52
+ * @property sensitive_fields - Lookup of the `sensitive(...)`-marked fields of
53
+ * an action or an event, by name (the two never share one).
54
54
  * Typed to the app's action and event names. Derived once at build time.
55
55
  * Returns the empty array for a name with none. The framework splits and
56
56
  * gates an event's fields; an action's are reported for tooling that