ark-runtime-kernel 1.5.0 → 1.6.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/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.cjs +6 -4
- package/dist/nestjs/index.cjs.map +1 -1
- package/dist/nestjs/index.d.cts +1 -1
- package/dist/nestjs/index.d.ts +1 -1
- package/dist/nestjs/index.js +6 -4
- package/dist/nestjs/index.js.map +1 -1
- package/dist/{types-7K_KQCgS.d.cts → types-Dr307WEm.d.cts} +11 -0
- package/dist/{types-7K_KQCgS.d.ts → types-Dr307WEm.d.ts} +11 -0
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// src/version.ts
|
|
4
|
-
var version = "1.
|
|
4
|
+
var version = "1.6.0";
|
|
5
5
|
|
|
6
6
|
// src/kernel/intent/IntentRegistry.ts
|
|
7
7
|
var IntentRegistry = class {
|
|
@@ -1723,7 +1723,7 @@ function createArchitectureProfile(options) {
|
|
|
1723
1723
|
layers,
|
|
1724
1724
|
rules,
|
|
1725
1725
|
resolveLayer(name) {
|
|
1726
|
-
return sortedLayers.find(
|
|
1726
|
+
return layers.find((layer) => layer.match?.(name))?.name ?? sortedLayers.find(
|
|
1727
1727
|
(layer) => layer.prefixes.some((prefix) => name.startsWith(prefix))
|
|
1728
1728
|
)?.name;
|
|
1729
1729
|
}
|
|
@@ -2772,6 +2772,7 @@ function createSaga(def, bus, options = {}) {
|
|
|
2772
2772
|
}
|
|
2773
2773
|
|
|
2774
2774
|
// src/kernel/runtime/createArkKernel.ts
|
|
2775
|
+
var DEFAULT_MAX_HISTORY_SIZE = 1e3;
|
|
2775
2776
|
var kernelSequence = 0;
|
|
2776
2777
|
function nextKernelInstanceId() {
|
|
2777
2778
|
kernelSequence += 1;
|
|
@@ -2781,10 +2782,11 @@ function createArkKernel(options = {}) {
|
|
|
2781
2782
|
const strict = options.strict ?? true;
|
|
2782
2783
|
const instanceId = options.instanceId ?? nextKernelInstanceId();
|
|
2783
2784
|
const profile = options.profile ?? elevenLayerProfile;
|
|
2785
|
+
const maxHistorySize = options.maxHistorySize ?? DEFAULT_MAX_HISTORY_SIZE;
|
|
2784
2786
|
const registry = createIntentRegistry();
|
|
2785
2787
|
const graph = createDependencyGraph();
|
|
2786
2788
|
const metadata = options.metadata ?? createMetadataRegistry();
|
|
2787
|
-
const auditTrail = options.auditTrail ?? createAuditTrail({ maxRecords:
|
|
2789
|
+
const auditTrail = options.auditTrail ?? createAuditTrail({ maxRecords: maxHistorySize });
|
|
2788
2790
|
const eventContracts = options.eventContracts ?? createEventContractRegistry();
|
|
2789
2791
|
const outbox = options.outbox ?? new InMemoryOutboxStore();
|
|
2790
2792
|
const projections = options.projections ?? createProjectionRegistry({ auditTrail });
|
|
@@ -2809,7 +2811,7 @@ function createArkKernel(options = {}) {
|
|
|
2809
2811
|
enforceObservedLayerFlow: options.enforceObservedLayerFlow ?? (strict ? "hard" : "off"),
|
|
2810
2812
|
outbox,
|
|
2811
2813
|
instanceId,
|
|
2812
|
-
maxHistorySize
|
|
2814
|
+
maxHistorySize,
|
|
2813
2815
|
onPublish: options.autoApplyProjections === false ? void 0 : async (event) => {
|
|
2814
2816
|
await projections.apply(event);
|
|
2815
2817
|
}
|
|
@@ -2871,6 +2873,7 @@ function createLenientArkKernel(options = {}) {
|
|
|
2871
2873
|
});
|
|
2872
2874
|
}
|
|
2873
2875
|
|
|
2876
|
+
exports.DEFAULT_MAX_HISTORY_SIZE = DEFAULT_MAX_HISTORY_SIZE;
|
|
2874
2877
|
exports.EventContractRegistryImpl = EventContractRegistryImpl;
|
|
2875
2878
|
exports.EventContractViolationError = EventContractViolationError;
|
|
2876
2879
|
exports.InMemoryAuditStore = InMemoryAuditStore;
|