@almadar/runtime 6.2.2 → 6.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-
|
|
1
|
+
export { InMemoryPersistence, OrbitalServerRuntime, collectDeclaredConfigDefaults, createOrbitalServerRuntime } from './chunk-E2YFJ6YP.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
4
4
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
@@ -4689,6 +4689,23 @@ var OrbitalServerRuntime = class {
|
|
|
4689
4689
|
action,
|
|
4690
4690
|
params
|
|
4691
4691
|
);
|
|
4692
|
+
} else if (this.config.mode === "mock") {
|
|
4693
|
+
const mockId = `mock_${service}_${action}_${Math.random().toString(36).slice(2, 10)}`;
|
|
4694
|
+
const paramsEcho = {};
|
|
4695
|
+
if (params) {
|
|
4696
|
+
for (const [k, v] of Object.entries(params)) {
|
|
4697
|
+
if (v !== void 0 && (typeof v === "string" || typeof v === "number" || typeof v === "boolean" || v === null || v instanceof Date)) {
|
|
4698
|
+
paramsEcho[k] = v;
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
result = {
|
|
4703
|
+
id: mockId,
|
|
4704
|
+
clientSecret: `secret_${mockId}`,
|
|
4705
|
+
success: true,
|
|
4706
|
+
status: "succeeded",
|
|
4707
|
+
...paramsEcho
|
|
4708
|
+
};
|
|
4692
4709
|
} else {
|
|
4693
4710
|
console.warn(
|
|
4694
4711
|
`[OrbitalRuntime] call-service not configured: ${service}.${action}`
|
|
@@ -5373,5 +5390,5 @@ function buildMatcher(src, listenerOrbital) {
|
|
|
5373
5390
|
}
|
|
5374
5391
|
|
|
5375
5392
|
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, OrbitalServerRuntime, StateMachineManager, buildEmitsFromTraits, collectDeclaredConfigDefaults, containsBindings, createContextFromBindings, createInitialTraitState, createLogger, createMockPersistence, createOrbitalServerRuntime, createTestExecutor, createUnifiedLoader, extractBindings, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, normalizeEventKey, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes };
|
|
5376
|
-
//# sourceMappingURL=chunk-
|
|
5377
|
-
//# sourceMappingURL=chunk-
|
|
5393
|
+
//# sourceMappingURL=chunk-E2YFJ6YP.js.map
|
|
5394
|
+
//# sourceMappingURL=chunk-E2YFJ6YP.js.map
|