@catladder/cli 1.0.1 → 1.0.2
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/apps/cli/cli.js.map +1 -1
- package/dist/apps/cli/verify/migration/fromv2.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -11
- package/src/apps/cli/cli.ts +0 -2
- package/src/apps/cli/verify/migration/fromv2.ts +0 -1
- package/dist/utils/dashboardToken.d.ts +0 -2
- package/dist/utils/dashboardToken.js +0 -89
- package/dist/utils/dashboardToken.js.map +0 -1
- package/src/types/git-repo-name.d.ts +0 -1
- package/src/types/yawn-yaml.d.ts +0 -1
- package/src/utils/dashboardToken.ts +0 -20
package/package.json
CHANGED
|
@@ -16,29 +16,22 @@
|
|
|
16
16
|
"catladder": "./bin/catladder"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@catladder/pipeline": "1.0.1",
|
|
19
|
+
"@catladder/pipeline": "1.0.2",
|
|
21
20
|
"@kubernetes/client-node": "^0.16.1",
|
|
22
21
|
"child-process-promise": "^2.2.1",
|
|
23
|
-
"clipboardy": "^2.2.0",
|
|
24
22
|
"command-exists-promise": "^2.0.2",
|
|
25
23
|
"common-tags": "^1.8.0",
|
|
26
24
|
"dayjs": "^1.10.4",
|
|
27
25
|
"fs-extra": "^7.0.1",
|
|
28
|
-
"git-repo-name": "^1.0.1",
|
|
29
26
|
"gitlab": "^4.4.1",
|
|
30
27
|
"js-yaml": "^3.12.0",
|
|
31
|
-
"lodash": "^4.17.
|
|
28
|
+
"lodash": "^4.17.21",
|
|
32
29
|
"memoizee": "^0.4.14",
|
|
33
30
|
"node-fetch": "^2.3.0",
|
|
34
31
|
"open": "^8.4.0",
|
|
35
|
-
"open-editor": "^2.0.1",
|
|
36
|
-
"open-in-editor": "^2.2.0",
|
|
37
32
|
"tmp-promise": "^2.0.2",
|
|
38
33
|
"update-notifier": "^2.5.0",
|
|
39
|
-
"vorpal": "^1.12.0"
|
|
40
|
-
"yargs": "^13.2.4",
|
|
41
|
-
"yawn-yaml": "^1.3.4"
|
|
34
|
+
"vorpal": "^1.12.0"
|
|
42
35
|
},
|
|
43
36
|
"engines": {
|
|
44
37
|
"node": ">=12.0.0"
|
|
@@ -60,5 +53,5 @@
|
|
|
60
53
|
"eslint": "^8.7.0",
|
|
61
54
|
"typescript": "^4.5.4"
|
|
62
55
|
},
|
|
63
|
-
"version": "1.0.
|
|
56
|
+
"version": "1.0.2"
|
|
64
57
|
}
|
package/src/apps/cli/cli.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Vorpal from "vorpal";
|
|
2
|
-
import { config } from "yargs";
|
|
3
2
|
// tslint:disable-next-line:no-var-requires
|
|
4
3
|
import packageInfos from "../../packageInfos";
|
|
5
4
|
import { stopAllPortForwards } from "../../utils/portForward";
|
|
@@ -8,7 +7,6 @@ import mongodb from "./commands/mongodb";
|
|
|
8
7
|
import project from "./commands/project";
|
|
9
8
|
import theStuffThatReallyMatters from "./commands/theStuffThatReallyMatters";
|
|
10
9
|
|
|
11
|
-
import { getProjectConfig } from "../../config/getProjectConfig";
|
|
12
10
|
import { verify } from "./verify";
|
|
13
11
|
import { showProjectBanner } from "./commands/project/utils/showProjectBanner";
|
|
14
12
|
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
exports.__esModule = true;
|
|
42
|
-
exports.printToken = exports.getToken = void 0;
|
|
43
|
-
var child_process_promise_1 = require("child-process-promise");
|
|
44
|
-
var clipboardy_1 = __importDefault(require("clipboardy"));
|
|
45
|
-
var getToken = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
46
|
-
var stdout;
|
|
47
|
-
return __generator(this, function (_a) {
|
|
48
|
-
switch (_a.label) {
|
|
49
|
-
case 0: return [4 /*yield*/, (0, child_process_promise_1.exec)("kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1==\"token:\"{print $2}'")];
|
|
50
|
-
case 1:
|
|
51
|
-
stdout = (_a.sent()).stdout;
|
|
52
|
-
return [2 /*return*/, stdout];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}); };
|
|
56
|
-
exports.getToken = getToken;
|
|
57
|
-
function printToken() {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
-
var token;
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
switch (_a.label) {
|
|
62
|
-
case 0: return [4 /*yield*/, this.log("you will need to pass a token to the dashboard. We will copy it to your clipboard!")];
|
|
63
|
-
case 1:
|
|
64
|
-
_a.sent();
|
|
65
|
-
return [4 /*yield*/, (0, exports.getToken)()];
|
|
66
|
-
case 2:
|
|
67
|
-
token = _a.sent();
|
|
68
|
-
return [4 /*yield*/, this.log("")];
|
|
69
|
-
case 3:
|
|
70
|
-
_a.sent();
|
|
71
|
-
return [4 /*yield*/, this.log(token)];
|
|
72
|
-
case 4:
|
|
73
|
-
_a.sent();
|
|
74
|
-
return [4 /*yield*/, this.log("")];
|
|
75
|
-
case 5:
|
|
76
|
-
_a.sent();
|
|
77
|
-
return [4 /*yield*/, clipboardy_1["default"].write(token)];
|
|
78
|
-
case 6:
|
|
79
|
-
_a.sent();
|
|
80
|
-
return [4 /*yield*/, this.log("")];
|
|
81
|
-
case 7:
|
|
82
|
-
_a.sent();
|
|
83
|
-
return [2 /*return*/];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
exports.printToken = printToken;
|
|
89
|
-
//# sourceMappingURL=dashboardToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardToken.js","sourceRoot":"","sources":["../../src/utils/dashboardToken.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,0DAAoC;AAC7B,IAAM,QAAQ,GAAG;;;;oBACH,qBAAM,IAAA,4BAAI,EAC3B,gKAA8J,CAC/J,EAAA;;gBAFO,MAAM,GAAK,CAAA,SAElB,CAAA,OAFa;gBAGd,sBAAO,MAAM,EAAC;;;KACf,CAAC;AALW,QAAA,QAAQ,YAKnB;AAEF,SAAsB,UAAU;;;;;wBAC9B,qBAAM,IAAI,CAAC,GAAG,CACZ,oFAAoF,CACrF,EAAA;;oBAFD,SAEC,CAAC;oBACY,qBAAM,IAAA,gBAAQ,GAAE,EAAA;;oBAAxB,KAAK,GAAG,SAAgB;oBAC9B,qBAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAA;;oBAAlB,SAAkB,CAAC;oBACnB,qBAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAA;;oBAArB,SAAqB,CAAC;oBACtB,qBAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAA;;oBAAlB,SAAkB,CAAC;oBACnB,qBAAM,uBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAA;;oBAA7B,SAA6B,CAAC;oBAC9B,qBAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAA;;oBAAlB,SAAkB,CAAC;;;;;CACpB;AAVD,gCAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module "git-repo-name";
|
package/src/types/yawn-yaml.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module "yawn-yaml/cjs";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { exec } from "child-process-promise";
|
|
2
|
-
import clipboardy from "clipboardy";
|
|
3
|
-
export const getToken = async () => {
|
|
4
|
-
const { stdout } = await exec(
|
|
5
|
-
`kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'`
|
|
6
|
-
);
|
|
7
|
-
return stdout;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export async function printToken() {
|
|
11
|
-
await this.log(
|
|
12
|
-
"you will need to pass a token to the dashboard. We will copy it to your clipboard!"
|
|
13
|
-
);
|
|
14
|
-
const token = await getToken();
|
|
15
|
-
await this.log("");
|
|
16
|
-
await this.log(token);
|
|
17
|
-
await this.log("");
|
|
18
|
-
await clipboardy.write(token);
|
|
19
|
-
await this.log("");
|
|
20
|
-
}
|