@xmobitea/gn-server 2.4.16 → 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.
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/GetCreateLeaderboardRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/GetCurrencyLeaderboardRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/GetCurrencyLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/GetLastLoginLeaderboardRequestHandler.d.ts +22 -0
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/GetStatisticsLeaderboardRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/GetStatisticsLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/characterPlayer/SetDisplayNameRequestHandler.d.ts +1 -0
- package/dist/GN-app-api/handler/controller/handler/content/SetContentDataRequestHandler.d.ts +2 -0
- package/dist/GN-app-api/handler/controller/handler/dashboard/DeleteInDatabaseRequestHandler.d.ts +1 -0
- package/dist/GN-app-api/handler/controller/handler/dashboard/GrantGameRequestHandler.d.ts +2 -0
- package/dist/GN-app-api/handler/controller/handler/dashboard/SetMasterGameSettingsRequestHandler.d.ts +2 -0
- package/dist/GN-app-api/handler/controller/handler/dashboard/model/CharacterPlayerPermissionRulesParam.d.ts +1 -0
- package/dist/GN-app-api/handler/controller/handler/dashboard/model/StoreInventoryPermissionRulesParam.d.ts +2 -0
- package/dist/GN-app-api/handler/controller/handler/gamePlayer/GetCurrencyLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/gamePlayer/GetStatisticsLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/gamePlayer/GrantPlayerCharacterRequestHandler.d.ts +1 -0
- package/dist/GN-app-api/handler/controller/handler/group/GetCurrencyLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/group/GetStatisticsLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/inventory/GetStatisticsLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/masterPlayer/GetCurrencyLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/masterPlayer/GetStatisticsLogRequestHandler.d.ts +0 -1
- package/dist/GN-app-api/handler/controller/handler/storeInventory/GetStoreUsedRequestHandler.d.ts +17 -0
- package/dist/GN-app-api/handler/controller/handler/storeInventory/RemoveStoreUsedRequestHandler.d.ts +18 -0
- package/dist/GN-app-api/handler/controller/handler/storeInventory/SetStoreItemInformationRequestHandler.d.ts +1 -0
- package/dist/GN-app-api/handler/controller/handler/storeInventory/StoreItemBaseRequestHandler.d.ts +1 -0
- package/dist/GN-app-api/handler/controller/handler/storeInventory/model/InfoRequestParam.d.ts +1 -0
- package/dist/GN-app-api/service/CacheService.d.ts +36 -0
- package/dist/GN-app-api/service/CloudScriptService.d.ts +2 -0
- package/dist/GN-app-api/service/ConfigService.d.ts +14 -0
- package/dist/{GN-library/xmail/lib/xMail.d.ts → GN-app-api/service/EmailService.d.ts} +3 -10
- package/dist/GN-app-api/service/EventCallbackService.d.ts +1 -0
- package/dist/GN-app-api/service/ICacheService.d.ts +15 -0
- package/dist/GN-app-api/service/IConfigService.d.ts +15 -0
- package/dist/GN-app-api/service/IEmailService.d.ts +10 -0
- package/dist/GN-app-api/service/IPushNotificationService.d.ts +17 -2
- package/dist/{GN-library/xnotification/lib/xPushNotification.d.ts → GN-app-api/service/PushNotificationService.d.ts} +8 -13
- package/dist/GN-common/constant/OperationCode.d.ts +2 -0
- package/dist/GN-common/constant/enumType/OwnerType.d.ts +2 -1
- package/dist/GN-common/constant/enumType/StoreItemType.d.ts +4 -0
- package/dist/GN-common/constant/errorCode/GNErrorCode.d.ts +2 -0
- package/dist/GN-common/constant/parameterCode/GNParameterCode.d.ts +4 -0
- package/dist/GN-common/entity/SecretInfo.d.ts +3 -0
- package/dist/GN-library/xdatabase/lib/entity/pro/StoreInventory.d.ts +4 -0
- package/dist/GN-library/xdatabase/lib/entity/pro/UploadFileInfo.d.ts +4 -2
- package/dist/GN-library/xdatabase/lib/entity/pro/findOptions/FileUploadInfoFindOptions.d.ts +9 -0
- package/dist/GN-library/xdatabase/lib/entity/pro/findOptions/StoreInventoryFindOptions.d.ts +1 -0
- package/dist/GN-library/xdatabase/lib/xDatabase.d.ts +15 -1
- package/dist/GN-startup/DefaultApplicationStartup.d.ts +2 -1
- package/dist/GN-startup/HttpApp.d.ts +6 -0
- package/dist/GN-startup/ServerApplication.d.ts +4 -0
- package/dist/GN-startup/cloudScript/eventCallbackCloudScriptData.json +20 -5
- package/dist/GN-startup/cloudScript/templateCloudScript.ts +203 -165
- package/dist/GN-startup/cloudScript/templateEventCallback.ts +263 -225
- package/dist/GN-startup/routes/ClusterHandler.d.ts +34 -0
- package/dist/GN-startup/routes/UploadFileHandler.d.ts +1 -0
- package/dist/GN-startup/settings/ApplicationSettings.d.ts +3 -0
- package/dist/GN-startup/settings/ClusterSettings.d.ts +29 -0
- package/dist/GNServer.d.ts +16 -13
- package/dist/index.d.ts +20 -14
- package/dist/index.js +74426 -82363
- package/gn.sh +19 -7
- package/package.json +4 -7
- package/dist/GN-library/xcachedata/lib/xCacheData.d.ts +0 -10
- package/dist/GN-library/xcachedata/lib/xCacheItem.d.ts +0 -8
- package/dist/GN-library/xconfig/lib/entity/xConfigItem.d.ts +0 -9
- package/dist/GN-library/xconfig/lib/xConfig.d.ts +0 -15
package/gn.sh
CHANGED
|
@@ -91,6 +91,7 @@ init_create_GNConfigDebugJson() {
|
|
|
91
91
|
"options": {
|
|
92
92
|
"applicationSettings": {
|
|
93
93
|
"port": 2202,
|
|
94
|
+
"socketPort": 2901,
|
|
94
95
|
"useSsl": false,
|
|
95
96
|
"keyFilePath": "",
|
|
96
97
|
"certFilePath": "",
|
|
@@ -161,7 +162,19 @@ init_create_GNConfigDebugJson() {
|
|
|
161
162
|
"maxUploadPendingRequest": 200,
|
|
162
163
|
"maxDownloadPendingRequest": 200,
|
|
163
164
|
"ipWhiteList": ["127.0.0.1"]
|
|
164
|
-
}
|
|
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
|
+
}
|
|
165
178
|
}
|
|
166
179
|
}' > GNconfig.debug.json
|
|
167
180
|
echo 'create GNconfig.debug.json file success'
|
|
@@ -189,6 +202,7 @@ let applicationStartup = new ServerApplicationStartup();
|
|
|
189
202
|
applicationStartup.config(options);
|
|
190
203
|
applicationStartup.run(() => {
|
|
191
204
|
Debug.log("Server running...");
|
|
205
|
+
postIndex.run();
|
|
192
206
|
});
|
|
193
207
|
|
|
194
208
|
let gnServer = applicationStartup.getGNServer();
|
|
@@ -197,7 +211,6 @@ gnServer.addCustomHandler(new TestRequestHandler(gnServer), false);
|
|
|
197
211
|
|
|
198
212
|
postIndex.setOptions(options);
|
|
199
213
|
postIndex.setGNServer(gnServer);
|
|
200
|
-
postIndex.run();
|
|
201
214
|
|
|
202
215
|
process.on("uncaughtException", (uncaughtException: Error) => {
|
|
203
216
|
Debug.log(
|
|
@@ -466,8 +479,7 @@ init_create_packageJson() {
|
|
|
466
479
|
"typescript": "^5.7.2"
|
|
467
480
|
},
|
|
468
481
|
"dependencies": {
|
|
469
|
-
"@xmobitea/gn-server": "*"
|
|
470
|
-
"fs": "*"
|
|
482
|
+
"@xmobitea/gn-server": "*"
|
|
471
483
|
}
|
|
472
484
|
}' > package.json
|
|
473
485
|
echo 'create package.json file success'
|
|
@@ -478,8 +490,8 @@ init_create_packageJson() {
|
|
|
478
490
|
init_create_tsconfigJson() {
|
|
479
491
|
echo '{
|
|
480
492
|
"compilerOptions": {
|
|
481
|
-
"target": "
|
|
482
|
-
"module": "
|
|
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": ["
|
|
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.
|
|
4
|
-
"description": "
|
|
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": {
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/async-lock": "^1.4.2",
|
|
19
19
|
"@types/bcrypt": "^5.0.2",
|
|
20
|
-
"@types/cookie-parser": "^1.4.8",
|
|
21
20
|
"@types/express": "^5.0.0",
|
|
22
21
|
"@types/jsonwebtoken": "^9.0.7",
|
|
23
22
|
"@types/md5": "^2.3.5",
|
|
24
23
|
"@types/mocha": "^10.0.10",
|
|
24
|
+
"@types/node": "^22.10.5",
|
|
25
25
|
"@types/multer": "^1.4.12",
|
|
26
26
|
"mocha": "^11.0.1",
|
|
27
27
|
"terser-webpack-plugin": "^5.3.10",
|
|
@@ -39,19 +39,16 @@
|
|
|
39
39
|
"@socket.io/mongo-adapter": "^0.3.2",
|
|
40
40
|
"@socket.io/mongo-emitter": "^0.2.0",
|
|
41
41
|
"@types/crypto-js": "^4.2.2",
|
|
42
|
-
"@
|
|
43
|
-
"@xmobitea/gn-typescript-client": "^2.4.10",
|
|
42
|
+
"@xmobitea/gn-typescript-client": "^2.5.4",
|
|
44
43
|
"async-lock": "^1.4.1",
|
|
45
44
|
"async-middleware": "^1.2.1",
|
|
46
45
|
"axios": "^1.7.9",
|
|
47
46
|
"bcrypt": "^5.1.1",
|
|
48
|
-
"cookie-parser": "^1.4.7",
|
|
49
47
|
"cors": "^2.8.5",
|
|
50
48
|
"crypto-js": "^4.2.0",
|
|
51
49
|
"express": "^4.21.2",
|
|
52
50
|
"express-msgpack": "^5.1.2",
|
|
53
51
|
"firebase-admin": "^13.0.2",
|
|
54
|
-
"fs": "^0.0.1-security",
|
|
55
52
|
"jsonwebtoken": "^9.0.2",
|
|
56
53
|
"jwks-rsa": "^3.1.0",
|
|
57
54
|
"log4js": "^6.9.1",
|
|
@@ -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,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
|
-
}
|