@nocobase/server 0.20.0-alpha.13 → 0.20.0-alpha.15

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.
@@ -52,6 +52,7 @@ const availableActions = {
52
52
  },
53
53
  destroy: {
54
54
  displayName: '{{t("Delete")}}',
55
+ aliases: ["destroy", "remove"],
55
56
  type: "old-data"
56
57
  }
57
58
  };
@@ -42,7 +42,7 @@ var pm_default = /* @__PURE__ */ __name((app) => {
42
42
  try {
43
43
  await app.pm.addViaCLI(name, import_lodash.default.cloneDeep(options));
44
44
  } catch (error) {
45
- throw new import_plugin_command_error.PluginCommandError(`Failed to add plugin: ${error.message}`);
45
+ throw new import_plugin_command_error.PluginCommandError(`Failed to add plugin`, { cause: error });
46
46
  }
47
47
  });
48
48
  pm.command("update").ipc().argument("<packageName>").option("--path [path]").option("--url [url]").option("--registry [registry]").option("--auth-token [authToken]").option("--version [version]").action(async (packageName, options) => {
@@ -52,21 +52,21 @@ var pm_default = /* @__PURE__ */ __name((app) => {
52
52
  packageName
53
53
  });
54
54
  } catch (error) {
55
- throw new import_plugin_command_error.PluginCommandError(`Failed to update plugin: ${error.message}`);
55
+ throw new import_plugin_command_error.PluginCommandError(`Failed to update plugin`, { cause: error });
56
56
  }
57
57
  });
58
58
  pm.command("enable").ipc().preload().arguments("<plugins...>").action(async (plugins) => {
59
59
  try {
60
60
  await app.pm.enable(plugins);
61
61
  } catch (error) {
62
- throw new import_plugin_command_error.PluginCommandError(`Failed to enable plugin: ${error.message}`);
62
+ throw new import_plugin_command_error.PluginCommandError(`Failed to enable plugin`, { cause: error });
63
63
  }
64
64
  });
65
65
  pm.command("disable").ipc().preload().arguments("<plugins...>").action(async (plugins) => {
66
66
  try {
67
67
  await app.pm.disable(plugins);
68
68
  } catch (error) {
69
- throw new import_plugin_command_error.PluginCommandError(`Failed to disable plugin: ${error.message}`);
69
+ throw new import_plugin_command_error.PluginCommandError(`Failed to disable plugin`, { cause: error });
70
70
  }
71
71
  });
72
72
  pm.command("remove").auth().arguments("<plugins...>").option("--force").option("--remove-dir").action(async (plugins, options) => {
@@ -282,14 +282,14 @@ const _Gateway = class _Gateway extends import_events.EventEmitter {
282
282
  throwError: true,
283
283
  from: "node"
284
284
  }).then(async () => {
285
- if (!await mainApp.isStarted()) {
285
+ if (!isStart && !await mainApp.isStarted()) {
286
286
  await mainApp.stop({ logging: false });
287
287
  }
288
288
  }).catch(async (e) => {
289
289
  if (e.code !== "commander.helpDisplayed") {
290
290
  mainApp.log.error(e);
291
291
  }
292
- if (!await mainApp.isStarted()) {
292
+ if (!isStart && !await mainApp.isStarted()) {
293
293
  await mainApp.stop({ logging: false });
294
294
  }
295
295
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "0.20.0-alpha.13",
3
+ "version": "0.20.0-alpha.15",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -10,18 +10,18 @@
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.20.0-alpha.13",
14
- "@nocobase/actions": "0.20.0-alpha.13",
15
- "@nocobase/auth": "0.20.0-alpha.13",
16
- "@nocobase/cache": "0.20.0-alpha.13",
17
- "@nocobase/data-source-manager": "0.20.0-alpha.13",
18
- "@nocobase/database": "0.20.0-alpha.13",
19
- "@nocobase/evaluators": "0.20.0-alpha.13",
20
- "@nocobase/logger": "0.20.0-alpha.13",
21
- "@nocobase/resourcer": "0.20.0-alpha.13",
22
- "@nocobase/sdk": "0.20.0-alpha.13",
23
- "@nocobase/telemetry": "0.20.0-alpha.13",
24
- "@nocobase/utils": "0.20.0-alpha.13",
13
+ "@nocobase/acl": "0.20.0-alpha.15",
14
+ "@nocobase/actions": "0.20.0-alpha.15",
15
+ "@nocobase/auth": "0.20.0-alpha.15",
16
+ "@nocobase/cache": "0.20.0-alpha.15",
17
+ "@nocobase/data-source-manager": "0.20.0-alpha.15",
18
+ "@nocobase/database": "0.20.0-alpha.15",
19
+ "@nocobase/evaluators": "0.20.0-alpha.15",
20
+ "@nocobase/logger": "0.20.0-alpha.15",
21
+ "@nocobase/resourcer": "0.20.0-alpha.15",
22
+ "@nocobase/sdk": "0.20.0-alpha.15",
23
+ "@nocobase/telemetry": "0.20.0-alpha.15",
24
+ "@nocobase/utils": "0.20.0-alpha.15",
25
25
  "@types/decompress": "4.2.4",
26
26
  "@types/ini": "^1.3.31",
27
27
  "@types/koa-send": "^4.1.3",
@@ -54,5 +54,5 @@
54
54
  "@types/serve-handler": "^6.1.1",
55
55
  "@types/ws": "^8.5.5"
56
56
  },
57
- "gitHead": "4c3ff74d14c8726759b65730eba0b15798ba6879"
57
+ "gitHead": "ec192dcfe2dadda913e2d4c67b3706d78d5d3b9c"
58
58
  }