@contember/schema-utils
Advanced tools
Comparing version 1.0.0-alpha.3 to 1.0.0-alpha.4
@@ -6,3 +6,5 @@ "use strict"; | ||
const roles = Object.entries(schema.acl.roles) | ||
.filter(([, value]) => value.stages === '*' || !!value.stages.find(pattern => !!new RegExp(pattern).exec(stageSlug))) | ||
.filter(([, value]) => !value.stages | ||
|| value.stages === '*' | ||
|| !!value.stages.find(pattern => !!new RegExp(pattern).exec(stageSlug))) | ||
.map(([name, definition], index, roles) => [ | ||
@@ -9,0 +11,0 @@ name, |
{ | ||
"name": "@contember/schema-utils", | ||
"version": "1.0.0-alpha.3", | ||
"version": "1.0.0-alpha.4", | ||
"license": "Apache-2.0", | ||
@@ -11,3 +11,3 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@contember/schema": "^1.0.0-alpha.3" | ||
"@contember/schema": "^1.0.0-alpha.4" | ||
}, | ||
@@ -14,0 +14,0 @@ "devDependencies": { |
@@ -6,3 +6,6 @@ import { Schema } from '@contember/schema' | ||
.filter( | ||
([, value]) => value.stages === '*' || !!value.stages.find(pattern => !!new RegExp(pattern).exec(stageSlug)), | ||
([, value]) => | ||
!value.stages | ||
|| value.stages === '*' | ||
|| !!value.stages.find(pattern => !!new RegExp(pattern).exec(stageSlug)), | ||
) | ||
@@ -9,0 +12,0 @@ .map(([name, definition], index, roles) => [ |
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
252771
3845