fix: repair Zod validator for disabling variable in object name
Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
This commit is contained in:
@@ -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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user