@nocobase/server 2.0.0-alpha.35 → 2.0.0-alpha.37

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.
@@ -56,7 +56,7 @@ const availableActions = {
56
56
  update: {
57
57
  displayName: '{{t("Edit")}}',
58
58
  type: "old-data",
59
- aliases: ["update", "move", "add", "set", "remove", "toggle"],
59
+ aliases: ["update", "move"],
60
60
  allowConfigureFields: true
61
61
  },
62
62
  destroy: {
@@ -300,13 +300,13 @@ const _EventQueue = class _EventQueue {
300
300
  return this.adapter.isConnected();
301
301
  }
302
302
  async connect() {
303
- if (!this.adapter) {
304
- throw new Error("no adapter set, cannot connect");
305
- }
306
303
  if (!this.app.serving()) {
307
304
  this.app.logger.warn("app is not serving, will not connect to event queue");
308
305
  return;
309
306
  }
307
+ if (!this.adapter) {
308
+ throw new Error("no adapter set, cannot connect");
309
+ }
310
310
  await this.adapter.connect();
311
311
  this.app.logger.debug(`connected to adapter, using memory? ${this.adapter instanceof MemoryEventQueueAdapter}`);
312
312
  for (const [channel, event] of this.events.entries()) {
@@ -342,6 +342,10 @@ const _EventQueue = class _EventQueue {
342
342
  }
343
343
  }
344
344
  async publish(channel, message, options = {}) {
345
+ if (!this.app.serving()) {
346
+ this.app.logger.warn("app is not serving, will not publish message to event queue");
347
+ return;
348
+ }
345
349
  if (!this.adapter) {
346
350
  throw new Error("no adapter set, cannot publish");
347
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "2.0.0-alpha.35",
3
+ "version": "2.0.0-alpha.37",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -10,20 +10,20 @@
10
10
  "@koa/cors": "^5.0.0",
11
11
  "@koa/multer": "^3.1.0",
12
12
  "@koa/router": "^13.1.0",
13
- "@nocobase/acl": "2.0.0-alpha.35",
14
- "@nocobase/actions": "2.0.0-alpha.35",
15
- "@nocobase/auth": "2.0.0-alpha.35",
16
- "@nocobase/cache": "2.0.0-alpha.35",
17
- "@nocobase/data-source-manager": "2.0.0-alpha.35",
18
- "@nocobase/database": "2.0.0-alpha.35",
19
- "@nocobase/evaluators": "2.0.0-alpha.35",
20
- "@nocobase/lock-manager": "2.0.0-alpha.35",
21
- "@nocobase/logger": "2.0.0-alpha.35",
22
- "@nocobase/resourcer": "2.0.0-alpha.35",
23
- "@nocobase/sdk": "2.0.0-alpha.35",
24
- "@nocobase/snowflake-id": "2.0.0-alpha.35",
25
- "@nocobase/telemetry": "2.0.0-alpha.35",
26
- "@nocobase/utils": "2.0.0-alpha.35",
13
+ "@nocobase/acl": "2.0.0-alpha.37",
14
+ "@nocobase/actions": "2.0.0-alpha.37",
15
+ "@nocobase/auth": "2.0.0-alpha.37",
16
+ "@nocobase/cache": "2.0.0-alpha.37",
17
+ "@nocobase/data-source-manager": "2.0.0-alpha.37",
18
+ "@nocobase/database": "2.0.0-alpha.37",
19
+ "@nocobase/evaluators": "2.0.0-alpha.37",
20
+ "@nocobase/lock-manager": "2.0.0-alpha.37",
21
+ "@nocobase/logger": "2.0.0-alpha.37",
22
+ "@nocobase/resourcer": "2.0.0-alpha.37",
23
+ "@nocobase/sdk": "2.0.0-alpha.37",
24
+ "@nocobase/snowflake-id": "2.0.0-alpha.37",
25
+ "@nocobase/telemetry": "2.0.0-alpha.37",
26
+ "@nocobase/utils": "2.0.0-alpha.37",
27
27
  "@types/decompress": "4.2.7",
28
28
  "@types/ini": "^1.3.31",
29
29
  "@types/koa-send": "^4.1.3",
@@ -60,5 +60,5 @@
60
60
  "@types/serve-handler": "^6.1.1",
61
61
  "@types/ws": "^8.5.5"
62
62
  },
63
- "gitHead": "e60da9bab9fd4c8ba9457e9806d5428054cefa7a"
63
+ "gitHead": "56e2dc3a83b8ca7afa97cfa71b37a43f2ec10396"
64
64
  }