@rotorsoft/act 1.33.4 → 1.33.6
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/builders/act-builder.d.ts.map +1 -1
- package/dist/@types/builders/builder-utils.d.ts +6 -3
- package/dist/@types/builders/builder-utils.d.ts.map +1 -1
- package/dist/@types/builders/slice-builder.d.ts.map +1 -1
- package/dist/index.cjs +10 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"act-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/act-builder.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAEV,KAAK,EAKL,MAAM,EACN,cAAc,EACd,OAAO,EAER,MAAM,mBAAmB,CAAC;AA8B3B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAEjB,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,EAChD,OAAO,SAAS,OAAO,GAAG,EAAE,EAC5B,QAAQ,SAAS,OAAO,GAAG,EAAE,EAC7B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,EAC7C,MAAM,SAAS,KAAK,GAAG,KAAK,KACzB,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"act-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/act-builder.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAEV,KAAK,EAKL,MAAM,EACN,cAAc,EACd,OAAO,EAER,MAAM,mBAAmB,CAAC;AA8B3B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAEjB,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,EAChD,OAAO,SAAS,OAAO,GAAG,EAAE,EAC5B,QAAQ,SAAS,OAAO,GAAG,EAAE,EAC7B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,EAC7C,MAAM,SAAS,KAAK,GAAG,KAAK,KACzB,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAwVhE"}
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
import { type DeferSchedule } from "../internal/defer-config.js";
|
|
15
15
|
import type { Committed, EventRegister, LaneConfig, ReactionHandler, ReactionOptions, ReactionResolver, Schemas } from "../types/index.js";
|
|
16
16
|
/**
|
|
17
|
-
* Validate and register a drain lane
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Validate and register a drain lane, the one rule for `withLane` on an Act
|
|
18
|
+
* or a slice and for the lanes a slice brings to `withSlice`, in any order.
|
|
19
|
+
* Validating here means a bad lane bag throws at declaration, not by
|
|
20
|
+
* silently draining nothing. `"default"` is reserved; a name declares one
|
|
21
|
+
* config, so declaring it again with the same config is a no-op and with a
|
|
22
|
+
* different one throws. Mutates `lanes` in place.
|
|
20
23
|
*
|
|
21
24
|
* @internal
|
|
22
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../src/builders/builder-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../src/builders/builder-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,UAAU,EAEV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,OAAO,EACR,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAc3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,SAAS,OAAO,EACvB,IAAI,SAAS,MAAM,OAAO,EAC1B,QAAQ,EACR,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ;IA2C5D,EAAE,YACS,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,YAC7B,OAAO,CAAC,eAAe,CAAC;qBAVrB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,MAAM;;IAYvD,KAAK,aAAa,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACvD,EAAE,YACS,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,YAC7B,OAAO,CAAC,eAAe,CAAC;;;;EAIzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slice-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/slice-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"slice-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/slice-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EACV,KAAK,EAGL,MAAM,EACN,cAAc,EACd,OAAO,EAER,MAAM,mBAAmB,CAAC;AAM3B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,KAAK,CAEnB,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,EAChD,OAAO,SAAS,OAAO,GAAG,EAAE,EAC5B,QAAQ,SAAS,OAAO,GAAG,EAAE,EAC7B,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,EAC7C,MAAM,SAAS,KAAK,GAAG,KAAK,KACzB,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CA0ClE"}
|
package/dist/index.cjs
CHANGED
|
@@ -4298,11 +4298,15 @@ var _this_ = ({ stream }) => ({
|
|
|
4298
4298
|
|
|
4299
4299
|
// src/builders/builder-utils.ts
|
|
4300
4300
|
function register_lane(config2, lanes) {
|
|
4301
|
+
_chunkO6QIJQRNcjs.resolveLaneConfig.call(void 0, config2);
|
|
4301
4302
|
if (config2.name === _chunk7AHW7FCNcjs.DEFAULT_LANE)
|
|
4302
4303
|
throw new Error(`Lane "${_chunk7AHW7FCNcjs.DEFAULT_LANE}" is reserved`);
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4304
|
+
const existing = lanes.find((l) => l.name === config2.name);
|
|
4305
|
+
if (!existing) return void lanes.push(config2);
|
|
4306
|
+
if (existing.leaseMillis !== config2.leaseMillis || existing.streamLimit !== config2.streamLimit || existing.cycleMs !== config2.cycleMs)
|
|
4307
|
+
throw new Error(
|
|
4308
|
+
`Lane "${config2.name}" was already declared with a different config`
|
|
4309
|
+
);
|
|
4306
4310
|
}
|
|
4307
4311
|
function reaction_on(event, events, builder) {
|
|
4308
4312
|
const register = (handler, options, schedule) => {
|
|
@@ -4653,18 +4657,7 @@ function act() {
|
|
|
4653
4657
|
}
|
|
4654
4658
|
merge_event_register(registry.events, input.events);
|
|
4655
4659
|
pending_projections.push(...input.projections);
|
|
4656
|
-
for (const
|
|
4657
|
-
const existing = lanes.find((l) => l.name === slice_lane.name);
|
|
4658
|
-
if (!existing) {
|
|
4659
|
-
lanes.push(slice_lane);
|
|
4660
|
-
continue;
|
|
4661
|
-
}
|
|
4662
|
-
if (existing.leaseMillis !== slice_lane.leaseMillis || existing.streamLimit !== slice_lane.streamLimit || existing.cycleMs !== slice_lane.cycleMs) {
|
|
4663
|
-
throw new Error(
|
|
4664
|
-
`Lane "${slice_lane.name}" was already declared with a different config`
|
|
4665
|
-
);
|
|
4666
|
-
}
|
|
4667
|
-
}
|
|
4660
|
+
for (const lane of input.lanes) register_lane(lane, lanes);
|
|
4668
4661
|
return builder;
|
|
4669
4662
|
},
|
|
4670
4663
|
withProjection: (proj) => {
|
|
@@ -4675,7 +4668,7 @@ function act() {
|
|
|
4675
4668
|
withActor: () => builder,
|
|
4676
4669
|
withLane: (config2) => {
|
|
4677
4670
|
if (_built) closed("withLane");
|
|
4678
|
-
register_lane(
|
|
4671
|
+
register_lane(config2, lanes);
|
|
4679
4672
|
return builder;
|
|
4680
4673
|
},
|
|
4681
4674
|
on: (event) => {
|
|
@@ -4897,7 +4890,7 @@ function slice() {
|
|
|
4897
4890
|
return builder;
|
|
4898
4891
|
},
|
|
4899
4892
|
withLane: (config2) => {
|
|
4900
|
-
register_lane(
|
|
4893
|
+
register_lane(config2, lanes);
|
|
4901
4894
|
return builder;
|
|
4902
4895
|
},
|
|
4903
4896
|
on: (event) => reaction_on(event, events, builder),
|