@almadar/runtime 6.64.0 → 6.65.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createTickScheduler, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, normalizeCallSiteConfigToValues, StateMachineManager, parseDurationString, validateEventPayload, formatPayloadValidationError, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, EffectExecutor } from './chunk-
|
|
2
|
-
export { InMemoryPersistence, collectDeclaredConfigDefaults } from './chunk-
|
|
1
|
+
import { createTickScheduler, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, normalizeCallSiteConfigToValues, StateMachineManager, parseDurationString, validateEventPayload, formatPayloadValidationError, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, EffectExecutor } from './chunk-LMYD5UB3.js';
|
|
2
|
+
export { InMemoryPersistence, collectDeclaredConfigDefaults } from './chunk-LMYD5UB3.js';
|
|
3
3
|
import { isValidCronExpression } from './chunk-OU3ITB5S.js';
|
|
4
4
|
import { createContextFromBindings, checkMutationAccess, resolveCallSitePayloadCaptures, applyRowAccess, accessDeniedMessage } from './chunk-ZJ62H3ES.js';
|
|
5
5
|
import './chunk-T4VDAB4C.js';
|
|
@@ -1351,14 +1351,21 @@ var EffectExecutor = class _EffectExecutor {
|
|
|
1351
1351
|
try {
|
|
1352
1352
|
if (action === "batch") {
|
|
1353
1353
|
const operations = args[1];
|
|
1354
|
-
await this.handlers.persist("batch", "", {
|
|
1354
|
+
const batchSummary = await this.handlers.persist("batch", "", {
|
|
1355
|
+
operations
|
|
1356
|
+
});
|
|
1355
1357
|
persistLog.debug("persist:success", {
|
|
1356
1358
|
action,
|
|
1357
1359
|
entityType: "batch",
|
|
1358
1360
|
opCount: operations.length,
|
|
1359
1361
|
willEmit: emitCfg?.success
|
|
1360
1362
|
});
|
|
1361
|
-
this.emitSuccess(
|
|
1363
|
+
this.emitSuccess(
|
|
1364
|
+
emitCfg,
|
|
1365
|
+
"success",
|
|
1366
|
+
batchSummary ?? { totalCount: operations.length },
|
|
1367
|
+
true
|
|
1368
|
+
);
|
|
1362
1369
|
persistLog.debug("persist:emit-fired", { action, eventName: emitCfg?.success });
|
|
1363
1370
|
} else {
|
|
1364
1371
|
const entityType = args[1];
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EffectExecutor } from './chunk-
|
|
2
|
-
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, StateMachineManager, TickScheduler, buildEmitsFromTraits, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, createInitialTraitState, createMockPersistence, createTestExecutor, createTickScheduler, createUnifiedLoader, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, isBrowser, isElectron, isNamespacedEvent, isNode, isValidDurationString, normalizeCallSiteConfigToValues, normalizeEventKey, parseDurationString, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes } from './chunk-
|
|
1
|
+
import { EffectExecutor } from './chunk-LMYD5UB3.js';
|
|
2
|
+
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, StateMachineManager, TickScheduler, buildEmitsFromTraits, collectDeclaredConfigDefaults, collectDeclaredEntityDefaults, createInitialTraitState, createMockPersistence, createTestExecutor, createTickScheduler, createUnifiedLoader, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, isBrowser, isElectron, isNamespacedEvent, isNode, isValidDurationString, normalizeCallSiteConfigToValues, normalizeEventKey, parseDurationString, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes } from './chunk-LMYD5UB3.js';
|
|
3
3
|
export { cronMatches, cronMinuteKey, isValidCronExpression, parseCron, parseCronField } from './chunk-OU3ITB5S.js';
|
|
4
4
|
import { createContextFromBindings, applyRowAccess, checkMutationAccess, accessDeniedMessage } from './chunk-ZJ62H3ES.js';
|
|
5
5
|
export { CALLSITE_PAYLOAD_PREFIX, applyRowAccess, checkMutationAccess, containsBindings, createContextFromBindings, createMinimalContext, deferEntityBindings, extractBindings, interpolateProps, interpolateValue, resolveCallSitePayloadCaptures } from './chunk-ZJ62H3ES.js';
|
|
@@ -340,18 +340,19 @@ function createServerEffectHandlers(opts) {
|
|
|
340
340
|
}
|
|
341
341
|
if (batchFailed) break;
|
|
342
342
|
}
|
|
343
|
+
const batchSummary = {
|
|
344
|
+
operations: batchResults,
|
|
345
|
+
completedCount: completed.length,
|
|
346
|
+
totalCount: operations.length
|
|
347
|
+
};
|
|
343
348
|
record({
|
|
344
349
|
effect: "persist",
|
|
345
350
|
action: "batch",
|
|
346
|
-
data:
|
|
347
|
-
operations: batchResults,
|
|
348
|
-
completedCount: completed.length,
|
|
349
|
-
totalCount: operations.length
|
|
350
|
-
},
|
|
351
|
+
data: batchSummary,
|
|
351
352
|
success: !batchFailed,
|
|
352
353
|
...batchFailed ? { error: batchError } : {}
|
|
353
354
|
});
|
|
354
|
-
return;
|
|
355
|
+
return batchSummary;
|
|
355
356
|
}
|
|
356
357
|
const type = targetEntityType || entityType;
|
|
357
358
|
let resultData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/runtime",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.65.0",
|
|
4
4
|
"description": "Interpreted runtime for Almadar orbital applications (OrbitalServerRuntime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@almadar/evaluator": "^2.42.0",
|
|
62
62
|
"@almadar/logger": "^1.11.0",
|
|
63
63
|
"@almadar/server": "^2.38.0",
|
|
64
|
-
"@almadar/std": "^16.
|
|
64
|
+
"@almadar/std": "^16.195.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"express": "^5.0.0"
|