@rotorsoft/act 1.23.14 → 1.23.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/act.d.ts.map +1 -1
- package/dist/@types/builders/act-builder.d.ts.map +1 -1
- package/dist/@types/internal/defer-config.d.ts.map +1 -1
- package/dist/@types/internal/projection-fold.d.ts +1 -1
- package/dist/@types/internal/projection-fold.d.ts.map +1 -1
- package/dist/index.cjs +27 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2607,7 +2607,15 @@ var DrainController = class {
|
|
|
2607
2607
|
};
|
|
2608
2608
|
|
|
2609
2609
|
// src/internal/projection-fold.ts
|
|
2610
|
-
function make_fold_handler(me, flush, config2, patch_fn = bare_patch) {
|
|
2610
|
+
function make_fold_handler(me, flush, config2, patch_fn = bare_patch, sensitive_fields) {
|
|
2611
|
+
const load_me = {
|
|
2612
|
+
...me,
|
|
2613
|
+
view: (raw, actor) => {
|
|
2614
|
+
const viewed = me.view(raw, actor);
|
|
2615
|
+
const fields = sensitive_fields(viewed.name);
|
|
2616
|
+
return fields.length ? pii_strip(viewed, fields) : viewed;
|
|
2617
|
+
}
|
|
2618
|
+
};
|
|
2611
2619
|
const cache2 = /* @__PURE__ */ new Map();
|
|
2612
2620
|
const row = ({ dirty: _, ...row2 }) => row2;
|
|
2613
2621
|
const flush_dirty = async () => {
|
|
@@ -2637,7 +2645,7 @@ function make_fold_handler(me, flush, config2, patch_fn = bare_patch) {
|
|
|
2637
2645
|
if (evictee.dirty) await flush([row(evictee)]);
|
|
2638
2646
|
cache2.delete(oldest);
|
|
2639
2647
|
}
|
|
2640
|
-
const snapshot = await load(
|
|
2648
|
+
const snapshot = await load(load_me, { stream }, void 0, patch_fn);
|
|
2641
2649
|
fold = {
|
|
2642
2650
|
stream,
|
|
2643
2651
|
state: snapshot.state,
|
|
@@ -4049,8 +4057,13 @@ var Act = class {
|
|
|
4049
4057
|
* @param options - Query window + per-category thresholds.
|
|
4050
4058
|
* @returns Async iterable of {@link AuditFinding}.
|
|
4051
4059
|
*/
|
|
4052
|
-
audit(categories, options) {
|
|
4053
|
-
|
|
4060
|
+
async *audit(categories, options) {
|
|
4061
|
+
const it = audit(this._audit_deps, categories, options)[Symbol.asyncIterator]();
|
|
4062
|
+
while (true) {
|
|
4063
|
+
const { value, done } = await this._scoped(() => it.next());
|
|
4064
|
+
if (done) break;
|
|
4065
|
+
yield value;
|
|
4066
|
+
}
|
|
4054
4067
|
}
|
|
4055
4068
|
/**
|
|
4056
4069
|
* Bulk-update scheduling priority for streams matching `filter`.
|
|
@@ -4352,7 +4365,16 @@ function act() {
|
|
|
4352
4365
|
);
|
|
4353
4366
|
batch_handlers.set(
|
|
4354
4367
|
proj.target,
|
|
4355
|
-
make_fold_handler(
|
|
4368
|
+
make_fold_handler(
|
|
4369
|
+
merged,
|
|
4370
|
+
fold.flush,
|
|
4371
|
+
fold.config,
|
|
4372
|
+
patch_fn,
|
|
4373
|
+
// Head loads strip sensitive keys like the warm path (#1320).
|
|
4374
|
+
// `_sf` is populated in the events pass below; read lazily at
|
|
4375
|
+
// fold time, by when the map is complete.
|
|
4376
|
+
(event_name) => _sf.get(event_name) ?? []
|
|
4377
|
+
)
|
|
4356
4378
|
);
|
|
4357
4379
|
}
|
|
4358
4380
|
finalize_deprecations();
|