@rotorsoft/act 2.1.14 → 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.
Files changed (36) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/@types/act.d.ts.map +1 -1
  3. package/dist/@types/builders/event-builder.d.ts +3 -11
  4. package/dist/@types/builders/event-builder.d.ts.map +1 -1
  5. package/dist/@types/internal/sensitive.d.ts +4 -2
  6. package/dist/@types/internal/sensitive.d.ts.map +1 -1
  7. package/dist/@types/internal/zod.d.ts +6 -0
  8. package/dist/@types/internal/zod.d.ts.map +1 -1
  9. package/dist/@types/types/act.d.ts +4 -3
  10. package/dist/@types/types/act.d.ts.map +1 -1
  11. package/dist/@types/types/registry.d.ts +2 -2
  12. package/dist/adapter.cjs +3 -3
  13. package/dist/adapter.js +2 -2
  14. package/dist/{chunk-WDIBO6AW.cjs → chunk-3WHD4VPP.cjs} +54 -54
  15. package/dist/{chunk-WDIBO6AW.cjs.map → chunk-3WHD4VPP.cjs.map} +1 -1
  16. package/dist/{chunk-SCH4GLWM.js → chunk-CWWTVYIN.js} +3 -3
  17. package/dist/{chunk-EIGZVFT7.js → chunk-GHMCESJA.js} +2 -2
  18. package/dist/{chunk-GDPBPAML.js → chunk-KAUON2M3.js} +1 -1
  19. package/dist/chunk-KAUON2M3.js.map +1 -0
  20. package/dist/{chunk-UEGKXCSQ.cjs → chunk-LA2BPKNS.cjs} +1 -1
  21. package/dist/chunk-LA2BPKNS.cjs.map +1 -0
  22. package/dist/{chunk-DCWPJFXR.cjs → chunk-QITJ63HG.cjs} +11 -11
  23. package/dist/{chunk-DCWPJFXR.cjs.map → chunk-QITJ63HG.cjs.map} +1 -1
  24. package/dist/index.cjs +504 -503
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.js +15 -14
  27. package/dist/index.js.map +1 -1
  28. package/dist/test/index.cjs +9 -9
  29. package/dist/test/index.js +3 -3
  30. package/dist/types/index.cjs +2 -2
  31. package/dist/types/index.js +1 -1
  32. package/package.json +2 -2
  33. package/dist/chunk-GDPBPAML.js.map +0 -1
  34. package/dist/chunk-UEGKXCSQ.cjs.map +0 -1
  35. /package/dist/{chunk-SCH4GLWM.js.map → chunk-CWWTVYIN.js.map} +0 -0
  36. /package/dist/{chunk-EIGZVFT7.js.map → chunk-GHMCESJA.js.map} +0 -0
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  store,
28
28
  unscoped_ports,
29
29
  validate
30
- } from "./chunk-SCH4GLWM.js";
30
+ } from "./chunk-CWWTVYIN.js";
31
31
  import {
32
32
  checkAppends,
33
33
  checkVersion,
@@ -36,7 +36,7 @@ import {
36
36
  isStreamName,
37
37
  parseNotification,
38
38
  seedEvent
39
- } from "./chunk-EIGZVFT7.js";
39
+ } from "./chunk-GHMCESJA.js";
40
40
  import {
41
41
  ActorSchema,
42
42
  CausationEventSchema,
@@ -66,7 +66,7 @@ import {
66
66
  ZodEmpty,
67
67
  __name,
68
68
  sensitive
69
- } from "./chunk-GDPBPAML.js";
69
+ } from "./chunk-KAUON2M3.js";
70
70
 
71
71
  // src/signals.ts
72
72
  process.once("SIGINT", async (arg) => {
@@ -1152,6 +1152,11 @@ function wrapped(schema) {
1152
1152
  return inner ? [inner] : [];
1153
1153
  }
1154
1154
  __name(wrapped, "wrapped");
1155
+ function parts_of(schema) {
1156
+ const def = def_of(schema);
1157
+ return def?.type === "intersection" ? [def.left, def.right] : wrapped(schema);
1158
+ }
1159
+ __name(parts_of, "parts_of");
1155
1160
  function some_layer(schema, test) {
1156
1161
  const seen = /* @__PURE__ */ new Set();
1157
1162
  const visit = /* @__PURE__ */ __name((s) => {
@@ -3961,6 +3966,7 @@ var Act = class {
3961
3966
  * @see {@link query_array} for loading events into memory
3962
3967
  */
3963
3968
  async query(query, callback) {
3969
+ check("page", query);
3964
3970
  return this._scoped(async () => {
3965
3971
  let first;
3966
3972
  let last;
@@ -4803,24 +4809,19 @@ import { z as z2 } from "zod";
4803
4809
  var SENSITIVE = /* @__PURE__ */ Symbol.for("act.sensitive");
4804
4810
  var is_pii = /* @__PURE__ */ __name((schema) => some_layer(schema, (def) => def[SENSITIVE] === true), "is_pii");
4805
4811
  function pii_schemas(schema) {
4812
+ const fields = {};
4806
4813
  const shape = schema.shape;
4807
4814
  if (shape && typeof shape === "object") {
4808
- const fields = {};
4809
4815
  for (const key of Object.keys(shape))
4810
4816
  if (is_pii(shape[key])) fields[key] = shape[key];
4811
4817
  return fields;
4812
4818
  }
4813
4819
  const options = schema.options;
4814
- if (Array.isArray(options)) {
4815
- const fields = {};
4816
- for (const option of options)
4817
- for (const [key, field] of Object.entries(
4818
- pii_schemas(option)
4819
- ))
4820
- fields[key] ??= field;
4821
- return fields;
4822
- }
4823
- return {};
4820
+ const parts = Array.isArray(options) ? options : parts_of(schema);
4821
+ for (const part of parts)
4822
+ for (const [key, field] of Object.entries(pii_schemas(part)))
4823
+ fields[key] ??= field;
4824
+ return fields;
4824
4825
  }
4825
4826
  __name(pii_schemas, "pii_schemas");
4826
4827