@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.
- package/lib/acl/available-action.js +1 -1
- package/lib/event-queue.js +7 -3
- package/package.json +16 -16
package/lib/event-queue.js
CHANGED
|
@@ -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.
|
|
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.
|
|
14
|
-
"@nocobase/actions": "2.0.0-alpha.
|
|
15
|
-
"@nocobase/auth": "2.0.0-alpha.
|
|
16
|
-
"@nocobase/cache": "2.0.0-alpha.
|
|
17
|
-
"@nocobase/data-source-manager": "2.0.0-alpha.
|
|
18
|
-
"@nocobase/database": "2.0.0-alpha.
|
|
19
|
-
"@nocobase/evaluators": "2.0.0-alpha.
|
|
20
|
-
"@nocobase/lock-manager": "2.0.0-alpha.
|
|
21
|
-
"@nocobase/logger": "2.0.0-alpha.
|
|
22
|
-
"@nocobase/resourcer": "2.0.0-alpha.
|
|
23
|
-
"@nocobase/sdk": "2.0.0-alpha.
|
|
24
|
-
"@nocobase/snowflake-id": "2.0.0-alpha.
|
|
25
|
-
"@nocobase/telemetry": "2.0.0-alpha.
|
|
26
|
-
"@nocobase/utils": "2.0.0-alpha.
|
|
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": "
|
|
63
|
+
"gitHead": "56e2dc3a83b8ca7afa97cfa71b37a43f2ec10396"
|
|
64
64
|
}
|