@context-action/core 1.2.6 → 1.3.1
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/CHANGELOG.md +22 -0
- package/README.md +31 -1
- package/dist/element-BRlY61kW.cjs +631 -0
- package/dist/element-BTaXgo7n.js +597 -0
- package/dist/element-BTaXgo7n.js.map +1 -0
- package/dist/element-DPioFL7C.d.cts +163 -0
- package/dist/element-DPioFL7C.d.cts.map +1 -0
- package/dist/element-DPioFL7C.d.ts +163 -0
- package/dist/element-DPioFL7C.d.ts.map +1 -0
- package/dist/element-react.cjs +91 -0
- package/dist/element-react.d.cts +11 -0
- package/dist/element-react.d.cts.map +1 -0
- package/dist/element-react.d.ts +11 -0
- package/dist/element-react.d.ts.map +1 -0
- package/dist/element-react.js +85 -0
- package/dist/element-react.js.map +1 -0
- package/dist/element.cjs +9 -0
- package/dist/element.d.cts +3 -0
- package/dist/element.d.ts +3 -0
- package/dist/element.js +3 -0
- package/dist/index.cjs +154 -47
- package/dist/index.d.cts +2 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -47
- package/dist/index.js.map +1 -1
- package/dist/public-action-methods-C_ppItRr.d.cts +5 -0
- package/dist/public-action-methods-C_ppItRr.d.cts.map +1 -0
- package/dist/public-action-methods-C_ppItRr.d.ts +5 -0
- package/dist/public-action-methods-C_ppItRr.d.ts.map +1 -0
- package/docs/action-contracts.md +78 -0
- package/docs/element-host-patterns.en.md +129 -0
- package/docs/element-host-patterns.ko.md +116 -0
- package/docs/element-interop.md +138 -0
- package/docs/interop-review.en.md +55 -0
- package/docs/interop-review.ko.md +51 -0
- package/package.json +35 -4
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
//#region src/action-guard.ts
|
|
3
|
+
function validateDelay(value, label) {
|
|
4
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new RangeError(`${label} must be a non-negative finite number.`);
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Action Guard system for managing action execution timing
|
|
5
8
|
*
|
|
@@ -98,6 +101,7 @@ var ActionGuard = class {
|
|
|
98
101
|
* @internal
|
|
99
102
|
*/
|
|
100
103
|
async debounce(actionKey, debounceMs, signal) {
|
|
104
|
+
validateDelay(debounceMs, "debounce");
|
|
101
105
|
this.ensureAutoCleanup();
|
|
102
106
|
if (signal?.aborted) return false;
|
|
103
107
|
/** Get or create guard state for this action */
|
|
@@ -177,6 +181,7 @@ var ActionGuard = class {
|
|
|
177
181
|
* @internal
|
|
178
182
|
*/
|
|
179
183
|
throttle(actionKey, throttleMs, signal) {
|
|
184
|
+
validateDelay(throttleMs, "throttle");
|
|
180
185
|
this.ensureAutoCleanup();
|
|
181
186
|
if (signal?.aborted) return false;
|
|
182
187
|
/** Get or create guard state for this action */
|
|
@@ -699,6 +704,26 @@ function createSkippedOutcome(registration) {
|
|
|
699
704
|
metadata: registration.config.metadata ? { ...registration.config.metadata } : void 0
|
|
700
705
|
};
|
|
701
706
|
}
|
|
707
|
+
/** Concurrent-mode conditions are preconditions for the entire attempt.
|
|
708
|
+
* Do not consume once registrations until every condition has been evaluated
|
|
709
|
+
* without throwing. A false condition skips only its own registration. */
|
|
710
|
+
function selectConcurrentHandlers(context) {
|
|
711
|
+
const eligibleHandlers = [];
|
|
712
|
+
for (const registration of context.handlers) {
|
|
713
|
+
if (registration.config.condition && !registration.config.condition(context.payload)) {
|
|
714
|
+
(context.handlerOutcomes ?? (context.handlerOutcomes = [])).push(createSkippedOutcome(registration));
|
|
715
|
+
continue;
|
|
716
|
+
}
|
|
717
|
+
eligibleHandlers.push(registration);
|
|
718
|
+
}
|
|
719
|
+
return eligibleHandlers.filter((registration) => {
|
|
720
|
+
if (context.claimOnce && !context.claimOnce(registration)) {
|
|
721
|
+
(context.handlerOutcomes ?? (context.handlerOutcomes = [])).push(createSkippedOutcome(registration));
|
|
722
|
+
return false;
|
|
723
|
+
}
|
|
724
|
+
return true;
|
|
725
|
+
});
|
|
726
|
+
}
|
|
702
727
|
function finishOutcome(outcome, startedAt, status, result, error) {
|
|
703
728
|
outcome.status = status;
|
|
704
729
|
outcome.duration = Date.now() - startedAt;
|
|
@@ -864,18 +889,7 @@ async function executeParallel(context, createController) {
|
|
|
864
889
|
* before any handler starts so a predicate error rejects the dispatch rather
|
|
865
890
|
* than being mistaken for a non-blocking handler failure.
|
|
866
891
|
*/
|
|
867
|
-
const runnableHandlers =
|
|
868
|
-
for (const registration of context.handlers) {
|
|
869
|
-
if (registration.config.condition && !registration.config.condition(context.payload)) {
|
|
870
|
-
(context.handlerOutcomes ?? (context.handlerOutcomes = [])).push(createSkippedOutcome(registration));
|
|
871
|
-
continue;
|
|
872
|
-
}
|
|
873
|
-
if (context.claimOnce && !context.claimOnce(registration)) {
|
|
874
|
-
(context.handlerOutcomes ?? (context.handlerOutcomes = [])).push(createSkippedOutcome(registration));
|
|
875
|
-
continue;
|
|
876
|
-
}
|
|
877
|
-
runnableHandlers.push(registration);
|
|
878
|
-
}
|
|
892
|
+
const runnableHandlers = selectConcurrentHandlers(context);
|
|
879
893
|
const terminationSlots = runnableHandlers.map(() => ({
|
|
880
894
|
requested: false,
|
|
881
895
|
result: void 0
|
|
@@ -974,18 +988,7 @@ async function executeParallel(context, createController) {
|
|
|
974
988
|
*/
|
|
975
989
|
async function executeRace(context, createController) {
|
|
976
990
|
/** See executeParallel: condition errors are dispatch errors in concurrent modes. */
|
|
977
|
-
const runnableHandlers =
|
|
978
|
-
for (const registration of context.handlers) {
|
|
979
|
-
if (registration.config.condition && !registration.config.condition(context.payload)) {
|
|
980
|
-
(context.handlerOutcomes ?? (context.handlerOutcomes = [])).push(createSkippedOutcome(registration));
|
|
981
|
-
continue;
|
|
982
|
-
}
|
|
983
|
-
if (context.claimOnce && !context.claimOnce(registration)) {
|
|
984
|
-
(context.handlerOutcomes ?? (context.handlerOutcomes = [])).push(createSkippedOutcome(registration));
|
|
985
|
-
continue;
|
|
986
|
-
}
|
|
987
|
-
runnableHandlers.push(registration);
|
|
988
|
-
}
|
|
991
|
+
const runnableHandlers = selectConcurrentHandlers(context);
|
|
989
992
|
if (runnableHandlers.length === 0) return;
|
|
990
993
|
/** Create promises for all handlers */
|
|
991
994
|
const handlerPromises = runnableHandlers.map(async (registration, _index) => {
|
|
@@ -1109,6 +1112,29 @@ function normalizePositiveLimit(value, fallback, label) {
|
|
|
1109
1112
|
if (!Number.isSafeInteger(limit) || limit <= 0) throw new RangeError(`${label} must be a positive safe integer or Infinity.`);
|
|
1110
1113
|
return limit;
|
|
1111
1114
|
}
|
|
1115
|
+
function validateNonNegativeFiniteNumber(value, label) {
|
|
1116
|
+
if (value === void 0) return;
|
|
1117
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new RangeError(`${label} must be a non-negative finite number.`);
|
|
1118
|
+
}
|
|
1119
|
+
function validateTimingConfig(config) {
|
|
1120
|
+
validateNonNegativeFiniteNumber(config?.debounce, "debounce");
|
|
1121
|
+
validateNonNegativeFiniteNumber(config?.throttle, "throttle");
|
|
1122
|
+
}
|
|
1123
|
+
function validateRetryOptions(options) {
|
|
1124
|
+
const retry = options?.retryOnError;
|
|
1125
|
+
if (!retry) return;
|
|
1126
|
+
if (retry.maxAttempts !== void 0 && (!Number.isSafeInteger(retry.maxAttempts) || retry.maxAttempts < 1)) throw new RangeError("retryOnError.maxAttempts must be a positive safe integer.");
|
|
1127
|
+
validateNonNegativeFiniteNumber(retry.delay, "retryOnError.delay");
|
|
1128
|
+
if (retry.attemptBarrier !== void 0 && retry.attemptBarrier !== "abort-and-drain" && retry.attemptBarrier !== "abort-and-overlap") throw new TypeError("retryOnError.attemptBarrier must be \"abort-and-drain\" or \"abort-and-overlap\".");
|
|
1129
|
+
}
|
|
1130
|
+
function validateDispatchTimingOptions(options) {
|
|
1131
|
+
validateNonNegativeFiniteNumber(options?.debounce, "debounce");
|
|
1132
|
+
validateNonNegativeFiniteNumber(options?.throttle, "throttle");
|
|
1133
|
+
validateRetryOptions(options);
|
|
1134
|
+
}
|
|
1135
|
+
function getAbortReason(signal) {
|
|
1136
|
+
return typeof signal?.reason === "string" ? signal.reason : "Action dispatch aborted by signal";
|
|
1137
|
+
}
|
|
1112
1138
|
/**
|
|
1113
1139
|
* Action Register for managing action handlers with priority-based execution
|
|
1114
1140
|
*
|
|
@@ -1437,6 +1463,7 @@ var ActionRegister = class {
|
|
|
1437
1463
|
* 🆕 Perform synchronous handler registration
|
|
1438
1464
|
*/
|
|
1439
1465
|
_performRegistrationSync(action, handler, config, handlerId, role = "legacy") {
|
|
1466
|
+
validateTimingConfig(config);
|
|
1440
1467
|
const registration = {
|
|
1441
1468
|
handler,
|
|
1442
1469
|
config: resolveHandlerConfig(config, handlerId),
|
|
@@ -1451,24 +1478,29 @@ var ActionRegister = class {
|
|
|
1451
1478
|
if (existingIndex !== -1) {
|
|
1452
1479
|
const existing = pipeline[existingIndex];
|
|
1453
1480
|
const existingUnregister = actionUnregisterFunctions.get(handlerId);
|
|
1454
|
-
if (existing
|
|
1481
|
+
if (!existing) throw new Error("Internal error: existing handler should be defined in duplicate handler block");
|
|
1482
|
+
if ((existing.role ?? "legacy") !== role) throw new Error(`Action handler role conflict for "${String(action)}" and id "${handlerId}": cannot replace ${existing.role ?? "legacy"} with ${role}.`);
|
|
1455
1483
|
if (registration.config.replaceExisting) {
|
|
1484
|
+
this.removeRegistration(action, existing, false);
|
|
1485
|
+
let currentPipeline = this.pipelines.get(action);
|
|
1486
|
+
if (!currentPipeline) {
|
|
1487
|
+
currentPipeline = [];
|
|
1488
|
+
this.pipelines.set(action, currentPipeline);
|
|
1489
|
+
}
|
|
1490
|
+
currentPipeline.push(registration);
|
|
1491
|
+
currentPipeline.sort((a, b) => b.config.priority - a.config.priority);
|
|
1492
|
+
this.lastRegisteredTimestamps.set(action, /* @__PURE__ */ new Date());
|
|
1493
|
+
const newUnregister = this.createUnregisterFunction(action, handlerId, registration);
|
|
1494
|
+
this.getUnregisterFunctions(action).set(handlerId, newUnregister);
|
|
1456
1495
|
if (existing?.config.cleanup && typeof existing.config.cleanup === "function") try {
|
|
1457
1496
|
existing.config.cleanup();
|
|
1458
1497
|
} catch (cleanupError) {
|
|
1459
1498
|
this.log(`Cleanup error for replaced handler: ${String(action)}`, cleanupError, "warn");
|
|
1460
1499
|
}
|
|
1461
|
-
if (existing) this.observerHandlers.delete(existing);
|
|
1462
|
-
if (existingUnregister) actionUnregisterFunctions.delete(handlerId);
|
|
1463
|
-
pipeline[existingIndex] = registration;
|
|
1464
|
-
pipeline.sort((a, b) => b.config.priority - a.config.priority);
|
|
1465
|
-
this.lastRegisteredTimestamps.set(action, /* @__PURE__ */ new Date());
|
|
1466
|
-
const newUnregister = this.createUnregisterFunction(action, handlerId, registration);
|
|
1467
|
-
actionUnregisterFunctions.set(handlerId, newUnregister);
|
|
1468
1500
|
this.log(`Handler replaced: ${String(action)}`, {
|
|
1469
1501
|
handlerId,
|
|
1470
1502
|
priority: config.priority,
|
|
1471
|
-
totalHandlers:
|
|
1503
|
+
totalHandlers: this.pipelines.get(action)?.length ?? 0,
|
|
1472
1504
|
hadExistingUnregister: Boolean(existingUnregister)
|
|
1473
1505
|
});
|
|
1474
1506
|
return newUnregister;
|
|
@@ -1500,12 +1532,21 @@ var ActionRegister = class {
|
|
|
1500
1532
|
dispatch(action, ...args) {
|
|
1501
1533
|
this.assertStringActionKey(action);
|
|
1502
1534
|
const [payload, options] = args;
|
|
1535
|
+
validateDispatchTimingOptions(options);
|
|
1503
1536
|
const trace = this.beginDispatchTrace(String(action), options);
|
|
1504
1537
|
if (this.lifecycleState !== "active") return this.withDispatchTrace(this.rejectedLifecyclePromise(), trace, () => "failed");
|
|
1505
1538
|
const timeoutScope = this.createTimeoutScope(action, options);
|
|
1506
1539
|
const dispatchHandlerPromises = /* @__PURE__ */ new Set();
|
|
1507
1540
|
const attemptState = { count: 0 };
|
|
1508
|
-
|
|
1541
|
+
let plan;
|
|
1542
|
+
try {
|
|
1543
|
+
plan = this.resolveDispatchPlan(action, options);
|
|
1544
|
+
} catch (error) {
|
|
1545
|
+
timeoutScope.cleanup();
|
|
1546
|
+
timeoutScope.cleanupSignals();
|
|
1547
|
+
trace.settle("failed");
|
|
1548
|
+
throw error;
|
|
1549
|
+
}
|
|
1509
1550
|
const hasTimingGuard = plan.debounceMs !== void 0 || plan.throttleMs !== void 0;
|
|
1510
1551
|
const notifiedObservers = /* @__PURE__ */ new Set();
|
|
1511
1552
|
const notifiedObserverOutcomes = /* @__PURE__ */ new Set();
|
|
@@ -1640,7 +1681,37 @@ var ActionRegister = class {
|
|
|
1640
1681
|
if (timeoutScope.options?.immediate || !this.dispatchQueue) return pipelineOperation();
|
|
1641
1682
|
const queued = this.dispatchQueue.enqueueWithHandle(pipelineOperation, timeoutScope.options?.queuePriority ?? 0);
|
|
1642
1683
|
timeoutScope.onTimeout((error) => queued.cancel(error));
|
|
1643
|
-
|
|
1684
|
+
const callerSignal = options?.signal;
|
|
1685
|
+
let removeCallerAbortListener;
|
|
1686
|
+
const cleanupCallerAbortListener = () => {
|
|
1687
|
+
removeCallerAbortListener?.();
|
|
1688
|
+
removeCallerAbortListener = void 0;
|
|
1689
|
+
};
|
|
1690
|
+
if (callerSignal) {
|
|
1691
|
+
const cancelQueued = () => {
|
|
1692
|
+
queued.cancel(callerSignal.reason);
|
|
1693
|
+
};
|
|
1694
|
+
callerSignal.addEventListener("abort", cancelQueued, { once: true });
|
|
1695
|
+
removeCallerAbortListener = () => callerSignal.removeEventListener("abort", cancelQueued);
|
|
1696
|
+
if (callerSignal.aborted) cancelQueued();
|
|
1697
|
+
}
|
|
1698
|
+
return queued.promise.then((value) => {
|
|
1699
|
+
cleanupCallerAbortListener();
|
|
1700
|
+
return value;
|
|
1701
|
+
}, (error) => {
|
|
1702
|
+
cleanupCallerAbortListener();
|
|
1703
|
+
throw error;
|
|
1704
|
+
}).catch(async (error) => {
|
|
1705
|
+
if (!(this.lifecycleState === "active" && callerSignal?.aborted === true && !(timeoutScope.options?.signal?.reason instanceof ActionTimeoutError))) throw error;
|
|
1706
|
+
await notifyObservers({
|
|
1707
|
+
action: String(action),
|
|
1708
|
+
payload,
|
|
1709
|
+
outcome: "cancelled",
|
|
1710
|
+
result: void 0,
|
|
1711
|
+
errors: [],
|
|
1712
|
+
signal: timeoutScope.options?.signal
|
|
1713
|
+
});
|
|
1714
|
+
});
|
|
1644
1715
|
};
|
|
1645
1716
|
let dispatchPromise;
|
|
1646
1717
|
let observedDispatchPromise;
|
|
@@ -1693,9 +1764,8 @@ var ActionRegister = class {
|
|
|
1693
1764
|
}
|
|
1694
1765
|
/** Execute a dispatch operation with an optional whole-action retry policy. */
|
|
1695
1766
|
async executeWithRetry(operation, options, attemptState, shouldRetryResult, canRetry = () => true, telemetry, beforeRetry) {
|
|
1696
|
-
const
|
|
1697
|
-
const
|
|
1698
|
-
const retryDelay = Math.max(0, options?.retryOnError?.delay ?? 0);
|
|
1767
|
+
const maxAttempts = options?.retryOnError?.maxAttempts ?? 1;
|
|
1768
|
+
const retryDelay = options?.retryOnError?.delay ?? 0;
|
|
1699
1769
|
while (attemptState.count < maxAttempts) {
|
|
1700
1770
|
attemptState.count += 1;
|
|
1701
1771
|
const attemptStartedAt = Date.now();
|
|
@@ -1947,7 +2017,7 @@ var ActionRegister = class {
|
|
|
1947
2017
|
errors: result.error.issues.map((issue) => issue.message)
|
|
1948
2018
|
};
|
|
1949
2019
|
}
|
|
1950
|
-
createAbortedExecutionResult(startTime, skippedRegistrations = [], validation) {
|
|
2020
|
+
createAbortedExecutionResult(startTime, skippedRegistrations = [], validation, abortReason = "Action dispatch aborted by signal") {
|
|
1951
2021
|
const endTime = Date.now();
|
|
1952
2022
|
const handlers = skippedRegistrations.map((registration) => ({
|
|
1953
2023
|
id: registration.id,
|
|
@@ -1961,7 +2031,7 @@ var ActionRegister = class {
|
|
|
1961
2031
|
return {
|
|
1962
2032
|
success: false,
|
|
1963
2033
|
aborted: true,
|
|
1964
|
-
abortReason
|
|
2034
|
+
abortReason,
|
|
1965
2035
|
terminated: false,
|
|
1966
2036
|
outcome: "cancelled",
|
|
1967
2037
|
validation,
|
|
@@ -2056,6 +2126,7 @@ var ActionRegister = class {
|
|
|
2056
2126
|
}
|
|
2057
2127
|
if (!shouldRun) continue;
|
|
2058
2128
|
const detachedOnce = registration.config.once && this.removeRegistration(action, registration, false);
|
|
2129
|
+
if (registration.config.once && !detachedOnce) continue;
|
|
2059
2130
|
const cleanupOnce = () => {
|
|
2060
2131
|
if (detachedOnce) this.runRegistrationCleanup(action, registration);
|
|
2061
2132
|
};
|
|
@@ -2273,6 +2344,7 @@ var ActionRegister = class {
|
|
|
2273
2344
|
dispatchWithResult(action, ...args) {
|
|
2274
2345
|
this.assertStringActionKey(action);
|
|
2275
2346
|
const [payload, options] = args;
|
|
2347
|
+
validateDispatchTimingOptions(options);
|
|
2276
2348
|
const trace = this.beginDispatchTrace(String(action), options);
|
|
2277
2349
|
if (this.lifecycleState !== "active") return this.withDispatchTrace(this.rejectedLifecyclePromise(), trace, () => "failed");
|
|
2278
2350
|
const timeoutScope = this.createTimeoutScope(action, options);
|
|
@@ -2288,7 +2360,15 @@ var ActionRegister = class {
|
|
|
2288
2360
|
retryDelayDuration: 0,
|
|
2289
2361
|
attempts: []
|
|
2290
2362
|
};
|
|
2291
|
-
|
|
2363
|
+
let plan;
|
|
2364
|
+
try {
|
|
2365
|
+
plan = this.resolveDispatchPlan(action, options);
|
|
2366
|
+
} catch (error) {
|
|
2367
|
+
timeoutScope.cleanup();
|
|
2368
|
+
timeoutScope.cleanupSignals();
|
|
2369
|
+
trace.settle("failed");
|
|
2370
|
+
throw error;
|
|
2371
|
+
}
|
|
2292
2372
|
const hasTimingGuard = plan.debounceMs !== void 0 || plan.throttleMs !== void 0;
|
|
2293
2373
|
const pipelineOperation = async () => {
|
|
2294
2374
|
pipelineStartedAt = Date.now();
|
|
@@ -2355,19 +2435,19 @@ var ActionRegister = class {
|
|
|
2355
2435
|
const operation = async () => {
|
|
2356
2436
|
if (timeoutScope.options?.signal?.aborted) {
|
|
2357
2437
|
admissionEndedAt = Date.now();
|
|
2358
|
-
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results]);
|
|
2438
|
+
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], void 0, getAbortReason(timeoutScope.options?.signal));
|
|
2359
2439
|
}
|
|
2360
2440
|
validation = this.validatePayload(action, payload);
|
|
2361
2441
|
if (timeoutScope.options?.signal?.aborted) {
|
|
2362
2442
|
admissionEndedAt = Date.now();
|
|
2363
|
-
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation);
|
|
2443
|
+
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation, getAbortReason(timeoutScope.options?.signal));
|
|
2364
2444
|
}
|
|
2365
2445
|
this.validateResultOptions(options?.result);
|
|
2366
2446
|
if (hasTimingGuard) {
|
|
2367
2447
|
const admission = await this.evaluateTimingGuards(String(action), plan, timeoutScope.options?.signal);
|
|
2368
2448
|
if (admission.aborted || timeoutScope.options?.signal?.aborted) {
|
|
2369
2449
|
admissionEndedAt = Date.now();
|
|
2370
|
-
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation);
|
|
2450
|
+
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation, getAbortReason(timeoutScope.options?.signal));
|
|
2371
2451
|
}
|
|
2372
2452
|
if (admission.reason) {
|
|
2373
2453
|
admissionEndedAt = Date.now();
|
|
@@ -2376,13 +2456,36 @@ var ActionRegister = class {
|
|
|
2376
2456
|
}
|
|
2377
2457
|
if (timeoutScope.options?.signal?.aborted) {
|
|
2378
2458
|
admissionEndedAt = Date.now();
|
|
2379
|
-
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation);
|
|
2459
|
+
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation, getAbortReason(timeoutScope.options?.signal));
|
|
2380
2460
|
}
|
|
2381
2461
|
admissionEndedAt = Date.now();
|
|
2382
2462
|
if (timeoutScope.options?.immediate || !this.dispatchQueue) return pipelineOperation();
|
|
2383
2463
|
const queued = this.dispatchQueue.enqueueWithHandle(pipelineOperation, timeoutScope.options?.queuePriority ?? 0);
|
|
2384
2464
|
timeoutScope.onTimeout((error) => queued.cancel(error));
|
|
2385
|
-
|
|
2465
|
+
const callerSignal = options?.signal;
|
|
2466
|
+
let removeCallerAbortListener;
|
|
2467
|
+
const cleanupCallerAbortListener = () => {
|
|
2468
|
+
removeCallerAbortListener?.();
|
|
2469
|
+
removeCallerAbortListener = void 0;
|
|
2470
|
+
};
|
|
2471
|
+
if (callerSignal) {
|
|
2472
|
+
const cancelQueued = () => {
|
|
2473
|
+
queued.cancel(callerSignal.reason);
|
|
2474
|
+
};
|
|
2475
|
+
callerSignal.addEventListener("abort", cancelQueued, { once: true });
|
|
2476
|
+
removeCallerAbortListener = () => callerSignal.removeEventListener("abort", cancelQueued);
|
|
2477
|
+
if (callerSignal.aborted) cancelQueued();
|
|
2478
|
+
}
|
|
2479
|
+
return queued.promise.then((value) => {
|
|
2480
|
+
cleanupCallerAbortListener();
|
|
2481
|
+
return value;
|
|
2482
|
+
}, (error) => {
|
|
2483
|
+
cleanupCallerAbortListener();
|
|
2484
|
+
throw error;
|
|
2485
|
+
}).catch((error) => {
|
|
2486
|
+
if (!(this.lifecycleState === "active" && callerSignal?.aborted === true && !(timeoutScope.options?.signal?.reason instanceof ActionTimeoutError))) throw error;
|
|
2487
|
+
return this.createAbortedExecutionResult(dispatchStartTime, [...plan.guards, ...plan.results], validation, getAbortReason(timeoutScope.options?.signal));
|
|
2488
|
+
});
|
|
2386
2489
|
};
|
|
2387
2490
|
const notifiedObservers = /* @__PURE__ */ new Set();
|
|
2388
2491
|
const notifiedObserverOutcomes = /* @__PURE__ */ new Set();
|
|
@@ -2489,7 +2592,7 @@ var ActionRegister = class {
|
|
|
2489
2592
|
if (options?.autoAbort?.onControllerCreated && autoAbortController) options.autoAbort.onControllerCreated(autoAbortController);
|
|
2490
2593
|
if (effectiveSignal?.aborted) {
|
|
2491
2594
|
cleanup();
|
|
2492
|
-
return this.createAbortedExecutionResult(_startTime, plan.results, validation);
|
|
2595
|
+
return this.createAbortedExecutionResult(_startTime, plan.results, validation, getAbortReason(effectiveSignal));
|
|
2493
2596
|
}
|
|
2494
2597
|
const pipeline = plan.pipelineSnapshot;
|
|
2495
2598
|
if (!pipeline || pipeline.length === 0) {
|
|
@@ -2877,6 +2980,8 @@ var ActionRegister = class {
|
|
|
2877
2980
|
this.pipelines.delete(action);
|
|
2878
2981
|
this.lastRegisteredTimestamps.delete(action);
|
|
2879
2982
|
this.actionGuard.clearGuards(String(action));
|
|
2983
|
+
this.actionDispatchers.delete(String(action));
|
|
2984
|
+
this.actionResultDispatchers.delete(String(action));
|
|
2880
2985
|
}
|
|
2881
2986
|
/**
|
|
2882
2987
|
* Remove all handlers for all actions
|
|
@@ -2895,6 +3000,8 @@ var ActionRegister = class {
|
|
|
2895
3000
|
this.unregisterFunctions.clear();
|
|
2896
3001
|
this.actionGuard.clearAll();
|
|
2897
3002
|
this.observerHandlers.clear();
|
|
3003
|
+
this.actionDispatchers.clear();
|
|
3004
|
+
this.actionResultDispatchers.clear();
|
|
2898
3005
|
}
|
|
2899
3006
|
/**
|
|
2900
3007
|
* Get the name of this action register
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as PublicActionMethods } from "./public-action-methods-C_ppItRr.cjs";
|
|
1
2
|
//#region src/types.d.ts
|
|
2
3
|
type ActionPayloadMap = object;
|
|
3
4
|
interface ActionSchemaLike {
|
|
@@ -514,5 +515,5 @@ export declare function executeSequential<T, R = void>(context: PipelineContext<
|
|
|
514
515
|
export declare function executeParallel<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number, state: PipelineControllerState<T, R>) => PipelineController<T, R>): Promise<void>;
|
|
515
516
|
export declare function executeRace<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number, state: PipelineControllerState<T, R>) => PipelineController<T, R>): Promise<void>;
|
|
516
517
|
//#endregion
|
|
517
|
-
export type { ActionDispatchTrace, ActionDispatchTraceListener, ActionDispatcher, ActionDispatcherWithResult, ActionEffectController, ActionEffectHandler, ActionGuardController, ActionGuardHandler, ActionHandler, ActionHandlerStats, ActionNames, ActionObserverEvent, ActionObserverHandler, ActionPayload, ActionPayloadMap, ActionRegisterConfig, ActionRegistryInfo, ActionResult, ActionResultController, ActionResultHandler, ActionResultMap, ActionSchemaLike, DispatchArgs, DispatchOptions, EffectConfig, ExecutionMode, ExecutionResult, GuardConfig, HandlerConfig, HandlerError, HandlerErrorPolicy, HandlerExecutionOutcome, HandlerExecutionStatus, HandlerRegistration, HandlerRole, HandlerScheduling, ObserverConfig, PipelineContext, PipelineController, ProxyActionKey, ReservedActionKey, ResolvedHandlerConfig, UnregisterFunction };
|
|
518
|
+
export type { ActionDispatchTrace, ActionDispatchTraceListener, ActionDispatcher, ActionDispatcherWithResult, ActionEffectController, ActionEffectHandler, ActionGuardController, ActionGuardHandler, ActionHandler, ActionHandlerStats, ActionNames, ActionObserverEvent, ActionObserverHandler, ActionPayload, ActionPayloadMap, ActionRegisterConfig, ActionRegistryInfo, ActionResult, ActionResultController, ActionResultHandler, ActionResultMap, ActionSchemaLike, DispatchArgs, DispatchOptions, EffectConfig, ExecutionMode, ExecutionResult, GuardConfig, HandlerConfig, HandlerError, HandlerErrorPolicy, HandlerExecutionOutcome, HandlerExecutionStatus, HandlerRegistration, HandlerRole, HandlerScheduling, ObserverConfig, PipelineContext, PipelineController, ProxyActionKey, PublicActionMethods, ReservedActionKey, ResolvedHandlerConfig, UnregisterFunction };
|
|
518
519
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/errors.ts","../src/execution-modes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/errors.ts","../src/execution-modes.ts"],"mappings":";;KAmBY;UASK;EACf,UAAU;IACJ;IAAe;;IAEf;IACA;MACE;MACA;QAAmB;;;;;KAsKjB,YAAY,UAAU,oBAAoB,cAAc;KAaxD,cAAc,UAAU,kBAAkB,gBAAgB,KAAK,EAAE;KASjE,gBAAgB,UAAU,oBAAoB,QACxD,OAAO,YAAY;KAIT,aACV,mBAAmB,kBACnB,UAAU,eACR,gBAAgB,aAAa,WAAW;UAgE3B,mBAAmB,aAAa;WAQtC,SAAS;EAGlB,MAAM;EAGN,cAAc,WAAW,SAAS,MAAM;EAGxC,cAAc;EA+Bd,eAAe;EAIf,OAAO,QAAQ,IAAI;EAGnB,UAAU,QAAQ;EAGlB,cAAc;EAGd,YAAY,SAAS,iBAAiB,KAAK,eAAe,MAAM;;UAIjD,uBAAuB;WAC7B,SAAS;EAClB,cAAc;;UAKC,sBAAsB,qBAAqB,uBAAuB;EACjF,MAAM;EACN,cAAc,WAAW,SAAS,MAAM;;UAKzB,uBAAuB,aAAa,kBAC3C,uBAAuB;EAC/B,MAAM;EACN,OAAO,QAAQ,IAAI;EACnB,UAAU,QAAQ;EAClB,uBAAuB;EACvB,YAAY,SAAS,0BAA0B,KAAK,eAAe,MAAM;;KAI/D;UAGK,oBAAoB,aAAa;WACvC;WACA,SAAS,SAAS;WAClB,SAAS,gBAAgB;WACzB,QAAQ,aAAa;WACrB,iBAAiB;WACjB,SAAS;;KAIR,sBAAsB,aAAa,aAC7C,OAAO,oBAAoB,GAAG,cACpB;UAGK,eAAe,qBAAq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,oBAAoB,GAAG,IACrC,eACA,OAAO,wBAAwB,GAAG,OAC/B,mBAAmB,GAAG,KAC1B;wBA4ImB,YAAY,GAAG,UACnC,SAAS,gBAAgB,GAAG,IAC5B,mBACE,cAAc,oBAAoB,GAAG,IACrC,eACA,OAAO,wBAAwB,GAAG,OAC/B,mBAAmB,GAAG,KAC1B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as PublicActionMethods } from "./public-action-methods-C_ppItRr.js";
|
|
1
2
|
//#region src/types.d.ts
|
|
2
3
|
type ActionPayloadMap = object;
|
|
3
4
|
interface ActionSchemaLike {
|
|
@@ -514,5 +515,5 @@ export declare function executeSequential<T, R = void>(context: PipelineContext<
|
|
|
514
515
|
export declare function executeParallel<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number, state: PipelineControllerState<T, R>) => PipelineController<T, R>): Promise<void>;
|
|
515
516
|
export declare function executeRace<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number, state: PipelineControllerState<T, R>) => PipelineController<T, R>): Promise<void>;
|
|
516
517
|
//#endregion
|
|
517
|
-
export type { ActionDispatchTrace, ActionDispatchTraceListener, ActionDispatcher, ActionDispatcherWithResult, ActionEffectController, ActionEffectHandler, ActionGuardController, ActionGuardHandler, ActionHandler, ActionHandlerStats, ActionNames, ActionObserverEvent, ActionObserverHandler, ActionPayload, ActionPayloadMap, ActionRegisterConfig, ActionRegistryInfo, ActionResult, ActionResultController, ActionResultHandler, ActionResultMap, ActionSchemaLike, DispatchArgs, DispatchOptions, EffectConfig, ExecutionMode, ExecutionResult, GuardConfig, HandlerConfig, HandlerError, HandlerErrorPolicy, HandlerExecutionOutcome, HandlerExecutionStatus, HandlerRegistration, HandlerRole, HandlerScheduling, ObserverConfig, PipelineContext, PipelineController, ProxyActionKey, ReservedActionKey, ResolvedHandlerConfig, UnregisterFunction };
|
|
518
|
+
export type { ActionDispatchTrace, ActionDispatchTraceListener, ActionDispatcher, ActionDispatcherWithResult, ActionEffectController, ActionEffectHandler, ActionGuardController, ActionGuardHandler, ActionHandler, ActionHandlerStats, ActionNames, ActionObserverEvent, ActionObserverHandler, ActionPayload, ActionPayloadMap, ActionRegisterConfig, ActionRegistryInfo, ActionResult, ActionResultController, ActionResultHandler, ActionResultMap, ActionSchemaLike, DispatchArgs, DispatchOptions, EffectConfig, ExecutionMode, ExecutionResult, GuardConfig, HandlerConfig, HandlerError, HandlerErrorPolicy, HandlerExecutionOutcome, HandlerExecutionStatus, HandlerRegistration, HandlerRole, HandlerScheduling, ObserverConfig, PipelineContext, PipelineController, ProxyActionKey, PublicActionMethods, ReservedActionKey, ResolvedHandlerConfig, UnregisterFunction };
|
|
518
519
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/errors.ts","../src/execution-modes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/errors.ts","../src/execution-modes.ts"],"mappings":";;KAmBY;UASK;EACf,UAAU;IACJ;IAAe;;IAEf;IACA;MACE;MACA;QAAmB;;;;;KAsKjB,YAAY,UAAU,oBAAoB,cAAc;KAaxD,cAAc,UAAU,kBAAkB,gBAAgB,KAAK,EAAE;KASjE,gBAAgB,UAAU,oBAAoB,QACxD,OAAO,YAAY;KAIT,aACV,mBAAmB,kBACnB,UAAU,eACR,gBAAgB,aAAa,WAAW;UAgE3B,mBAAmB,aAAa;WAQtC,SAAS;EAGlB,MAAM;EAGN,cAAc,WAAW,SAAS,MAAM;EAGxC,cAAc;EA+Bd,eAAe;EAIf,OAAO,QAAQ,IAAI;EAGnB,UAAU,QAAQ;EAGlB,cAAc;EAGd,YAAY,SAAS,iBAAi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