@nocobase/server 1.4.26 → 1.4.28

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 +14 -14
@@ -64,6 +64,14 @@ var import_ipc_socket_client = require("./ipc-socket-client");
64
64
  var import_ipc_socket_server = require("./ipc-socket-server");
65
65
  var import_ws_server = require("./ws-server");
66
66
  const compress = (0, import_node_util.promisify)((0, import_compression.default)());
67
+ function getSocketPath() {
68
+ const { SOCKET_PATH } = process.env;
69
+ if ((0, import_path.isAbsolute)(SOCKET_PATH)) {
70
+ return SOCKET_PATH;
71
+ }
72
+ return (0, import_path.resolve)(process.cwd(), SOCKET_PATH);
73
+ }
74
+ __name(getSocketPath, "getSocketPath");
67
75
  const _Gateway = class _Gateway extends import_events.EventEmitter {
68
76
  /**
69
77
  * use main app as default app to handle request
@@ -79,9 +87,7 @@ const _Gateway = class _Gateway extends import_events.EventEmitter {
79
87
  constructor() {
80
88
  super();
81
89
  this.reset();
82
- if (process.env.SOCKET_PATH) {
83
- this.socketPath = (0, import_path.resolve)(process.cwd(), process.env.SOCKET_PATH);
84
- }
90
+ this.socketPath = getSocketPath();
85
91
  }
86
92
  static getInstance(options = {}) {
87
93
  if (!_Gateway.instance) {
@@ -90,7 +96,7 @@ const _Gateway = class _Gateway extends import_events.EventEmitter {
90
96
  return _Gateway.instance;
91
97
  }
92
98
  static async getIPCSocketClient() {
93
- const socketPath = (0, import_path.resolve)(process.cwd(), process.env.SOCKET_PATH || "storage/gateway.sock");
99
+ const socketPath = getSocketPath();
94
100
  try {
95
101
  return await import_ipc_socket_client.IPCSocketClient.getConnection(socketPath);
96
102
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "AGPL-3.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": "1.4.26",
14
- "@nocobase/actions": "1.4.26",
15
- "@nocobase/auth": "1.4.26",
16
- "@nocobase/cache": "1.4.26",
17
- "@nocobase/data-source-manager": "1.4.26",
18
- "@nocobase/database": "1.4.26",
19
- "@nocobase/evaluators": "1.4.26",
20
- "@nocobase/logger": "1.4.26",
21
- "@nocobase/resourcer": "1.4.26",
22
- "@nocobase/sdk": "1.4.26",
23
- "@nocobase/telemetry": "1.4.26",
24
- "@nocobase/utils": "1.4.26",
13
+ "@nocobase/acl": "1.4.28",
14
+ "@nocobase/actions": "1.4.28",
15
+ "@nocobase/auth": "1.4.28",
16
+ "@nocobase/cache": "1.4.28",
17
+ "@nocobase/data-source-manager": "1.4.28",
18
+ "@nocobase/database": "1.4.28",
19
+ "@nocobase/evaluators": "1.4.28",
20
+ "@nocobase/logger": "1.4.28",
21
+ "@nocobase/resourcer": "1.4.28",
22
+ "@nocobase/sdk": "1.4.28",
23
+ "@nocobase/telemetry": "1.4.28",
24
+ "@nocobase/utils": "1.4.28",
25
25
  "@types/decompress": "4.2.7",
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": "6e9064d9d028901b0fce51fae363dfaabf6edcc6"
57
+ "gitHead": "260a61dc3ac950026860dc7d164a26dd3ce81a0e"
58
58
  }