@almadar/core 10.61.0 → 10.63.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 +3 -3
- package/dist/builders.js +10 -0
- package/dist/builders.js.map +1 -1
- package/dist/{effect-a1W_hXyG.d.ts → effect-CgDrWfKW.d.ts} +60 -8
- package/dist/{entityAccess-DU_mdtr5.d.ts → entityAccess-Dr7XPoi_.d.ts} +1 -1
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +10 -0
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/{index-C-qK6t2U.d.ts → index-D2rQS1PS.d.ts} +4 -4
- package/dist/index.d.ts +11 -11
- package/dist/index.js +855 -15
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +4 -4
- package/dist/mock/index.js +30 -0
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +11 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +1788 -15
- package/dist/patterns/index.js +835 -13
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +817 -10
- package/dist/patterns/registry.json +817 -10
- package/dist/{schema-Dj4GC3Vo.d.ts → schema-KdqDOMXm.d.ts} +2 -2
- package/dist/{trait-DgZ5Exel.d.ts → trait-CesmHKZ2.d.ts} +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +16 -1
- package/dist/types/index.js.map +1 -1
- package/dist/{types-CGjZ7Odu.d.ts → types-mYXAkmBy.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 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-KdqDOMXm.js';
|
|
2
|
+
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-Dr7XPoi_.js';
|
|
3
|
+
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-CgDrWfKW.js';
|
|
4
|
+
import '../trait-CesmHKZ2.js';
|
|
5
5
|
import '../expression-Fk8bQWef.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/mock/index.js
CHANGED
|
@@ -351,6 +351,8 @@ var FIELD_TYPES = [
|
|
|
351
351
|
"phone",
|
|
352
352
|
"uuid",
|
|
353
353
|
"image",
|
|
354
|
+
"money",
|
|
355
|
+
"file",
|
|
354
356
|
"array",
|
|
355
357
|
"object",
|
|
356
358
|
"enum",
|
|
@@ -388,6 +390,12 @@ var RelationConfigSchema = z.object({
|
|
|
388
390
|
};
|
|
389
391
|
return normalized;
|
|
390
392
|
});
|
|
393
|
+
z.object({
|
|
394
|
+
name: z.string(),
|
|
395
|
+
url: z.string(),
|
|
396
|
+
mimeType: z.string(),
|
|
397
|
+
sizeBytes: z.number()
|
|
398
|
+
});
|
|
391
399
|
var FIELD_TYPE_ALIASES = {
|
|
392
400
|
text: "string",
|
|
393
401
|
int: "number",
|
|
@@ -445,6 +453,8 @@ var EntityFieldSchema = z.lazy(() => {
|
|
|
445
453
|
scalarVariant("slot"),
|
|
446
454
|
scalarVariant("pattern"),
|
|
447
455
|
scalarVariant("node"),
|
|
456
|
+
scalarVariant("money"),
|
|
457
|
+
scalarVariant("file"),
|
|
448
458
|
// Enum variant — REQUIRES non-empty values.
|
|
449
459
|
z.object({
|
|
450
460
|
...baseFieldShape,
|
|
@@ -799,6 +809,26 @@ function sampleFieldValue(field, ctx) {
|
|
|
799
809
|
const stepped = (field.min ?? 0) + ctx.index * 10;
|
|
800
810
|
return field.max !== void 0 && stepped > field.max ? field.max : stepped;
|
|
801
811
|
}
|
|
812
|
+
// Money is numeric at rest — same sampling as `number` (index strategy
|
|
813
|
+
// mirrors the Rust seeder for the shared parity fixture).
|
|
814
|
+
case "money": {
|
|
815
|
+
if (ctx.strategy === "seeded") {
|
|
816
|
+
return randomInt({ min: field.min ?? 0, max: field.max ?? 100 });
|
|
817
|
+
}
|
|
818
|
+
const steppedMoney = (field.min ?? 0) + ctx.index * 10;
|
|
819
|
+
return field.max !== void 0 && steppedMoney > field.max ? field.max : steppedMoney;
|
|
820
|
+
}
|
|
821
|
+
// File seeds the canonical struct value (satisfies isFileValue) —
|
|
822
|
+
// mirrors the Rust seeder's FieldType::File arm byte-for-byte.
|
|
823
|
+
case "file": {
|
|
824
|
+
const base = slug(field.name ?? "file");
|
|
825
|
+
return {
|
|
826
|
+
name: `${base}-${ctx.index}.pdf`,
|
|
827
|
+
url: `https://example.com/files/${base}/${ctx.index}.pdf`,
|
|
828
|
+
mimeType: "application/pdf",
|
|
829
|
+
sizeBytes: ctx.index * 1024
|
|
830
|
+
};
|
|
831
|
+
}
|
|
802
832
|
case "boolean":
|
|
803
833
|
return ctx.strategy === "seeded" ? randomBoolean() : ctx.index % 2 === 0;
|
|
804
834
|
case "date":
|