@ludeo/cloud-common 1.1.73 → 1.1.74

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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.1.73",
3
+ "version": "1.1.74",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
7
7
  "scripts": {
8
- "build": "tsc",
8
+ "build": "rm -rf dist && tsc",
9
9
  "test": "jest",
10
10
  "publish": "npm run build && npm publish"
11
11
  },
@@ -1,8 +0,0 @@
1
- import { CloudSessionContext } from "../contexts/cloud-session-context";
2
- import { LudeoEvent } from "../../infra/ludeo-event";
3
- export declare class CloudSessionTerminated extends LudeoEvent {
4
- static readonly EVENT_NAME = "cloud-sessions.cloud-session-terminated";
5
- constructor(context: CloudSessionContext);
6
- context: CloudSessionContext;
7
- payload: never;
8
- }
@@ -1,28 +0,0 @@
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.CloudSessionTerminated = void 0;
13
- const cloud_session_context_1 = require("../contexts/cloud-session-context");
14
- const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
15
- const ludeo_event_1 = require("../../infra/ludeo-event");
16
- class CloudSessionTerminated extends ludeo_event_1.LudeoEvent {
17
- constructor(context) {
18
- super(CloudSessionTerminated.EVENT_NAME);
19
- this.context = context;
20
- }
21
- }
22
- exports.CloudSessionTerminated = CloudSessionTerminated;
23
- CloudSessionTerminated.EVENT_NAME = "cloud-sessions.cloud-session-terminated";
24
- __decorate([
25
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_session_context_1.CloudSessionContext),
26
- __metadata("design:type", cloud_session_context_1.CloudSessionContext)
27
- ], CloudSessionTerminated.prototype, "context", void 0);
28
- //# sourceMappingURL=cloud-session-ended.event.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloud-session-ended.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-session-ended.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AAErD,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YAAY,OAA4B;QACtC,KAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,wDAYC;AAXiB,iCAAU,GAAG,yCAAyC,CAAC;AAQvE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;uDAAC"}
@@ -1,15 +0,0 @@
1
- import { CloudResourceContext } from "../contexts";
2
- import { LudeoEvent } from "../../infra/ludeo-event";
3
- import { CloudProviderSettings, CloudProvider } from "../types";
4
- export declare class GameCreatedResponsePayload {
5
- gameResourceId: string;
6
- gamePoolId: string;
7
- providerSettings: CloudProviderSettings;
8
- cloudProvider: CloudProvider;
9
- }
10
- export declare class GameCreatedResponse extends LudeoEvent {
11
- static readonly EVENT_NAME = "cloud-resources.game-created-response";
12
- constructor(payload: GameCreatedResponsePayload, context: CloudResourceContext);
13
- context: CloudResourceContext;
14
- payload: GameCreatedResponsePayload;
15
- }
@@ -1,54 +0,0 @@
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.GameCreatedResponse = exports.GameCreatedResponsePayload = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const contexts_1 = require("../contexts");
15
- const ludeo_event_1 = require("../../infra/ludeo-event");
16
- const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
17
- const types_1 = require("../types");
18
- class GameCreatedResponsePayload {
19
- }
20
- exports.GameCreatedResponsePayload = GameCreatedResponsePayload;
21
- __decorate([
22
- (0, class_validator_1.IsUUID)(),
23
- __metadata("design:type", String)
24
- ], GameCreatedResponsePayload.prototype, "gameResourceId", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsUUID)(),
27
- __metadata("design:type", String)
28
- ], GameCreatedResponsePayload.prototype, "gamePoolId", void 0);
29
- __decorate([
30
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSProviderSettings),
31
- __metadata("design:type", Object)
32
- ], GameCreatedResponsePayload.prototype, "providerSettings", void 0);
33
- __decorate([
34
- (0, class_validator_1.IsEnum)(types_1.CloudProvider),
35
- __metadata("design:type", String)
36
- ], GameCreatedResponsePayload.prototype, "cloudProvider", void 0);
37
- class GameCreatedResponse extends ludeo_event_1.LudeoEvent {
38
- constructor(payload, context) {
39
- super(GameCreatedResponse.EVENT_NAME);
40
- this.payload = payload;
41
- this.context = context;
42
- }
43
- }
44
- exports.GameCreatedResponse = GameCreatedResponse;
45
- GameCreatedResponse.EVENT_NAME = "cloud-resources.game-created-response";
46
- __decorate([
47
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
48
- __metadata("design:type", contexts_1.CloudResourceContext)
49
- ], GameCreatedResponse.prototype, "context", void 0);
50
- __decorate([
51
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameCreatedResponsePayload),
52
- __metadata("design:type", GameCreatedResponsePayload)
53
- ], GameCreatedResponse.prototype, "payload", void 0);
54
- //# sourceMappingURL=game-created-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"game-created-response.js","sourceRoot":"","sources":["../../../src/v3/events/game-created-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,oCAIkB;AAElB,MAAa,0BAA0B;CAYtC;AAZD,gEAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;kEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;8DACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;oEACN;AAGxC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;iEACO;AAG/B,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAAmC,EACnC,OAA6B;QAE7B,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,uCAAuC,CAAC;AAYrE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;oDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;oDAAC"}
@@ -1,16 +0,0 @@
1
- import { LudeoEvent } from "../../infra/ludeo-event";
2
- import { CloudResourceContext } from "../contexts/cloud-resource-context";
3
- import { AWSResourceProviderSettings, CloudResourceStatus } from "../types";
4
- export declare class GameStatusChangedEventPayload {
5
- gameResourceId: string;
6
- gamePoolId: string;
7
- providerSettings: AWSResourceProviderSettings;
8
- status: CloudResourceStatus;
9
- error?: string;
10
- }
11
- export declare class GameStatusChangedEvent extends LudeoEvent {
12
- static readonly EVENT_NAME = "cloud-resource-monitor.game-status-changed";
13
- constructor(payload: GameStatusChangedEventPayload, context: CloudResourceContext);
14
- context: CloudResourceContext;
15
- payload: GameStatusChangedEventPayload;
16
- }
@@ -1,59 +0,0 @@
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.GameStatusChangedEvent = exports.GameStatusChangedEventPayload = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const ludeo_event_1 = require("../../infra/ludeo-event");
15
- const cloud_resource_context_1 = require("../contexts/cloud-resource-context");
16
- const types_1 = require("../types");
17
- const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
18
- class GameStatusChangedEventPayload {
19
- }
20
- exports.GameStatusChangedEventPayload = GameStatusChangedEventPayload;
21
- __decorate([
22
- (0, class_validator_1.IsUUID)(),
23
- __metadata("design:type", String)
24
- ], GameStatusChangedEventPayload.prototype, "gameResourceId", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsUUID)(),
27
- __metadata("design:type", String)
28
- ], GameStatusChangedEventPayload.prototype, "gamePoolId", void 0);
29
- __decorate([
30
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
31
- __metadata("design:type", types_1.AWSResourceProviderSettings)
32
- ], GameStatusChangedEventPayload.prototype, "providerSettings", void 0);
33
- __decorate([
34
- (0, class_validator_1.IsString)(),
35
- __metadata("design:type", String)
36
- ], GameStatusChangedEventPayload.prototype, "status", void 0);
37
- __decorate([
38
- (0, class_validator_1.IsOptional)(),
39
- (0, class_validator_1.IsString)(),
40
- __metadata("design:type", String)
41
- ], GameStatusChangedEventPayload.prototype, "error", void 0);
42
- class GameStatusChangedEvent extends ludeo_event_1.LudeoEvent {
43
- constructor(payload, context) {
44
- super(GameStatusChangedEvent.EVENT_NAME);
45
- this.payload = payload;
46
- this.context = context;
47
- }
48
- }
49
- exports.GameStatusChangedEvent = GameStatusChangedEvent;
50
- GameStatusChangedEvent.EVENT_NAME = "cloud-resource-monitor.game-status-changed";
51
- __decorate([
52
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => cloud_resource_context_1.CloudResourceContext),
53
- __metadata("design:type", cloud_resource_context_1.CloudResourceContext)
54
- ], GameStatusChangedEvent.prototype, "context", void 0);
55
- __decorate([
56
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => GameStatusChangedEventPayload),
57
- __metadata("design:type", GameStatusChangedEventPayload)
58
- ], GameStatusChangedEvent.prototype, "payload", void 0);
59
- //# sourceMappingURL=game-status-changed.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"game-status-changed.js","sourceRoot":"","sources":["../../../src/v3/events/game-status-changed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,+EAA0E;AAC1E,oCAA4E;AAC5E,oGAAqF;AAErF,MAAa,6BAA6B;CAgBzC;AAhBD,sEAgBC;AAdC;IADC,IAAA,wBAAM,GAAE;;qEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;iEACU;AAGnB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BACpC,mCAA2B;uEAAC;AAG9C;IADC,IAAA,0BAAQ,GAAE;;6DACiB;AAI5B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACI;AAGjB,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAA6B;QAE7B,KAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,wDAiBC;AAhBiB,iCAAU,GAAG,4CAA4C,CAAC;AAY1E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;8BACtC,6CAAoB;uDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
@@ -1,12 +0,0 @@
1
- import { CloudResourceContext } from "../contexts";
2
- import { LudeoEvent } from "../../infra/ludeo-event";
3
- export declare class MachineCreatedResponsePayload {
4
- machineResourceId: string;
5
- machinePoolId: string;
6
- }
7
- export declare class MachineCreatedResponse extends LudeoEvent {
8
- static readonly EVENT_NAME = "cloud-resources.machine-created-response";
9
- constructor(payload: MachineCreatedResponsePayload, context: CloudResourceContext);
10
- context: CloudResourceContext;
11
- payload: MachineCreatedResponsePayload;
12
- }
@@ -1,45 +0,0 @@
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.MachineCreatedResponse = exports.MachineCreatedResponsePayload = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const contexts_1 = require("../contexts");
15
- const ludeo_event_1 = require("../../infra/ludeo-event");
16
- const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
17
- class MachineCreatedResponsePayload {
18
- }
19
- exports.MachineCreatedResponsePayload = MachineCreatedResponsePayload;
20
- __decorate([
21
- (0, class_validator_1.IsUUID)(),
22
- __metadata("design:type", String)
23
- ], MachineCreatedResponsePayload.prototype, "machineResourceId", void 0);
24
- __decorate([
25
- (0, class_validator_1.IsUUID)(),
26
- __metadata("design:type", String)
27
- ], MachineCreatedResponsePayload.prototype, "machinePoolId", void 0);
28
- class MachineCreatedResponse extends ludeo_event_1.LudeoEvent {
29
- constructor(payload, context) {
30
- super(MachineCreatedResponse.EVENT_NAME);
31
- this.payload = payload;
32
- this.context = context;
33
- }
34
- }
35
- exports.MachineCreatedResponse = MachineCreatedResponse;
36
- MachineCreatedResponse.EVENT_NAME = "cloud-resources.machine-created-response";
37
- __decorate([
38
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
39
- __metadata("design:type", contexts_1.CloudResourceContext)
40
- ], MachineCreatedResponse.prototype, "context", void 0);
41
- __decorate([
42
- (0, validate_nested_type_decorator_1.ValidateNestedType)(() => MachineCreatedResponsePayload),
43
- __metadata("design:type", MachineCreatedResponsePayload)
44
- ], MachineCreatedResponse.prototype, "payload", void 0);
45
- //# sourceMappingURL=machine-created-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"machine-created-response.js","sourceRoot":"","sources":["../../../src/v3/events/machine-created-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAJC;IADC,IAAA,wBAAM,GAAE;;wEACiB;AAG1B;IADC,IAAA,wBAAM,GAAE;;oEACa;AAGxB,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAAsC,EACtC,OAA6B;QAE7B,KAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,wDAiBC;AAhBiB,iCAAU,GAAG,0CAA0C,CAAC;AAYxE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;uDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
@@ -1,14 +0,0 @@
1
- import { LudeoEvent } from "../../infra/ludeo-event";
2
- import { AWSResourceProviderSettings, CloudProvider } from "../types";
3
- export declare class MonitorGameTaskEventPayload {
4
- gameResourceId: string;
5
- gamePoolId: string;
6
- providerSettings: AWSResourceProviderSettings;
7
- cloudProvider: CloudProvider;
8
- }
9
- export declare class MonitorGameTaskEvent extends LudeoEvent {
10
- static readonly EVENT_NAME = "cloud-resources.monitor-game-task";
11
- constructor(payload: MonitorGameTaskEventPayload);
12
- context: never;
13
- payload: MonitorGameTaskEventPayload;
14
- }
@@ -1,48 +0,0 @@
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.MonitorGameTaskEvent = exports.MonitorGameTaskEventPayload = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const ludeo_event_1 = require("../../infra/ludeo-event");
15
- const types_1 = require("../types");
16
- const decorators_1 = require("../../decorators");
17
- class MonitorGameTaskEventPayload {
18
- }
19
- exports.MonitorGameTaskEventPayload = MonitorGameTaskEventPayload;
20
- __decorate([
21
- (0, class_validator_1.IsUUID)(),
22
- __metadata("design:type", String)
23
- ], MonitorGameTaskEventPayload.prototype, "gameResourceId", void 0);
24
- __decorate([
25
- (0, class_validator_1.IsUUID)(),
26
- __metadata("design:type", String)
27
- ], MonitorGameTaskEventPayload.prototype, "gamePoolId", void 0);
28
- __decorate([
29
- (0, decorators_1.ValidateNestedType)(() => types_1.AWSResourceProviderSettings),
30
- __metadata("design:type", types_1.AWSResourceProviderSettings)
31
- ], MonitorGameTaskEventPayload.prototype, "providerSettings", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsEnum)(types_1.CloudProvider),
34
- __metadata("design:type", String)
35
- ], MonitorGameTaskEventPayload.prototype, "cloudProvider", void 0);
36
- class MonitorGameTaskEvent extends ludeo_event_1.LudeoEvent {
37
- constructor(payload) {
38
- super(MonitorGameTaskEvent.EVENT_NAME);
39
- this.payload = payload;
40
- }
41
- }
42
- exports.MonitorGameTaskEvent = MonitorGameTaskEvent;
43
- MonitorGameTaskEvent.EVENT_NAME = "cloud-resources.monitor-game-task";
44
- __decorate([
45
- (0, decorators_1.ValidateNestedType)(() => MonitorGameTaskEventPayload),
46
- __metadata("design:type", MonitorGameTaskEventPayload)
47
- ], MonitorGameTaskEvent.prototype, "payload", void 0);
48
- //# sourceMappingURL=monitor-game-task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"monitor-game-task.js","sourceRoot":"","sources":["../../../src/v3/events/monitor-game-task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,yDAAqD;AACrD,oCAAsE;AACtE,iDAAsD;AAEtD,MAAa,2BAA2B;CAYvC;AAZD,kEAYC;AAVC;IADC,IAAA,wBAAM,GAAE;;mEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;+DACU;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BACpC,mCAA2B;qEAAC;AAG9C;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;kEACO;AAG/B,MAAa,oBAAqB,SAAQ,wBAAU;IAGlD,YAAY,OAAoC;QAC9C,KAAK,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,oDAYC;AAXiB,+BAAU,GAAG,mCAAmC,CAAC;AAUjE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC7C,2BAA2B;qDAAC"}
@@ -1,63 +0,0 @@
1
- import { AWSResourceProviderSettings, CloudProvider, CloudProviderSettings } from "./cloud";
2
- export declare enum CloudResourceStatus {
3
- Allocated = "allocated",
4
- Available = "available",
5
- Creating = "creating",
6
- Created = "created",
7
- Allocating = "allocating",
8
- Error = "error",
9
- Terminating = "terminating",
10
- Terminated = "terminated"
11
- }
12
- export declare enum CloudPoolStatus {
13
- Active = "active",
14
- Created = "created",
15
- Scaling = "scaling",
16
- Terminated = "terminated"
17
- }
18
- export declare class PoolScaleConfiguration {
19
- size: number;
20
- }
21
- export declare enum CloudPoolType {
22
- GAME = "game",
23
- MACHINE = "machine"
24
- }
25
- export declare class BaseCloudPoolConfiguration {
26
- providerSettings?: CloudProviderSettings;
27
- cloudProvider: CloudProvider;
28
- poolId: string;
29
- poolScaleConfiguration: PoolScaleConfiguration;
30
- type: CloudPoolType;
31
- }
32
- export declare class GamePoolConfiguration extends BaseCloudPoolConfiguration {
33
- type: CloudPoolType.GAME;
34
- gameId: string;
35
- machinePoolId: string;
36
- }
37
- export declare class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
38
- type: CloudPoolType.MACHINE;
39
- }
40
- export type CloudPoolConfigurationType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudPoolConfiguration : T extends CloudPoolType.GAME ? GamePoolConfiguration : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration : BaseCloudPoolConfiguration;
41
- export declare class BaseCloudResource {
42
- id: string;
43
- status: CloudResourceStatus;
44
- createdAt: number;
45
- updatedAt?: number;
46
- settings?: AWSResourceProviderSettings;
47
- }
48
- export declare class MachineCloudResource extends BaseCloudResource {
49
- }
50
- export declare class GameCloudResource extends BaseCloudResource {
51
- machineResourceId?: string;
52
- }
53
- export type CloudResourceType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudResource : T extends CloudPoolType.GAME ? GameCloudResource : T extends CloudPoolType.MACHINE ? MachineCloudResource : BaseCloudResource;
54
- export type CloudResourcesMap<T extends BaseCloudResource> = Record<string, T>;
55
- export type CloudResourcesStatusMap = Record<CloudResourceStatus, number>;
56
- export declare class CloudPool<T extends CloudPoolType | undefined = undefined> {
57
- id: string;
58
- status: CloudPoolStatus;
59
- createdAt: number;
60
- updatedAt?: number;
61
- config: CloudPoolConfigurationType<T>;
62
- resources?: CloudResourcesMap<CloudResourceType<T>>;
63
- }
@@ -1,125 +0,0 @@
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.CloudPool = exports.GameCloudResource = exports.MachineCloudResource = exports.BaseCloudResource = exports.MachinePoolConfiguration = exports.GamePoolConfiguration = exports.BaseCloudPoolConfiguration = exports.CloudPoolType = exports.PoolScaleConfiguration = exports.CloudPoolStatus = exports.CloudResourceStatus = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const decorators_1 = require("../../decorators");
15
- const cloud_1 = require("./cloud");
16
- var CloudResourceStatus;
17
- (function (CloudResourceStatus) {
18
- CloudResourceStatus["Allocated"] = "allocated";
19
- CloudResourceStatus["Available"] = "available";
20
- CloudResourceStatus["Creating"] = "creating";
21
- CloudResourceStatus["Created"] = "created";
22
- CloudResourceStatus["Allocating"] = "allocating";
23
- CloudResourceStatus["Error"] = "error";
24
- CloudResourceStatus["Terminating"] = "terminating";
25
- CloudResourceStatus["Terminated"] = "terminated";
26
- })(CloudResourceStatus || (exports.CloudResourceStatus = CloudResourceStatus = {}));
27
- var CloudPoolStatus;
28
- (function (CloudPoolStatus) {
29
- CloudPoolStatus["Active"] = "active";
30
- CloudPoolStatus["Created"] = "created";
31
- CloudPoolStatus["Scaling"] = "scaling";
32
- CloudPoolStatus["Terminated"] = "terminated";
33
- })(CloudPoolStatus || (exports.CloudPoolStatus = CloudPoolStatus = {}));
34
- class PoolScaleConfiguration {
35
- }
36
- exports.PoolScaleConfiguration = PoolScaleConfiguration;
37
- __decorate([
38
- (0, class_validator_1.IsNumber)(),
39
- __metadata("design:type", Number)
40
- ], PoolScaleConfiguration.prototype, "size", void 0);
41
- var CloudPoolType;
42
- (function (CloudPoolType) {
43
- CloudPoolType["GAME"] = "game";
44
- CloudPoolType["MACHINE"] = "machine";
45
- })(CloudPoolType || (exports.CloudPoolType = CloudPoolType = {}));
46
- class BaseCloudPoolConfiguration {
47
- }
48
- exports.BaseCloudPoolConfiguration = BaseCloudPoolConfiguration;
49
- __decorate([
50
- (0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
51
- __metadata("design:type", String)
52
- ], BaseCloudPoolConfiguration.prototype, "cloudProvider", void 0);
53
- __decorate([
54
- (0, class_validator_1.IsUUID)(),
55
- __metadata("design:type", String)
56
- ], BaseCloudPoolConfiguration.prototype, "poolId", void 0);
57
- __decorate([
58
- (0, decorators_1.ValidateNestedType)(() => PoolScaleConfiguration),
59
- __metadata("design:type", PoolScaleConfiguration)
60
- ], BaseCloudPoolConfiguration.prototype, "poolScaleConfiguration", void 0);
61
- __decorate([
62
- (0, class_validator_1.IsEnum)(CloudPoolType),
63
- __metadata("design:type", String)
64
- ], BaseCloudPoolConfiguration.prototype, "type", void 0);
65
- class GamePoolConfiguration extends BaseCloudPoolConfiguration {
66
- }
67
- exports.GamePoolConfiguration = GamePoolConfiguration;
68
- __decorate([
69
- (0, class_validator_1.IsEnum)(CloudPoolType),
70
- __metadata("design:type", String)
71
- ], GamePoolConfiguration.prototype, "type", void 0);
72
- __decorate([
73
- (0, class_validator_1.IsUUID)(),
74
- __metadata("design:type", String)
75
- ], GamePoolConfiguration.prototype, "gameId", void 0);
76
- __decorate([
77
- (0, class_validator_1.IsUUID)(),
78
- __metadata("design:type", String)
79
- ], GamePoolConfiguration.prototype, "machinePoolId", void 0);
80
- class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
81
- }
82
- exports.MachinePoolConfiguration = MachinePoolConfiguration;
83
- __decorate([
84
- (0, class_validator_1.IsEnum)(CloudPoolType),
85
- __metadata("design:type", String)
86
- ], MachinePoolConfiguration.prototype, "type", void 0);
87
- class BaseCloudResource {
88
- }
89
- exports.BaseCloudResource = BaseCloudResource;
90
- __decorate([
91
- (0, class_validator_1.IsUUID)(),
92
- __metadata("design:type", String)
93
- ], BaseCloudResource.prototype, "id", void 0);
94
- __decorate([
95
- (0, class_validator_1.IsEnum)(CloudResourceStatus),
96
- __metadata("design:type", String)
97
- ], BaseCloudResource.prototype, "status", void 0);
98
- __decorate([
99
- (0, class_validator_1.IsNumber)(),
100
- __metadata("design:type", Number)
101
- ], BaseCloudResource.prototype, "createdAt", void 0);
102
- __decorate([
103
- (0, class_validator_1.IsNumber)(),
104
- (0, class_validator_1.IsOptional)(),
105
- __metadata("design:type", Number)
106
- ], BaseCloudResource.prototype, "updatedAt", void 0);
107
- __decorate([
108
- (0, decorators_1.ValidateNestedType)(() => cloud_1.AWSResourceProviderSettings),
109
- __metadata("design:type", cloud_1.AWSResourceProviderSettings)
110
- ], BaseCloudResource.prototype, "settings", void 0);
111
- class MachineCloudResource extends BaseCloudResource {
112
- }
113
- exports.MachineCloudResource = MachineCloudResource;
114
- class GameCloudResource extends BaseCloudResource {
115
- }
116
- exports.GameCloudResource = GameCloudResource;
117
- __decorate([
118
- (0, class_validator_1.IsString)(),
119
- (0, class_validator_1.IsOptional)(),
120
- __metadata("design:type", String)
121
- ], GameCloudResource.prototype, "machineResourceId", void 0);
122
- class CloudPool {
123
- }
124
- exports.CloudPool = CloudPool;
125
- //# sourceMappingURL=pools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v3/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAMyB;AAEzB,iDAAsD;AACtD,mCAIiB;AAEjB,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,gDAAyB,CAAA;AAC3B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AACD,MAAa,sBAAsB;CAGlC;AAHD,wDAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAGf,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,MAAa,0BAA0B;CActC;AAdD,gEAcC;AAVC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;iEACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;0DACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;0EAAC;AAG/C;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;wDACF;AAGtB,MAAa,qBAAsB,SAAQ,0BAA0B;CASpE;AATD,sDASC;AAPC;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;mDACG;AAGzB;IADC,IAAA,wBAAM,GAAE;;qDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;4DACa;AAGxB,MAAa,wBAAyB,SAAQ,0BAA0B;CAGvE;AAHD,4DAGC;AADC;IADC,IAAA,wBAAM,EAAC,aAAa,CAAC;;sDACM;AAY9B,MAAa,iBAAiB;CAgB7B;AAhBD,8CAgBC;AAdC;IADC,IAAA,wBAAM,GAAE;;6CACE;AAGX;IADC,IAAA,wBAAM,EAAC,mBAAmB,CAAC;;iDACA;AAG5B;IADC,IAAA,0BAAQ,GAAE;;oDACO;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACM;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BAC3C,mCAA2B;mDAAC;AAGzC,MAAa,oBAAqB,SAAQ,iBAAiB;CAAG;AAA9D,oDAA8D;AAE9D,MAAa,iBAAkB,SAAQ,iBAAiB;CAIvD;AAJD,8CAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACc;AAgB7B,MAAa,SAAS;CAOrB;AAPD,8BAOC"}