@nocobase/server 1.6.8 → 1.6.10
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/app-supervisor.js +1 -1
- package/lib/application.js +1 -0
- package/lib/run-plugin-static-imports.js +5 -1
- package/package.json +15 -15
package/lib/app-supervisor.js
CHANGED
|
@@ -245,7 +245,7 @@ const _AppSupervisor = class _AppSupervisor extends import_events.EventEmitter {
|
|
|
245
245
|
this.setAppStatus(app.name, "running");
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
|
-
app.on("
|
|
248
|
+
app.on("__stopped", async () => {
|
|
249
249
|
this.setAppStatus(app.name, "stopped");
|
|
250
250
|
});
|
|
251
251
|
app.on("maintaining", (maintainingStatus) => {
|
package/lib/application.js
CHANGED
|
@@ -679,6 +679,7 @@ const _Application = class _Application extends import_koa.default {
|
|
|
679
679
|
await this.telemetry.shutdown();
|
|
680
680
|
}
|
|
681
681
|
await this.emitAsync("afterStop", this, options);
|
|
682
|
+
this.emit("__stopped", this, options);
|
|
682
683
|
this.stopped = true;
|
|
683
684
|
log.info(`app has stopped`, { method: "stop" });
|
|
684
685
|
this._started = null;
|
|
@@ -30,17 +30,21 @@ __export(run_plugin_static_imports_exports, {
|
|
|
30
30
|
runPluginStaticImports: () => runPluginStaticImports
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(run_plugin_static_imports_exports);
|
|
33
|
+
var import_logger = require("@nocobase/logger");
|
|
33
34
|
var import_server = require("@nocobase/server");
|
|
35
|
+
var import_utils = require("@nocobase/utils");
|
|
34
36
|
async function runPluginStaticImports() {
|
|
35
37
|
const packages = await (0, import_server.findAllPlugins)();
|
|
36
38
|
for (const name of packages) {
|
|
37
39
|
const { packageName } = await import_server.PluginManager.parseName(name);
|
|
38
40
|
try {
|
|
39
|
-
const plugin =
|
|
41
|
+
const plugin = await (0, import_utils.importModule)(packageName);
|
|
40
42
|
if (plugin && plugin.staticImport) {
|
|
43
|
+
import_logger.logger.info("run static import", { packageName });
|
|
41
44
|
await plugin.staticImport();
|
|
42
45
|
}
|
|
43
46
|
} catch (error) {
|
|
47
|
+
import_logger.logger.error(error, { packageName });
|
|
44
48
|
continue;
|
|
45
49
|
}
|
|
46
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"@koa/cors": "^5.0.0",
|
|
11
11
|
"@koa/multer": "^3.0.2",
|
|
12
12
|
"@koa/router": "^9.4.0",
|
|
13
|
-
"@nocobase/acl": "1.6.
|
|
14
|
-
"@nocobase/actions": "1.6.
|
|
15
|
-
"@nocobase/auth": "1.6.
|
|
16
|
-
"@nocobase/cache": "1.6.
|
|
17
|
-
"@nocobase/data-source-manager": "1.6.
|
|
18
|
-
"@nocobase/database": "1.6.
|
|
19
|
-
"@nocobase/evaluators": "1.6.
|
|
20
|
-
"@nocobase/lock-manager": "1.6.
|
|
21
|
-
"@nocobase/logger": "1.6.
|
|
22
|
-
"@nocobase/resourcer": "1.6.
|
|
23
|
-
"@nocobase/sdk": "1.6.
|
|
24
|
-
"@nocobase/telemetry": "1.6.
|
|
25
|
-
"@nocobase/utils": "1.6.
|
|
13
|
+
"@nocobase/acl": "1.6.10",
|
|
14
|
+
"@nocobase/actions": "1.6.10",
|
|
15
|
+
"@nocobase/auth": "1.6.10",
|
|
16
|
+
"@nocobase/cache": "1.6.10",
|
|
17
|
+
"@nocobase/data-source-manager": "1.6.10",
|
|
18
|
+
"@nocobase/database": "1.6.10",
|
|
19
|
+
"@nocobase/evaluators": "1.6.10",
|
|
20
|
+
"@nocobase/lock-manager": "1.6.10",
|
|
21
|
+
"@nocobase/logger": "1.6.10",
|
|
22
|
+
"@nocobase/resourcer": "1.6.10",
|
|
23
|
+
"@nocobase/sdk": "1.6.10",
|
|
24
|
+
"@nocobase/telemetry": "1.6.10",
|
|
25
|
+
"@nocobase/utils": "1.6.10",
|
|
26
26
|
"@types/decompress": "4.2.7",
|
|
27
27
|
"@types/ini": "^1.3.31",
|
|
28
28
|
"@types/koa-send": "^4.1.3",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"@types/serve-handler": "^6.1.1",
|
|
57
57
|
"@types/ws": "^8.5.5"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "e60f706756ba6e0d11a6b9a752c02531db8500bc"
|
|
60
60
|
}
|