@contember/schema-utils
Advanced tools
Comparing version 1.1.0-alpha.7 to 1.1.0-alpha.8
@@ -7,3 +7,5 @@ import { Acl } from '@contember/schema'; | ||
}; | ||
} & { | ||
readonly customPrimary?: boolean | undefined; | ||
}>; | ||
//# sourceMappingURL=acl.d.ts.map |
@@ -78,3 +78,3 @@ "use strict"; | ||
const baseRolePermissionsCheck = true; | ||
exports.aclSchema = Typesafe.object({ | ||
exports.aclSchema = Typesafe.intersection(Typesafe.object({ | ||
roles: Typesafe.record(Typesafe.string, (v, p) => { | ||
@@ -87,4 +87,6 @@ const main = baseRolePermissionsSchema(v, p); | ||
}), | ||
}); | ||
}), Typesafe.partial({ | ||
customPrimary: Typesafe.boolean, | ||
})); | ||
const aclSchemaCheck = true; | ||
//# sourceMappingURL=acl.js.map |
{ | ||
"name": "@contember/schema-utils", | ||
"version": "1.1.0-alpha.7", | ||
"version": "1.1.0-alpha.8", | ||
"license": "Apache-2.0", | ||
@@ -11,4 +11,4 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@contember/schema": "^1.1.0-alpha.7", | ||
"@contember/typesafe": "^1.1.0-alpha.7" | ||
"@contember/schema": "^1.1.0-alpha.8", | ||
"@contember/typesafe": "^1.1.0-alpha.8" | ||
}, | ||
@@ -15,0 +15,0 @@ "devDependencies": { |
@@ -88,14 +88,19 @@ import { Acl, Model } from '@contember/schema' | ||
export const aclSchema = Typesafe.object({ | ||
roles: Typesafe.record( | ||
Typesafe.string, | ||
(v, p): Acl.RolePermissions => { | ||
const main: Acl.BaseRolePermissions = baseRolePermissionsSchema(v, p) | ||
return { | ||
...(v as any), | ||
...main, | ||
} | ||
}, | ||
), | ||
}) | ||
export const aclSchema = Typesafe.intersection( | ||
Typesafe.object({ | ||
roles: Typesafe.record( | ||
Typesafe.string, | ||
(v, p): Acl.RolePermissions => { | ||
const main: Acl.BaseRolePermissions = baseRolePermissionsSchema(v, p) | ||
return { | ||
...(v as any), | ||
...main, | ||
} | ||
}, | ||
), | ||
}), | ||
Typesafe.partial({ | ||
customPrimary: Typesafe.boolean, | ||
}), | ||
) | ||
const aclSchemaCheck: Typesafe.Equals<Acl.Schema, ReturnType<typeof aclSchema>> = true |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
234603
3470