@almadar/runtime 5.5.0 → 5.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createLogger, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, StateMachineManager, createContextFromBindings, validateEventPayload, formatPayloadValidationError, EffectExecutor } from './chunk-
|
|
2
|
-
export { InMemoryPersistence } from './chunk-
|
|
1
|
+
import { createLogger, EventBus, createUnifiedLoader, MockPersistenceAdapter, InMemoryPersistence, preprocessSchema, StateMachineManager, createContextFromBindings, validateEventPayload, formatPayloadValidationError, EffectExecutor } from './chunk-BRN3VJT5.js';
|
|
2
|
+
export { InMemoryPersistence } from './chunk-BRN3VJT5.js';
|
|
3
3
|
import './chunk-PZ5AY32C.js';
|
|
4
4
|
import { Router } from 'express';
|
|
5
5
|
import * as fs from 'fs';
|
|
@@ -1811,14 +1811,12 @@ var MockPersistenceAdapter = class {
|
|
|
1811
1811
|
* Generate a mock value for a field based on its schema.
|
|
1812
1812
|
*/
|
|
1813
1813
|
generateFieldValue(entityName, field, index) {
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
}
|
|
1814
|
+
const fieldTypeLc = field.type.toLowerCase();
|
|
1815
|
+
const isNumeric = fieldTypeLc === "number" || fieldTypeLc === "integer";
|
|
1816
|
+
if (isNumeric && field.default !== void 0) {
|
|
1818
1817
|
return field.default;
|
|
1819
1818
|
}
|
|
1820
|
-
|
|
1821
|
-
switch (fieldType) {
|
|
1819
|
+
switch (fieldTypeLc) {
|
|
1822
1820
|
case "string":
|
|
1823
1821
|
return this.generateStringValue(entityName, field, index);
|
|
1824
1822
|
case "number":
|
|
@@ -3415,5 +3413,5 @@ var InMemoryPersistence = class {
|
|
|
3415
3413
|
};
|
|
3416
3414
|
|
|
3417
3415
|
export { EffectExecutor, EventBus, HANDLER_MANIFEST, InMemoryPersistence, MockPersistenceAdapter, StateMachineManager, buildEmitsFromTraits, containsBindings, createContextFromBindings, createInitialTraitState, createLogger, createMockPersistence, createTestExecutor, createUnifiedLoader, extractBindings, findInitialState, findTransition, formatPayloadValidationError, getIsolatedCollectionName, getNamespacedEvent, interpolateProps, interpolateValue, isBrowser, isElectron, isNamespacedEvent, isNode, normalizeEventKey, parseNamespacedEvent, preprocessSchema, processEvent, validateEventPayload, validatePayloadShapes };
|
|
3418
|
-
//# sourceMappingURL=chunk-
|
|
3419
|
-
//# sourceMappingURL=chunk-
|
|
3416
|
+
//# sourceMappingURL=chunk-BRN3VJT5.js.map
|
|
3417
|
+
//# sourceMappingURL=chunk-BRN3VJT5.js.map
|