@tachybase/acl 1.6.13-alpha.4 → 1.6.13-alpha.5

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.
Files changed (2) hide show
  1. package/lib/acl.js +3 -2
  2. package/package.json +4 -4
package/lib/acl.js CHANGED
@@ -96,7 +96,7 @@ const _ACL = class _ACL extends import_node_events.default {
96
96
  this.addCoreMiddleware();
97
97
  }
98
98
  setStrategyResources(resources) {
99
- this.strategyResources = new Set(resources);
99
+ this.strategyResources = resources === null ? null : new Set(resources);
100
100
  }
101
101
  getStrategyResources() {
102
102
  return this.strategyResources ? [...this.strategyResources] : null;
@@ -108,7 +108,8 @@ const _ACL = class _ACL extends import_node_events.default {
108
108
  this.strategyResources.add(resource);
109
109
  }
110
110
  removeStrategyResource(resource) {
111
- this.strategyResources.delete(resource);
111
+ var _a;
112
+ (_a = this.strategyResources) == null ? void 0 : _a.delete(resource);
112
113
  }
113
114
  define(options) {
114
115
  const roleName = options.role;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/acl",
3
- "version": "1.6.13-alpha.4",
3
+ "version": "1.6.13-alpha.5",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/tegojs/tego#readme",
6
6
  "bugs": {
@@ -18,9 +18,9 @@
18
18
  "koa-compose": "^4.1.0",
19
19
  "lodash": "4.17.21",
20
20
  "minimatch": "^5.1.6",
21
- "@tachybase/actions": "1.6.13-alpha.4",
22
- "@tachybase/utils": "1.6.13-alpha.4",
23
- "@tachybase/resourcer": "1.6.13-alpha.4"
21
+ "@tachybase/actions": "1.6.13-alpha.5",
22
+ "@tachybase/utils": "1.6.13-alpha.5",
23
+ "@tachybase/resourcer": "1.6.13-alpha.5"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/lodash": "4.17.20",