@ludeo/cloud-common 1.2.205 → 1.2.206-ygbeta1
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/tsconfig.tsbuildinfo +1 -1
- package/dist/v4/events/index.d.ts +1 -0
- package/dist/v4/events/index.js +2 -1
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/events/sonic-server/game-priorities-changed.d.ts +10 -0
- package/dist/v4/events/sonic-server/game-priorities-changed.js +39 -0
- package/dist/v4/events/sonic-server/game-priorities-changed.js.map +1 -0
- package/dist/v4/events/sonic-server/index.d.ts +1 -0
- package/dist/v4/events/sonic-server/index.js +18 -0
- package/dist/v4/events/sonic-server/index.js.map +1 -0
- package/dist/v4/types/cloud/cloud-configuration-settings.d.ts +9 -1
- package/dist/v4/types/cloud/cloud-configuration-settings.js +12 -0
- package/dist/v4/types/cloud/cloud-configuration-settings.js.map +1 -1
- package/dist/v4/types/cloud/ludeocast-v2/index.d.ts +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/index.js +1 -0
- package/dist/v4/types/cloud/ludeocast-v2/index.js.map +1 -1
- package/dist/v4/types/cloud/ludeocast-v2/machine-class.d.ts +5 -0
- package/dist/v4/types/cloud/ludeocast-v2/machine-class.js +10 -0
- package/dist/v4/types/cloud/ludeocast-v2/machine-class.js.map +1 -0
- package/package.json +1 -1
- package/src/v4/events/index.ts +1 -2
- package/src/v4/events/sonic-server/game-priorities-changed.ts +23 -0
- package/src/v4/events/sonic-server/index.ts +1 -0
- package/src/v4/types/cloud/cloud-configuration-settings.ts +20 -0
- package/src/v4/types/cloud/ludeocast-v2/index.ts +1 -0
- package/src/v4/types/cloud/ludeocast-v2/machine-class.ts +5 -0
|
@@ -178,3 +178,4 @@ export * as SiteController from "./site-controller";
|
|
|
178
178
|
export * as CloudResources from "./cloud-resources";
|
|
179
179
|
export * as CloudBuilds from "./cloud-builds";
|
|
180
180
|
export * as LudeocastAgent from "./ludeocast-agent";
|
|
181
|
+
export * as SonicServer from "./sonic-server";
|
package/dist/v4/events/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.LudeocastAgent = exports.CloudBuilds = exports.CloudResources = exports.SiteController = void 0;
|
|
17
|
+
exports.SonicServer = exports.LudeocastAgent = exports.CloudBuilds = exports.CloudResources = exports.SiteController = void 0;
|
|
18
18
|
__exportStar(require("./allocate-game-request"), exports);
|
|
19
19
|
__exportStar(require("./allocate-game-resource-request"), exports);
|
|
20
20
|
__exportStar(require("./allocate-machine-request"), exports);
|
|
@@ -195,4 +195,5 @@ exports.SiteController = require("./site-controller");
|
|
|
195
195
|
exports.CloudResources = require("./cloud-resources");
|
|
196
196
|
exports.CloudBuilds = require("./cloud-builds");
|
|
197
197
|
exports.LudeocastAgent = require("./ludeocast-agent");
|
|
198
|
+
exports.SonicServer = require("./sonic-server");
|
|
198
199
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEA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;AAChD,+DAA6C;AAC7C,oEAAkD;AAClD,kEAAgD;AAChD,yDAAuC;AACvC,+DAA6C;AAC7C,iEAA+C;AAC/C,+DAA6C;AAC7C,sDAAoC;AACpC,kDAAgC;AAChC,wDAAsC;AACtC,kEAAgD;AAChD,sEAAoD;AACpD,uEAAqD;AACrD,oDAAkC;AAClC,iEAA+C;AAC/C,mDAAiC;AACjC,iDAA+B;AAC/B,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,iFAA+D;AAC/D,iDAA+B;AAC/B,2EAAyD;AACzD,iFAA+D;AAC/D,yEAAuD;AACvD,sFAAoE;AACpE,6DAA2C;AAC3C,qEAAmD;AACnD,mDAAiC;AACjC,oEAAkD;AAClD,kEAAgD;AAChD,4DAA0C;AAC1C,8EAA4D;AAC5D,wDAAsC;AACtC,iEAA+C;AAC/C,8EAA4D;AAC5D,iEAA+C;AAC/C,0EAAwD;AACxD,wEAAsD;AACtD,yDAAuC;AACvC,2DAAyC;AACzC,wDAAsC;AACtC,mDAAiC;AACjC,4EAA0D;AAC1D,+EAA6D;AAC7D,uDAAqC;AACrC,4DAA0C;AAC1C,iDAA+B;AAC/B,kDAAgC;AAChC,4DAA0C;AAC1C,sEAAoD;AACpD,oEAAkD;AAClD,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,2DAAyC;AACzC,mEAAiD;AACjD,iDAA+B;AAC/B,qDAAmC;AACnC,4DAA0C;AAC1C,8DAA4C;AAC5C,kDAAgC;AAChC,0DAAwC;AACxC,2DAAyC;AACzC,4DAA0C;AAC1C,oEAAkD;AAClD,2EAAyD;AACzD,kFAAgE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;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C;AACzC,4DAA0C;AAC1C,oEAAkD;AAClD,2EAAyD;AACzD,kFAAgE;AAEhE,sDAAoD;AACpD,sDAAoD;AACpD,gDAA8C;AAC9C,sDAAoD;AACpD,gDAA8C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
export declare class GamePrioritiesChangedPayload {
|
|
3
|
+
priorities: Record<string, number>;
|
|
4
|
+
updatedAt: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class GamePrioritiesChanged extends LudeoEvent {
|
|
7
|
+
static readonly EVENT_NAME = "sonic-server.game-priorities-changed";
|
|
8
|
+
constructor(payload: GamePrioritiesChangedPayload);
|
|
9
|
+
payload: GamePrioritiesChangedPayload;
|
|
10
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GamePrioritiesChanged = exports.GamePrioritiesChangedPayload = void 0;
|
|
13
|
+
const infra_1 = require("../../../infra");
|
|
14
|
+
const decorators_1 = require("../../../decorators");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
class GamePrioritiesChangedPayload {
|
|
17
|
+
}
|
|
18
|
+
exports.GamePrioritiesChangedPayload = GamePrioritiesChangedPayload;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsObject)(),
|
|
21
|
+
__metadata("design:type", Object)
|
|
22
|
+
], GamePrioritiesChangedPayload.prototype, "priorities", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsNumber)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], GamePrioritiesChangedPayload.prototype, "updatedAt", void 0);
|
|
27
|
+
class GamePrioritiesChanged extends infra_1.LudeoEvent {
|
|
28
|
+
constructor(payload) {
|
|
29
|
+
super(GamePrioritiesChanged.EVENT_NAME);
|
|
30
|
+
this.payload = payload;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.GamePrioritiesChanged = GamePrioritiesChanged;
|
|
34
|
+
GamePrioritiesChanged.EVENT_NAME = "sonic-server.game-priorities-changed";
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, decorators_1.ValidateNestedType)(() => GamePrioritiesChangedPayload),
|
|
37
|
+
__metadata("design:type", GamePrioritiesChangedPayload)
|
|
38
|
+
], GamePrioritiesChanged.prototype, "payload", void 0);
|
|
39
|
+
//# sourceMappingURL=game-priorities-changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game-priorities-changed.js","sourceRoot":"","sources":["../../../../src/v4/events/sonic-server/game-priorities-changed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAA4C;AAC5C,oDAAyD;AACzD,qDAAqD;AAErD,MAAa,4BAA4B;CAMxC;AAND,oEAMC;AAJC;IADC,IAAA,0BAAQ,GAAE;;gEACwB;AAGnC;IADC,IAAA,0BAAQ,GAAE;;+DACO;AAGpB,MAAa,qBAAsB,SAAQ,kBAAU;IAGnD,YAAY,OAAqC;QAC/C,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,sDAUC;AATiB,gCAAU,GAAG,sCAAsC,CAAC;AAQpE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./game-priorities-changed";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./game-priorities-changed"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/events/sonic-server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { LudeoCastV2MachineClass } from "./ludeocast-v2";
|
|
1
2
|
export declare enum CloudSettingsKeys {
|
|
2
3
|
GAME_LOADING_TIME = "gameLoadingTime",
|
|
3
4
|
FIRST_TIME_LUDEO_LOAD = "firstTimeLudeoLoad",
|
|
4
5
|
NON_PRELOADED_LUDEO_LOAD = "nonPreloadedLudeoLoad",
|
|
5
6
|
POST_GAME_LOAD_DELAY = "postGameLoadDelay",
|
|
6
7
|
ADDITIONAL_LAUNCH_ARGS = "additionalLaunchArgs",
|
|
7
|
-
ADDITIONAL_ENVIRONMENT_VARIABLES = "additionalEnvironmentVariables"
|
|
8
|
+
ADDITIONAL_ENVIRONMENT_VARIABLES = "additionalEnvironmentVariables",
|
|
9
|
+
MACHINE_CLASS_PRIORITY = "machineClassPriority"
|
|
8
10
|
}
|
|
9
11
|
export interface CloudSettingsTypeMap {
|
|
10
12
|
[CloudSettingsKeys.GAME_LOADING_TIME]: number;
|
|
@@ -13,6 +15,7 @@ export interface CloudSettingsTypeMap {
|
|
|
13
15
|
[CloudSettingsKeys.POST_GAME_LOAD_DELAY]: number;
|
|
14
16
|
[CloudSettingsKeys.ADDITIONAL_LAUNCH_ARGS]: string[];
|
|
15
17
|
[CloudSettingsKeys.ADDITIONAL_ENVIRONMENT_VARIABLES]: Record<string, string>;
|
|
18
|
+
[CloudSettingsKeys.MACHINE_CLASS_PRIORITY]: LudeoCastV2MachineClass[];
|
|
16
19
|
}
|
|
17
20
|
export type CloudSettings = {
|
|
18
21
|
[K in CloudSettingsKeys]: CloudSettingsTypeMap[K];
|
|
@@ -38,5 +41,10 @@ export type CloudSettingConfig = {
|
|
|
38
41
|
key: CloudSettingsKeys;
|
|
39
42
|
displayKey: string;
|
|
40
43
|
defaultValue: Record<string, string>;
|
|
44
|
+
} | {
|
|
45
|
+
type: "array";
|
|
46
|
+
key: CloudSettingsKeys;
|
|
47
|
+
displayKey: string;
|
|
48
|
+
defaultValue: LudeoCastV2MachineClass[];
|
|
41
49
|
};
|
|
42
50
|
export declare const CLOUD_SETTINGS_DEFAULT_VALUES: Record<CloudSettingsKeys, CloudSettingConfig>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CLOUD_SETTINGS_DEFAULT_VALUES = exports.getCloudSettingsByKey = exports.CloudSettingsKeys = void 0;
|
|
4
|
+
const ludeocast_v2_1 = require("./ludeocast-v2");
|
|
4
5
|
var CloudSettingsKeys;
|
|
5
6
|
(function (CloudSettingsKeys) {
|
|
6
7
|
CloudSettingsKeys["GAME_LOADING_TIME"] = "gameLoadingTime";
|
|
@@ -9,6 +10,7 @@ var CloudSettingsKeys;
|
|
|
9
10
|
CloudSettingsKeys["POST_GAME_LOAD_DELAY"] = "postGameLoadDelay";
|
|
10
11
|
CloudSettingsKeys["ADDITIONAL_LAUNCH_ARGS"] = "additionalLaunchArgs";
|
|
11
12
|
CloudSettingsKeys["ADDITIONAL_ENVIRONMENT_VARIABLES"] = "additionalEnvironmentVariables";
|
|
13
|
+
CloudSettingsKeys["MACHINE_CLASS_PRIORITY"] = "machineClassPriority";
|
|
12
14
|
})(CloudSettingsKeys || (exports.CloudSettingsKeys = CloudSettingsKeys = {}));
|
|
13
15
|
const getCloudSettingsByKey = (key, cloudSettings) => {
|
|
14
16
|
return (cloudSettings[key] ||
|
|
@@ -52,5 +54,15 @@ exports.CLOUD_SETTINGS_DEFAULT_VALUES = {
|
|
|
52
54
|
displayKey: "Additional Environment Variables",
|
|
53
55
|
defaultValue: {},
|
|
54
56
|
},
|
|
57
|
+
[CloudSettingsKeys.MACHINE_CLASS_PRIORITY]: {
|
|
58
|
+
type: "array",
|
|
59
|
+
key: CloudSettingsKeys.MACHINE_CLASS_PRIORITY,
|
|
60
|
+
displayKey: "Machine Class Priority",
|
|
61
|
+
defaultValue: [
|
|
62
|
+
ludeocast_v2_1.LudeoCastV2MachineClass.N1_STANDARD_8,
|
|
63
|
+
ludeocast_v2_1.LudeoCastV2MachineClass.N1_STANDARD_16,
|
|
64
|
+
ludeocast_v2_1.LudeoCastV2MachineClass.G2_STANDARD_16,
|
|
65
|
+
],
|
|
66
|
+
},
|
|
55
67
|
};
|
|
56
68
|
//# sourceMappingURL=cloud-configuration-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-configuration-settings.js","sourceRoot":"","sources":["../../../../src/v4/types/cloud/cloud-configuration-settings.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"cloud-configuration-settings.js","sourceRoot":"","sources":["../../../../src/v4/types/cloud/cloud-configuration-settings.ts"],"names":[],"mappings":";;;AAAA,iDAAyD;AAEzD,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,0DAAqC,CAAA;IACrC,iEAA4C,CAAA;IAC5C,uEAAkD,CAAA;IAClD,+DAA0C,CAAA;IAC1C,oEAA+C,CAAA;IAC/C,wFAAmE,CAAA;IACnE,oEAA+C,CAAA;AACjD,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AAmBM,MAAM,qBAAqB,GAAG,CACnC,GAAM,EACN,aAA4B,EACH,EAAE;IAC3B,OAAO,CACL,aAAa,CAAC,GAAG,CAAC;QACjB,qCAA6B,CAAC,GAAG,CAAC,CAAC,YAAwC,CAC7E,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,qBAAqB,yBAQhC;AAmCW,QAAA,6BAA6B,GAGtC;IACF,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE;QACrC,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,iBAAiB,CAAC,iBAAiB;QACxC,UAAU,EAAE,wBAAwB;QACpC,YAAY,EAAE,MAAM;KACrB;IACD,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,EAAE;QACzC,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,iBAAiB,CAAC,qBAAqB;QAC5C,UAAU,EAAE,4BAA4B;QACxC,YAAY,EAAE,KAAK;KACpB;IACD,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,EAAE;QAC5C,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,iBAAiB,CAAC,wBAAwB;QAC/C,UAAU,EAAE,+BAA+B;QAC3C,YAAY,EAAE,KAAK;KACpB;IACD,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAAE;QACxC,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,iBAAiB,CAAC,oBAAoB;QAC3C,UAAU,EAAE,2BAA2B;QACvC,YAAY,EAAE,CAAC;KAChB;IACD,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,EAAE;QAC1C,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,iBAAiB,CAAC,sBAAsB;QAC7C,UAAU,EAAE,wBAAwB;QACpC,YAAY,EAAE,EAAE;KACjB;IACD,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,EAAE;QACpD,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,iBAAiB,CAAC,gCAAgC;QACvD,UAAU,EAAE,kCAAkC;QAC9C,YAAY,EAAE,EAAE;KACjB;IACD,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,EAAE;QAC1C,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,iBAAiB,CAAC,sBAAsB;QAC7C,UAAU,EAAE,wBAAwB;QACpC,YAAY,EAAE;YACZ,sCAAuB,CAAC,aAAa;YACrC,sCAAuB,CAAC,cAAc;YACtC,sCAAuB,CAAC,cAAc;SACvC;KACF;CACF,CAAC"}
|
|
@@ -20,4 +20,5 @@ __exportStar(require("./request-data"), exports);
|
|
|
20
20
|
__exportStar(require("./game-creation-response"), exports);
|
|
21
21
|
__exportStar(require("./allocation-data"), exports);
|
|
22
22
|
__exportStar(require("./machine-provider-settings"), exports);
|
|
23
|
+
__exportStar(require("./machine-class"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/v4/types/cloud/ludeocast-v2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,sDAAoC;AACpC,iDAA+B;AAC/B,2DAAyC;AACzC,oDAAkC;AAClC,8DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/v4/types/cloud/ludeocast-v2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,sDAAoC;AACpC,iDAA+B;AAC/B,2DAAyC;AACzC,oDAAkC;AAClC,8DAA4C;AAC5C,kDAAgC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LudeoCastV2MachineClass = void 0;
|
|
4
|
+
var LudeoCastV2MachineClass;
|
|
5
|
+
(function (LudeoCastV2MachineClass) {
|
|
6
|
+
LudeoCastV2MachineClass["N1_STANDARD_8"] = "n1-standard-8";
|
|
7
|
+
LudeoCastV2MachineClass["N1_STANDARD_16"] = "n1-standard-16";
|
|
8
|
+
LudeoCastV2MachineClass["G2_STANDARD_16"] = "g2-standard-16";
|
|
9
|
+
})(LudeoCastV2MachineClass || (exports.LudeoCastV2MachineClass = LudeoCastV2MachineClass = {}));
|
|
10
|
+
//# sourceMappingURL=machine-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine-class.js","sourceRoot":"","sources":["../../../../../src/v4/types/cloud/ludeocast-v2/machine-class.ts"],"names":[],"mappings":";;;AAAA,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,0DAA+B,CAAA;IAC/B,4DAAiC,CAAA;IACjC,4DAAiC,CAAA;AACnC,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC"}
|
package/package.json
CHANGED
package/src/v4/events/index.ts
CHANGED
|
@@ -175,9 +175,8 @@ export * from "./pools-deletion-for-build-failed";
|
|
|
175
175
|
export * from "./monitor-ludeocast-transfer-status-task";
|
|
176
176
|
export * from "./ludeocast-machine-resource-error-timeout-task";
|
|
177
177
|
|
|
178
|
-
|
|
179
178
|
export * as SiteController from "./site-controller";
|
|
180
179
|
export * as CloudResources from "./cloud-resources";
|
|
181
180
|
export * as CloudBuilds from "./cloud-builds";
|
|
182
181
|
export * as LudeocastAgent from "./ludeocast-agent";
|
|
183
|
-
|
|
182
|
+
export * as SonicServer from "./sonic-server";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../../infra";
|
|
2
|
+
import { ValidateNestedType } from "../../../decorators";
|
|
3
|
+
import { IsNumber, IsObject } from "class-validator";
|
|
4
|
+
|
|
5
|
+
export class GamePrioritiesChangedPayload {
|
|
6
|
+
@IsObject()
|
|
7
|
+
priorities: Record<string, number>; // gameEnvironmentId -> priority
|
|
8
|
+
|
|
9
|
+
@IsNumber()
|
|
10
|
+
updatedAt: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class GamePrioritiesChanged extends LudeoEvent {
|
|
14
|
+
static readonly EVENT_NAME = "sonic-server.game-priorities-changed";
|
|
15
|
+
|
|
16
|
+
constructor(payload: GamePrioritiesChangedPayload) {
|
|
17
|
+
super(GamePrioritiesChanged.EVENT_NAME);
|
|
18
|
+
this.payload = payload;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@ValidateNestedType(() => GamePrioritiesChangedPayload)
|
|
22
|
+
payload: GamePrioritiesChangedPayload;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./game-priorities-changed";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LudeoCastV2MachineClass } from "./ludeocast-v2";
|
|
2
|
+
|
|
1
3
|
export enum CloudSettingsKeys {
|
|
2
4
|
GAME_LOADING_TIME = "gameLoadingTime",
|
|
3
5
|
FIRST_TIME_LUDEO_LOAD = "firstTimeLudeoLoad",
|
|
@@ -5,6 +7,7 @@ export enum CloudSettingsKeys {
|
|
|
5
7
|
POST_GAME_LOAD_DELAY = "postGameLoadDelay",
|
|
6
8
|
ADDITIONAL_LAUNCH_ARGS = "additionalLaunchArgs",
|
|
7
9
|
ADDITIONAL_ENVIRONMENT_VARIABLES = "additionalEnvironmentVariables",
|
|
10
|
+
MACHINE_CLASS_PRIORITY = "machineClassPriority",
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
// Define the mapping of setting keys to their actual value types
|
|
@@ -15,6 +18,7 @@ export interface CloudSettingsTypeMap {
|
|
|
15
18
|
[CloudSettingsKeys.POST_GAME_LOAD_DELAY]: number;
|
|
16
19
|
[CloudSettingsKeys.ADDITIONAL_LAUNCH_ARGS]: string[];
|
|
17
20
|
[CloudSettingsKeys.ADDITIONAL_ENVIRONMENT_VARIABLES]: Record<string, string>;
|
|
21
|
+
[CloudSettingsKeys.MACHINE_CLASS_PRIORITY]: LudeoCastV2MachineClass[];
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
// Create a type-safe CloudSettings type
|
|
@@ -58,6 +62,12 @@ export type CloudSettingConfig =
|
|
|
58
62
|
key: CloudSettingsKeys;
|
|
59
63
|
displayKey: string;
|
|
60
64
|
defaultValue: Record<string, string>;
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
type: "array";
|
|
68
|
+
key: CloudSettingsKeys;
|
|
69
|
+
displayKey: string;
|
|
70
|
+
defaultValue: LudeoCastV2MachineClass[];
|
|
61
71
|
};
|
|
62
72
|
|
|
63
73
|
export const CLOUD_SETTINGS_DEFAULT_VALUES: Record<
|
|
@@ -100,4 +110,14 @@ export const CLOUD_SETTINGS_DEFAULT_VALUES: Record<
|
|
|
100
110
|
displayKey: "Additional Environment Variables",
|
|
101
111
|
defaultValue: {},
|
|
102
112
|
},
|
|
113
|
+
[CloudSettingsKeys.MACHINE_CLASS_PRIORITY]: {
|
|
114
|
+
type: "array",
|
|
115
|
+
key: CloudSettingsKeys.MACHINE_CLASS_PRIORITY,
|
|
116
|
+
displayKey: "Machine Class Priority",
|
|
117
|
+
defaultValue: [
|
|
118
|
+
LudeoCastV2MachineClass.N1_STANDARD_8,
|
|
119
|
+
LudeoCastV2MachineClass.N1_STANDARD_16,
|
|
120
|
+
LudeoCastV2MachineClass.G2_STANDARD_16,
|
|
121
|
+
],
|
|
122
|
+
},
|
|
103
123
|
};
|