@ludeo/cloud-common 1.2.266 → 1.2.267
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/index.d.ts +2 -0
- package/dist/v4/events/index.js +2 -0
- package/dist/v4/events/index.js.map +1 -1
- package/dist/v4/events/ludeocast-agent/index.d.ts +1 -0
- package/dist/v4/events/ludeocast-agent/index.js +1 -0
- package/dist/v4/events/ludeocast-agent/index.js.map +1 -1
- package/dist/v4/events/ludeocast-agent/set-sftp-credentials-ended.d.ts +9 -0
- package/dist/v4/events/ludeocast-agent/set-sftp-credentials-ended.js +39 -0
- package/dist/v4/events/ludeocast-agent/set-sftp-credentials-ended.js.map +1 -0
- package/dist/v4/events/set-sftp-credentials.d.ts +12 -0
- package/dist/v4/events/set-sftp-credentials.js +45 -0
- package/dist/v4/events/set-sftp-credentials.js.map +1 -0
- package/dist/v4/events/sftp-credentials-installed.d.ts +14 -0
- package/dist/v4/events/sftp-credentials-installed.js +51 -0
- package/dist/v4/events/sftp-credentials-installed.js.map +1 -0
- package/dist/v4/events/site-controller/index.d.ts +1 -0
- package/dist/v4/events/site-controller/index.js +1 -0
- package/dist/v4/events/site-controller/index.js.map +1 -1
- package/dist/v4/events/site-controller/set-sftp-credentials.command.d.ts +9 -0
- package/dist/v4/events/site-controller/set-sftp-credentials.command.js +37 -0
- package/dist/v4/events/site-controller/set-sftp-credentials.command.js.map +1 -0
- package/dist/v4/types/site-controller/types.d.ts +6 -0
- package/dist/v4/types/site-controller/types.js +8 -1
- package/dist/v4/types/site-controller/types.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/index.ts +2 -0
- package/src/v4/events/ludeocast-agent/index.ts +2 -1
- package/src/v4/events/ludeocast-agent/set-sftp-credentials-ended.ts +26 -0
- package/src/v4/events/set-sftp-credentials.ts +34 -0
- package/src/v4/events/sftp-credentials-installed.ts +37 -0
- package/src/v4/events/site-controller/index.ts +1 -0
- package/src/v4/events/site-controller/set-sftp-credentials.command.ts +23 -0
- package/src/v4/types/site-controller/types.ts +9 -0
|
@@ -40,6 +40,8 @@ export * from "./pool-status";
|
|
|
40
40
|
export * from "./send-pools-to-predictor";
|
|
41
41
|
export * from "./set-pool";
|
|
42
42
|
export * from "./set-pools-state";
|
|
43
|
+
export * from "./set-sftp-credentials";
|
|
44
|
+
export * from "./sftp-credentials-installed";
|
|
43
45
|
export * from "./swap-cloud-user-completed";
|
|
44
46
|
export * from "./swap-cloud-user-request-failed";
|
|
45
47
|
export * from "./swap-cloud-user-request";
|
package/dist/v4/events/index.js
CHANGED
|
@@ -57,6 +57,8 @@ __exportStar(require("./pool-status"), exports);
|
|
|
57
57
|
__exportStar(require("./send-pools-to-predictor"), exports);
|
|
58
58
|
__exportStar(require("./set-pool"), exports);
|
|
59
59
|
__exportStar(require("./set-pools-state"), exports);
|
|
60
|
+
__exportStar(require("./set-sftp-credentials"), exports);
|
|
61
|
+
__exportStar(require("./sftp-credentials-installed"), exports);
|
|
60
62
|
__exportStar(require("./swap-cloud-user-completed"), exports);
|
|
61
63
|
__exportStar(require("./swap-cloud-user-request-failed"), exports);
|
|
62
64
|
__exportStar(require("./swap-cloud-user-request"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v4/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,uEAAqD;AACrD,4EAA0D;AAC1D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,mDAAiC;AACjC,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8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A0C;AAC1C,iDAA+B;AAC/B,kDAAgC;AAChC,4DAA0C;AAC1C,sEAAoD;AACpD,oEAAkD;AAClD,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,2DAAyC;AACzC,mEAAiD;AACjD,iDAA+B;AAC/B,qDAAmC;AACnC,4DAA0C;AAC1C,8DAA4C;AAC5C,kDAAgC;AAChC,0DAAwC;AACxC,2DAAyC;AACzC,4DAA0C;AAC1C,oEAAkD;AAClD,2EAAyD;AACzD,kFAAgE;AAChE,kEAAgD;AAEhD,sDAAoD;AACpD,sDAAoD;AACpD,gDAA8C;AAC9C,yCAAuC;AACvC,+CAA6C;AAC7C,sDAAoD;AACpD,gDAA8C;AAC9C,qEAAmE;AACnE,mEAAiE;AACjE,oDAAkD"}
|
|
@@ -18,4 +18,5 @@ __exportStar(require("./resource-update"), exports);
|
|
|
18
18
|
__exportStar(require("./export-logs-ended"), exports);
|
|
19
19
|
__exportStar(require("./detect-artifacts-ended"), exports);
|
|
20
20
|
__exportStar(require("./save-artifacts-ended"), exports);
|
|
21
|
+
__exportStar(require("./set-sftp-credentials-ended"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/events/ludeocast-agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,2DAAyC;AACzC,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/events/ludeocast-agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,2DAAyC;AACzC,yDAAuC;AACvC,+DAA6C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommandPayload } from '../base/base';
|
|
2
|
+
import { SiteOperationStatus, SftpErrorCode } from '../../types/site-controller';
|
|
3
|
+
export declare class SetSftpCredentialsEndedPayload extends BaseCommandPayload {
|
|
4
|
+
principalId: string;
|
|
5
|
+
status: SiteOperationStatus;
|
|
6
|
+
errorCode?: SftpErrorCode;
|
|
7
|
+
}
|
|
8
|
+
export declare function getSetSftpCredentialsEndedTopic(machineResourceId: string): string;
|
|
9
|
+
export declare const SET_SFTP_CREDENTIALS_ENDED_SUBSCRIBE_PATTERN = "$share/site-controller-group/agent/set-sftp-credentials-ended/+";
|
|
@@ -0,0 +1,39 @@
|
|
|
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.SET_SFTP_CREDENTIALS_ENDED_SUBSCRIBE_PATTERN = exports.SetSftpCredentialsEndedPayload = void 0;
|
|
13
|
+
exports.getSetSftpCredentialsEndedTopic = getSetSftpCredentialsEndedTopic;
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const base_1 = require("../base/base");
|
|
16
|
+
const constants_1 = require("../base/constants");
|
|
17
|
+
const site_controller_1 = require("../../types/site-controller");
|
|
18
|
+
const SET_SFTP_CREDENTIALS_ENDED = 'set-sftp-credentials-ended';
|
|
19
|
+
class SetSftpCredentialsEndedPayload extends base_1.BaseCommandPayload {
|
|
20
|
+
}
|
|
21
|
+
exports.SetSftpCredentialsEndedPayload = SetSftpCredentialsEndedPayload;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], SetSftpCredentialsEndedPayload.prototype, "principalId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsEnum)(site_controller_1.SiteOperationStatus),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], SetSftpCredentialsEndedPayload.prototype, "status", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsEnum)(site_controller_1.SftpErrorCode),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], SetSftpCredentialsEndedPayload.prototype, "errorCode", void 0);
|
|
35
|
+
function getSetSftpCredentialsEndedTopic(machineResourceId) {
|
|
36
|
+
return `${constants_1.AGENT_STRING}/${SET_SFTP_CREDENTIALS_ENDED}/${machineResourceId}`;
|
|
37
|
+
}
|
|
38
|
+
exports.SET_SFTP_CREDENTIALS_ENDED_SUBSCRIBE_PATTERN = `$share/site-controller-group/${constants_1.AGENT_STRING}/${SET_SFTP_CREDENTIALS_ENDED}/${constants_1.WILDCARD_MQTT_STRING}`;
|
|
39
|
+
//# sourceMappingURL=set-sftp-credentials-ended.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-sftp-credentials-ended.js","sourceRoot":"","sources":["../../../../src/v4/events/ludeocast-agent/set-sftp-credentials-ended.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA,0EAEC;AAvBD,qDAA+D;AAC/D,uCAAkD;AAClD,iDAAuE;AACvE,iEAAiF;AAEjF,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AAGhE,MAAa,8BAA+B,SAAQ,yBAAkB;CAWrE;AAXD,wEAWC;AARC;IADC,IAAA,0BAAQ,GAAE;;mEACS;AAGpB;IADC,IAAA,wBAAM,EAAC,qCAAmB,CAAC;;8DACA;AAI5B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,+BAAa,CAAC;;iEACI;AAG5B,SAAgB,+BAA+B,CAAC,iBAAyB;IACvE,OAAO,GAAG,wBAAY,IAAI,0BAA0B,IAAI,iBAAiB,EAAE,CAAC;AAC9E,CAAC;AAEY,QAAA,4CAA4C,GAAG,gCAAgC,wBAAY,IAAI,0BAA0B,IAAI,gCAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { CloudResourceContext } from "../contexts";
|
|
3
|
+
export declare class SetSftpCredentialsPayload {
|
|
4
|
+
principalId: string;
|
|
5
|
+
publicKey: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class SetSftpCredentials extends LudeoEvent {
|
|
8
|
+
static readonly EVENT_NAME = "test-machines.set-sftp-credentials";
|
|
9
|
+
constructor(payload: SetSftpCredentialsPayload, context: CloudResourceContext);
|
|
10
|
+
payload: SetSftpCredentialsPayload;
|
|
11
|
+
context: CloudResourceContext;
|
|
12
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.SetSftpCredentials = exports.SetSftpCredentialsPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
15
|
+
const infra_1 = require("../../infra");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
|
+
class SetSftpCredentialsPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.SetSftpCredentialsPayload = SetSftpCredentialsPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], SetSftpCredentialsPayload.prototype, "principalId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], SetSftpCredentialsPayload.prototype, "publicKey", void 0);
|
|
28
|
+
class SetSftpCredentials extends infra_1.LudeoEvent {
|
|
29
|
+
constructor(payload, context) {
|
|
30
|
+
super(SetSftpCredentials.EVENT_NAME);
|
|
31
|
+
this.payload = payload;
|
|
32
|
+
this.context = context;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.SetSftpCredentials = SetSftpCredentials;
|
|
36
|
+
SetSftpCredentials.EVENT_NAME = "test-machines.set-sftp-credentials";
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => SetSftpCredentialsPayload),
|
|
39
|
+
__metadata("design:type", SetSftpCredentialsPayload)
|
|
40
|
+
], SetSftpCredentials.prototype, "payload", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
|
|
43
|
+
__metadata("design:type", contexts_1.CloudResourceContext)
|
|
44
|
+
], SetSftpCredentials.prototype, "context", void 0);
|
|
45
|
+
//# sourceMappingURL=set-sftp-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-sftp-credentials.js","sourceRoot":"","sources":["../../../src/v4/events/set-sftp-credentials.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,oGAAqF;AACrF,uCAAyC;AACzC,0CAAmD;AAEnD,MAAa,yBAAyB;CASrC;AATD,8DASC;AALC;IADC,IAAA,0BAAQ,GAAE;;8DACS;AAIpB;IADC,IAAA,0BAAQ,GAAE;;4DACO;AAGpB,MAAa,kBAAmB,SAAQ,kBAAU;IAGhD,YACE,OAAkC,EAClC,OAA6B;QAE7B,KAAK,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,gDAiBC;AAhBiB,6BAAU,GAAG,oCAAoC,CAAC;AAYlE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC;8BAC3C,yBAAyB;mDAAC;AAGnC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;mDAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra";
|
|
2
|
+
import { CloudResourceContext } from "../contexts";
|
|
3
|
+
import { SiteOperationStatus, SftpErrorCode } from "../types/site-controller";
|
|
4
|
+
export declare class SftpCredentialsInstalledPayload {
|
|
5
|
+
principalId: string;
|
|
6
|
+
status: SiteOperationStatus;
|
|
7
|
+
errorCode?: SftpErrorCode;
|
|
8
|
+
}
|
|
9
|
+
export declare class SftpCredentialsInstalled extends LudeoEvent {
|
|
10
|
+
static readonly EVENT_NAME = "site-controller.sftp-credentials-installed";
|
|
11
|
+
constructor(payload: SftpCredentialsInstalledPayload, context: CloudResourceContext);
|
|
12
|
+
payload: SftpCredentialsInstalledPayload;
|
|
13
|
+
context: CloudResourceContext;
|
|
14
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.SftpCredentialsInstalled = exports.SftpCredentialsInstalledPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
15
|
+
const infra_1 = require("../../infra");
|
|
16
|
+
const contexts_1 = require("../contexts");
|
|
17
|
+
const site_controller_1 = require("../types/site-controller");
|
|
18
|
+
class SftpCredentialsInstalledPayload {
|
|
19
|
+
}
|
|
20
|
+
exports.SftpCredentialsInstalledPayload = SftpCredentialsInstalledPayload;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], SftpCredentialsInstalledPayload.prototype, "principalId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsEnum)(site_controller_1.SiteOperationStatus),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], SftpCredentialsInstalledPayload.prototype, "status", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsEnum)(site_controller_1.SftpErrorCode),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], SftpCredentialsInstalledPayload.prototype, "errorCode", void 0);
|
|
34
|
+
class SftpCredentialsInstalled extends infra_1.LudeoEvent {
|
|
35
|
+
constructor(payload, context) {
|
|
36
|
+
super(SftpCredentialsInstalled.EVENT_NAME);
|
|
37
|
+
this.payload = payload;
|
|
38
|
+
this.context = context;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.SftpCredentialsInstalled = SftpCredentialsInstalled;
|
|
42
|
+
SftpCredentialsInstalled.EVENT_NAME = "site-controller.sftp-credentials-installed";
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => SftpCredentialsInstalledPayload),
|
|
45
|
+
__metadata("design:type", SftpCredentialsInstalledPayload)
|
|
46
|
+
], SftpCredentialsInstalled.prototype, "payload", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, validate_nested_type_decorator_1.ValidateNestedType)(() => contexts_1.CloudResourceContext),
|
|
49
|
+
__metadata("design:type", contexts_1.CloudResourceContext)
|
|
50
|
+
], SftpCredentialsInstalled.prototype, "context", void 0);
|
|
51
|
+
//# sourceMappingURL=sftp-credentials-installed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sftp-credentials-installed.js","sourceRoot":"","sources":["../../../src/v4/events/sftp-credentials-installed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,oGAAqF;AACrF,uCAAyC;AACzC,0CAAmD;AACnD,8DAA8E;AAE9E,MAAa,+BAA+B;CAW3C;AAXD,0EAWC;AARC;IADC,IAAA,0BAAQ,GAAE;;oEACS;AAGpB;IADC,IAAA,wBAAM,EAAC,qCAAmB,CAAC;;+DACA;AAI5B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,+BAAa,CAAC;;kEACI;AAG5B,MAAa,wBAAyB,SAAQ,kBAAU;IAGtD,YACE,OAAwC,EACxC,OAA6B;QAE7B,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,4DAiBC;AAhBiB,mCAAU,GAAG,4CAA4C,CAAC;AAY1E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAA+B,CAAC;8BACjD,+BAA+B;yDAAC;AAGzC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;yDAAC"}
|
|
@@ -14,6 +14,7 @@ export * from "../base/constants";
|
|
|
14
14
|
export * from "./init.command";
|
|
15
15
|
export * from "./terminate-game.command";
|
|
16
16
|
export * from "./start-game.command";
|
|
17
|
+
export * from "./set-sftp-credentials.command";
|
|
17
18
|
export * from "./shutdown.command";
|
|
18
19
|
export * from "./export-logs.command";
|
|
19
20
|
export * from "./detect-artifacts.command";
|
|
@@ -30,6 +30,7 @@ __exportStar(require("../base/constants"), exports);
|
|
|
30
30
|
__exportStar(require("./init.command"), exports);
|
|
31
31
|
__exportStar(require("./terminate-game.command"), exports);
|
|
32
32
|
__exportStar(require("./start-game.command"), exports);
|
|
33
|
+
__exportStar(require("./set-sftp-credentials.command"), exports);
|
|
33
34
|
__exportStar(require("./shutdown.command"), exports);
|
|
34
35
|
__exportStar(require("./export-logs.command"), exports);
|
|
35
36
|
__exportStar(require("./detect-artifacts.command"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/events/site-controller/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAmD;AACnD,gEAA8C;AAC9C,kEAAgD;AAChD,qEAAmD;AACnD,wEAAsD;AAEtD,gFAA8D;AAC9D,mFAAiE;AACjE,4EAA0D;AAE1D,qEAAmD;AACnD,gEAA8C;AAC9C,qEAAmD;AAGnD,+CAA6B;AAC7B,oDAAkC;AAClC,iDAA+B;AAC/B,2DAAyC;AACzC,uDAAqC;AACrC,qDAAmC;AACnC,wDAAsC;AACtC,6DAA2C;AAC3C,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v4/events/site-controller/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAmD;AACnD,gEAA8C;AAC9C,kEAAgD;AAChD,qEAAmD;AACnD,wEAAsD;AAEtD,gFAA8D;AAC9D,mFAAiE;AACjE,4EAA0D;AAE1D,qEAAmD;AACnD,gEAA8C;AAC9C,qEAAmD;AAGnD,+CAA6B;AAC7B,oDAAkC;AAClC,iDAA+B;AAC/B,2DAAyC;AACzC,uDAAqC;AACrC,iEAA+C;AAC/C,qDAAmC;AACnC,wDAAsC;AACtC,6DAA2C;AAC3C,2DAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand, BaseCommandPayload } from '../base/base';
|
|
2
|
+
export declare class SetSftpCredentialsCommandPayload extends BaseCommandPayload {
|
|
3
|
+
principalId: string;
|
|
4
|
+
publicKey: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class SetSftpCredentialsCommand extends BaseCommand<SetSftpCredentialsCommandPayload> {
|
|
7
|
+
payload: SetSftpCredentialsCommandPayload;
|
|
8
|
+
constructor(payload: SetSftpCredentialsCommandPayload);
|
|
9
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.SetSftpCredentialsCommand = exports.SetSftpCredentialsCommandPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const base_1 = require("../base/base");
|
|
15
|
+
const decorators_1 = require("../../../decorators");
|
|
16
|
+
class SetSftpCredentialsCommandPayload extends base_1.BaseCommandPayload {
|
|
17
|
+
}
|
|
18
|
+
exports.SetSftpCredentialsCommandPayload = SetSftpCredentialsCommandPayload;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], SetSftpCredentialsCommandPayload.prototype, "principalId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], SetSftpCredentialsCommandPayload.prototype, "publicKey", void 0);
|
|
27
|
+
class SetSftpCredentialsCommand extends base_1.BaseCommand {
|
|
28
|
+
constructor(payload) {
|
|
29
|
+
super(payload.machineResourceId, 'set-sftp-credentials', payload);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.SetSftpCredentialsCommand = SetSftpCredentialsCommand;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, decorators_1.ValidateNestedType)(() => SetSftpCredentialsCommandPayload),
|
|
35
|
+
__metadata("design:type", SetSftpCredentialsCommandPayload)
|
|
36
|
+
], SetSftpCredentialsCommand.prototype, "payload", void 0);
|
|
37
|
+
//# sourceMappingURL=set-sftp-credentials.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-sftp-credentials.command.js","sourceRoot":"","sources":["../../../../src/v4/events/site-controller/set-sftp-credentials.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,uCAA+D;AAC/D,oDAAyD;AAEzD,MAAa,gCAAiC,SAAQ,yBAAkB;CASvE;AATD,4EASC;AALC;IADC,IAAA,0BAAQ,GAAE;;qEACS;AAIpB;IADC,IAAA,0BAAQ,GAAE;;mEACO;AAGpB,MAAa,yBAA0B,SAAQ,kBAA6C;IAI1F,YAAY,OAAyC;QACnD,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AAPD,8DAOC;AALC;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,gCAAgC,CAAC;8BAClD,gCAAgC;0DAAC"}
|
|
@@ -37,6 +37,12 @@ export declare enum SiteOperationStatus {
|
|
|
37
37
|
Success = "success",
|
|
38
38
|
Error = "error"
|
|
39
39
|
}
|
|
40
|
+
export declare enum SftpErrorCode {
|
|
41
|
+
PermissionDenied = "PERMISSION_DENIED",
|
|
42
|
+
FsError = "FS_ERROR",
|
|
43
|
+
MountFailed = "MOUNT_FAILED",
|
|
44
|
+
AgentTimeout = "AGENT_TIMEOUT"
|
|
45
|
+
}
|
|
40
46
|
export declare enum MachineStatusReason {
|
|
41
47
|
VMReady = "VMReady",
|
|
42
48
|
AgentReadyForCommands = "AgentReadyForCommands",
|
|
@@ -9,7 +9,7 @@ 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.TerminationType = exports.SiteAdapterFlow = exports.AgentRunMode = exports.GameStatusReason = exports.MachineStatusReason = exports.SiteOperationStatus = exports.AndroidGameCreationPayload = exports.ProtonGameCreationPayload = exports.RuntimeArtifactsPayload = exports.ArtifactKeyParts = exports.MachineMode = void 0;
|
|
12
|
+
exports.TerminationType = exports.SiteAdapterFlow = exports.AgentRunMode = exports.GameStatusReason = exports.MachineStatusReason = exports.SftpErrorCode = exports.SiteOperationStatus = exports.AndroidGameCreationPayload = exports.ProtonGameCreationPayload = exports.RuntimeArtifactsPayload = exports.ArtifactKeyParts = exports.MachineMode = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const decorators_1 = require("../../../decorators");
|
|
15
15
|
const runtime_artifacts_dto_1 = require("./runtime-artifacts.dto");
|
|
@@ -113,6 +113,13 @@ var SiteOperationStatus;
|
|
|
113
113
|
SiteOperationStatus["Success"] = "success";
|
|
114
114
|
SiteOperationStatus["Error"] = "error";
|
|
115
115
|
})(SiteOperationStatus || (exports.SiteOperationStatus = SiteOperationStatus = {}));
|
|
116
|
+
var SftpErrorCode;
|
|
117
|
+
(function (SftpErrorCode) {
|
|
118
|
+
SftpErrorCode["PermissionDenied"] = "PERMISSION_DENIED";
|
|
119
|
+
SftpErrorCode["FsError"] = "FS_ERROR";
|
|
120
|
+
SftpErrorCode["MountFailed"] = "MOUNT_FAILED";
|
|
121
|
+
SftpErrorCode["AgentTimeout"] = "AGENT_TIMEOUT";
|
|
122
|
+
})(SftpErrorCode || (exports.SftpErrorCode = SftpErrorCode = {}));
|
|
116
123
|
var MachineStatusReason;
|
|
117
124
|
(function (MachineStatusReason) {
|
|
118
125
|
MachineStatusReason["VMReady"] = "VMReady";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/v4/types/site-controller/types.ts"],"names":[],"mappings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"}
|
package/package.json
CHANGED
package/src/v4/events/index.ts
CHANGED
|
@@ -40,6 +40,8 @@ export * from "./pool-status";
|
|
|
40
40
|
export * from "./send-pools-to-predictor";
|
|
41
41
|
export * from "./set-pool";
|
|
42
42
|
export * from "./set-pools-state";
|
|
43
|
+
export * from "./set-sftp-credentials";
|
|
44
|
+
export * from "./sftp-credentials-installed";
|
|
43
45
|
export * from "./swap-cloud-user-completed";
|
|
44
46
|
export * from "./swap-cloud-user-request-failed";
|
|
45
47
|
export * from "./swap-cloud-user-request";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { BaseCommandPayload } from '../base/base';
|
|
3
|
+
import { AGENT_STRING, WILDCARD_MQTT_STRING } from '../base/constants';
|
|
4
|
+
import { SiteOperationStatus, SftpErrorCode } from '../../types/site-controller';
|
|
5
|
+
|
|
6
|
+
const SET_SFTP_CREDENTIALS_ENDED = 'set-sftp-credentials-ended';
|
|
7
|
+
|
|
8
|
+
/** Agent → site-controller: SFTP provisioning finished (machine-scoped topic). */
|
|
9
|
+
export class SetSftpCredentialsEndedPayload extends BaseCommandPayload {
|
|
10
|
+
// Echoed back from the command so the result can be routed to the dev via Echo.
|
|
11
|
+
@IsString()
|
|
12
|
+
principalId: string;
|
|
13
|
+
|
|
14
|
+
@IsEnum(SiteOperationStatus)
|
|
15
|
+
status: SiteOperationStatus;
|
|
16
|
+
|
|
17
|
+
@IsOptional()
|
|
18
|
+
@IsEnum(SftpErrorCode)
|
|
19
|
+
errorCode?: SftpErrorCode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function getSetSftpCredentialsEndedTopic(machineResourceId: string): string {
|
|
23
|
+
return `${AGENT_STRING}/${SET_SFTP_CREDENTIALS_ENDED}/${machineResourceId}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const SET_SFTP_CREDENTIALS_ENDED_SUBSCRIBE_PATTERN = `$share/site-controller-group/${AGENT_STRING}/${SET_SFTP_CREDENTIALS_ENDED}/${WILDCARD_MQTT_STRING}`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IsString } from "class-validator";
|
|
2
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
3
|
+
import { LudeoEvent } from "../../infra";
|
|
4
|
+
import { CloudResourceContext } from "../contexts";
|
|
5
|
+
|
|
6
|
+
export class SetSftpCredentialsPayload {
|
|
7
|
+
// Stable userId of the dev who clicked Browse Files. Carried through so the
|
|
8
|
+
// install result can later be routed back to that user via Echo.
|
|
9
|
+
@IsString()
|
|
10
|
+
principalId: string;
|
|
11
|
+
|
|
12
|
+
// The dev's SSH public key (BYOK). Public by definition - safe to log/store.
|
|
13
|
+
@IsString()
|
|
14
|
+
publicKey: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class SetSftpCredentials extends LudeoEvent {
|
|
18
|
+
static readonly EVENT_NAME = "test-machines.set-sftp-credentials";
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
payload: SetSftpCredentialsPayload,
|
|
22
|
+
context: CloudResourceContext
|
|
23
|
+
) {
|
|
24
|
+
super(SetSftpCredentials.EVENT_NAME);
|
|
25
|
+
this.payload = payload;
|
|
26
|
+
this.context = context;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@ValidateNestedType(() => SetSftpCredentialsPayload)
|
|
30
|
+
payload: SetSftpCredentialsPayload;
|
|
31
|
+
|
|
32
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
33
|
+
context: CloudResourceContext;
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from "class-validator";
|
|
2
|
+
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
3
|
+
import { LudeoEvent } from "../../infra";
|
|
4
|
+
import { CloudResourceContext } from "../contexts";
|
|
5
|
+
import { SiteOperationStatus, SftpErrorCode } from "../types/site-controller";
|
|
6
|
+
|
|
7
|
+
export class SftpCredentialsInstalledPayload {
|
|
8
|
+
// Stable userId of the dev - used by test-machines to route the result via Echo.
|
|
9
|
+
@IsString()
|
|
10
|
+
principalId: string;
|
|
11
|
+
|
|
12
|
+
@IsEnum(SiteOperationStatus)
|
|
13
|
+
status: SiteOperationStatus;
|
|
14
|
+
|
|
15
|
+
@IsOptional()
|
|
16
|
+
@IsEnum(SftpErrorCode)
|
|
17
|
+
errorCode?: SftpErrorCode;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class SftpCredentialsInstalled extends LudeoEvent {
|
|
21
|
+
static readonly EVENT_NAME = "site-controller.sftp-credentials-installed";
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
payload: SftpCredentialsInstalledPayload,
|
|
25
|
+
context: CloudResourceContext
|
|
26
|
+
) {
|
|
27
|
+
super(SftpCredentialsInstalled.EVENT_NAME);
|
|
28
|
+
this.payload = payload;
|
|
29
|
+
this.context = context;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@ValidateNestedType(() => SftpCredentialsInstalledPayload)
|
|
33
|
+
payload: SftpCredentialsInstalledPayload;
|
|
34
|
+
|
|
35
|
+
@ValidateNestedType(() => CloudResourceContext)
|
|
36
|
+
context: CloudResourceContext;
|
|
37
|
+
}
|
|
@@ -18,6 +18,7 @@ export * from "../base/constants";
|
|
|
18
18
|
export * from "./init.command";
|
|
19
19
|
export * from "./terminate-game.command";
|
|
20
20
|
export * from "./start-game.command";
|
|
21
|
+
export * from "./set-sftp-credentials.command";
|
|
21
22
|
export * from "./shutdown.command";
|
|
22
23
|
export * from "./export-logs.command";
|
|
23
24
|
export * from "./detect-artifacts.command";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IsString } from 'class-validator';
|
|
2
|
+
import { BaseCommand, BaseCommandPayload } from '../base/base';
|
|
3
|
+
import { ValidateNestedType } from '../../../decorators';
|
|
4
|
+
|
|
5
|
+
export class SetSftpCredentialsCommandPayload extends BaseCommandPayload {
|
|
6
|
+
// Stable userId of the dev who clicked Browse Files. Echoed back in the ack
|
|
7
|
+
// so site-controller can route the install result to the right user.
|
|
8
|
+
@IsString()
|
|
9
|
+
principalId: string;
|
|
10
|
+
|
|
11
|
+
// The dev's SSH public key (BYOK). Public by definition - safe to log.
|
|
12
|
+
@IsString()
|
|
13
|
+
publicKey: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class SetSftpCredentialsCommand extends BaseCommand<SetSftpCredentialsCommandPayload> {
|
|
17
|
+
@ValidateNestedType(() => SetSftpCredentialsCommandPayload)
|
|
18
|
+
payload: SetSftpCredentialsCommandPayload;
|
|
19
|
+
|
|
20
|
+
constructor(payload: SetSftpCredentialsCommandPayload) {
|
|
21
|
+
super(payload.machineResourceId, 'set-sftp-credentials', payload);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -103,6 +103,15 @@ export enum SiteOperationStatus {
|
|
|
103
103
|
Error = "error",
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
// Failure reasons for SFTP credential provisioning. Reported by the agent, except
|
|
107
|
+
// AGENT_TIMEOUT which site-controller raises when the agent never acks.
|
|
108
|
+
export enum SftpErrorCode {
|
|
109
|
+
PermissionDenied = "PERMISSION_DENIED",
|
|
110
|
+
FsError = "FS_ERROR",
|
|
111
|
+
MountFailed = "MOUNT_FAILED",
|
|
112
|
+
AgentTimeout = "AGENT_TIMEOUT",
|
|
113
|
+
}
|
|
114
|
+
|
|
106
115
|
export enum MachineStatusReason {
|
|
107
116
|
VMReady = "VMReady",
|
|
108
117
|
AgentReadyForCommands = "AgentReadyForCommands",
|