@ludeo/cloud-common 1.2.77 → 1.2.78
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/build-artifacts-job-failed.d.ts +13 -0
- package/dist/v4/events/{build-distribution-failed-response.js → build-artifacts-job-failed.js} +14 -14
- package/dist/v4/events/build-artifacts-job-failed.js.map +1 -0
- package/dist/v4/events/build-artifacts-job-finished.d.ts +15 -0
- package/dist/v4/events/{build-distributed-successfully.js → build-artifacts-job-finished.js} +16 -16
- package/dist/v4/events/build-artifacts-job-finished.js.map +1 -0
- package/dist/v4/events/build-created.d.ts +11 -0
- package/dist/v4/events/build-created.js +41 -0
- package/dist/v4/events/build-created.js.map +1 -0
- package/dist/v4/events/build-distributed.d.ts +11 -0
- package/dist/v4/events/build-distributed.js +41 -0
- package/dist/v4/events/build-distributed.js.map +1 -0
- package/dist/v4/events/{build-distribution-failed-response.d.ts → build-distribution-job-failed.d.ts} +5 -5
- package/dist/v4/events/build-distribution-job-failed.js +46 -0
- package/dist/v4/events/build-distribution-job-failed.js.map +1 -0
- package/dist/v4/events/build-distribution-job-finished.d.ts +14 -0
- package/dist/v4/events/build-distribution-job-finished.js +50 -0
- package/dist/v4/events/build-distribution-job-finished.js.map +1 -0
- package/dist/v4/events/create-build-artifacts-job.d.ts +14 -0
- package/dist/v4/events/create-build-artifacts-job.js +47 -0
- package/dist/v4/events/create-build-artifacts-job.js.map +1 -0
- package/dist/v4/events/{distribute-build-request.d.ts → distribute-build-job.d.ts} +5 -5
- package/dist/v4/events/{distribute-build-request.js → distribute-build-job.js} +14 -14
- package/dist/v4/events/distribute-build-job.js.map +1 -0
- package/dist/v4/events/index.d.ts +8 -3
- package/dist/v4/events/index.js +8 -3
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/types/build.d.ts +36 -24
- package/dist/v4/types/build.js +31 -5
- package/dist/v4/types/build.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/build-artifacts-job-failed.ts +29 -0
- package/src/v4/events/build-artifacts-job-finished.ts +36 -0
- package/src/v4/events/build-created.ts +25 -0
- package/src/v4/events/build-distributed.ts +25 -0
- package/src/v4/events/{build-distribution-failed-response.ts → build-distribution-job-failed.ts} +7 -8
- package/src/v4/events/build-distribution-job-finished.ts +35 -0
- package/src/v4/events/create-build-artifacts-job.ts +30 -0
- package/src/v4/events/{distribute-build-request.ts → distribute-build-job.ts} +7 -7
- package/src/v4/events/index.ts +8 -3
- package/src/v4/types/build.ts +38 -25
- package/dist/v4/events/build-distributed-successfully.d.ts +0 -15
- package/dist/v4/events/build-distributed-successfully.js.map +0 -1
- package/dist/v4/events/build-distribution-failed-response.js.map +0 -1
- package/dist/v4/events/distribute-build-request.js.map +0 -1
- package/src/v4/events/build-distributed-successfully.ts +0 -36
package/dist/v4/types/build.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ export declare enum BuildStatus {
|
|
|
5
5
|
DISTRIBUTING = "distributing",
|
|
6
6
|
DISTRIBUTED = "distributed",
|
|
7
7
|
FAILED = "failed",
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
CREATING_ARTIFACTS = "creating-artifacts",
|
|
9
|
+
ARTIFACTS_CREATED = "artifacts-created",
|
|
10
|
+
ASSIGNED = "assigned"
|
|
10
11
|
}
|
|
11
12
|
export declare enum DistributionStatus {
|
|
12
13
|
DISTRIBUTING = "distributing",
|
|
@@ -16,43 +17,38 @@ export declare enum ArtifactStatus {
|
|
|
16
17
|
CREATING = "creating",
|
|
17
18
|
CREATED = "created"
|
|
18
19
|
}
|
|
19
|
-
export
|
|
20
|
+
export declare class BuildMetadata {
|
|
20
21
|
studioId: string;
|
|
21
22
|
gameId: string;
|
|
22
23
|
versionId: string;
|
|
23
24
|
friendlyName?: string;
|
|
24
|
-
}
|
|
25
|
-
export
|
|
25
|
+
}
|
|
26
|
+
export declare class AwsArtifactData {
|
|
26
27
|
basePath: string;
|
|
27
28
|
executeableLaunchPath: string;
|
|
28
29
|
runtimeEnvironment: string;
|
|
29
30
|
applicationName: string;
|
|
30
31
|
applicationIdentifier?: string;
|
|
31
32
|
status?: ArtifactStatus;
|
|
32
|
-
}
|
|
33
|
-
export
|
|
33
|
+
}
|
|
34
|
+
export declare class AwsDistributionData {
|
|
34
35
|
path: string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export type AwsDistributions = {
|
|
36
|
+
}
|
|
37
|
+
export declare class AwsDistributions {
|
|
38
38
|
[region: string]: AwsDistributionData;
|
|
39
|
-
}
|
|
40
|
-
export type
|
|
39
|
+
}
|
|
40
|
+
export type Distributions = AwsDistributions;
|
|
41
|
+
export declare class AwsArtifacts {
|
|
41
42
|
[region: string]: AwsArtifactData;
|
|
42
|
-
}
|
|
43
|
-
export type Artifacts =
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
export type Distributions = {
|
|
47
|
-
[CloudProvider.AWS]: AwsDistributions;
|
|
48
|
-
};
|
|
49
|
-
export type BuildProviderSettings = {
|
|
43
|
+
}
|
|
44
|
+
export type Artifacts = AwsArtifacts;
|
|
45
|
+
export declare class BuildProviderSettings {
|
|
50
46
|
[CloudProvider.AWS]: {
|
|
51
47
|
status?: BuildStatus;
|
|
52
48
|
artifacts?: AwsArtifacts;
|
|
53
49
|
distributions?: AwsDistributions;
|
|
54
50
|
};
|
|
55
|
-
}
|
|
51
|
+
}
|
|
56
52
|
export declare class CloudBuild {
|
|
57
53
|
id: string;
|
|
58
54
|
createdAt: number;
|
|
@@ -60,9 +56,25 @@ export declare class CloudBuild {
|
|
|
60
56
|
status: BuildStatus;
|
|
61
57
|
centralizedPath?: string;
|
|
62
58
|
meta?: BuildMetadata;
|
|
59
|
+
creationInput?: BuildCreationInput;
|
|
63
60
|
providers?: Partial<BuildProviderSettings>;
|
|
64
61
|
}
|
|
65
|
-
export declare class
|
|
66
|
-
|
|
62
|
+
export declare class BuildCreationInput {
|
|
63
|
+
applicationName: string;
|
|
64
|
+
basePath: string;
|
|
65
|
+
executeableLaunchPath: string;
|
|
66
|
+
runtimeEnvironment: RuntimeEnvironment;
|
|
67
|
+
logPath?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare enum RuntimeEnvironment {
|
|
70
|
+
WINDOWS = "windows",
|
|
71
|
+
NVIDIA_ULTRA = "nvidiaUltra",
|
|
72
|
+
NVIDIA_HIGH = "nvidiaHigh"
|
|
73
|
+
}
|
|
74
|
+
export interface RuntimeEnvironmentConfigurationMap {
|
|
75
|
+
streamClass: string;
|
|
76
|
+
runtimeEnvironment: {
|
|
77
|
+
Type: string;
|
|
78
|
+
Version: string;
|
|
79
|
+
};
|
|
67
80
|
}
|
|
68
|
-
export type DistributorResponse = AwsDistributorResponse;
|
package/dist/v4/types/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RuntimeEnvironment = exports.BuildCreationInput = exports.CloudBuild = exports.BuildProviderSettings = exports.AwsArtifacts = exports.AwsDistributions = exports.AwsDistributionData = exports.AwsArtifactData = exports.BuildMetadata = exports.ArtifactStatus = exports.DistributionStatus = exports.BuildStatus = void 0;
|
|
4
4
|
const cloud_1 = require("./cloud");
|
|
5
5
|
var BuildStatus;
|
|
6
6
|
(function (BuildStatus) {
|
|
@@ -9,8 +9,9 @@ var BuildStatus;
|
|
|
9
9
|
BuildStatus["DISTRIBUTING"] = "distributing";
|
|
10
10
|
BuildStatus["DISTRIBUTED"] = "distributed";
|
|
11
11
|
BuildStatus["FAILED"] = "failed";
|
|
12
|
-
BuildStatus["
|
|
13
|
-
BuildStatus["
|
|
12
|
+
BuildStatus["CREATING_ARTIFACTS"] = "creating-artifacts";
|
|
13
|
+
BuildStatus["ARTIFACTS_CREATED"] = "artifacts-created";
|
|
14
|
+
BuildStatus["ASSIGNED"] = "assigned";
|
|
14
15
|
})(BuildStatus || (exports.BuildStatus = BuildStatus = {}));
|
|
15
16
|
var DistributionStatus;
|
|
16
17
|
(function (DistributionStatus) {
|
|
@@ -22,10 +23,35 @@ var ArtifactStatus;
|
|
|
22
23
|
ArtifactStatus["CREATING"] = "creating";
|
|
23
24
|
ArtifactStatus["CREATED"] = "created";
|
|
24
25
|
})(ArtifactStatus || (exports.ArtifactStatus = ArtifactStatus = {}));
|
|
26
|
+
class BuildMetadata {
|
|
27
|
+
}
|
|
28
|
+
exports.BuildMetadata = BuildMetadata;
|
|
29
|
+
class AwsArtifactData {
|
|
30
|
+
}
|
|
31
|
+
exports.AwsArtifactData = AwsArtifactData;
|
|
32
|
+
class AwsDistributionData {
|
|
33
|
+
}
|
|
34
|
+
exports.AwsDistributionData = AwsDistributionData;
|
|
35
|
+
class AwsDistributions {
|
|
36
|
+
}
|
|
37
|
+
exports.AwsDistributions = AwsDistributions;
|
|
38
|
+
class AwsArtifacts {
|
|
39
|
+
}
|
|
40
|
+
exports.AwsArtifacts = AwsArtifacts;
|
|
41
|
+
class BuildProviderSettings {
|
|
42
|
+
}
|
|
43
|
+
exports.BuildProviderSettings = BuildProviderSettings;
|
|
44
|
+
cloud_1.CloudProvider.AWS;
|
|
25
45
|
class CloudBuild {
|
|
26
46
|
}
|
|
27
47
|
exports.CloudBuild = CloudBuild;
|
|
28
|
-
class
|
|
48
|
+
class BuildCreationInput {
|
|
29
49
|
}
|
|
30
|
-
exports.
|
|
50
|
+
exports.BuildCreationInput = BuildCreationInput;
|
|
51
|
+
var RuntimeEnvironment;
|
|
52
|
+
(function (RuntimeEnvironment) {
|
|
53
|
+
RuntimeEnvironment["WINDOWS"] = "windows";
|
|
54
|
+
RuntimeEnvironment["NVIDIA_ULTRA"] = "nvidiaUltra";
|
|
55
|
+
RuntimeEnvironment["NVIDIA_HIGH"] = "nvidiaHigh";
|
|
56
|
+
})(RuntimeEnvironment || (exports.RuntimeEnvironment = RuntimeEnvironment = {}));
|
|
31
57
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/v4/types/build.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAExC,IAAY,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/v4/types/build.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAExC,IAAY,WASX;AATD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;IACjB,wDAAyC,CAAA;IACzC,sDAAuC,CAAA;IACvC,oCAAqB,CAAA;AACvB,CAAC,EATW,WAAW,2BAAX,WAAW,QAStB;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,mDAA6B,CAAA;IAC7B,iDAA2B,CAAA;AAC7B,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,qCAAmB,CAAA;AACrB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,MAAa,aAAa;CAKzB;AALD,sCAKC;AAED,MAAa,eAAe;CAO3B;AAPD,0CAOC;AAED,MAAa,mBAAmB;CAE/B;AAFD,kDAEC;AAED,MAAa,gBAAgB;CAE5B;AAFD,4CAEC;AAID,MAAa,YAAY;CAExB;AAFD,oCAEC;AAID,MAAa,qBAAqB;CAMjC;AAND,sDAMC;AALE,qBAAa,CAAC,GAAG;AAOpB,MAAa,UAAU;CAStB;AATD,gCASC;AAED,MAAa,kBAAkB;CAM9B;AAND,gDAMC;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,kDAA4B,CAAA;IAC5B,gDAA0B,CAAA;AAC5B,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
+
import { CloudProvider } from "../types";
|
|
3
|
+
import { BuildContext } from "../contexts/build-context";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
6
|
+
|
|
7
|
+
export class BuildArtifactsJobFailedPayload {
|
|
8
|
+
@IsEnum(CloudProvider)
|
|
9
|
+
cloudProvider: CloudProvider;
|
|
10
|
+
|
|
11
|
+
@IsUUID()
|
|
12
|
+
buildId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class BuildArtifactsJobFailed extends LudeoEvent {
|
|
16
|
+
static readonly EVENT_NAME = "cloud-builds.build-artifacts-job-failed";
|
|
17
|
+
|
|
18
|
+
constructor(payload: BuildArtifactsJobFailedPayload, context: BuildContext) {
|
|
19
|
+
super(BuildArtifactsJobFailed.EVENT_NAME);
|
|
20
|
+
this.payload = payload;
|
|
21
|
+
this.context = context;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@ValidateNestedType(() => BuildContext)
|
|
25
|
+
context: BuildContext;
|
|
26
|
+
|
|
27
|
+
@ValidateNestedType(() => BuildArtifactsJobFailedPayload)
|
|
28
|
+
payload: BuildArtifactsJobFailedPayload;
|
|
29
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
+
import { BuildContext } from "../contexts/build-context";
|
|
3
|
+
import { CloudProvider } from "../types";
|
|
4
|
+
import { Artifacts, AwsArtifacts } from "../types/build";
|
|
5
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
7
|
+
|
|
8
|
+
export class BuildArtifactsJobFinishedPayload {
|
|
9
|
+
@IsEnum(CloudProvider)
|
|
10
|
+
cloudProvider: CloudProvider;
|
|
11
|
+
|
|
12
|
+
@ValidateNestedType(() => AwsArtifacts)
|
|
13
|
+
artifacts: Artifacts;
|
|
14
|
+
|
|
15
|
+
@IsUUID()
|
|
16
|
+
buildId: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class BuildArtifactsJobFinished extends LudeoEvent {
|
|
20
|
+
static readonly EVENT_NAME = "cloud-builds.build-artifacts-job-finished";
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
payload: BuildArtifactsJobFinishedPayload,
|
|
24
|
+
context: BuildContext
|
|
25
|
+
) {
|
|
26
|
+
super(BuildArtifactsJobFinished.EVENT_NAME);
|
|
27
|
+
this.payload = payload;
|
|
28
|
+
this.context = context;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@ValidateNestedType(() => BuildContext)
|
|
32
|
+
context: BuildContext;
|
|
33
|
+
|
|
34
|
+
@ValidateNestedType(() => BuildArtifactsJobFinishedPayload)
|
|
35
|
+
payload: BuildArtifactsJobFinishedPayload;
|
|
36
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
import { BuildContext } from "../contexts/build-context";
|
|
3
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
|
+
|
|
6
|
+
export class BuildCreatedPayload {
|
|
7
|
+
@IsUUID()
|
|
8
|
+
buildId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class BuildCreated extends LudeoEvent {
|
|
12
|
+
static readonly EVENT_NAME = "cloud-builds.build-created";
|
|
13
|
+
|
|
14
|
+
constructor(payload: BuildCreatedPayload, context: BuildContext) {
|
|
15
|
+
super(BuildCreated.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
this.context = context;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@ValidateNestedType(() => BuildContext)
|
|
21
|
+
context: BuildContext;
|
|
22
|
+
|
|
23
|
+
@ValidateNestedType(() => BuildCreatedPayload)
|
|
24
|
+
payload: BuildCreatedPayload;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
import { BuildContext } from "../contexts/build-context";
|
|
3
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
|
+
|
|
6
|
+
export class BuildDistributedPayload {
|
|
7
|
+
@IsUUID()
|
|
8
|
+
buildId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class BuildDistributed extends LudeoEvent {
|
|
12
|
+
static readonly EVENT_NAME = "cloud-builds.build-distributed";
|
|
13
|
+
|
|
14
|
+
constructor(payload: BuildDistributedPayload, context: BuildContext) {
|
|
15
|
+
super(BuildDistributed.EVENT_NAME);
|
|
16
|
+
this.payload = payload;
|
|
17
|
+
this.context = context;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@ValidateNestedType(() => BuildContext)
|
|
21
|
+
context: BuildContext;
|
|
22
|
+
|
|
23
|
+
@ValidateNestedType(() => BuildDistributedPayload)
|
|
24
|
+
payload: BuildDistributedPayload;
|
|
25
|
+
}
|
package/src/v4/events/{build-distribution-failed-response.ts → build-distribution-job-failed.ts}
RENAMED
|
@@ -4,7 +4,7 @@ import { BuildContext } from "../contexts/build-context";
|
|
|
4
4
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
5
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class BuildDistributionJobFailedPayload {
|
|
8
8
|
@IsEnum(CloudProvider)
|
|
9
9
|
cloudProvider: CloudProvider;
|
|
10
10
|
|
|
@@ -12,15 +12,14 @@ export class BuildDistributionFailedResponsePayload {
|
|
|
12
12
|
buildId: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export class
|
|
16
|
-
static readonly EVENT_NAME =
|
|
17
|
-
"cloud-builds.build-distribution-failed-response";
|
|
15
|
+
export class BuildDistributionJobFailed extends LudeoEvent {
|
|
16
|
+
static readonly EVENT_NAME = "cloud-builds.build-distribution-job-failed";
|
|
18
17
|
|
|
19
18
|
constructor(
|
|
20
|
-
payload:
|
|
19
|
+
payload: BuildDistributionJobFailedPayload,
|
|
21
20
|
context: BuildContext
|
|
22
21
|
) {
|
|
23
|
-
super(
|
|
22
|
+
super(BuildDistributionJobFailed.EVENT_NAME);
|
|
24
23
|
this.payload = payload;
|
|
25
24
|
this.context = context;
|
|
26
25
|
}
|
|
@@ -28,6 +27,6 @@ export class BuildDistributionFailedResponse extends LudeoEvent {
|
|
|
28
27
|
@ValidateNestedType(() => BuildContext)
|
|
29
28
|
context: BuildContext;
|
|
30
29
|
|
|
31
|
-
@ValidateNestedType(() =>
|
|
32
|
-
payload:
|
|
30
|
+
@ValidateNestedType(() => BuildDistributionJobFailedPayload)
|
|
31
|
+
payload: BuildDistributionJobFailedPayload;
|
|
33
32
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
+
import { BuildContext } from "../contexts/build-context";
|
|
3
|
+
import { AwsDistributions, CloudProvider, Distributions } from "../types";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
5
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
6
|
+
|
|
7
|
+
export class BuildDistributionJobFinishedPayload {
|
|
8
|
+
@IsEnum(CloudProvider)
|
|
9
|
+
cloudProvider: CloudProvider;
|
|
10
|
+
|
|
11
|
+
@ValidateNestedType(() => AwsDistributions)
|
|
12
|
+
distributions: Distributions;
|
|
13
|
+
|
|
14
|
+
@IsUUID()
|
|
15
|
+
buildId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class BuildDistributionJobFinished extends LudeoEvent {
|
|
19
|
+
static readonly EVENT_NAME = "cloud-builds.build-distribution-job-finished";
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
payload: BuildDistributionJobFinishedPayload,
|
|
23
|
+
context: BuildContext
|
|
24
|
+
) {
|
|
25
|
+
super(BuildDistributionJobFinished.EVENT_NAME);
|
|
26
|
+
this.payload = payload;
|
|
27
|
+
this.context = context;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@ValidateNestedType(() => BuildContext)
|
|
31
|
+
context: BuildContext;
|
|
32
|
+
|
|
33
|
+
@ValidateNestedType(() => BuildDistributionJobFinishedPayload)
|
|
34
|
+
payload: BuildDistributionJobFinishedPayload;
|
|
35
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IsEnum } from "class-validator";
|
|
2
|
+
import { CloudProvider } from "../types";
|
|
3
|
+
import { BuildContext } from "../contexts/build-context";
|
|
4
|
+
import { CloudBuild } from "../types/build";
|
|
5
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
7
|
+
|
|
8
|
+
export class CreateBuildArtifactsJobPayload {
|
|
9
|
+
@ValidateNestedType(() => CloudBuild)
|
|
10
|
+
build: CloudBuild;
|
|
11
|
+
|
|
12
|
+
@IsEnum(CloudProvider)
|
|
13
|
+
cloudProvider: CloudProvider;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class CreateBuildArtifactsJob extends LudeoEvent {
|
|
17
|
+
static readonly EVENT_NAME = "cloud-builds.create-build-artifacts-job";
|
|
18
|
+
|
|
19
|
+
constructor(payload: CreateBuildArtifactsJobPayload, context: BuildContext) {
|
|
20
|
+
super(CreateBuildArtifactsJob.EVENT_NAME);
|
|
21
|
+
this.payload = payload;
|
|
22
|
+
this.context = context;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@ValidateNestedType(() => BuildContext)
|
|
26
|
+
context: BuildContext;
|
|
27
|
+
|
|
28
|
+
@ValidateNestedType(() => CreateBuildArtifactsJobPayload)
|
|
29
|
+
payload: CreateBuildArtifactsJobPayload;
|
|
30
|
+
}
|
|
@@ -5,7 +5,7 @@ import { CloudBuild } from "../types/build";
|
|
|
5
5
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
6
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
7
7
|
|
|
8
|
-
export class
|
|
8
|
+
export class DistributeBuildJobPayload {
|
|
9
9
|
@ValidateNestedType(() => CloudBuild)
|
|
10
10
|
build: CloudBuild;
|
|
11
11
|
|
|
@@ -13,11 +13,11 @@ export class DistributeBuildRequestPayload {
|
|
|
13
13
|
cloudProvider: CloudProvider;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export class
|
|
17
|
-
static readonly EVENT_NAME = "cloud-builds.distribute-build-
|
|
16
|
+
export class DistributeBuildJob extends LudeoEvent {
|
|
17
|
+
static readonly EVENT_NAME = "cloud-builds.distribute-build-job";
|
|
18
18
|
|
|
19
|
-
constructor(payload:
|
|
20
|
-
super(
|
|
19
|
+
constructor(payload: DistributeBuildJobPayload, context: BuildContext) {
|
|
20
|
+
super(DistributeBuildJob.EVENT_NAME);
|
|
21
21
|
this.payload = payload;
|
|
22
22
|
this.context = context;
|
|
23
23
|
}
|
|
@@ -25,6 +25,6 @@ export class DistributeBuildRequest extends LudeoEvent {
|
|
|
25
25
|
@ValidateNestedType(() => BuildContext)
|
|
26
26
|
context: BuildContext;
|
|
27
27
|
|
|
28
|
-
@ValidateNestedType(() =>
|
|
29
|
-
payload:
|
|
28
|
+
@ValidateNestedType(() => DistributeBuildJobPayload)
|
|
29
|
+
payload: DistributeBuildJobPayload;
|
|
30
30
|
}
|
package/src/v4/events/index.ts
CHANGED
|
@@ -103,6 +103,11 @@ export * from "./terminate-stale-ludeos";
|
|
|
103
103
|
export * from "./terminate-ludeo-request";
|
|
104
104
|
export * from "./ludeo-allocation-timeout-task";
|
|
105
105
|
export * from "./monitor-stream-groups-task";
|
|
106
|
-
export * from "./build-
|
|
107
|
-
export * from "./build-distribution-failed
|
|
108
|
-
export * from "./distribute-build-
|
|
106
|
+
export * from "./build-distribution-job-finished";
|
|
107
|
+
export * from "./build-distribution-job-failed";
|
|
108
|
+
export * from "./distribute-build-job";
|
|
109
|
+
export * from "./create-build-artifacts-job";
|
|
110
|
+
export * from "./build-artifacts-job-finished";
|
|
111
|
+
export * from "./build-artifacts-job-failed";
|
|
112
|
+
export * from "./build-distributed";
|
|
113
|
+
export * from "./build-created";
|
package/src/v4/types/build.ts
CHANGED
|
@@ -6,8 +6,9 @@ export enum BuildStatus {
|
|
|
6
6
|
DISTRIBUTING = "distributing",
|
|
7
7
|
DISTRIBUTED = "distributed",
|
|
8
8
|
FAILED = "failed",
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
CREATING_ARTIFACTS = "creating-artifacts",
|
|
10
|
+
ARTIFACTS_CREATED = "artifacts-created",
|
|
11
|
+
ASSIGNED = "assigned",
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export enum DistributionStatus {
|
|
@@ -20,50 +21,45 @@ export enum ArtifactStatus {
|
|
|
20
21
|
CREATED = "created",
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
export
|
|
24
|
+
export class BuildMetadata {
|
|
24
25
|
studioId: string;
|
|
25
26
|
gameId: string;
|
|
26
27
|
versionId: string;
|
|
27
28
|
friendlyName?: string;
|
|
28
|
-
}
|
|
29
|
+
}
|
|
29
30
|
|
|
30
|
-
export
|
|
31
|
+
export class AwsArtifactData {
|
|
31
32
|
basePath: string;
|
|
32
33
|
executeableLaunchPath: string;
|
|
33
34
|
runtimeEnvironment: string;
|
|
34
35
|
applicationName: string;
|
|
35
36
|
applicationIdentifier?: string;
|
|
36
37
|
status?: ArtifactStatus;
|
|
37
|
-
}
|
|
38
|
+
}
|
|
38
39
|
|
|
39
|
-
export
|
|
40
|
+
export class AwsDistributionData {
|
|
40
41
|
path: string; // URL or path to the build in the specific region
|
|
41
|
-
|
|
42
|
-
};
|
|
42
|
+
}
|
|
43
43
|
|
|
44
|
-
export
|
|
44
|
+
export class AwsDistributions {
|
|
45
45
|
[region: string]: AwsDistributionData;
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
|
|
48
|
-
export type
|
|
49
|
-
[region: string]: AwsArtifactData;
|
|
50
|
-
};
|
|
48
|
+
export type Distributions = AwsDistributions;
|
|
51
49
|
|
|
52
|
-
export
|
|
53
|
-
[
|
|
54
|
-
}
|
|
50
|
+
export class AwsArtifacts {
|
|
51
|
+
[region: string]: AwsArtifactData;
|
|
52
|
+
}
|
|
55
53
|
|
|
56
|
-
export type
|
|
57
|
-
[CloudProvider.AWS]: AwsDistributions;
|
|
58
|
-
};
|
|
54
|
+
export type Artifacts = AwsArtifacts;
|
|
59
55
|
|
|
60
|
-
export
|
|
56
|
+
export class BuildProviderSettings {
|
|
61
57
|
[CloudProvider.AWS]: {
|
|
62
58
|
status?: BuildStatus;
|
|
63
59
|
artifacts?: AwsArtifacts;
|
|
64
60
|
distributions?: AwsDistributions;
|
|
65
61
|
};
|
|
66
|
-
}
|
|
62
|
+
}
|
|
67
63
|
|
|
68
64
|
export class CloudBuild {
|
|
69
65
|
id: string;
|
|
@@ -72,11 +68,28 @@ export class CloudBuild {
|
|
|
72
68
|
status: BuildStatus;
|
|
73
69
|
centralizedPath?: string;
|
|
74
70
|
meta?: BuildMetadata;
|
|
71
|
+
creationInput?: BuildCreationInput;
|
|
75
72
|
providers?: Partial<BuildProviderSettings>;
|
|
76
73
|
}
|
|
77
74
|
|
|
78
|
-
export class
|
|
79
|
-
|
|
75
|
+
export class BuildCreationInput {
|
|
76
|
+
applicationName: string;
|
|
77
|
+
basePath: string;
|
|
78
|
+
executeableLaunchPath: string;
|
|
79
|
+
runtimeEnvironment: RuntimeEnvironment;
|
|
80
|
+
logPath?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export enum RuntimeEnvironment {
|
|
84
|
+
WINDOWS = "windows",
|
|
85
|
+
NVIDIA_ULTRA = "nvidiaUltra",
|
|
86
|
+
NVIDIA_HIGH = "nvidiaHigh",
|
|
80
87
|
}
|
|
81
88
|
|
|
82
|
-
export
|
|
89
|
+
export interface RuntimeEnvironmentConfigurationMap {
|
|
90
|
+
streamClass: string;
|
|
91
|
+
runtimeEnvironment: {
|
|
92
|
+
Type: string;
|
|
93
|
+
Version: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BuildContext } from "../contexts/build-context";
|
|
2
|
-
import { CloudProvider } from "../types";
|
|
3
|
-
import { DistributorResponse } from "../types/build";
|
|
4
|
-
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
|
-
export declare class BuildDistributedSuccessfullyPayload {
|
|
6
|
-
cloudProvider: CloudProvider;
|
|
7
|
-
distributorResponse: DistributorResponse;
|
|
8
|
-
buildId: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class BuildDistributedSuccessfully extends LudeoEvent {
|
|
11
|
-
static readonly EVENT_NAME = "cloud-builds.build-distributed-successfully";
|
|
12
|
-
constructor(payload: BuildDistributedSuccessfullyPayload, context: BuildContext);
|
|
13
|
-
context: BuildContext;
|
|
14
|
-
payload: BuildDistributedSuccessfullyPayload;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-distributed-successfully.js","sourceRoot":"","sources":["../../../src/v4/events/build-distributed-successfully.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,6DAAyD;AACzD,oCAAyC;AACzC,0CAA6E;AAC7E,oGAAqF;AACrF,yDAAqD;AAErD,MAAa,mCAAmC;CAS/C;AATD,kFASC;AAPC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0EACO;AAG7B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,8BAAsB,CAAC;;gFACR;AAGzC;IADC,IAAA,wBAAM,GAAE;;oEACO;AAGlB,MAAa,4BAA6B,SAAQ,wBAAU;IAG1D,YACE,OAA4C,EAC5C,OAAqB;QAErB,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,oEAiBC;AAhBiB,uCAAU,GAAG,6CAA6C,CAAC;AAY3E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;8BAC9B,4BAAY;6DAAC;AAGtB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,mCAAmC,CAAC;8BACrD,mCAAmC;6DAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-distribution-failed-response.js","sourceRoot":"","sources":["../../../src/v4/events/build-distribution-failed-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,oCAAyC;AACzC,6DAAyD;AACzD,oGAAqF;AACrF,yDAAqD;AAErD,MAAa,sCAAsC;CAMlD;AAND,wFAMC;AAJC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;6EACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;uEACO;AAGlB,MAAa,+BAAgC,SAAQ,wBAAU;IAI7D,YACE,OAA+C,EAC/C,OAAqB;QAErB,KAAK,CAAC,+BAA+B,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,0EAkBC;AAjBiB,0CAAU,GACxB,iDAAiD,CAAC;AAYpD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;8BAC9B,4BAAY;gEAAC;AAGtB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sCAAsC,CAAC;8BACxD,sCAAsC;gEAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"distribute-build-request.js","sourceRoot":"","sources":["../../../src/v4/events/distribute-build-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,oCAAyC;AACzC,6DAAyD;AACzD,0CAA4C;AAC5C,oGAAqF;AACrF,yDAAqD;AAErD,MAAa,6BAA6B;CAMzC;AAND,sEAMC;AAJC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,kBAAU,CAAC;8BAC9B,kBAAU;4DAAC;AAGlB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;oEACO;AAG/B,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YAAY,OAAsC,EAAE,OAAqB;QACvE,KAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,wDAcC;AAbiB,iCAAU,GAAG,uCAAuC,CAAC;AASrE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;8BAC9B,4BAAY;uDAAC;AAGtB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,6BAA6B,CAAC;8BAC/C,6BAA6B;uDAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
-
import { BuildContext } from "../contexts/build-context";
|
|
3
|
-
import { CloudProvider } from "../types";
|
|
4
|
-
import { AwsDistributorResponse, DistributorResponse } from "../types/build";
|
|
5
|
-
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
-
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
7
|
-
|
|
8
|
-
export class BuildDistributedSuccessfullyPayload {
|
|
9
|
-
@IsEnum(CloudProvider)
|
|
10
|
-
cloudProvider: CloudProvider;
|
|
11
|
-
|
|
12
|
-
@ValidateNestedType(() => AwsDistributorResponse)
|
|
13
|
-
distributorResponse: DistributorResponse;
|
|
14
|
-
|
|
15
|
-
@IsUUID()
|
|
16
|
-
buildId: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class BuildDistributedSuccessfully extends LudeoEvent {
|
|
20
|
-
static readonly EVENT_NAME = "cloud-builds.build-distributed-successfully";
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
payload: BuildDistributedSuccessfullyPayload,
|
|
24
|
-
context: BuildContext
|
|
25
|
-
) {
|
|
26
|
-
super(BuildDistributedSuccessfully.EVENT_NAME);
|
|
27
|
-
this.payload = payload;
|
|
28
|
-
this.context = context;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@ValidateNestedType(() => BuildContext)
|
|
32
|
-
context: BuildContext;
|
|
33
|
-
|
|
34
|
-
@ValidateNestedType(() => BuildDistributedSuccessfullyPayload)
|
|
35
|
-
payload: BuildDistributedSuccessfullyPayload;
|
|
36
|
-
}
|