@nocobase/server 0.8.0-alpha.7 → 0.8.0-alpha.9
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.
|
@@ -124,24 +124,10 @@ class PluginManager {
|
|
|
124
124
|
this.repository = this.collection.repository;
|
|
125
125
|
this.repository.setPluginManager(this);
|
|
126
126
|
this.app.resourcer.define(_resource.default);
|
|
127
|
-
this.app.acl.
|
|
128
|
-
var _ref = _asyncToGenerator(function* (ctx, next) {
|
|
129
|
-
if (ctx.action.resourceName === 'pm') {
|
|
130
|
-
ctx.permission = {
|
|
131
|
-
skip: true
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
yield next();
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
return function (_x, _x2) {
|
|
139
|
-
return _ref.apply(this, arguments);
|
|
140
|
-
};
|
|
141
|
-
}());
|
|
127
|
+
this.app.acl.allow('pm', ['enable', 'disable', 'remove'], 'allowConfigure');
|
|
142
128
|
this.server = _net().default.createServer(socket => {
|
|
143
129
|
socket.on('data', /*#__PURE__*/function () {
|
|
144
|
-
var
|
|
130
|
+
var _ref = _asyncToGenerator(function* (data) {
|
|
145
131
|
const _JSON$parse = JSON.parse(data.toString()),
|
|
146
132
|
method = _JSON$parse.method,
|
|
147
133
|
plugins = _JSON$parse.plugins;
|
|
@@ -154,14 +140,14 @@ class PluginManager {
|
|
|
154
140
|
}
|
|
155
141
|
});
|
|
156
142
|
|
|
157
|
-
return function (
|
|
158
|
-
return
|
|
143
|
+
return function (_x) {
|
|
144
|
+
return _ref.apply(this, arguments);
|
|
159
145
|
};
|
|
160
146
|
}());
|
|
161
147
|
socket.pipe(socket);
|
|
162
148
|
});
|
|
163
149
|
this.app.on('beforeLoad', /*#__PURE__*/function () {
|
|
164
|
-
var
|
|
150
|
+
var _ref2 = _asyncToGenerator(function* (app, options) {
|
|
165
151
|
if ((options === null || options === void 0 ? void 0 : options.method) && ['install', 'upgrade'].includes(options.method)) {
|
|
166
152
|
yield _this.collection.sync();
|
|
167
153
|
}
|
|
@@ -177,8 +163,8 @@ class PluginManager {
|
|
|
177
163
|
}
|
|
178
164
|
});
|
|
179
165
|
|
|
180
|
-
return function (
|
|
181
|
-
return
|
|
166
|
+
return function (_x2, _x3) {
|
|
167
|
+
return _ref2.apply(this, arguments);
|
|
182
168
|
};
|
|
183
169
|
}());
|
|
184
170
|
this.addStaticMultiple(options.plugins);
|
|
@@ -270,7 +256,7 @@ class PluginManager {
|
|
|
270
256
|
run = _require.run;
|
|
271
257
|
|
|
272
258
|
const createPlugin = /*#__PURE__*/function () {
|
|
273
|
-
var
|
|
259
|
+
var _ref4 = _asyncToGenerator(function* (name) {
|
|
274
260
|
const _require2 = require('@nocobase/cli/src/plugin-generator'),
|
|
275
261
|
PluginGenerator = _require2.PluginGenerator;
|
|
276
262
|
|
|
@@ -284,8 +270,8 @@ class PluginManager {
|
|
|
284
270
|
yield generator.run();
|
|
285
271
|
});
|
|
286
272
|
|
|
287
|
-
return function createPlugin(
|
|
288
|
-
return
|
|
273
|
+
return function createPlugin(_x4) {
|
|
274
|
+
return _ref4.apply(this, arguments);
|
|
289
275
|
};
|
|
290
276
|
}();
|
|
291
277
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "0.8.0-alpha.
|
|
3
|
+
"version": "0.8.0-alpha.9",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"@hapi/topo": "^6.0.0",
|
|
15
15
|
"@koa/cors": "^3.1.0",
|
|
16
16
|
"@koa/router": "^9.4.0",
|
|
17
|
-
"@nocobase/acl": "0.8.0-alpha.
|
|
18
|
-
"@nocobase/actions": "0.8.0-alpha.
|
|
19
|
-
"@nocobase/database": "0.8.0-alpha.
|
|
20
|
-
"@nocobase/resourcer": "0.8.0-alpha.
|
|
17
|
+
"@nocobase/acl": "0.8.0-alpha.9",
|
|
18
|
+
"@nocobase/actions": "0.8.0-alpha.9",
|
|
19
|
+
"@nocobase/database": "0.8.0-alpha.9",
|
|
20
|
+
"@nocobase/resourcer": "0.8.0-alpha.9",
|
|
21
21
|
"chalk": "^4.1.1",
|
|
22
22
|
"commander": "^9.2.0",
|
|
23
23
|
"find-package-json": "^1.2.0",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/semver": "^7.3.9"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "6afe02d59bb22df0f96a7605c9001dcc17a30d6a"
|
|
36
36
|
}
|