@nocobase/server 0.13.0-alpha.2 → 0.13.0-alpha.4
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/commands/pm.js
CHANGED
|
@@ -18,7 +18,7 @@ var _default = app => {
|
|
|
18
18
|
}());
|
|
19
19
|
pm.command('add').arguments('plugin').action( /*#__PURE__*/function () {
|
|
20
20
|
var _ref2 = _asyncToGenerator(function* (plugin) {
|
|
21
|
-
yield app.pm.add(plugin);
|
|
21
|
+
yield app.pm.add(plugin, {}, true);
|
|
22
22
|
});
|
|
23
23
|
return function (_x2) {
|
|
24
24
|
return _ref2.apply(this, arguments);
|
package/lib/gateway/index.js
CHANGED
|
@@ -67,6 +67,13 @@ function _url() {
|
|
|
67
67
|
};
|
|
68
68
|
return data;
|
|
69
69
|
}
|
|
70
|
+
function _xpipe() {
|
|
71
|
+
const data = _interopRequireDefault(require("xpipe"));
|
|
72
|
+
_xpipe = function _xpipe() {
|
|
73
|
+
return data;
|
|
74
|
+
};
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
70
77
|
var _appSupervisor = require("../app-supervisor");
|
|
71
78
|
var _errors = require("./errors");
|
|
72
79
|
var _ipcSocketClient = require("./ipc-socket-client");
|
|
@@ -88,7 +95,7 @@ class Gateway extends _events().EventEmitter {
|
|
|
88
95
|
this.port = process.env.APP_PORT ? parseInt(process.env.APP_PORT) : null;
|
|
89
96
|
this.host = '0.0.0.0';
|
|
90
97
|
this.wsServer = void 0;
|
|
91
|
-
this.socketPath = (0, _path().resolve)(process.cwd(), 'storage', 'gateway.sock');
|
|
98
|
+
this.socketPath = _xpipe().default.eq((0, _path().resolve)(process.cwd(), 'storage', 'gateway.sock'));
|
|
92
99
|
this.reset();
|
|
93
100
|
}
|
|
94
101
|
static getInstance(options = {}) {
|
|
@@ -37,7 +37,7 @@ export declare class PluginManager {
|
|
|
37
37
|
has(name: string | typeof Plugin): boolean;
|
|
38
38
|
del(name: string | typeof Plugin): void;
|
|
39
39
|
create(name: string | string[]): Promise<void>;
|
|
40
|
-
add(plugin?: any, options?: any): Promise<void>;
|
|
40
|
+
add(plugin?: any, options?: any, insert?: boolean): Promise<void>;
|
|
41
41
|
initPlugins(): Promise<void>;
|
|
42
42
|
load(options?: any): Promise<void>;
|
|
43
43
|
install(options?: InstallOptions): Promise<void>;
|
|
@@ -235,7 +235,7 @@ class PluginManager {
|
|
|
235
235
|
yield run('yarn', ['install']);
|
|
236
236
|
})();
|
|
237
237
|
}
|
|
238
|
-
add(plugin, options = {}) {
|
|
238
|
+
add(plugin, options = {}, insert = false) {
|
|
239
239
|
var _this2 = this;
|
|
240
240
|
return _asyncToGenerator(function* () {
|
|
241
241
|
if (_this2.has(plugin)) {
|
|
@@ -259,6 +259,16 @@ class PluginManager {
|
|
|
259
259
|
if (options.name) {
|
|
260
260
|
_this2.pluginAliases.set(options.name, instance);
|
|
261
261
|
}
|
|
262
|
+
if (insert && options.name) {
|
|
263
|
+
const packageName = PluginManager.getPackageName(options.name);
|
|
264
|
+
const packageJson = PluginManager.getPackageJson(packageName);
|
|
265
|
+
yield _this2.repository.updateOrCreate({
|
|
266
|
+
values: _objectSpread(_objectSpread({}, options), {}, {
|
|
267
|
+
version: packageJson.version
|
|
268
|
+
}),
|
|
269
|
+
filterKeys: ['name']
|
|
270
|
+
});
|
|
271
|
+
}
|
|
262
272
|
yield instance.afterAdd();
|
|
263
273
|
})();
|
|
264
274
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "0.13.0-alpha.
|
|
3
|
+
"version": "0.13.0-alpha.4",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"@koa/cors": "^3.1.0",
|
|
11
11
|
"@koa/multer": "^3.0.2",
|
|
12
12
|
"@koa/router": "^9.4.0",
|
|
13
|
-
"@nocobase/acl": "0.13.0-alpha.
|
|
14
|
-
"@nocobase/actions": "0.13.0-alpha.
|
|
15
|
-
"@nocobase/auth": "0.13.0-alpha.
|
|
16
|
-
"@nocobase/cache": "0.13.0-alpha.
|
|
17
|
-
"@nocobase/database": "0.13.0-alpha.
|
|
18
|
-
"@nocobase/evaluators": "0.13.0-alpha.
|
|
19
|
-
"@nocobase/logger": "0.13.0-alpha.
|
|
20
|
-
"@nocobase/resourcer": "0.13.0-alpha.
|
|
21
|
-
"@nocobase/sdk": "0.13.0-alpha.
|
|
22
|
-
"@nocobase/utils": "0.13.0-alpha.
|
|
13
|
+
"@nocobase/acl": "0.13.0-alpha.4",
|
|
14
|
+
"@nocobase/actions": "0.13.0-alpha.4",
|
|
15
|
+
"@nocobase/auth": "0.13.0-alpha.4",
|
|
16
|
+
"@nocobase/cache": "0.13.0-alpha.4",
|
|
17
|
+
"@nocobase/database": "0.13.0-alpha.4",
|
|
18
|
+
"@nocobase/evaluators": "0.13.0-alpha.4",
|
|
19
|
+
"@nocobase/logger": "0.13.0-alpha.4",
|
|
20
|
+
"@nocobase/resourcer": "0.13.0-alpha.4",
|
|
21
|
+
"@nocobase/sdk": "0.13.0-alpha.4",
|
|
22
|
+
"@nocobase/utils": "0.13.0-alpha.4",
|
|
23
23
|
"@types/koa-send": "^4.1.3",
|
|
24
24
|
"@types/multer": "^1.4.5",
|
|
25
25
|
"axios": "^0.26.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@types/serve-handler": "^6.1.1",
|
|
47
47
|
"@types/ws": "^8.5.5"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "29594e9dbb2455e2f3f6bea95340c4ed75789b61"
|
|
50
50
|
}
|