@nocobase/acl 0.7.1-alpha.6 → 0.7.2-alpha.2

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 +11 -3
  2. package/package.json +3 -3
package/lib/acl.js CHANGED
@@ -15,6 +15,16 @@ function _events() {
15
15
  return data;
16
16
  }
17
17
 
18
+ function _jsonTemplates() {
19
+ const data = _interopRequireDefault(require("json-templates"));
20
+
21
+ _jsonTemplates = function _jsonTemplates() {
22
+ return data;
23
+ };
24
+
25
+ return data;
26
+ }
27
+
18
28
  function _koaCompose() {
19
29
  const data = _interopRequireDefault(require("koa-compose"));
20
30
 
@@ -69,8 +79,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
69
79
 
70
80
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
71
81
 
72
- const parse = require('json-templates');
73
-
74
82
  class ACL extends _events().default {
75
83
  constructor() {
76
84
  super();
@@ -279,7 +287,7 @@ class ACL extends _events().default {
279
287
  }
280
288
 
281
289
  parseJsonTemplate(json, ctx) {
282
- return parse(json)({
290
+ return (0, _jsonTemplates().default)(json)({
283
291
  ctx: {
284
292
  state: JSON.parse(JSON.stringify(ctx.state))
285
293
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/acl",
3
- "version": "0.7.1-alpha.6",
3
+ "version": "0.7.2-alpha.2",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "licenses": [
@@ -12,7 +12,7 @@
12
12
  "main": "./lib/index.js",
13
13
  "types": "./lib/index.d.ts",
14
14
  "dependencies": {
15
- "@nocobase/resourcer": "0.7.1-alpha.6",
15
+ "@nocobase/resourcer": "0.7.2-alpha.2",
16
16
  "json-templates": "^4.2.0"
17
17
  },
18
18
  "repository": {
@@ -20,5 +20,5 @@
20
20
  "url": "git+https://github.com/nocobase/nocobase.git",
21
21
  "directory": "packages/acl"
22
22
  },
23
- "gitHead": "b6f96c97020d278ae597bf05553442d7516b2216"
23
+ "gitHead": "a0cc50154cc292248ef107c95a24bcc0c7a586fa"
24
24
  }