@ludeo/cloud-common 1.2.260 → 1.2.262-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/ludeocast-agent/detect-artifacts-ended.d.ts +12 -0
- package/dist/v4/events/ludeocast-agent/detect-artifacts-ended.js +52 -0
- package/dist/v4/events/ludeocast-agent/detect-artifacts-ended.js.map +1 -0
- package/dist/v4/events/ludeocast-agent/index.d.ts +2 -0
- package/dist/v4/events/ludeocast-agent/index.js +2 -0
- package/dist/v4/events/ludeocast-agent/index.js.map +1 -1
- package/dist/v4/events/ludeocast-agent/save-artifacts-ended.d.ts +11 -0
- package/dist/v4/events/ludeocast-agent/save-artifacts-ended.js +47 -0
- package/dist/v4/events/ludeocast-agent/save-artifacts-ended.js.map +1 -0
- package/dist/v4/events/site-controller/detect-artifacts.command.d.ts +11 -0
- package/dist/v4/events/site-controller/detect-artifacts.command.js +45 -0
- package/dist/v4/events/site-controller/detect-artifacts.command.js.map +1 -0
- package/dist/v4/events/site-controller/index.d.ts +2 -0
- package/dist/v4/events/site-controller/index.js +2 -0
- package/dist/v4/events/site-controller/index.js.map +1 -1
- package/dist/v4/events/site-controller/save-artifacts.command.d.ts +12 -0
- package/dist/v4/events/site-controller/save-artifacts.command.js +47 -0
- package/dist/v4/events/site-controller/save-artifacts.command.js.map +1 -0
- package/dist/v4/types/site-controller/runtime-artifacts.dto.d.ts +13 -5
- package/dist/v4/types/site-controller/runtime-artifacts.dto.js +41 -11
- package/dist/v4/types/site-controller/runtime-artifacts.dto.js.map +1 -1
- package/dist/v4/types/site-controller/types.d.ts +1 -0
- package/dist/v4/types/site-controller/types.js +5 -0
- package/dist/v4/types/site-controller/types.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/ludeocast-agent/detect-artifacts-ended.ts +38 -0
- package/src/v4/events/ludeocast-agent/index.ts +3 -1
- package/src/v4/events/ludeocast-agent/save-artifacts-ended.ts +32 -0
- package/src/v4/events/site-controller/detect-artifacts.command.ts +37 -0
- package/src/v4/events/site-controller/index.ts +2 -0
- package/src/v4/events/site-controller/save-artifacts.command.ts +30 -0
- package/src/v4/types/site-controller/runtime-artifacts.dto.ts +44 -10
- package/src/v4/types/site-controller/types.ts +8 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IsArray, IsString, IsUUID } from 'class-validator';
|
|
2
|
+
import { ValidateNestedType } from '../../../decorators';
|
|
3
|
+
import { BaseCommand, BaseCommandPayload } from '../base/base';
|
|
4
|
+
import { RuntimeArtifactPresignedUploadDto } from '../../types/site-controller/runtime-artifacts.dto';
|
|
5
|
+
|
|
6
|
+
/** Machine-scoped PUT pass: `artifactPrefix` + target `latestVersion` + presigned **`uploads`** per object key. */
|
|
7
|
+
export class SaveArtifactsCommandPayload extends BaseCommandPayload {
|
|
8
|
+
/** Game session this upload pass belongs to (parity with `{@link DetectArtifactsCommandPayload.gameResourceId}`). */
|
|
9
|
+
@IsUUID()
|
|
10
|
+
gameResourceId: string;
|
|
11
|
+
|
|
12
|
+
@IsString()
|
|
13
|
+
artifactPrefix: string;
|
|
14
|
+
|
|
15
|
+
@IsString()
|
|
16
|
+
latestVersion: string;
|
|
17
|
+
|
|
18
|
+
@IsArray()
|
|
19
|
+
@ValidateNestedType(() => RuntimeArtifactPresignedUploadDto)
|
|
20
|
+
uploads: RuntimeArtifactPresignedUploadDto[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class SaveArtifactsCommand extends BaseCommand<SaveArtifactsCommandPayload> {
|
|
24
|
+
@ValidateNestedType(() => SaveArtifactsCommandPayload)
|
|
25
|
+
payload: SaveArtifactsCommandPayload;
|
|
26
|
+
|
|
27
|
+
constructor(payload: SaveArtifactsCommandPayload) {
|
|
28
|
+
super(payload.machineResourceId, 'save-artifacts', payload);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { IsArray, IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsArray, IsObject, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ValidateNestedType } from '../../../decorators/validate-nested-type.decorator';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Single object the client wants PUT URLs for (site-controller → site-adapter HTTP).
|
|
6
|
+
* No URL yet — only key + headers the signer may bind into the signature.
|
|
7
|
+
*/
|
|
8
|
+
export class RuntimeArtifactUploadPresignSpecDto {
|
|
5
9
|
@IsString()
|
|
6
10
|
key: string;
|
|
7
11
|
|
|
12
|
+
/** If set, adapters typically bind this into the presigned PUT; client must repeat on upload. Agent can infer (e.g. `mime`/extension). */
|
|
8
13
|
@IsOptional()
|
|
9
14
|
@IsString()
|
|
10
15
|
contentType?: string;
|
|
16
|
+
|
|
17
|
+
/** Optional custom metadata echoed back when adapters sign with it (S3 / GCS). */
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsObject()
|
|
20
|
+
metadata?: Record<string, string>;
|
|
11
21
|
}
|
|
12
22
|
|
|
13
|
-
/** Full bucket object key paired with a presigned URL (
|
|
23
|
+
/** Full bucket object key paired with a presigned GET URL (`runtimeArtifacts.downloads`). */
|
|
14
24
|
export class ObjectKeyUrlPair {
|
|
15
25
|
@IsString()
|
|
16
26
|
key: string;
|
|
@@ -19,15 +29,39 @@ export class ObjectKeyUrlPair {
|
|
|
19
29
|
url: string;
|
|
20
30
|
}
|
|
21
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Presigned PUT target (adapter reply, MQTT `save-artifacts.uploads`): full key, URL, echoed header binding.
|
|
34
|
+
*/
|
|
35
|
+
export class RuntimeArtifactPresignedUploadDto {
|
|
36
|
+
@IsString()
|
|
37
|
+
key: string;
|
|
38
|
+
|
|
39
|
+
@IsString()
|
|
40
|
+
url: string;
|
|
41
|
+
|
|
42
|
+
/** Echo of spec / signer — agent MUST send matching `Content-Type` on PUT when present. */
|
|
43
|
+
@IsOptional()
|
|
44
|
+
@IsString()
|
|
45
|
+
contentType?: string;
|
|
46
|
+
|
|
47
|
+
@IsOptional()
|
|
48
|
+
@IsObject()
|
|
49
|
+
metadata?: Record<string, string>;
|
|
50
|
+
}
|
|
51
|
+
|
|
22
52
|
export class RuntimeArtifactsDownloadUrlsRequestDto {
|
|
53
|
+
/** Client-relative parent path inside the artifact root (no trailing `latestVersion`; no artifact-folder prefix — adapters add RUNTIME_ARTIFACTS_FOLDER). */
|
|
23
54
|
@IsString()
|
|
24
|
-
|
|
55
|
+
artifactPrefix: string;
|
|
56
|
+
|
|
57
|
+
@IsString()
|
|
58
|
+
latestVersion: string;
|
|
25
59
|
}
|
|
26
60
|
|
|
27
61
|
export class RuntimeArtifactsUploadUrlsRequestDto {
|
|
28
62
|
@IsArray()
|
|
29
|
-
@ValidateNestedType(() =>
|
|
30
|
-
objects:
|
|
63
|
+
@ValidateNestedType(() => RuntimeArtifactUploadPresignSpecDto)
|
|
64
|
+
objects: RuntimeArtifactUploadPresignSpecDto[];
|
|
31
65
|
}
|
|
32
66
|
|
|
33
67
|
export class RuntimeArtifactsDownloadUrlsResponseDto {
|
|
@@ -35,13 +69,13 @@ export class RuntimeArtifactsDownloadUrlsResponseDto {
|
|
|
35
69
|
@ValidateNestedType(() => ObjectKeyUrlPair)
|
|
36
70
|
objects: ObjectKeyUrlPair[];
|
|
37
71
|
|
|
38
|
-
/** Full object key prefix incl. artifact folder,
|
|
72
|
+
/** Full object key prefix incl. artifact folder, **parent only** (matches request `artifactPrefix` + folder; no `latestVersion` segment). */
|
|
39
73
|
@IsString()
|
|
40
74
|
artifactPrefix: string;
|
|
41
75
|
}
|
|
42
76
|
|
|
43
|
-
export class
|
|
77
|
+
export class RuntimeArtifactsUploadsResponseDto {
|
|
44
78
|
@IsArray()
|
|
45
|
-
@ValidateNestedType(() =>
|
|
46
|
-
|
|
79
|
+
@ValidateNestedType(() => RuntimeArtifactPresignedUploadDto)
|
|
80
|
+
uploads: RuntimeArtifactPresignedUploadDto[];
|
|
47
81
|
}
|
|
@@ -21,7 +21,9 @@ export class RuntimeArtifactsPayload {
|
|
|
21
21
|
@ValidateNestedType(() => ObjectKeyUrlPair)
|
|
22
22
|
downloads: ObjectKeyUrlPair[];
|
|
23
23
|
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Parent prefix under artifact root (**excludes** `latestVersion`; agent joins with {@code latestVersion} for binds / disk layout).
|
|
26
|
+
*/
|
|
25
27
|
@IsString()
|
|
26
28
|
artifactPrefix: string;
|
|
27
29
|
}
|
|
@@ -48,6 +50,11 @@ export class ProtonGameCreationPayload {
|
|
|
48
50
|
@IsOptional()
|
|
49
51
|
@ValidateNestedType(() => RuntimeArtifactsPayload)
|
|
50
52
|
runtimeArtifacts?: RuntimeArtifactsPayload;
|
|
53
|
+
|
|
54
|
+
/** Docker bind mounts `{ hostAbsolutePath: containerAbsolutePath }` (site fills for runtime artifacts, etc.). */
|
|
55
|
+
@IsOptional()
|
|
56
|
+
@IsObject()
|
|
57
|
+
additionalMounts?: Record<string, string>;
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
export class AndroidGameCreationPayload {
|