dsh-perm-gate 4.2.0-beta.6 → 4.2.0-beta.8

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/lib/rule.js CHANGED
@@ -71,7 +71,8 @@ export function parsePermissionsObject(raw) {
71
71
  if (!isRecord(raw))
72
72
  throw new RuleError('permissions document must be a mapping');
73
73
  const root = isRecord(raw.permissions) ? raw.permissions : raw;
74
- const unknown = Object.keys(root).filter((k) => !VALID_ACTIONS.includes(k) && k !== 'defaultAction');
74
+ // `initialized` is the activation-time seed marker (RulesSchema), not a rule.
75
+ const unknown = Object.keys(root).filter((k) => !VALID_ACTIONS.includes(k) && k !== 'defaultAction' && k !== 'initialized');
75
76
  if (unknown.length > 0) {
76
77
  throw new RuleError(`unknown permissions field${unknown.length > 1 ? 's' : ''} ${unknown.map((k) => JSON.stringify(k)).join(', ')}`);
77
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-perm-gate",
3
- "version": "4.2.0-beta.6",
3
+ "version": "4.2.0-beta.8",
4
4
  "publishConfig": {
5
5
  "tag": "dsh-0.1.7"
6
6
  },