fix: repair Zod validator for disabling variable in object name

Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
This commit is contained in:
Sandor Karpf
2025-12-16 09:08:15 +01:00
parent e382000997
commit 7f014c4e38
4 changed files with 4 additions and 4 deletions
@@ -120,7 +120,7 @@ describe('EntityCardBlueprint', () => {
"not": {},
},
"propertyNames": {
"pattern": "(?!\\$)+",
"pattern": "^\\$",
},
"type": "object",
},
@@ -122,7 +122,7 @@ describe('EntityContentBlueprint', () => {
"not": {},
},
"propertyNames": {
"pattern": "(?!\\$)+",
"pattern": "^\\$",
},
"type": "object",
},
@@ -133,7 +133,7 @@ describe('EntityContextMenuItemBlueprint', () => {
"not": {},
},
"propertyNames": {
"pattern": "(?!\\$)+",
"pattern": "^\\$",
},
"type": "object",
},
@@ -36,7 +36,7 @@ export function createEntityPredicateSchema(z: typeof zImpl) {
const expressionSchema = z.lazy(() =>
z.union([
z.record(z.string().regex(/^(?!\$).*$/), valuePredicateSchema),
z.record(z.string().regex(/(?!\$)+/), z.never()),
z.record(z.string().regex(/^\$/), z.never()),
]),
) as ZodType<EntityPredicateExpression>;