@ludeo/cloud-common 1.1.62 → 1.1.64
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/v3/contexts/getCloudContextType.d.ts +1 -1
- package/dist/v3/events/game-resource-terminated-response.d.ts +5 -5
- package/dist/v3/events/game-resource-terminated-response.js +9 -9
- package/dist/v3/events/game-resource-terminated-response.js.map +1 -1
- package/dist/v3/events/game-resource-termination-failed-response.d.ts +2 -2
- package/dist/v3/events/game-resource-termination-failed-response.js +2 -2
- package/dist/v3/events/game-resource-termination-failed-response.js.map +1 -1
- package/dist/v3/events/game-terminated-response.d.ts +5 -5
- package/dist/v3/events/game-terminated-response.js +5 -5
- package/dist/v3/events/game-terminated-response.js.map +1 -1
- package/dist/v3/events/game-termination-failed-response.d.ts +13 -0
- package/dist/v3/events/game-termination-failed-response.js +49 -0
- package/dist/v3/events/game-termination-failed-response.js.map +1 -0
- package/dist/v3/events/index.d.ts +6 -3
- package/dist/v3/events/index.js +6 -3
- package/dist/v3/events/index.js.map +1 -1
- package/dist/v3/events/prepare-cloud-machine-auth-failed.d.ts +2 -2
- package/dist/v3/events/prepare-cloud-machine-auth-failed.js +2 -2
- package/dist/v3/events/prepare-cloud-machine-auth-failed.js.map +1 -1
- package/dist/v3/events/terminate-game-request.d.ts +12 -0
- package/dist/v3/events/terminate-game-request.js +45 -0
- package/dist/v3/events/terminate-game-request.js.map +1 -0
- package/dist/v3/events/terminate-game-resource-request.d.ts +2 -2
- package/dist/v3/events/terminate-game-resource-request.js +2 -2
- package/dist/v3/events/terminate-game-resource-request.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/events/game-resource-terminated-response.ts +11 -7
- package/src/v3/events/game-resource-termination-failed-response.ts +7 -3
- package/src/v3/events/game-terminated-response.ts +32 -0
- package/src/v3/events/game-termination-failed-response.ts +35 -0
- package/src/v3/events/index.ts +6 -3
- package/src/v3/events/prepare-cloud-machine-auth-failed.ts +8 -4
- package/src/v3/events/terminate-game-request.ts +32 -0
- package/src/v3/events/terminate-game-resource-request.ts +7 -3
- package/dist/v3/events/game-status-changed.d.ts +0 -16
- package/dist/v3/events/game-status-changed.js +0 -59
- package/dist/v3/events/game-status-changed.js.map +0 -1
- package/dist/v3/events/monitor-game-task.d.ts +0 -14
- package/dist/v3/events/monitor-game-task.js +0 -48
- package/dist/v3/events/monitor-game-task.js.map +0 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
2
2
|
import { LudeoEvent } from "../../infra";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CloudResourceContext,
|
|
5
|
+
CloudSessionContext,
|
|
6
|
+
getCloudContextType,
|
|
7
|
+
} from "../contexts";
|
|
4
8
|
import { IsOptional, IsString } from "class-validator";
|
|
5
9
|
|
|
6
10
|
export class PrepareCloudMachineAuthFailedPayload {
|
|
@@ -14,7 +18,7 @@ export class PrepareCloudMachineAuthFailed extends LudeoEvent {
|
|
|
14
18
|
|
|
15
19
|
constructor(
|
|
16
20
|
payload: PrepareCloudMachineAuthFailedPayload,
|
|
17
|
-
context: CloudResourceContext
|
|
21
|
+
context: CloudResourceContext
|
|
18
22
|
) {
|
|
19
23
|
super(PrepareCloudMachineAuthFailed.EVENT_NAME);
|
|
20
24
|
this.payload = payload;
|
|
@@ -24,6 +28,6 @@ export class PrepareCloudMachineAuthFailed extends LudeoEvent {
|
|
|
24
28
|
@ValidateNestedType(() => PrepareCloudMachineAuthFailedPayload)
|
|
25
29
|
payload: PrepareCloudMachineAuthFailedPayload;
|
|
26
30
|
|
|
27
|
-
@ValidateNestedType(
|
|
28
|
-
context: CloudResourceContext;
|
|
31
|
+
@ValidateNestedType(getCloudContextType)
|
|
32
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
29
33
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudSessionContext } from "../contexts";
|
|
4
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
+
|
|
7
|
+
export class TerminateGameRequestPayload {
|
|
8
|
+
@IsUUID()
|
|
9
|
+
gamePoolId: string;
|
|
10
|
+
|
|
11
|
+
@IsUUID()
|
|
12
|
+
gameResourceId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class TerminateGameRequest extends LudeoEvent {
|
|
16
|
+
static readonly EVENT_NAME = "cloud-session-allocator.terminate-game-request";
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
payload: TerminateGameRequestPayload,
|
|
20
|
+
context: CloudSessionContext
|
|
21
|
+
) {
|
|
22
|
+
super(TerminateGameRequest.EVENT_NAME);
|
|
23
|
+
this.payload = payload;
|
|
24
|
+
this.context = context;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@ValidateNestedType(() => CloudSessionContext)
|
|
28
|
+
context: CloudSessionContext;
|
|
29
|
+
|
|
30
|
+
@ValidateNestedType(() => TerminateGameRequestPayload)
|
|
31
|
+
payload: TerminateGameRequestPayload;
|
|
32
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { IsUUID, IsBoolean, IsOptional, IsEnum } from "class-validator";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CloudResourceContext,
|
|
5
|
+
CloudSessionContext,
|
|
6
|
+
getCloudContextType,
|
|
7
|
+
} from "../contexts";
|
|
4
8
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
9
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
10
|
import {
|
|
@@ -44,8 +48,8 @@ export class TerminateGameResourceRequest extends LudeoEvent {
|
|
|
44
48
|
this.context = context;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
@ValidateNestedType(
|
|
48
|
-
context: CloudSessionContext;
|
|
51
|
+
@ValidateNestedType(getCloudContextType)
|
|
52
|
+
context: CloudSessionContext | CloudResourceContext;
|
|
49
53
|
|
|
50
54
|
@ValidateNestedType(() => TerminateGameResourceRequestPayload)
|
|
51
55
|
payload: TerminateGameResourceRequestPayload;
|
|
@@ -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,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"}
|