@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.
@@ -1,7 +1,7 @@
1
- import { O as OrbitalSchema } from '../schema-Dj4GC3Vo.js';
2
- export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-DU_mdtr5.js';
3
- import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-a1W_hXyG.js';
4
- import '../trait-DgZ5Exel.js';
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
 
@@ -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":