@xrystal/core 3.7.5 → 3.7.7
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/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
1
2
|
export default class ConfigsService {
|
|
2
3
|
config = {};
|
|
3
4
|
_systemService;
|
|
5
|
+
publicFolderName = 'public';
|
|
4
6
|
load = ({ tmp, systemService }) => {
|
|
5
7
|
this._systemService = systemService;
|
|
6
8
|
const rawConfigs = tmp?.configs || tmp?.configs || {};
|
|
7
9
|
this.config = {
|
|
8
10
|
rootFolderPath: rawConfigs.rootFolderPath || 'x',
|
|
9
11
|
projectName: tmp.project.name,
|
|
10
|
-
port: process.env.PORT || rawConfigs.port || 3000,
|
|
11
12
|
serviceName: rawConfigs.service,
|
|
13
|
+
port: process.env.PORT || rawConfigs.port || 3000,
|
|
14
|
+
systemStaticFolderPath: path.resolve(rawConfigs.rootFolderPath, this.publicFolderName),
|
|
12
15
|
env: process.env.NODE_ENV,
|
|
13
16
|
...rawConfigs
|
|
14
17
|
};
|
|
@@ -76,7 +76,11 @@ export declare enum TimezoneEnum {
|
|
|
76
76
|
EtcUTC = "Etc/UTC",
|
|
77
77
|
EtcGMT = "Etc/GMT"
|
|
78
78
|
}
|
|
79
|
-
export declare enum
|
|
79
|
+
export declare enum WsActionsEnum {
|
|
80
|
+
REGISTER = "register",
|
|
81
|
+
JOIN = "join"
|
|
82
|
+
}
|
|
83
|
+
export declare enum WsKeyEnum {
|
|
80
84
|
BUS = "WS_BUS",
|
|
81
85
|
USER = "ws:user",
|
|
82
86
|
ROOM = "ws:room"
|
|
@@ -90,12 +90,17 @@ export var TimezoneEnum;
|
|
|
90
90
|
TimezoneEnum["EtcUTC"] = "Etc/UTC";
|
|
91
91
|
TimezoneEnum["EtcGMT"] = "Etc/GMT";
|
|
92
92
|
})(TimezoneEnum || (TimezoneEnum = {}));
|
|
93
|
-
export var
|
|
94
|
-
(function (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
export var WsActionsEnum;
|
|
94
|
+
(function (WsActionsEnum) {
|
|
95
|
+
WsActionsEnum["REGISTER"] = "register";
|
|
96
|
+
WsActionsEnum["JOIN"] = "join";
|
|
97
|
+
})(WsActionsEnum || (WsActionsEnum = {}));
|
|
98
|
+
export var WsKeyEnum;
|
|
99
|
+
(function (WsKeyEnum) {
|
|
100
|
+
WsKeyEnum["BUS"] = "WS_BUS";
|
|
101
|
+
WsKeyEnum["USER"] = "ws:user";
|
|
102
|
+
WsKeyEnum["ROOM"] = "ws:room";
|
|
103
|
+
})(WsKeyEnum || (WsKeyEnum = {}));
|
|
99
104
|
export var TokensEnum;
|
|
100
105
|
(function (TokensEnum) {
|
|
101
106
|
TokensEnum["CSRF_TOKEN"] = "csrf_token";
|