@almadar/core 10.78.0 → 10.79.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/builders.d.ts +8 -3
- package/dist/builders.js +16 -2
- package/dist/builders.js.map +1 -1
- package/dist/{effect-CW3s399G.d.ts → effect-Mx_niZdY.d.ts} +1 -1
- package/dist/{entityAccess-B-CK9j-I.d.ts → entityAccess-C3_cjLNi.d.ts} +1 -1
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory/index.js +211 -76
- package/dist/factory/index.js.map +1 -1
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +16 -2
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/{index-C5Firrg9.d.ts → index-B1N3gjT0.d.ts} +4 -4
- package/dist/index.d.ts +10 -10
- package/dist/index.js +243 -85
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +4 -4
- package/dist/mock/index.js +13 -0
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +440 -143
- package/dist/patterns/index.js +219 -80
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +212 -77
- package/dist/patterns/registry.json +212 -77
- package/dist/{schema-BG7mDO7m.d.ts → schema-CkTuSx6F.d.ts} +265 -2
- package/dist/{trait-jWk0BInU.d.ts → trait-B1fI0lTU.d.ts} +90 -2
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +15 -2
- package/dist/types/index.js.map +1 -1
- package/dist/{types-DwAE_Qu-.d.ts → types-B53Myv7U.d.ts} +2 -2
- package/package.json +1 -1
package/dist/mock/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as OrbitalSchema } from '../schema-
|
|
2
|
-
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessPoliciesByStoreKey, b as entityAccessTable } from '../entityAccess-
|
|
3
|
-
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-
|
|
4
|
-
import '../trait-
|
|
1
|
+
import { O as OrbitalSchema } from '../schema-CkTuSx6F.js';
|
|
2
|
+
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessPoliciesByStoreKey, b as entityAccessTable } from '../entityAccess-C3_cjLNi.js';
|
|
3
|
+
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-Mx_niZdY.js';
|
|
4
|
+
import '../trait-B1fI0lTU.js';
|
|
5
5
|
import '../expression-Fk8bQWef.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/mock/index.js
CHANGED
|
@@ -758,6 +758,7 @@ function indexUuid(index) {
|
|
|
758
758
|
return `00000000-0000-4000-8000-${index.toString(16).padStart(12, "0").slice(-12)}`;
|
|
759
759
|
}
|
|
760
760
|
function declaredValues(field) {
|
|
761
|
+
if (field.type === "union") return void 0;
|
|
761
762
|
const values = "values" in field ? field.values : void 0;
|
|
762
763
|
return values && values.length > 0 ? values : void 0;
|
|
763
764
|
}
|
|
@@ -821,6 +822,16 @@ function sampleObject(field, ctx) {
|
|
|
821
822
|
}
|
|
822
823
|
return out;
|
|
823
824
|
}
|
|
825
|
+
function sampleUnion(field, ctx) {
|
|
826
|
+
const depth = ctx.depth ?? 0;
|
|
827
|
+
if (!field.properties || field.values.length === 0 || depth >= MAX_NESTED_DEPTH) {
|
|
828
|
+
return void 0;
|
|
829
|
+
}
|
|
830
|
+
const firstVariant = field.properties[field.values[0]];
|
|
831
|
+
if (!firstVariant) return void 0;
|
|
832
|
+
const child = { ...firstVariant, name: field.name };
|
|
833
|
+
return sampleFieldValue(child, { ...ctx, depth: depth + 1 });
|
|
834
|
+
}
|
|
824
835
|
function sampleFieldValue(field, ctx) {
|
|
825
836
|
const honoredDefault = field.default !== void 0 && isFieldValue(field.default) ? field.default : void 0;
|
|
826
837
|
if (field.intrinsic === true) return honoredDefault;
|
|
@@ -892,6 +903,8 @@ function sampleFieldValue(field, ctx) {
|
|
|
892
903
|
return sampleArray(field, ctx);
|
|
893
904
|
case "object":
|
|
894
905
|
return sampleObject(field, ctx);
|
|
906
|
+
case "union":
|
|
907
|
+
return sampleUnion(field, ctx);
|
|
895
908
|
case "trait":
|
|
896
909
|
case "slot":
|
|
897
910
|
case "pattern":
|