@xmobitea/gn-server 2.5.0 → 2.5.1

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 (38) hide show
  1. package/dist/GN-app-api/handler/controller/handler/characterPlayer/SetDisplayNameRequestHandler.d.ts +1 -0
  2. package/dist/GN-app-api/handler/controller/handler/content/SetContentDataRequestHandler.d.ts +2 -0
  3. package/dist/GN-app-api/handler/controller/handler/dashboard/DeleteInDatabaseRequestHandler.d.ts +1 -0
  4. package/dist/GN-app-api/handler/controller/handler/dashboard/GrantGameRequestHandler.d.ts +2 -0
  5. package/dist/GN-app-api/handler/controller/handler/dashboard/SetMasterGameSettingsRequestHandler.d.ts +2 -0
  6. package/dist/GN-app-api/handler/controller/handler/gamePlayer/GrantPlayerCharacterRequestHandler.d.ts +1 -0
  7. package/dist/GN-app-api/service/CacheService.d.ts +36 -0
  8. package/dist/GN-app-api/service/CloudScriptService.d.ts +2 -0
  9. package/dist/GN-app-api/service/ConfigService.d.ts +14 -0
  10. package/dist/{GN-library/xmail/lib/xMail.d.ts → GN-app-api/service/EmailService.d.ts} +3 -10
  11. package/dist/GN-app-api/service/EventCallbackService.d.ts +1 -0
  12. package/dist/GN-app-api/service/ICacheService.d.ts +15 -0
  13. package/dist/GN-app-api/service/IConfigService.d.ts +15 -0
  14. package/dist/GN-app-api/service/IEmailService.d.ts +10 -0
  15. package/dist/GN-app-api/service/IPushNotificationService.d.ts +17 -2
  16. package/dist/{GN-library/xnotification/lib/xPushNotification.d.ts → GN-app-api/service/PushNotificationService.d.ts} +8 -13
  17. package/dist/GN-common/constant/enumType/OwnerType.d.ts +2 -1
  18. package/dist/GN-library/xdatabase/lib/entity/pro/UploadFileInfo.d.ts +4 -2
  19. package/dist/GN-library/xdatabase/lib/entity/pro/findOptions/FileUploadInfoFindOptions.d.ts +9 -0
  20. package/dist/GN-library/xdatabase/lib/xDatabase.d.ts +3 -1
  21. package/dist/GN-startup/DefaultApplicationStartup.d.ts +2 -1
  22. package/dist/GN-startup/HttpApp.d.ts +6 -0
  23. package/dist/GN-startup/ServerApplication.d.ts +4 -0
  24. package/dist/GN-startup/cloudScript/eventCallbackCloudScriptData.json +3 -3
  25. package/dist/GN-startup/cloudScript/templateCloudScript.ts +32 -0
  26. package/dist/GN-startup/cloudScript/templateEventCallback.ts +32 -0
  27. package/dist/GN-startup/routes/ClusterHandler.d.ts +34 -0
  28. package/dist/GN-startup/routes/UploadFileHandler.d.ts +1 -0
  29. package/dist/GN-startup/settings/ClusterSettings.d.ts +29 -0
  30. package/dist/GNServer.d.ts +15 -14
  31. package/dist/index.d.ts +18 -14
  32. package/dist/index.js +74224 -82897
  33. package/gn.sh +17 -5
  34. package/package.json +4 -4
  35. package/dist/GN-library/xcachedata/lib/xCacheData.d.ts +0 -10
  36. package/dist/GN-library/xcachedata/lib/xCacheItem.d.ts +0 -8
  37. package/dist/GN-library/xconfig/lib/entity/xConfigItem.d.ts +0 -9
  38. package/dist/GN-library/xconfig/lib/xConfig.d.ts +0 -15
package/gn.sh CHANGED
@@ -162,7 +162,19 @@ init_create_GNConfigDebugJson() {
162
162
  "maxUploadPendingRequest": 200,
163
163
  "maxDownloadPendingRequest": 200,
164
164
  "ipWhiteList": ["127.0.0.1"]
165
- }
165
+ },
166
+
167
+ "clusterSettings": {
168
+ "instanceId": "node_0",
169
+ "isPrimary": true,
170
+ "privateKeyToken": "privateKeyDefault",
171
+ "allNodes": [
172
+ {
173
+ "instanceId": "node_0",
174
+ "fullUrl": "http://127.0.0.1:2202"
175
+ }
176
+ ]
177
+ }
166
178
  }
167
179
  }' > GNconfig.debug.json
168
180
  echo 'create GNconfig.debug.json file success'
@@ -190,6 +202,7 @@ let applicationStartup = new ServerApplicationStartup();
190
202
  applicationStartup.config(options);
191
203
  applicationStartup.run(() => {
192
204
  Debug.log("Server running...");
205
+ postIndex.run();
193
206
  });
194
207
 
195
208
  let gnServer = applicationStartup.getGNServer();
@@ -198,7 +211,6 @@ gnServer.addCustomHandler(new TestRequestHandler(gnServer), false);
198
211
 
199
212
  postIndex.setOptions(options);
200
213
  postIndex.setGNServer(gnServer);
201
- postIndex.run();
202
214
 
203
215
  process.on("uncaughtException", (uncaughtException: Error) => {
204
216
  Debug.log(
@@ -478,8 +490,8 @@ init_create_packageJson() {
478
490
  init_create_tsconfigJson() {
479
491
  echo '{
480
492
  "compilerOptions": {
481
- "target": "es2016",
482
- "module": "commonjs",
493
+ "target": "ES2022",
494
+ "module": "CommonJS",
483
495
  "declaration": false,
484
496
  "strict": false,
485
497
  "noImplicitAny": true,
@@ -496,7 +508,7 @@ init_create_tsconfigJson() {
496
508
  "experimentalDecorators": true,
497
509
  "emitDecoratorMetadata": true,
498
510
  "forceConsistentCasingInFileNames": true,
499
- "lib": ["ES2020", "dom"],
511
+ "lib": ["ES2022"],
500
512
  "allowSyntheticDefaultImports": true,
501
513
  "stripInternal": true,
502
514
  "skipLibCheck": true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xmobitea/gn-server",
3
- "version": "2.5.0",
4
- "description": "Game Networking Server by XmobiTea (Pro)",
3
+ "version": "2.5.1",
4
+ "description": "GearN Server by XmobiTea (Pro)",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
@@ -21,6 +21,7 @@
21
21
  "@types/jsonwebtoken": "^9.0.7",
22
22
  "@types/md5": "^2.3.5",
23
23
  "@types/mocha": "^10.0.10",
24
+ "@types/node": "^22.10.5",
24
25
  "@types/multer": "^1.4.12",
25
26
  "mocha": "^11.0.1",
26
27
  "terser-webpack-plugin": "^5.3.10",
@@ -38,8 +39,7 @@
38
39
  "@socket.io/mongo-adapter": "^0.3.2",
39
40
  "@socket.io/mongo-emitter": "^0.2.0",
40
41
  "@types/crypto-js": "^4.2.2",
41
- "@types/node": "^22.10.5",
42
- "@xmobitea/gn-typescript-client": "^2.5.2",
42
+ "@xmobitea/gn-typescript-client": "^2.5.4",
43
43
  "async-lock": "^1.4.1",
44
44
  "async-middleware": "^1.2.1",
45
45
  "axios": "^1.7.9",
@@ -1,10 +0,0 @@
1
- export declare class xCacheData {
2
- private dataDic;
3
- hasData(key: string): boolean;
4
- getData<T>(key: string): T;
5
- setData<T>(key: string, tData: T, expireAfterMs: number): void;
6
- removeData(key: string): boolean;
7
- isValid(key: string): boolean;
8
- removeInvalidData(): number;
9
- constructor();
10
- }
@@ -1,8 +0,0 @@
1
- export declare class xCacheItem {
2
- private tsExpire;
3
- private tData;
4
- constructor(tData: any, expireAfterMs: number);
5
- setData(tData: any, expireAfterMs: number): void;
6
- isExpired(): boolean;
7
- getData(): any;
8
- }
@@ -1,9 +0,0 @@
1
- export declare class xConfigItem {
2
- private configName;
3
- private label;
4
- private data;
5
- constructor(configName: string, label: string, data: {});
6
- getConfigName(): string;
7
- getLabel(): string;
8
- getData(): {};
9
- }
@@ -1,15 +0,0 @@
1
- import { xConfigItem } from "./entity/xConfigItem";
2
- import * as mongoDB from "mongodb";
3
- import { OnRunSuccess } from "./../../xbuilder/lib/OnRunSuccess";
4
- export declare class xConfig {
5
- private configDic;
6
- private gameId;
7
- private configCollection;
8
- setConfigCollection(gameId: string, configCollection: mongoDB.Collection<mongoDB.Document>): void;
9
- run(onRunSuccess?: OnRunSuccess): void;
10
- syncAllConfigAsync(): Promise<void>;
11
- syncConfigFromDatabaseAsync(configName: string, label: string): Promise<xConfigItem>;
12
- setConfigAsync(configName: string, label: string, data: {}): Promise<xConfigItem>;
13
- getConfigItem(configName: string, label: string): xConfigItem;
14
- getConfigDicViaLabel(label: string): Map<string, xConfigItem>;
15
- }