@nocobase/server 1.5.0-beta.32 → 1.5.0-beta.33

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.
Files changed (2) hide show
  1. package/lib/gateway/index.js +10 -4
  2. package/package.json +15 -15
@@ -66,6 +66,14 @@ var import_ws_server = require("./ws-server");
66
66
  var import_node_worker_threads = require("node:worker_threads");
67
67
  var import_node_process = __toESM(require("node:process"));
68
68
  const compress = (0, import_node_util.promisify)((0, import_compression.default)());
69
+ function getSocketPath() {
70
+ const { SOCKET_PATH } = import_node_process.default.env;
71
+ if ((0, import_path.isAbsolute)(SOCKET_PATH)) {
72
+ return SOCKET_PATH;
73
+ }
74
+ return (0, import_path.resolve)(import_node_process.default.cwd(), SOCKET_PATH);
75
+ }
76
+ __name(getSocketPath, "getSocketPath");
69
77
  const _Gateway = class _Gateway extends import_events.EventEmitter {
70
78
  /**
71
79
  * use main app as default app to handle request
@@ -81,9 +89,7 @@ const _Gateway = class _Gateway extends import_events.EventEmitter {
81
89
  constructor() {
82
90
  super();
83
91
  this.reset();
84
- if (import_node_process.default.env.SOCKET_PATH) {
85
- this.socketPath = (0, import_path.resolve)(import_node_process.default.cwd(), import_node_process.default.env.SOCKET_PATH);
86
- }
92
+ this.socketPath = getSocketPath();
87
93
  }
88
94
  static getInstance(options = {}) {
89
95
  if (!_Gateway.instance) {
@@ -92,7 +98,7 @@ const _Gateway = class _Gateway extends import_events.EventEmitter {
92
98
  return _Gateway.instance;
93
99
  }
94
100
  static async getIPCSocketClient() {
95
- const socketPath = (0, import_path.resolve)(import_node_process.default.cwd(), import_node_process.default.env.SOCKET_PATH || "storage/gateway.sock");
101
+ const socketPath = getSocketPath();
96
102
  try {
97
103
  return await import_ipc_socket_client.IPCSocketClient.getConnection(socketPath);
98
104
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "1.5.0-beta.32",
3
+ "version": "1.5.0-beta.33",
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": "^3.1.0",
11
11
  "@koa/multer": "^3.0.2",
12
12
  "@koa/router": "^9.4.0",
13
- "@nocobase/acl": "1.5.0-beta.32",
14
- "@nocobase/actions": "1.5.0-beta.32",
15
- "@nocobase/auth": "1.5.0-beta.32",
16
- "@nocobase/cache": "1.5.0-beta.32",
17
- "@nocobase/data-source-manager": "1.5.0-beta.32",
18
- "@nocobase/database": "1.5.0-beta.32",
19
- "@nocobase/evaluators": "1.5.0-beta.32",
20
- "@nocobase/lock-manager": "1.5.0-beta.32",
21
- "@nocobase/logger": "1.5.0-beta.32",
22
- "@nocobase/resourcer": "1.5.0-beta.32",
23
- "@nocobase/sdk": "1.5.0-beta.32",
24
- "@nocobase/telemetry": "1.5.0-beta.32",
25
- "@nocobase/utils": "1.5.0-beta.32",
13
+ "@nocobase/acl": "1.5.0-beta.33",
14
+ "@nocobase/actions": "1.5.0-beta.33",
15
+ "@nocobase/auth": "1.5.0-beta.33",
16
+ "@nocobase/cache": "1.5.0-beta.33",
17
+ "@nocobase/data-source-manager": "1.5.0-beta.33",
18
+ "@nocobase/database": "1.5.0-beta.33",
19
+ "@nocobase/evaluators": "1.5.0-beta.33",
20
+ "@nocobase/lock-manager": "1.5.0-beta.33",
21
+ "@nocobase/logger": "1.5.0-beta.33",
22
+ "@nocobase/resourcer": "1.5.0-beta.33",
23
+ "@nocobase/sdk": "1.5.0-beta.33",
24
+ "@nocobase/telemetry": "1.5.0-beta.33",
25
+ "@nocobase/utils": "1.5.0-beta.33",
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": "f7e2c653ba4ad919a96a88b5204a7b4e594f2016"
59
+ "gitHead": "75774454f24ba8c34eba13337bb921df6737c202"
60
60
  }