@xmobitea/gn-server 2.6.2 → 2.6.3
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/index.js +64 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -86017,7 +86017,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86017
86017
|
}
|
|
86018
86018
|
}
|
|
86019
86019
|
async setupNewGNDatabase() {
|
|
86020
|
-
Debug.log("The GN Server is installing some information
|
|
86020
|
+
Debug.log("The GN Server is installing some new information on Database...");
|
|
86021
86021
|
//let currentMilliseconds = xDatetime.getCurrentMilliseconds();
|
|
86022
86022
|
let masterAdminCollection = this.gnServer.getDatabase().systemCollection("MasterAdmin");
|
|
86023
86023
|
{
|
|
@@ -86028,6 +86028,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86028
86028
|
// create version
|
|
86029
86029
|
await masterAdminCollection.insertOne({ type: "version", gnVersion: GNServer.getServerVersion() });
|
|
86030
86030
|
}
|
|
86031
|
+
Debug.log("create some indexes on System.MasterAdmin success.");
|
|
86031
86032
|
let userId = StringUtility.generateRandomString(10, 0);
|
|
86032
86033
|
{
|
|
86033
86034
|
let currentMilliseconds = xDatetime.getCurrentMilliseconds();
|
|
@@ -86174,6 +86175,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86174
86175
|
.setDisplayName(secretInfoItem.getDisplayName())
|
|
86175
86176
|
.build();
|
|
86176
86177
|
this.gnServer.getApiMiddleware().updateSecretInfo(newSecretInfo);
|
|
86178
|
+
Debug.log("create SecretInfo Permission for sub admin success.");
|
|
86177
86179
|
}
|
|
86178
86180
|
{
|
|
86179
86181
|
let permission = GrantSecretInfoRequestHandler.generateRecommendPlayerPermission();
|
|
@@ -86202,6 +86204,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86202
86204
|
.setDisplayName(secretInfoItem.getDisplayName())
|
|
86203
86205
|
.build();
|
|
86204
86206
|
this.gnServer.getApiMiddleware().updateSecretInfo(newSecretInfo);
|
|
86207
|
+
Debug.log("create SecretInfo Permission for player gameId dev success.");
|
|
86205
86208
|
}
|
|
86206
86209
|
{
|
|
86207
86210
|
let result = {
|
|
@@ -86228,6 +86231,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86228
86231
|
.setDisplayName(secretInfoItem.getDisplayName())
|
|
86229
86232
|
.build();
|
|
86230
86233
|
this.gnServer.getApiMiddleware().updateSecretInfo(newSecretInfo);
|
|
86234
|
+
Debug.log("create SecretInfo Permission for player gameId main success.");
|
|
86231
86235
|
}
|
|
86232
86236
|
}
|
|
86233
86237
|
let username = process.env["GEARN_INIT_ROOT_USERNAME"] ?? "gearnadmin";
|
|
@@ -86257,7 +86261,9 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86257
86261
|
secretKey: secretKey,
|
|
86258
86262
|
};
|
|
86259
86263
|
await masterAdminCollection.insertOne(result);
|
|
86264
|
+
Debug.log("create SecretInfo Permission for root admin success.");
|
|
86260
86265
|
}
|
|
86266
|
+
Debug.log("creating some indexes on System.MasterPlayer...");
|
|
86261
86267
|
let masterPlayerCollection = this.gnServer.getDatabase().systemCollection("MasterPlayer");
|
|
86262
86268
|
await masterPlayerCollection.createIndex({ userId: 1 }, { background: true, name: "userId_1" });
|
|
86263
86269
|
await masterPlayerCollection.createIndex({ segments: 1 }, { background: true, name: "segments_1" });
|
|
@@ -86281,7 +86287,8 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86281
86287
|
await masterPlayerCollection.createIndex({ "external.apple.appleId": 1 }, { background: true, sparse: true, name: "external.apple.appleId_1" });
|
|
86282
86288
|
await masterPlayerCollection.createIndex({ "external.google.googleId": 1 }, { background: true, sparse: true, name: "external.google.googleId_1" });
|
|
86283
86289
|
await masterPlayerCollection.createIndex({ "external.facebook.facebookId": 1 }, { background: true, sparse: true, name: "external.facebook.facebookId_1" });
|
|
86284
|
-
Debug.log("
|
|
86290
|
+
Debug.log("create some indexes on System.MasterPlayer success.");
|
|
86291
|
+
Debug.log("[Security] Please login via account with username '" + username + "' and password is '" + password + "' and change new password");
|
|
86285
86292
|
}
|
|
86286
86293
|
{
|
|
86287
86294
|
// create masterGameSettings
|
|
@@ -86335,6 +86342,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86335
86342
|
}
|
|
86336
86343
|
};
|
|
86337
86344
|
await masterAdminCollection.insertOne(masterGameSettingsResult);
|
|
86345
|
+
Debug.log("create default MasterGameSettingsResult success.");
|
|
86338
86346
|
}
|
|
86339
86347
|
{
|
|
86340
86348
|
{
|
|
@@ -86346,6 +86354,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86346
86354
|
let currencyLogCollection = this.gnServer.getDatabase().runtimeCollection("MasterPlayer.CurrencyLog");
|
|
86347
86355
|
await currencyLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86348
86356
|
await currencyLogCollection.createIndex({ userId: 1, key: 1, _id: -1 }, { background: true, name: "userId_1_key_1_id_-1" });
|
|
86357
|
+
Debug.log("create some indexes on Runtime.MasterPlayer.CurrencyLog success.");
|
|
86349
86358
|
}
|
|
86350
86359
|
{
|
|
86351
86360
|
await this.gnServer.getDatabase().createCollection("Runtime.MasterPlayer.StatisticsLog", {
|
|
@@ -86356,18 +86365,22 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86356
86365
|
let statisticsLogCollection = this.gnServer.getDatabase().runtimeCollection("MasterPlayer.StatisticsLog");
|
|
86357
86366
|
await statisticsLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86358
86367
|
await statisticsLogCollection.createIndex({ userId: 1, key: 1, _id: -1 }, { background: true, name: "userId_1_key_1_id_-1" });
|
|
86368
|
+
Debug.log("create some indexes on Runtime.MasterPlayer.StatisticsLog success.");
|
|
86359
86369
|
}
|
|
86360
86370
|
{
|
|
86361
86371
|
let userIPAddressCollection = this.gnServer.getDatabase().systemCollection("MasterPlayer.IPAddress");
|
|
86362
86372
|
await userIPAddressCollection.createIndex({ userId: 1 }, { background: true, name: "userId_1" });
|
|
86373
|
+
Debug.log("create some indexes on System.MasterPlayer.IPAddress success.");
|
|
86363
86374
|
}
|
|
86364
86375
|
{
|
|
86365
86376
|
let countryRegionCollection = this.gnServer.getDatabase().systemCollection("CountryRegion");
|
|
86366
86377
|
await countryRegionCollection.createIndex({ countryCode: 1 }, { background: true, name: "countryCode_1" });
|
|
86378
|
+
Debug.log("create some indexes on System.MasterPlayer.CountryRegion success.");
|
|
86367
86379
|
}
|
|
86368
86380
|
{
|
|
86369
86381
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeCollection("MasterPlayer.StatisticsBackup");
|
|
86370
86382
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86383
|
+
Debug.log("create some indexes on Runtime.MasterPlayer.StatisticsBackup success.");
|
|
86371
86384
|
}
|
|
86372
86385
|
{
|
|
86373
86386
|
await this.gnServer.getDatabase().createCollection("System.Analytics", {
|
|
@@ -86377,6 +86390,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86377
86390
|
});
|
|
86378
86391
|
let analyticsCollection = this.gnServer.getDatabase().systemCollection("Analytics");
|
|
86379
86392
|
await analyticsCollection.createIndex({ tsCreate: -1 }, { background: true, name: "tsCreate_-1" });
|
|
86393
|
+
Debug.log("create some indexes on System.Analytics success.");
|
|
86380
86394
|
}
|
|
86381
86395
|
{
|
|
86382
86396
|
await this.gnServer.getDatabase().createCollection("System.StoreAnalytics", {
|
|
@@ -86386,11 +86400,13 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86386
86400
|
});
|
|
86387
86401
|
let storeAnalytics = this.gnServer.getDatabase().systemCollection("StoreAnalytics");
|
|
86388
86402
|
await storeAnalytics.createIndex({ tsCreate: -1 }, { background: true, name: "tsCreate_-1" });
|
|
86403
|
+
Debug.log("create some indexes on System.StoreAnalytics success.");
|
|
86389
86404
|
}
|
|
86390
86405
|
}
|
|
86391
86406
|
{
|
|
86392
86407
|
// create main game settings
|
|
86393
86408
|
{
|
|
86409
|
+
Debug.log("creating some indexes for gameId main...");
|
|
86394
86410
|
let gameId = "main";
|
|
86395
86411
|
let gameSettingsResult = {
|
|
86396
86412
|
type: "gameSettings",
|
|
@@ -86446,6 +86462,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86446
86462
|
await gamePlayerCollection.createIndex({ segments: 1 }, { background: true, name: "segments_1" });
|
|
86447
86463
|
await gamePlayerCollection.createIndex({ displayNameNormalize: 1 }, { background: true, name: "displayNameNormalize_1" });
|
|
86448
86464
|
await gamePlayerCollection.createIndex({ tsLastLogin: -1 }, { background: true, name: "tsLastLogin_-1" });
|
|
86465
|
+
Debug.log("create some indexes on System." + gameId + ".GamePlayer success.");
|
|
86449
86466
|
}
|
|
86450
86467
|
{
|
|
86451
86468
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".GamePlayer.CurrencyLog", {
|
|
@@ -86456,6 +86473,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86456
86473
|
let currencyLogCollection = this.gnServer.getDatabase().runtimeGameCollection("GamePlayer.CurrencyLog", gameId);
|
|
86457
86474
|
await currencyLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86458
86475
|
await currencyLogCollection.createIndex({ userId: 1, key: 1, _id: -1 }, { background: true, name: "userId_1_key_1_id_-1" });
|
|
86476
|
+
Debug.log("create some indexes on Runtime." + gameId + ".GamePlayer.CurrencyLog success.");
|
|
86459
86477
|
}
|
|
86460
86478
|
{
|
|
86461
86479
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".GamePlayer.StatisticsLog", {
|
|
@@ -86466,10 +86484,12 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86466
86484
|
let statisticsLogCollection = this.gnServer.getDatabase().runtimeGameCollection("GamePlayer.StatisticsLog", gameId);
|
|
86467
86485
|
await statisticsLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86468
86486
|
await statisticsLogCollection.createIndex({ userId: 1, key: 1, _id: -1 }, { background: true, name: "userId_1_key_1_id_-1" });
|
|
86487
|
+
Debug.log("create some indexes on Runtime." + gameId + ".GamePlayer.StatisticsLog success.");
|
|
86469
86488
|
}
|
|
86470
86489
|
{
|
|
86471
86490
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("GamePlayer.StatisticsBackup", gameId);
|
|
86472
86491
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86492
|
+
Debug.log("create some indexes on Runtime." + gameId + ".GamePlayer.StatisticsBackup success.");
|
|
86473
86493
|
}
|
|
86474
86494
|
{
|
|
86475
86495
|
let characterPlayerCollection = this.gnServer.getDatabase().systemGameCollection("CharacterPlayer", gameId);
|
|
@@ -86477,6 +86497,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86477
86497
|
await characterPlayerCollection.createIndex({ segments: 1 }, { background: true, name: "segments_1" });
|
|
86478
86498
|
await characterPlayerCollection.createIndex({ displayNameNormalize: 1 }, { background: true, name: "displayNameNormalize_1" });
|
|
86479
86499
|
await characterPlayerCollection.createIndex({ tsLastLogin: -1 }, { background: true, name: "tsLastLogin_-1" });
|
|
86500
|
+
Debug.log("create some indexes on System." + gameId + ".CharacterPlayer success.");
|
|
86480
86501
|
}
|
|
86481
86502
|
{
|
|
86482
86503
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".CharacterPlayer.CurrencyLog", {
|
|
@@ -86487,6 +86508,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86487
86508
|
let currencyLogCollection = this.gnServer.getDatabase().runtimeGameCollection("CharacterPlayer.CurrencyLog", gameId);
|
|
86488
86509
|
await currencyLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86489
86510
|
await currencyLogCollection.createIndex({ characterId: 1, key: 1, _id: -1 }, { background: true, name: "characterId_1_key_1_id_-1" });
|
|
86511
|
+
Debug.log("create some indexes on Runtime." + gameId + ".CharacterPlayer.CurrencyLog success.");
|
|
86490
86512
|
}
|
|
86491
86513
|
{
|
|
86492
86514
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".CharacterPlayer.StatisticsLog", {
|
|
@@ -86497,16 +86519,19 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86497
86519
|
let statisticsLogCollection = this.gnServer.getDatabase().runtimeGameCollection("CharacterPlayer.StatisticsLog", gameId);
|
|
86498
86520
|
await statisticsLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86499
86521
|
await statisticsLogCollection.createIndex({ characterId: 1, key: 1, _id: -1 }, { background: true, name: "characterId_1_key_1_id_-1" });
|
|
86522
|
+
Debug.log("create some indexes on Runtime." + gameId + ".CharacterPlayer.StatisticsLog success.");
|
|
86500
86523
|
}
|
|
86501
86524
|
{
|
|
86502
86525
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("CharacterPlayer.StatisticsBackup", gameId);
|
|
86503
86526
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86527
|
+
Debug.log("create some indexes on Runtime." + gameId + ".CharacterPlayer.StatisticsBackup success.");
|
|
86504
86528
|
}
|
|
86505
86529
|
{
|
|
86506
86530
|
let groupCollection = this.gnServer.getDatabase().systemGameCollection("Group", gameId);
|
|
86507
86531
|
await groupCollection.createIndex({ groupId: 1 }, { background: true, name: "groupId_1" });
|
|
86508
86532
|
await groupCollection.createIndex({ segments: 1 }, { background: true, name: "segments_1" });
|
|
86509
86533
|
await groupCollection.createIndex({ displayNameNormalize: 1 }, { background: true, name: "displayNameNormalize_1" });
|
|
86534
|
+
Debug.log("create some indexes on System." + gameId + ".Group success.");
|
|
86510
86535
|
}
|
|
86511
86536
|
{
|
|
86512
86537
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".Group.CurrencyLog", {
|
|
@@ -86517,6 +86542,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86517
86542
|
let currencyLogCollection = this.gnServer.getDatabase().runtimeGameCollection("Group.CurrencyLog", gameId);
|
|
86518
86543
|
await currencyLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86519
86544
|
await currencyLogCollection.createIndex({ groupId: 1, key: 1, _id: -1 }, { background: true, name: "groupId_1_key_1_id_-1" });
|
|
86545
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Group.CurrencyLog success.");
|
|
86520
86546
|
}
|
|
86521
86547
|
{
|
|
86522
86548
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".Group.StatisticsLog", {
|
|
@@ -86527,10 +86553,12 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86527
86553
|
let statisticsLogCollection = this.gnServer.getDatabase().runtimeGameCollection("Group.StatisticsLog", gameId);
|
|
86528
86554
|
await statisticsLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86529
86555
|
await statisticsLogCollection.createIndex({ groupId: 1, key: 1, _id: -1 }, { background: true, name: "groupId_1_key_1_id_-1" });
|
|
86556
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Group.StatisticsLog success.");
|
|
86530
86557
|
}
|
|
86531
86558
|
{
|
|
86532
86559
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("Group.StatisticsBackup", gameId);
|
|
86533
86560
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86561
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Group.StatisticsBackup success.");
|
|
86534
86562
|
}
|
|
86535
86563
|
{
|
|
86536
86564
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".Group.Message", {
|
|
@@ -86540,12 +86568,14 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86540
86568
|
});
|
|
86541
86569
|
let groupMessageCollection = this.gnServer.getDatabase().runtimeGameCollection("Group.Message", gameId);
|
|
86542
86570
|
await groupMessageCollection.createIndex({ groupId: 1, _id: -1 }, { background: true, name: "groupId_1_id_-1" });
|
|
86571
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Group.Message success.");
|
|
86543
86572
|
}
|
|
86544
86573
|
{
|
|
86545
86574
|
let inventoryCollection = this.gnServer.getDatabase().systemGameCollection("Inventory", gameId);
|
|
86546
86575
|
await inventoryCollection.createIndex({ itemId: 1 }, { background: true, name: "itemId_1" });
|
|
86547
86576
|
await inventoryCollection.createIndex({ segments: 1 }, { background: true, name: "segments_1" });
|
|
86548
86577
|
await inventoryCollection.createIndex({ displayNameNormalize: 1 }, { background: true, name: "displayNameNormalize_1" });
|
|
86578
|
+
Debug.log("create some indexes on System." + gameId + ".Inventory success.");
|
|
86549
86579
|
}
|
|
86550
86580
|
{
|
|
86551
86581
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".Inventory.StatisticsLog", {
|
|
@@ -86556,16 +86586,19 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86556
86586
|
let statisticsLogCollection = this.gnServer.getDatabase().runtimeGameCollection("Inventory.StatisticsLog", gameId);
|
|
86557
86587
|
await statisticsLogCollection.createIndex({ key: 1, _id: -1 }, { background: true, name: "key_1_id_-1" });
|
|
86558
86588
|
await statisticsLogCollection.createIndex({ itemId: 1, key: 1, _id: -1 }, { background: true, name: "itemId_1_key_1_id_-1" });
|
|
86589
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Inventory.StatisticsLog success.");
|
|
86559
86590
|
}
|
|
86560
86591
|
{
|
|
86561
86592
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("Inventory.StatisticsBackup", gameId);
|
|
86562
86593
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86594
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Inventory.StatisticsBackup success.");
|
|
86563
86595
|
}
|
|
86564
86596
|
{
|
|
86565
86597
|
let storeInventoryCollection = this.gnServer.getDatabase().systemGameCollection("StoreInventory", gameId);
|
|
86566
86598
|
await storeInventoryCollection.createIndex({ storeId: 1 }, { background: true, name: "storeId_1" });
|
|
86567
86599
|
await storeInventoryCollection.createIndex({ displayNameNormalize: 1 }, { background: true, name: "displayNameNormalize_1" });
|
|
86568
86600
|
await storeInventoryCollection.createIndex({ tags: 1 }, { background: true, sparse: true, name: "tags_1" });
|
|
86601
|
+
Debug.log("create some indexes on System." + gameId + ".StoreInventory success.");
|
|
86569
86602
|
}
|
|
86570
86603
|
{
|
|
86571
86604
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".StoreInventory.StoreLog", {
|
|
@@ -86577,15 +86610,18 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86577
86610
|
await storeInventoryLogCollection.createIndex({ storeId: 1, id: 1, storeReceiveType: -1, _id: -1 }, { background: true, name: "storeId_1_id_1_storeReceiveType_-1_id_-1" });
|
|
86578
86611
|
await storeInventoryLogCollection.createIndex({ id: 1, storeReceiveType: -1, _id: -1 }, { background: true, name: "id_1_storeReceiveType_-1_id_-1" });
|
|
86579
86612
|
await storeInventoryLogCollection.createIndex({ storeReceiveType: -1, _id: -1 }, { background: true, name: "storeReceiveType_-1_id_-1" });
|
|
86613
|
+
Debug.log("create some indexes on Runtime." + gameId + ".StoreInventory.StoreLog success.");
|
|
86580
86614
|
}
|
|
86581
86615
|
{
|
|
86582
86616
|
let storeInventoryUsedCollection = this.gnServer.getDatabase().systemGameCollection("StoreInventory.StoreUsed", gameId);
|
|
86583
86617
|
await storeInventoryUsedCollection.createIndex({ storeId: 1 }, { background: true, name: "storeId_1" });
|
|
86618
|
+
Debug.log("create some indexes on System." + gameId + ".StoreInventory.StoreUsed success.");
|
|
86584
86619
|
}
|
|
86585
86620
|
{
|
|
86586
86621
|
let receiptIAPCollection = this.gnServer.getDatabase().systemGameCollection("ReceiptIAP", gameId);
|
|
86587
86622
|
receiptIAPCollection.createIndex({ payloadMd5: 1 }, { background: true, name: "payloadMd5_1" });
|
|
86588
86623
|
receiptIAPCollection.createIndex({ transactionId: 1 }, { background: true, name: "transactionId_1" });
|
|
86624
|
+
Debug.log("create some indexes on System." + gameId + ".ReceiptIAP success.");
|
|
86589
86625
|
}
|
|
86590
86626
|
{
|
|
86591
86627
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".MatchmakingTicket", {
|
|
@@ -86598,6 +86634,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86598
86634
|
await matchmakingTicketCollection.createIndex({ queueName: 1, "status": -1, "tsCreate": -1 }, { background: true, name: "queueName_1_status_-1_tsCreate_-1" });
|
|
86599
86635
|
await matchmakingTicketCollection.createIndex({ ticketId: 1 }, { background: true, name: "ticketId_1" });
|
|
86600
86636
|
await matchmakingTicketCollection.createIndex({ status: -1, _id: -1 }, { background: true, name: "status_-1_id_-1" });
|
|
86637
|
+
Debug.log("create some indexes on Runtime." + gameId + ".MatchmakingTicket success.");
|
|
86601
86638
|
}
|
|
86602
86639
|
{
|
|
86603
86640
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".CloudScript.Log", {
|
|
@@ -86607,24 +86644,30 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86607
86644
|
});
|
|
86608
86645
|
let cloudScriptFunctionLogCollection = this.gnServer.getDatabase().runtimeGameCollection("CloudScript.Log", gameId);
|
|
86609
86646
|
await cloudScriptFunctionLogCollection.createIndex({ tsCreate: -1 }, { background: true, name: "tsCreate-1" });
|
|
86647
|
+
Debug.log("create some indexes on Runtime." + gameId + ".CloudScript.Log success.");
|
|
86610
86648
|
}
|
|
86611
86649
|
{
|
|
86612
86650
|
let matchCollection = this.gnServer.getDatabase().systemGameCollection("Match", gameId);
|
|
86613
86651
|
await matchCollection.createIndex({ matchId: 1 }, { background: true, name: "matchId_1" });
|
|
86614
86652
|
await matchCollection.createIndex({ queueName: 1, tsCreate: -1 }, { background: true, name: "queueName_1_tsCreate_-1" });
|
|
86615
86653
|
await matchCollection.createIndex({ status: -1, tsCreate: -1 }, { background: true, name: "status_-1_tsCreate_-1" });
|
|
86654
|
+
Debug.log("create some indexes on System." + gameId + ".Match success.");
|
|
86616
86655
|
}
|
|
86617
86656
|
{
|
|
86618
86657
|
let configCollection = this.gnServer.getDatabase().systemGameCollection("Config", gameId);
|
|
86619
86658
|
await configCollection.createIndex({ configName: 1, label: 1 }, { background: true, unique: true, name: "configName_1_label_1" });
|
|
86659
|
+
Debug.log("create some indexes on System." + gameId + ".Config success.");
|
|
86620
86660
|
}
|
|
86621
86661
|
{
|
|
86622
86662
|
let cacheCollection = this.gnServer.getDatabase().runtimeGameCollection("Cache", gameId);
|
|
86623
86663
|
await cacheCollection.createIndex({ key: 1 }, { background: true, name: "key_1" });
|
|
86664
|
+
Debug.log("create some indexes on System." + gameId + ".Cache success.");
|
|
86624
86665
|
}
|
|
86666
|
+
Debug.log("create some indexes for gameId main success.");
|
|
86625
86667
|
}
|
|
86626
86668
|
// create dev game settings
|
|
86627
86669
|
{
|
|
86670
|
+
Debug.log("creating some indexes for gameId dev...");
|
|
86628
86671
|
let gameId = "dev";
|
|
86629
86672
|
let gameSettingsResult = {
|
|
86630
86673
|
type: "gameSettings",
|
|
@@ -86705,6 +86748,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86705
86748
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("GamePlayer.StatisticsBackup", gameId);
|
|
86706
86749
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86707
86750
|
}
|
|
86751
|
+
Debug.log("create some indexes on GamePlayer for gameId " + gameId + " success.");
|
|
86708
86752
|
{
|
|
86709
86753
|
let characterPlayerCollection = this.gnServer.getDatabase().systemGameCollection("CharacterPlayer", gameId);
|
|
86710
86754
|
await characterPlayerCollection.createIndex({ characterId: 1 }, { background: true, name: "characterId_1" });
|
|
@@ -86736,6 +86780,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86736
86780
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("CharacterPlayer.StatisticsBackup", gameId);
|
|
86737
86781
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86738
86782
|
}
|
|
86783
|
+
Debug.log("create some indexes on CharacterPlayer for gameId " + gameId + " success.");
|
|
86739
86784
|
{
|
|
86740
86785
|
let groupCollection = this.gnServer.getDatabase().systemGameCollection("Group", gameId);
|
|
86741
86786
|
await groupCollection.createIndex({ groupId: 1 }, { background: true, name: "groupId_1" });
|
|
@@ -86775,6 +86820,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86775
86820
|
let groupMessageCollection = this.gnServer.getDatabase().runtimeGameCollection("Group.Message", gameId);
|
|
86776
86821
|
await groupMessageCollection.createIndex({ groupId: 1, _id: -1 }, { background: true, name: "groupId_1_id_-1" });
|
|
86777
86822
|
}
|
|
86823
|
+
Debug.log("create some indexes on Group for gameId " + gameId + " success.");
|
|
86778
86824
|
{
|
|
86779
86825
|
let inventoryCollection = this.gnServer.getDatabase().systemGameCollection("Inventory", gameId);
|
|
86780
86826
|
await inventoryCollection.createIndex({ itemId: 1 }, { background: true, name: "itemId_1" });
|
|
@@ -86795,6 +86841,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86795
86841
|
let backupStatisticsLeaderboardCollection = this.gnServer.getDatabase().runtimeGameCollection("Inventory.StatisticsBackup", gameId);
|
|
86796
86842
|
await backupStatisticsLeaderboardCollection.createIndex({ key: 1, version: 1 }, { background: true, name: "key_1_version_1" });
|
|
86797
86843
|
}
|
|
86844
|
+
Debug.log("create some indexes on Inventory for gameId " + gameId + " success.");
|
|
86798
86845
|
{
|
|
86799
86846
|
let storeInventoryCollection = this.gnServer.getDatabase().systemGameCollection("StoreInventory", gameId);
|
|
86800
86847
|
await storeInventoryCollection.createIndex({ storeId: 1 }, { background: true, name: "storeId_1" });
|
|
@@ -86816,11 +86863,13 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86816
86863
|
let storeInventoryUsedCollection = this.gnServer.getDatabase().systemGameCollection("StoreInventory.StoreUsed", gameId);
|
|
86817
86864
|
await storeInventoryUsedCollection.createIndex({ storeId: 1 }, { background: true, name: "storeId_1" });
|
|
86818
86865
|
}
|
|
86866
|
+
Debug.log("create some indexes on StoreInventory for gameId " + gameId + " success.");
|
|
86819
86867
|
{
|
|
86820
86868
|
let receiptIAPCollection = this.gnServer.getDatabase().systemGameCollection("ReceiptIAP", gameId);
|
|
86821
86869
|
receiptIAPCollection.createIndex({ payloadMd5: 1 }, { background: true, name: "payloadMd5_1" });
|
|
86822
86870
|
receiptIAPCollection.createIndex({ transactionId: 1 }, { background: true, name: "transactionId_1" });
|
|
86823
86871
|
}
|
|
86872
|
+
Debug.log("create some indexes on ReceiptIAP for gameId " + gameId + " success.");
|
|
86824
86873
|
{
|
|
86825
86874
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".MatchmakingTicket", {
|
|
86826
86875
|
capped: true,
|
|
@@ -86832,6 +86881,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86832
86881
|
await matchmakingTicketCollection.createIndex({ queueName: 1, status: -1, tsCreate: -1 }, { background: true, name: "queueName_1_status_-1_tsCreate_-1" });
|
|
86833
86882
|
await matchmakingTicketCollection.createIndex({ ticketId: 1 }, { background: true, name: "ticketId_1" });
|
|
86834
86883
|
await matchmakingTicketCollection.createIndex({ status: -1, "_id": -1 }, { background: true, name: "status_-1_id_-1" });
|
|
86884
|
+
Debug.log("create some indexes on Runtime." + gameId + ".MatchmakingTicket success.");
|
|
86835
86885
|
}
|
|
86836
86886
|
{
|
|
86837
86887
|
await this.gnServer.getDatabase().createCollection("Runtime." + gameId + ".CloudScript.Log", {
|
|
@@ -86841,21 +86891,26 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86841
86891
|
});
|
|
86842
86892
|
let cloudScriptFunctionLogCollection = this.gnServer.getDatabase().runtimeGameCollection("CloudScript.Log", gameId);
|
|
86843
86893
|
await cloudScriptFunctionLogCollection.createIndex({ tsCreate: -1 }, { background: true, name: "tsCreate-1" });
|
|
86894
|
+
Debug.log("create some indexes on Runtime." + gameId + ".CloudScript.Log success.");
|
|
86844
86895
|
}
|
|
86845
86896
|
{
|
|
86846
86897
|
let matchCollection = this.gnServer.getDatabase().systemGameCollection("Match", gameId);
|
|
86847
86898
|
await matchCollection.createIndex({ matchId: 1 }, { background: true, name: "matchId_1" });
|
|
86848
86899
|
await matchCollection.createIndex({ queueName: 1, tsCreate: -1 }, { background: true, name: "queueName_1_tsCreate_-1" });
|
|
86849
86900
|
await matchCollection.createIndex({ status: -1, tsCreate: -1 }, { background: true, name: "status_-1_tsCreate_-1" });
|
|
86901
|
+
Debug.log("create some indexes on System." + gameId + ".Match success.");
|
|
86850
86902
|
}
|
|
86851
86903
|
{
|
|
86852
86904
|
let configCollection = this.gnServer.getDatabase().systemGameCollection("Config", gameId);
|
|
86853
86905
|
await configCollection.createIndex({ configName: 1, label: 1 }, { background: true, unique: true, name: "configName_1_label_1" });
|
|
86906
|
+
Debug.log("create some indexes on System." + gameId + ".Config success.");
|
|
86854
86907
|
}
|
|
86855
86908
|
{
|
|
86856
86909
|
let cacheCollection = this.gnServer.getDatabase().runtimeGameCollection("Cache", gameId);
|
|
86857
86910
|
await cacheCollection.createIndex({ key: 1 }, { background: true, name: "key_1" });
|
|
86911
|
+
Debug.log("create some indexes on Runtime." + gameId + ".Cache success.");
|
|
86858
86912
|
}
|
|
86913
|
+
Debug.log("create some indexes for gameId dev success.");
|
|
86859
86914
|
}
|
|
86860
86915
|
}
|
|
86861
86916
|
{
|
|
@@ -86866,16 +86921,19 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86866
86921
|
});
|
|
86867
86922
|
let authInfoCollection = this.gnServer.getDatabase().systemCollection("AuthInfo");
|
|
86868
86923
|
await authInfoCollection.createIndex({ gnToken: 1 }, { background: true, name: "gnToken_1" });
|
|
86924
|
+
Debug.log("create some indexes for System.AuthInfo success.");
|
|
86869
86925
|
}
|
|
86870
86926
|
{
|
|
86871
86927
|
let downloadFileSessionCollection = this.gnServer.getDatabase().systemCollection("DownloadFileSession");
|
|
86872
86928
|
await downloadFileSessionCollection.createIndex({ downloadToken: 1 }, { background: true, name: "downloadToken_1" });
|
|
86873
86929
|
await downloadFileSessionCollection.createIndex({ createdAt: 1 }, { background: true, name: "createdAt_1", expireAfterSeconds: 3600 });
|
|
86930
|
+
Debug.log("create some indexes for System.DownloadFileSession success.");
|
|
86874
86931
|
}
|
|
86875
86932
|
{
|
|
86876
86933
|
let uploadFileInfoCollection = this.gnServer.getDatabase().systemCollection("UploadFileInfo");
|
|
86877
86934
|
await uploadFileInfoCollection.createIndex({ fileId: 1 }, { background: true, name: "fileId_1" });
|
|
86878
86935
|
await uploadFileInfoCollection.createIndex({ gameId: 1, _id: -1 }, { background: true, name: "gameId_1_id_-1" });
|
|
86936
|
+
Debug.log("create some indexes for System.UploadFileInfo success.");
|
|
86879
86937
|
}
|
|
86880
86938
|
{
|
|
86881
86939
|
await this.gnServer.getDatabase().createCollection("System.AdapterEvent", {
|
|
@@ -86888,6 +86946,7 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86888
86946
|
// { "createdAt": 1 },
|
|
86889
86947
|
// { expireAfterSeconds: 60, background: true, name: "createdAt_1" }
|
|
86890
86948
|
// );
|
|
86949
|
+
Debug.log("create some indexes for System.AdapterEvent success.");
|
|
86891
86950
|
}
|
|
86892
86951
|
{
|
|
86893
86952
|
// await this.gnServer.getDatabase().systemCollection("SecretInfo").createIndex({ secretKey": 1 }, { background: true, unique: true, name: "secretKey_1" });
|
|
@@ -86900,14 +86959,17 @@ class ServerApplication extends ServerApplication_BuilderBase {
|
|
|
86900
86959
|
});
|
|
86901
86960
|
// let postEventCallbackPostCollection = this.gnServer.getDatabase().systemCollection("EventCallback.Post");
|
|
86902
86961
|
// await postEventCallbackPostCollection.createIndex({ eventName: 1, _id: -1 }, { background: true, name: "eventName_1_id_-1" });
|
|
86962
|
+
Debug.log("create some indexes for System.EventCallback.Post success.");
|
|
86903
86963
|
}
|
|
86904
86964
|
{
|
|
86905
86965
|
let cloudScriptFunctionCollection = this.gnServer.getDatabase().systemCollection("EventCallback.CloudScript");
|
|
86906
86966
|
let path = __dirname + "/./GN-startup/cloudScript/eventCallbackCloudScriptData.json";
|
|
86907
86967
|
await cloudScriptFunctionCollection.insertMany(JSON.parse(external_fs_default().readFileSync(path).toString()));
|
|
86968
|
+
Debug.log("create some indexes for EventCallback.CloudScript success.");
|
|
86908
86969
|
}
|
|
86909
86970
|
}
|
|
86910
86971
|
async reSetupGNDatabase(oldVersion) {
|
|
86972
|
+
Debug.log("re setup Database from version " + oldVersion);
|
|
86911
86973
|
}
|
|
86912
86974
|
async applySettingsGame() {
|
|
86913
86975
|
let answer = [];
|