envware 1.2.8 → 1.2.9
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CommandRunner } from 'nest-commander';
|
|
2
2
|
import { ApiService } from '../services/api.service';
|
|
3
|
+
import { PushCommand } from './push.command';
|
|
3
4
|
export declare class VerifyCommand extends CommandRunner {
|
|
4
5
|
private apiService;
|
|
5
|
-
|
|
6
|
+
private pushCommand;
|
|
7
|
+
constructor(apiService: ApiService, pushCommand: PushCommand);
|
|
6
8
|
run(passedParams: string[]): Promise<void>;
|
|
7
9
|
}
|
|
@@ -15,13 +15,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.VerifyCommand = void 0;
|
|
16
16
|
const nest_commander_1 = require("nest-commander");
|
|
17
17
|
const api_service_1 = require("../services/api.service");
|
|
18
|
+
const push_command_1 = require("./push.command");
|
|
18
19
|
const chalk_1 = __importDefault(require("chalk"));
|
|
19
20
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
20
21
|
let VerifyCommand = class VerifyCommand extends nest_commander_1.CommandRunner {
|
|
21
22
|
apiService;
|
|
22
|
-
|
|
23
|
+
pushCommand;
|
|
24
|
+
constructor(apiService, pushCommand) {
|
|
23
25
|
super();
|
|
24
26
|
this.apiService = apiService;
|
|
27
|
+
this.pushCommand = pushCommand;
|
|
25
28
|
}
|
|
26
29
|
async run(passedParams) {
|
|
27
30
|
let [code] = passedParams;
|
|
@@ -38,8 +41,10 @@ let VerifyCommand = class VerifyCommand extends nest_commander_1.CommandRunner {
|
|
|
38
41
|
try {
|
|
39
42
|
const response = await this.apiService.instance.post('/secrets/public-key/verify', { code });
|
|
40
43
|
if (response.data.success) {
|
|
41
|
-
console.log(chalk_1.default.green('✔ SSH Key verified and updated successfully!'));
|
|
42
|
-
console.log(chalk_1.default.blue('
|
|
44
|
+
console.log(chalk_1.default.green('✔ SSH Key verified and updated successfully! 🌸'));
|
|
45
|
+
console.log(chalk_1.default.blue('Your device is now authorized.\n'));
|
|
46
|
+
console.log(chalk_1.default.magenta('Resuming your push operation... 🚀'));
|
|
47
|
+
await this.pushCommand.run([], { env: '.env' });
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
catch (error) {
|
|
@@ -54,6 +59,7 @@ exports.VerifyCommand = VerifyCommand = __decorate([
|
|
|
54
59
|
name: 'verify',
|
|
55
60
|
description: 'Verify a new SSH key using the code sent to your email',
|
|
56
61
|
}),
|
|
57
|
-
__metadata("design:paramtypes", [api_service_1.ApiService
|
|
62
|
+
__metadata("design:paramtypes", [api_service_1.ApiService,
|
|
63
|
+
push_command_1.PushCommand])
|
|
58
64
|
], VerifyCommand);
|
|
59
65
|
//# sourceMappingURL=verify.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.command.js","sourceRoot":"","sources":["../../src/commands/verify.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAwD;AACxD,yDAAqD;AACrD,kDAA0B;AAC1B,wDAAgC;AAMzB,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,8BAAa;
|
|
1
|
+
{"version":3,"file":"verify.command.js","sourceRoot":"","sources":["../../src/commands/verify.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAwD;AACxD,yDAAqD;AACrD,iDAA6C;AAC7C,kDAA0B;AAC1B,wDAAgC;AAMzB,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,8BAAa;IAEpC;IACA;IAFV,YACU,UAAsB,EACtB,WAAwB;QAEhC,KAAK,EAAE,CAAC;QAHA,eAAU,GAAV,UAAU,CAAY;QACtB,gBAAW,GAAX,WAAW,CAAa;IAGlC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,YAAsB;QAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC;QAE1B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,M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