@ludeo/cloud-common 1.2.206 → 1.2.208-beta-yahil-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/tsconfig.tsbuildinfo +1 -1
- package/dist/v4/events/pool-updated.event.d.ts +6 -2
- package/dist/v4/events/pool-updated.event.js +6 -4
- package/dist/v4/events/pool-updated.event.js.map +1 -1
- 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 +2 -2
- package/src/v4/events/pool-updated.event.ts +8 -3
- 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
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
2
|
import { CloudPool } from "../types/pools";
|
|
3
3
|
import { CloudPoolContext } from "../contexts/cloud-pool-context";
|
|
4
|
+
export declare class PoolUpdatedEventPayload {
|
|
5
|
+
poolId: string;
|
|
6
|
+
pool: Partial<CloudPool>;
|
|
7
|
+
}
|
|
4
8
|
export declare class PoolUpdatedEvent extends LudeoEvent {
|
|
5
9
|
static readonly EVENT_NAME = "cloud-pools.pool-updated";
|
|
6
|
-
constructor(payload:
|
|
10
|
+
constructor(payload: PoolUpdatedEventPayload, context: CloudPoolContext);
|
|
7
11
|
context: CloudPoolContext;
|
|
8
|
-
payload:
|
|
12
|
+
payload: PoolUpdatedEventPayload;
|
|
9
13
|
}
|
|
@@ -9,11 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PoolUpdatedEvent = void 0;
|
|
12
|
+
exports.PoolUpdatedEvent = exports.PoolUpdatedEventPayload = void 0;
|
|
13
13
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
14
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
15
|
-
const pools_1 = require("../types/pools");
|
|
16
15
|
const cloud_pool_context_1 = require("../contexts/cloud-pool-context");
|
|
16
|
+
class PoolUpdatedEventPayload {
|
|
17
|
+
}
|
|
18
|
+
exports.PoolUpdatedEventPayload = PoolUpdatedEventPayload;
|
|
17
19
|
class PoolUpdatedEvent extends ludeo_event_1.LudeoEvent {
|
|
18
20
|
constructor(payload, context) {
|
|
19
21
|
super(PoolUpdatedEvent.EVENT_NAME);
|
|
@@ -28,7 +30,7 @@ __decorate([
|
|
|
28
30
|
__metadata("design:type", cloud_pool_context_1.CloudPoolContext)
|
|
29
31
|
], PoolUpdatedEvent.prototype, "context", void 0);
|
|
30
32
|
__decorate([
|
|
31
|
-
(0, validate_nested_type_decorator_1.ValidateNestedType)(() =>
|
|
32
|
-
__metadata("design:type",
|
|
33
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => PoolUpdatedEventPayload),
|
|
34
|
+
__metadata("design:type", PoolUpdatedEventPayload)
|
|
33
35
|
], PoolUpdatedEvent.prototype, "payload", void 0);
|
|
34
36
|
//# sourceMappingURL=pool-updated.event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-updated.event.js","sourceRoot":"","sources":["../../../src/v4/events/pool-updated.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;
|
|
1
|
+
{"version":3,"file":"pool-updated.event.js","sourceRoot":"","sources":["../../../src/v4/events/pool-updated.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oGAAqF;AAErF,uEAAkE;AAElE,MAAa,uBAAuB;CAGnC;AAHD,0DAGC;AAED,MAAa,gBAAiB,SAAQ,wBAAU;IAG9C,YAAY,OAAgC,EAAE,OAAyB;QACrE,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,4CAcC;AAbiB,2BAAU,GAAG,0BAA0B,CAAC;AASxD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,qCAAgB,CAAC;8BAClC,qCAAgB;iDAAC;AAG1B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;8BACzC,uBAAuB;iDAAC"}
|
|
@@ -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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AE,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludeo/cloud-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.208-beta-yahil-1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": "Yahil Didi",
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
"ts-node": "^10.9.2",
|
|
24
24
|
"typescript": "^5.5.3"
|
|
25
25
|
}
|
|
26
|
-
}
|
|
26
|
+
}
|
|
@@ -3,10 +3,15 @@ import { ValidateNestedType } from "../../decorators/validate-nested-type.decora
|
|
|
3
3
|
import { CloudPool } from "../types/pools";
|
|
4
4
|
import { CloudPoolContext } from "../contexts/cloud-pool-context";
|
|
5
5
|
|
|
6
|
+
export class PoolUpdatedEventPayload {
|
|
7
|
+
poolId: string;
|
|
8
|
+
pool: Partial<CloudPool>;
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
export class PoolUpdatedEvent extends LudeoEvent {
|
|
7
12
|
static readonly EVENT_NAME = "cloud-pools.pool-updated";
|
|
8
13
|
|
|
9
|
-
constructor(payload:
|
|
14
|
+
constructor(payload: PoolUpdatedEventPayload, context: CloudPoolContext) {
|
|
10
15
|
super(PoolUpdatedEvent.EVENT_NAME);
|
|
11
16
|
this.payload = payload;
|
|
12
17
|
this.context = context;
|
|
@@ -15,6 +20,6 @@ export class PoolUpdatedEvent extends LudeoEvent {
|
|
|
15
20
|
@ValidateNestedType(() => CloudPoolContext)
|
|
16
21
|
context: CloudPoolContext;
|
|
17
22
|
|
|
18
|
-
@ValidateNestedType(() =>
|
|
19
|
-
payload:
|
|
23
|
+
@ValidateNestedType(() => PoolUpdatedEventPayload)
|
|
24
|
+
payload: PoolUpdatedEventPayload;
|
|
20
25
|
}
|
|
@@ -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
|
};
|