@almadar/core 4.4.0 → 4.4.2
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 +2 -2
- package/dist/builders.js +12 -0
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-BtbzIJyB.d.ts → compose-behaviors-Da0YDcli.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +1 -1
- package/dist/domain-language/index.js +12 -0
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/{schema-BoAH6cRd.d.ts → schema-B0Yin-RM.d.ts} +9 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3372,6 +3372,18 @@ var EntityFieldSchema = z.lazy(
|
|
|
3372
3372
|
}).refine(
|
|
3373
3373
|
(field) => field.type !== "relation" || field.relation !== void 0,
|
|
3374
3374
|
{ message: 'Relation config is required when type is "relation"', path: ["relation"] }
|
|
3375
|
+
).refine(
|
|
3376
|
+
// Enum fields must carry their allowed values. Without this refine,
|
|
3377
|
+
// the type was lying about what's valid — bare `type: 'enum'` without
|
|
3378
|
+
// `values` passed zod but failed `orb validate` downstream with
|
|
3379
|
+
// ORB_E_EMPTY_ENUM_VALUES, stalling the agent pipeline for 20 minutes.
|
|
3380
|
+
// `enum` is the legacy field-name alias; accept either.
|
|
3381
|
+
(field) => {
|
|
3382
|
+
if (field.type !== "enum") return true;
|
|
3383
|
+
const vals = field.values ?? field.enum;
|
|
3384
|
+
return Array.isArray(vals) && vals.length > 0;
|
|
3385
|
+
},
|
|
3386
|
+
{ message: "Enum field requires a non-empty `values` array", path: ["values"] }
|
|
3375
3387
|
)
|
|
3376
3388
|
);
|
|
3377
3389
|
var ENTITY_ROLES = [
|