@almadar/runtime 4.6.0 → 4.8.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/{OrbitalServerRuntime-DS7Zs5x1.d.ts → OrbitalServerRuntime-B5lfym6T.d.ts} +8 -0
- package/dist/OrbitalServerRuntime.d.ts +1 -1
- package/dist/OrbitalServerRuntime.js +28 -1
- package/dist/OrbitalServerRuntime.js.map +1 -1
- package/dist/{chunk-32BOI7LH.js → chunk-K36736GF.js} +16 -4
- package/dist/chunk-K36736GF.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-32BOI7LH.js.map +0 -1
|
@@ -1034,6 +1034,14 @@ declare class OrbitalServerRuntime {
|
|
|
1034
1034
|
* Unregister all orbitals and clean up
|
|
1035
1035
|
*/
|
|
1036
1036
|
unregisterAll(): void;
|
|
1037
|
+
/**
|
|
1038
|
+
* Reset the mock persistence store to a clean-slate re-seed without
|
|
1039
|
+
* unregistering orbitals. Exposed for verifier tools that want to
|
|
1040
|
+
* start each test with deterministic seeded rows, not the residue of
|
|
1041
|
+
* the previous walk's persist-creates. No-op when the persistence
|
|
1042
|
+
* layer is not MockPersistenceAdapter.
|
|
1043
|
+
*/
|
|
1044
|
+
resetMockPersistence(): void;
|
|
1037
1045
|
/**
|
|
1038
1046
|
* Process an event for an orbital
|
|
1039
1047
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'express';
|
|
2
|
-
export { B as EffectResult, C as LoaderConfig, D as LocalPersistenceAdapter, O as OrbitalEventRequest, e as OrbitalEventResponse, F as OrbitalServerRuntime, f as OrbitalServerRuntimeConfig, P as PersistenceAdapter, R as RegisteredOrbital, k as RuntimeOrbital, l as RuntimeOrbitalSchema, m as RuntimeTrait, G as RuntimeTraitTick, H as createOrbitalServerRuntime } from './OrbitalServerRuntime-
|
|
2
|
+
export { B as EffectResult, C as LoaderConfig, D as LocalPersistenceAdapter, O as OrbitalEventRequest, e as OrbitalEventResponse, F as OrbitalServerRuntime, f as OrbitalServerRuntimeConfig, P as PersistenceAdapter, R as RegisteredOrbital, k as RuntimeOrbital, l as RuntimeOrbitalSchema, m as RuntimeTrait, G as RuntimeTraitTick, H as createOrbitalServerRuntime } from './OrbitalServerRuntime-B5lfym6T.js';
|
|
3
3
|
import './types-DwDhc9Jt.js';
|
|
4
4
|
import '@almadar/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventBus, createUnifiedLoader, preprocessSchema, StateMachineManager, createContextFromBindings, EffectExecutor } from './chunk-
|
|
1
|
+
import { EventBus, createUnifiedLoader, preprocessSchema, StateMachineManager, createContextFromBindings, EffectExecutor } from './chunk-K36736GF.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { Router } from 'express';
|
|
4
4
|
import * as fs from 'fs';
|
|
@@ -1315,11 +1315,38 @@ var OrbitalServerRuntime = class {
|
|
|
1315
1315
|
this.listenerCleanups = [];
|
|
1316
1316
|
this.orbitals.clear();
|
|
1317
1317
|
this.eventBus.clear();
|
|
1318
|
+
if (this.persistence instanceof MockPersistenceAdapter) {
|
|
1319
|
+
this.persistence.clearAll();
|
|
1320
|
+
}
|
|
1318
1321
|
if (this.osHandlers) {
|
|
1319
1322
|
this.osHandlers.cleanup();
|
|
1320
1323
|
this.osHandlers = null;
|
|
1321
1324
|
}
|
|
1322
1325
|
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Reset the mock persistence store to a clean-slate re-seed without
|
|
1328
|
+
* unregistering orbitals. Exposed for verifier tools that want to
|
|
1329
|
+
* start each test with deterministic seeded rows, not the residue of
|
|
1330
|
+
* the previous walk's persist-creates. No-op when the persistence
|
|
1331
|
+
* layer is not MockPersistenceAdapter.
|
|
1332
|
+
*/
|
|
1333
|
+
resetMockPersistence() {
|
|
1334
|
+
if (!(this.persistence instanceof MockPersistenceAdapter)) return;
|
|
1335
|
+
this.persistence.clearAll();
|
|
1336
|
+
for (const registered of this.orbitals.values()) {
|
|
1337
|
+
const entity = registered.entity;
|
|
1338
|
+
if (entity?.name && entity.fields) {
|
|
1339
|
+
const fields = entity.fields.map((f) => ({
|
|
1340
|
+
name: f.name,
|
|
1341
|
+
type: f.type,
|
|
1342
|
+
required: f.required,
|
|
1343
|
+
values: f.values,
|
|
1344
|
+
default: f.default
|
|
1345
|
+
}));
|
|
1346
|
+
this.persistence.registerEntity({ name: entity.name, fields });
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1323
1350
|
// ==========================================================================
|
|
1324
1351
|
// Event Processing
|
|
1325
1352
|
// ==========================================================================
|