@almadar/runtime 5.8.3 → 5.8.4
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-C4YIYOJI.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
4
4
|
//# sourceMappingURL=OrbitalServerRuntime.js.map
|
|
@@ -1818,6 +1818,16 @@ var MockPersistenceAdapter = class {
|
|
|
1818
1818
|
*/
|
|
1819
1819
|
generateFieldValue(entityName, field, index) {
|
|
1820
1820
|
const fieldTypeLc = field.type.toLowerCase();
|
|
1821
|
+
mockLog.debug("field:generate", {
|
|
1822
|
+
entityName,
|
|
1823
|
+
fieldName: field.name,
|
|
1824
|
+
fieldType: fieldTypeLc,
|
|
1825
|
+
hasValues: !!field.values?.length,
|
|
1826
|
+
valuesCount: field.values?.length ?? 0,
|
|
1827
|
+
values: field.values?.length ? field.values.join(",") : null,
|
|
1828
|
+
format: field.format ?? null,
|
|
1829
|
+
hasDefault: field.default !== void 0
|
|
1830
|
+
});
|
|
1821
1831
|
const isNumeric = fieldTypeLc === "number" || fieldTypeLc === "integer";
|
|
1822
1832
|
if (isNumeric && field.default !== void 0) {
|
|
1823
1833
|
return field.default;
|
|
@@ -1856,7 +1866,7 @@ var MockPersistenceAdapter = class {
|
|
|
1856
1866
|
* — the schema is the source of truth. If a caller needs a real email, they
|
|
1857
1867
|
* declare `format: "email"`; if they need an enum, they declare `values: [...]`.
|
|
1858
1868
|
*/
|
|
1859
|
-
generateStringValue(
|
|
1869
|
+
generateStringValue(entityName, field, _index) {
|
|
1860
1870
|
if (field.values && field.values.length > 0) {
|
|
1861
1871
|
return faker.helpers.arrayElement(field.values);
|
|
1862
1872
|
}
|
|
@@ -1873,8 +1883,17 @@ var MockPersistenceAdapter = class {
|
|
|
1873
1883
|
return faker.date.recent().toISOString().split("T")[0];
|
|
1874
1884
|
case "datetime":
|
|
1875
1885
|
return faker.date.recent().toISOString();
|
|
1876
|
-
default:
|
|
1877
|
-
|
|
1886
|
+
default: {
|
|
1887
|
+
const value = faker.lorem.words(2);
|
|
1888
|
+
mockLog.warn("field:fallback-lorem", {
|
|
1889
|
+
entityName,
|
|
1890
|
+
fieldName: field.name,
|
|
1891
|
+
hasValues: false,
|
|
1892
|
+
format: field.format ?? null,
|
|
1893
|
+
generated: value
|
|
1894
|
+
});
|
|
1895
|
+
return value;
|
|
1896
|
+
}
|
|
1878
1897
|
}
|
|
1879
1898
|
}
|
|
1880
1899
|
/**
|
|
@@ -5252,5 +5271,5 @@ function buildMatcher(src, listenerOrbital) {
|
|
|
5252
5271
|
}
|
|
5253
5272
|
|
|
5254
5273
|
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 };
|
|
5255
|
-
//# sourceMappingURL=chunk-
|
|
5256
|
-
//# sourceMappingURL=chunk-
|
|
5274
|
+
//# sourceMappingURL=chunk-C4YIYOJI.js.map
|
|
5275
|
+
//# sourceMappingURL=chunk-C4YIYOJI.js.map
|