@rotorsoft/act 2.1.15 → 2.2.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/.tsbuildinfo +1 -1
- package/dist/@types/act.d.ts +6 -3
- package/dist/@types/act.d.ts.map +1 -1
- package/dist/@types/builders/event-builder.d.ts +3 -11
- package/dist/@types/builders/event-builder.d.ts.map +1 -1
- package/dist/@types/disposers.d.ts +4 -1
- package/dist/@types/disposers.d.ts.map +1 -1
- package/dist/@types/internal/config.d.ts +8 -0
- package/dist/@types/internal/config.d.ts.map +1 -1
- package/dist/@types/internal/sensitive.d.ts +4 -2
- package/dist/@types/internal/sensitive.d.ts.map +1 -1
- package/dist/@types/internal/zod.d.ts +6 -0
- package/dist/@types/internal/zod.d.ts.map +1 -1
- package/dist/@types/ports.d.ts +2 -1
- package/dist/@types/ports.d.ts.map +1 -1
- package/dist/@types/types/builders.d.ts +25 -11
- package/dist/@types/types/builders.d.ts.map +1 -1
- package/dist/@types/types/registry.d.ts +7 -4
- package/dist/@types/types/registry.d.ts.map +1 -1
- package/dist/{chunk-3WHD4VPP.cjs → chunk-DDGMSQSO.cjs} +31 -16
- package/dist/chunk-DDGMSQSO.cjs.map +1 -0
- package/dist/{chunk-CWWTVYIN.js → chunk-OFBVOZIA.js} +26 -11
- package/dist/chunk-OFBVOZIA.js.map +1 -0
- package/dist/index.cjs +199 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +3 -3
- package/dist/test/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-3WHD4VPP.cjs.map +0 -1
- package/dist/chunk-CWWTVYIN.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
store,
|
|
28
28
|
unscoped_ports,
|
|
29
29
|
validate
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OFBVOZIA.js";
|
|
31
31
|
import {
|
|
32
32
|
checkAppends,
|
|
33
33
|
checkVersion,
|
|
@@ -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) => {
|
|
@@ -3933,6 +3938,7 @@ var Act = class {
|
|
|
3933
3938
|
actor: void 0,
|
|
3934
3939
|
asOf
|
|
3935
3940
|
} : streamOrTarget;
|
|
3941
|
+
check("page", target.asOf ?? {});
|
|
3936
3942
|
return await this._es.load(merged, target, callback);
|
|
3937
3943
|
});
|
|
3938
3944
|
}
|
|
@@ -4378,7 +4384,7 @@ var Act = class {
|
|
|
4378
4384
|
* ```
|
|
4379
4385
|
*/
|
|
4380
4386
|
async blocked_streams(options) {
|
|
4381
|
-
check("page", options
|
|
4387
|
+
check("page", { limit: options?.limit });
|
|
4382
4388
|
return this._scoped(async () => {
|
|
4383
4389
|
const positions = [];
|
|
4384
4390
|
await store().query_streams(
|
|
@@ -4804,24 +4810,19 @@ import { z as z2 } from "zod";
|
|
|
4804
4810
|
var SENSITIVE = /* @__PURE__ */ Symbol.for("act.sensitive");
|
|
4805
4811
|
var is_pii = /* @__PURE__ */ __name((schema) => some_layer(schema, (def) => def[SENSITIVE] === true), "is_pii");
|
|
4806
4812
|
function pii_schemas(schema) {
|
|
4813
|
+
const fields = {};
|
|
4807
4814
|
const shape = schema.shape;
|
|
4808
4815
|
if (shape && typeof shape === "object") {
|
|
4809
|
-
const fields = {};
|
|
4810
4816
|
for (const key of Object.keys(shape))
|
|
4811
4817
|
if (is_pii(shape[key])) fields[key] = shape[key];
|
|
4812
4818
|
return fields;
|
|
4813
4819
|
}
|
|
4814
4820
|
const options = schema.options;
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
for (const
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
))
|
|
4821
|
-
fields[key] ??= field;
|
|
4822
|
-
return fields;
|
|
4823
|
-
}
|
|
4824
|
-
return {};
|
|
4821
|
+
const parts = Array.isArray(options) ? options : parts_of(schema);
|
|
4822
|
+
for (const part of parts)
|
|
4823
|
+
for (const [key, field] of Object.entries(pii_schemas(part)))
|
|
4824
|
+
fields[key] ??= field;
|
|
4825
|
+
return fields;
|
|
4825
4826
|
}
|
|
4826
4827
|
__name(pii_schemas, "pii_schemas");
|
|
4827
4828
|
|