@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,7 +1,7 @@
1
1
  {
2
2
  "author": "Yusuf Yasir KAYGUSUZ",
3
3
  "name": "@xrystal/core",
4
- "version": "3.7.5",
4
+ "version": "3.7.7",
5
5
  "description": "Project core for xrystal",
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -2,6 +2,7 @@ import SystemService from '../system/index';
2
2
  export default class ConfigsService {
3
3
  private config;
4
4
  protected _systemService: SystemService;
5
+ publicFolderName: string;
5
6
  load: ({ tmp, systemService }: {
6
7
  tmp: any;
7
8
  systemService: SystemService;
@@ -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 WsEnum {
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 WsEnum;
94
- (function (WsEnum) {
95
- WsEnum["BUS"] = "WS_BUS";
96
- WsEnum["USER"] = "ws:user";
97
- WsEnum["ROOM"] = "ws:room";
98
- })(WsEnum || (WsEnum = {}));
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";