@catladder/cli 1.0.3 → 1.0.4
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/package.json +2 -2
- package/dist/apps/catenv/catenv.d.ts +0 -2
- package/dist/apps/catenv/catenv.js +0 -135
- package/dist/apps/catenv/catenv.js.map +0 -1
- package/dist/apps/cli/cli.d.ts +0 -2
- package/dist/apps/cli/cli.js +0 -81
- package/dist/apps/cli/cli.js.map +0 -1
- package/dist/apps/cli/commands/general/index.d.ts +0 -4
- package/dist/apps/cli/commands/general/index.js +0 -274
- package/dist/apps/cli/commands/general/index.js.map +0 -1
- package/dist/apps/cli/commands/general/namespaceAutoCompletion.d.ts +0 -3
- package/dist/apps/cli/commands/general/namespaceAutoCompletion.js +0 -56
- package/dist/apps/cli/commands/general/namespaceAutoCompletion.js.map +0 -1
- package/dist/apps/cli/commands/general/portForward.d.ts +0 -3
- package/dist/apps/cli/commands/general/portForward.js +0 -98
- package/dist/apps/cli/commands/general/portForward.js.map +0 -1
- package/dist/apps/cli/commands/mongodb/index.d.ts +0 -3
- package/dist/apps/cli/commands/mongodb/index.js +0 -53
- package/dist/apps/cli/commands/mongodb/index.js.map +0 -1
- package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.d.ts +0 -3
- package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.js +0 -190
- package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.js.map +0 -1
- package/dist/apps/cli/commands/mongodb/projectMongoGetShell.d.ts +0 -3
- package/dist/apps/cli/commands/mongodb/projectMongoGetShell.js +0 -96
- package/dist/apps/cli/commands/mongodb/projectMongoGetShell.js.map +0 -1
- package/dist/apps/cli/commands/mongodb/projectMongoPortForward.d.ts +0 -3
- package/dist/apps/cli/commands/mongodb/projectMongoPortForward.js +0 -105
- package/dist/apps/cli/commands/mongodb/projectMongoPortForward.js.map +0 -1
- package/dist/apps/cli/commands/mongodb/utils/index.d.ts +0 -13
- package/dist/apps/cli/commands/mongodb/utils/index.js +0 -167
- package/dist/apps/cli/commands/mongodb/utils/index.js.map +0 -1
- package/dist/apps/cli/commands/project/commandCloudSqlProxy.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandCloudSqlProxy.js +0 -128
- package/dist/apps/cli/commands/project/commandCloudSqlProxy.js.map +0 -1
- package/dist/apps/cli/commands/project/commandConfigSecrets.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandConfigSecrets.js +0 -254
- package/dist/apps/cli/commands/project/commandConfigSecrets.js.map +0 -1
- package/dist/apps/cli/commands/project/commandCopyDB.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandCopyDB.js +0 -102
- package/dist/apps/cli/commands/project/commandCopyDB.js.map +0 -1
- package/dist/apps/cli/commands/project/commandDeletePods.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandDeletePods.js +0 -119
- package/dist/apps/cli/commands/project/commandDeletePods.js.map +0 -1
- package/dist/apps/cli/commands/project/commandDeleteProject.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandDeleteProject.js +0 -97
- package/dist/apps/cli/commands/project/commandDeleteProject.js.map +0 -1
- package/dist/apps/cli/commands/project/commandEnvVars.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandEnvVars.js +0 -74
- package/dist/apps/cli/commands/project/commandEnvVars.js.map +0 -1
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js +0 -58
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js.map +0 -1
- package/dist/apps/cli/commands/project/commandGetShell.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandGetShell.js +0 -92
- package/dist/apps/cli/commands/project/commandGetShell.js.map +0 -1
- package/dist/apps/cli/commands/project/commandGitlabCi.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandGitlabCi.js +0 -185
- package/dist/apps/cli/commands/project/commandGitlabCi.js.map +0 -1
- package/dist/apps/cli/commands/project/commandInitGitlab.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandInitGitlab.js +0 -245
- package/dist/apps/cli/commands/project/commandInitGitlab.js.map +0 -1
- package/dist/apps/cli/commands/project/commandInitProject.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandInitProject.js +0 -345
- package/dist/apps/cli/commands/project/commandInitProject.js.map +0 -1
- package/dist/apps/cli/commands/project/commandListPods.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandListPods.js +0 -78
- package/dist/apps/cli/commands/project/commandListPods.js.map +0 -1
- package/dist/apps/cli/commands/project/commandMigrateHelm3.d.ts +0 -7
- package/dist/apps/cli/commands/project/commandMigrateHelm3.js +0 -113
- package/dist/apps/cli/commands/project/commandMigrateHelm3.js.map +0 -1
- package/dist/apps/cli/commands/project/commandNamespace.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandNamespace.js +0 -70
- package/dist/apps/cli/commands/project/commandNamespace.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenCostDashboard.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenCostDashboard.js +0 -83
- package/dist/apps/cli/commands/project/commandOpenCostDashboard.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenDashboard.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenDashboard.js +0 -92
- package/dist/apps/cli/commands/project/commandOpenDashboard.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenEnv.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenEnv.js +0 -80
- package/dist/apps/cli/commands/project/commandOpenEnv.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenGit.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenGit.js +0 -56
- package/dist/apps/cli/commands/project/commandOpenGit.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenGrafana.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenGrafana.js +0 -83
- package/dist/apps/cli/commands/project/commandOpenGrafana.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenGrafanaPod.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenGrafanaPod.js +0 -99
- package/dist/apps/cli/commands/project/commandOpenGrafanaPod.js.map +0 -1
- package/dist/apps/cli/commands/project/commandOpenLogs.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandOpenLogs.js +0 -87
- package/dist/apps/cli/commands/project/commandOpenLogs.js.map +0 -1
- package/dist/apps/cli/commands/project/commandPauseProject.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandPauseProject.js +0 -97
- package/dist/apps/cli/commands/project/commandPauseProject.js.map +0 -1
- package/dist/apps/cli/commands/project/commandPortForward.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandPortForward.js +0 -106
- package/dist/apps/cli/commands/project/commandPortForward.js.map +0 -1
- package/dist/apps/cli/commands/project/commandReloadConfig.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandReloadConfig.js +0 -62
- package/dist/apps/cli/commands/project/commandReloadConfig.js.map +0 -1
- package/dist/apps/cli/commands/project/commandTriggerCronjob.d.ts +0 -3
- package/dist/apps/cli/commands/project/commandTriggerCronjob.js +0 -144
- package/dist/apps/cli/commands/project/commandTriggerCronjob.js.map +0 -1
- package/dist/apps/cli/commands/project/index.d.ts +0 -3
- package/dist/apps/cli/commands/project/index.js +0 -97
- package/dist/apps/cli/commands/project/index.js.map +0 -1
- package/dist/apps/cli/commands/project/utils/autocompletions.d.ts +0 -3
- package/dist/apps/cli/commands/project/utils/autocompletions.js +0 -96
- package/dist/apps/cli/commands/project/utils/autocompletions.js.map +0 -1
- package/dist/apps/cli/commands/project/utils/ensureCluster.d.ts +0 -1
- package/dist/apps/cli/commands/project/utils/ensureCluster.js +0 -84
- package/dist/apps/cli/commands/project/utils/ensureCluster.js.map +0 -1
- package/dist/apps/cli/commands/project/utils/ensureNamespace.d.ts +0 -1
- package/dist/apps/cli/commands/project/utils/ensureNamespace.js +0 -92
- package/dist/apps/cli/commands/project/utils/ensureNamespace.js.map +0 -1
- package/dist/apps/cli/commands/project/utils/showProjectBanner.d.ts +0 -2
- package/dist/apps/cli/commands/project/utils/showProjectBanner.js +0 -58
- package/dist/apps/cli/commands/project/utils/showProjectBanner.js.map +0 -1
- package/dist/apps/cli/commands/shared/index.d.ts +0 -2
- package/dist/apps/cli/commands/shared/index.js +0 -72
- package/dist/apps/cli/commands/shared/index.js.map +0 -1
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.d.ts +0 -3
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js +0 -131
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js.map +0 -1
- package/dist/apps/cli/config/writeConfig.d.ts +0 -5
- package/dist/apps/cli/config/writeConfig.js +0 -104
- package/dist/apps/cli/config/writeConfig.js.map +0 -1
- package/dist/apps/cli/utils/getGoogleAuthUserNumber.d.ts +0 -1
- package/dist/apps/cli/utils/getGoogleAuthUserNumber.js +0 -69
- package/dist/apps/cli/utils/getGoogleAuthUserNumber.js.map +0 -1
- package/dist/apps/cli/verify/index.d.ts +0 -2
- package/dist/apps/cli/verify/index.js +0 -90
- package/dist/apps/cli/verify/index.js.map +0 -1
- package/dist/apps/cli/verify/migration/fromv2.d.ts +0 -3
- package/dist/apps/cli/verify/migration/fromv2.js +0 -322
- package/dist/apps/cli/verify/migration/fromv2.js.map +0 -1
- package/dist/apps/cli/verify/migration/migrateSecrets.d.ts +0 -4
- package/dist/apps/cli/verify/migration/migrateSecrets.js +0 -88
- package/dist/apps/cli/verify/migration/migrateSecrets.js.map +0 -1
- package/dist/apps/cli/verify/migration/oldGitlabCi.d.ts +0 -17
- package/dist/apps/cli/verify/migration/oldGitlabCi.js +0 -26
- package/dist/apps/cli/verify/migration/oldGitlabCi.js.map +0 -1
- package/dist/catenv.d.ts +0 -1
- package/dist/catenv.js +0 -8
- package/dist/catenv.js.map +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -13
- package/dist/cli.js.map +0 -1
- package/dist/config/clusters.d.ts +0 -14
- package/dist/config/clusters.js +0 -72
- package/dist/config/clusters.js.map +0 -1
- package/dist/config/constants.d.ts +0 -4
- package/dist/config/constants.js +0 -8
- package/dist/config/constants.js.map +0 -1
- package/dist/config/getProjectConfig.d.ts +0 -21
- package/dist/config/getProjectConfig.js +0 -212
- package/dist/config/getProjectConfig.js.map +0 -1
- package/dist/k8sApi/index.d.ts +0 -5
- package/dist/k8sApi/index.js +0 -11
- package/dist/k8sApi/index.js.map +0 -1
- package/dist/packageInfos.d.ts +0 -2
- package/dist/packageInfos.js +0 -6
- package/dist/packageInfos.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/types.d.ts +0 -18
- package/dist/types/types.js +0 -3
- package/dist/types/types.js.map +0 -1
- package/dist/utils/cluster.d.ts +0 -12
- package/dist/utils/cluster.js +0 -100
- package/dist/utils/cluster.js.map +0 -1
- package/dist/utils/editAsFile.d.ts +0 -1
- package/dist/utils/editAsFile.js +0 -85
- package/dist/utils/editAsFile.js.map +0 -1
- package/dist/utils/files.d.ts +0 -2
- package/dist/utils/files.js +0 -83
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/formatEnvVars.d.ts +0 -2
- package/dist/utils/formatEnvVars.js +0 -10
- package/dist/utils/formatEnvVars.js.map +0 -1
- package/dist/utils/getEditor.d.ts +0 -4
- package/dist/utils/getEditor.js +0 -70
- package/dist/utils/getEditor.js.map +0 -1
- package/dist/utils/gitlab.d.ts +0 -21
- package/dist/utils/gitlab.js +0 -258
- package/dist/utils/gitlab.js.map +0 -1
- package/dist/utils/log.d.ts +0 -1
- package/dist/utils/log.js +0 -14
- package/dist/utils/log.js.map +0 -1
- package/dist/utils/passwordstore/index.d.ts +0 -8
- package/dist/utils/passwordstore/index.js +0 -378
- package/dist/utils/passwordstore/index.js.map +0 -1
- package/dist/utils/portForward.d.ts +0 -4
- package/dist/utils/portForward.js +0 -116
- package/dist/utils/portForward.js.map +0 -1
- package/dist/utils/preferences/index.d.ts +0 -3
- package/dist/utils/preferences/index.js +0 -119
- package/dist/utils/preferences/index.js.map +0 -1
- package/dist/utils/projects/index.d.ts +0 -8
- package/dist/utils/projects/index.js +0 -150
- package/dist/utils/projects/index.js.map +0 -1
- package/dist/utils/promise.d.ts +0 -2
- package/dist/utils/promise.js +0 -62
- package/dist/utils/promise.js.map +0 -1
- package/dist/utils/shell.d.ts +0 -1
- package/dist/utils/shell.js +0 -81
- package/dist/utils/shell.js.map +0 -1
|
@@ -1,150 +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.getProjectPodNames = exports.getProjectPvcs = exports.getProjectPods = exports.getProjectNamespace = exports.hasGitlabCiFile = exports.readRootGitlabCiFile = exports.getRootGitlabCiFile = exports.getGitRoot = void 0;
|
|
43
|
-
var child_process_promise_1 = require("child-process-promise");
|
|
44
|
-
var path_1 = require("path");
|
|
45
|
-
var getProjectConfig_1 = require("../../config/getProjectConfig");
|
|
46
|
-
var k8sApi_1 = __importDefault(require("../../k8sApi"));
|
|
47
|
-
var files_1 = require("../files");
|
|
48
|
-
var getGitRoot = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
-
var _a;
|
|
50
|
-
return __generator(this, function (_b) {
|
|
51
|
-
switch (_b.label) {
|
|
52
|
-
case 0: return [4 /*yield*/, (0, child_process_promise_1.exec)("git rev-parse --show-toplevel")];
|
|
53
|
-
case 1: return [2 /*return*/, (_a = (_b.sent()).stdout) === null || _a === void 0 ? void 0 : _a.trim()];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}); };
|
|
57
|
-
exports.getGitRoot = getGitRoot;
|
|
58
|
-
var getRootGitlabCiFile = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var gitRoot;
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
switch (_a.label) {
|
|
62
|
-
case 0: return [4 /*yield*/, (0, exports.getGitRoot)()];
|
|
63
|
-
case 1:
|
|
64
|
-
gitRoot = _a.sent();
|
|
65
|
-
return [2 /*return*/, (0, path_1.join)(gitRoot, ".gitlab-ci.yml")];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); };
|
|
69
|
-
exports.getRootGitlabCiFile = getRootGitlabCiFile;
|
|
70
|
-
var readRootGitlabCiFile = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
|
|
71
|
-
switch (_b.label) {
|
|
72
|
-
case 0:
|
|
73
|
-
_a = files_1.readFileOrError;
|
|
74
|
-
return [4 /*yield*/, (0, exports.getRootGitlabCiFile)()];
|
|
75
|
-
case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
|
|
76
|
-
}
|
|
77
|
-
}); }); };
|
|
78
|
-
exports.readRootGitlabCiFile = readRootGitlabCiFile;
|
|
79
|
-
var hasGitlabCiFile = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
80
|
-
var _a, error, file;
|
|
81
|
-
return __generator(this, function (_b) {
|
|
82
|
-
switch (_b.label) {
|
|
83
|
-
case 0: return [4 /*yield*/, (0, exports.readRootGitlabCiFile)()];
|
|
84
|
-
case 1:
|
|
85
|
-
_a = _b.sent(), error = _a[0], file = _a[1];
|
|
86
|
-
if (error) {
|
|
87
|
-
return [2 /*return*/, false];
|
|
88
|
-
}
|
|
89
|
-
return [2 /*return*/, true];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}); };
|
|
93
|
-
exports.hasGitlabCiFile = hasGitlabCiFile;
|
|
94
|
-
var getProjectNamespace = function (envComponent) { return __awaiter(void 0, void 0, void 0, function () {
|
|
95
|
-
var env, config;
|
|
96
|
-
return __generator(this, function (_a) {
|
|
97
|
-
switch (_a.label) {
|
|
98
|
-
case 0:
|
|
99
|
-
env = (0, getProjectConfig_1.parseChoice)(envComponent).env;
|
|
100
|
-
return [4 /*yield*/, (0, getProjectConfig_1.getProjectConfig)()];
|
|
101
|
-
case 1:
|
|
102
|
-
config = _a.sent();
|
|
103
|
-
return [2 /*return*/, "".concat(config.customerName, "-").concat(config.appName, "-").concat(env)];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}); };
|
|
107
|
-
exports.getProjectNamespace = getProjectNamespace;
|
|
108
|
-
var getProjectPods = function (envComponent) { return __awaiter(void 0, void 0, void 0, function () {
|
|
109
|
-
var namespace, res;
|
|
110
|
-
return __generator(this, function (_a) {
|
|
111
|
-
switch (_a.label) {
|
|
112
|
-
case 0: return [4 /*yield*/, (0, exports.getProjectNamespace)(envComponent)];
|
|
113
|
-
case 1:
|
|
114
|
-
namespace = _a.sent();
|
|
115
|
-
return [4 /*yield*/, k8sApi_1["default"].listNamespacedPod(namespace)];
|
|
116
|
-
case 2:
|
|
117
|
-
res = _a.sent();
|
|
118
|
-
return [2 /*return*/, res.body.items];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}); };
|
|
122
|
-
exports.getProjectPods = getProjectPods;
|
|
123
|
-
var getProjectPvcs = function (envComponent) { return __awaiter(void 0, void 0, void 0, function () {
|
|
124
|
-
var namespace, res;
|
|
125
|
-
return __generator(this, function (_a) {
|
|
126
|
-
switch (_a.label) {
|
|
127
|
-
case 0: return [4 /*yield*/, (0, exports.getProjectNamespace)(envComponent)];
|
|
128
|
-
case 1:
|
|
129
|
-
namespace = _a.sent();
|
|
130
|
-
return [4 /*yield*/, k8sApi_1["default"].listNamespacedPersistentVolumeClaim(namespace)];
|
|
131
|
-
case 2:
|
|
132
|
-
res = _a.sent();
|
|
133
|
-
return [2 /*return*/, res.body.items];
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}); };
|
|
137
|
-
exports.getProjectPvcs = getProjectPvcs;
|
|
138
|
-
var getProjectPodNames = function (envComponent) { return __awaiter(void 0, void 0, void 0, function () {
|
|
139
|
-
var pods;
|
|
140
|
-
return __generator(this, function (_a) {
|
|
141
|
-
switch (_a.label) {
|
|
142
|
-
case 0: return [4 /*yield*/, (0, exports.getProjectPods)(envComponent)];
|
|
143
|
-
case 1:
|
|
144
|
-
pods = _a.sent();
|
|
145
|
-
return [2 /*return*/, pods.map(function (n) { return n.metadata.name; })];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
}); };
|
|
149
|
-
exports.getProjectPodNames = getProjectPodNames;
|
|
150
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/projects/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA6C;AAE7C,6BAA4B;AAC5B,kEAA8E;AAC9E,wDAAkC;AAClC,kCAA2C;AAEpC,IAAM,UAAU,GAAG;;;;oBAChB,qBAAM,IAAA,4BAAI,EAAC,+BAA+B,CAAC,EAAA;oBAAnD,sBAAO,MAAA,CAAC,SAA2C,CAAC,CAAC,MAAM,0CAAE,IAAI,EAAE,EAAC;;;KACrE,CAAC;AAFW,QAAA,UAAU,cAErB;AAEK,IAAM,mBAAmB,GAAG;;;;oBACjB,qBAAM,IAAA,kBAAU,GAAE,EAAA;;gBAA5B,OAAO,GAAG,SAAkB;gBAClC,sBAAO,IAAA,WAAI,EAAC,OAAO,EAAE,gBAAgB,CAAC,EAAC;;;KACxC,CAAC;AAHW,QAAA,mBAAmB,uBAG9B;AAEK,IAAM,oBAAoB,GAAG;;;YAClC,KAAA,uBAAe,CAAA;YAAC,qBAAM,IAAA,2BAAmB,GAAE,EAAA;gBAA3C,sBAAA,kBAAgB,SAA2B,EAAC,EAAA;;SAAA,CAAC;AADlC,QAAA,oBAAoB,wBACc;AAExC,IAAM,eAAe,GAAG;;;;oBACP,qBAAM,IAAA,4BAAoB,GAAE,EAAA;;gBAA5C,KAAgB,SAA4B,EAA3C,KAAK,QAAA,EAAE,IAAI,QAAA;gBAClB,IAAI,KAAK,EAAE;oBACT,sBAAO,KAAK,EAAC;iBACd;gBACD,sBAAO,IAAI,EAAC;;;KACb,CAAC;AANW,QAAA,eAAe,mBAM1B;AAEK,IAAM,mBAAmB,GAAG,UAAO,YAAoB;;;;;gBACpD,GAAG,GAAK,IAAA,8BAAW,EAAC,YAAY,CAAC,IAA9B,CAA+B;gBAC3B,qBAAM,IAAA,mCAAgB,GAAE,EAAA;;gBAAjC,MAAM,GAAG,SAAwB;gBACvC,sBAAO,UAAG,MAAM,CAAC,YAAY,cAAI,MAAM,CAAC,OAAO,cAAI,GAAG,CAAE,EAAC;;;KAC1D,CAAC;AAJW,QAAA,mBAAmB,uBAI9B;AAEK,IAAM,cAAc,GAAG,UAAO,YAAoB;;;;oBACrC,qBAAM,IAAA,2BAAmB,EAAC,YAAY,CAAC,EAAA;;gBAAnD,SAAS,GAAG,SAAuC;gBAC7C,qBAAM,mBAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAA;;gBAA/C,GAAG,GAAG,SAAyC;gBAErD,sBAAO,GAAG,CAAC,IAAI,CAAC,KAAK,EAAC;;;KACvB,CAAC;AALW,QAAA,cAAc,kBAKzB;AAEK,IAAM,cAAc,GAAG,UAAO,YAAoB;;;;oBACrC,qBAAM,IAAA,2BAAmB,EAAC,YAAY,CAAC,EAAA;;gBAAnD,SAAS,GAAG,SAAuC;gBAC7C,qBAAM,mBAAM,CAAC,mCAAmC,CAAC,SAAS,CAAC,EAAA;;gBAAjE,GAAG,GAAG,SAA2D;gBAEvE,sBAAO,GAAG,CAAC,IAAI,CAAC,KAAK,EAAC;;;KACvB,CAAC;AALW,QAAA,cAAc,kBAKzB;AAEK,IAAM,kBAAkB,GAAG,UAAO,YAAoB;;;;oBAC9C,qBAAM,IAAA,sBAAc,EAAC,YAAY,CAAC,EAAA;;gBAAzC,IAAI,GAAG,SAAkC;gBAC/C,sBAAO,IAAI,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAf,CAAe,CAAC,EAAC;;;KACzC,CAAC;AAHW,QAAA,kBAAkB,sBAG7B"}
|
package/dist/utils/promise.d.ts
DELETED
package/dist/utils/promise.js
DELETED
|
@@ -1,62 +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
|
-
exports.__esModule = true;
|
|
39
|
-
exports.delay = exports.filter = void 0;
|
|
40
|
-
function filter(arr, iterator) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
-
var fail;
|
|
43
|
-
var _this = this;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
switch (_a.label) {
|
|
46
|
-
case 0:
|
|
47
|
-
fail = Symbol("fail");
|
|
48
|
-
return [4 /*yield*/, Promise.all(arr.map(function (item) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
49
|
-
switch (_a.label) {
|
|
50
|
-
case 0: return [4 /*yield*/, iterator(item)];
|
|
51
|
-
case 1: return [2 /*return*/, ((_a.sent()) ? item : fail)];
|
|
52
|
-
}
|
|
53
|
-
}); }); }))];
|
|
54
|
-
case 1: return [2 /*return*/, (_a.sent()).filter(function (i) { return i !== fail; })];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
exports.filter = filter;
|
|
60
|
-
var delay = function (ms) { return new Promise(function (res) { return setTimeout(res, ms); }); };
|
|
61
|
-
exports.delay = delay;
|
|
62
|
-
//# sourceMappingURL=promise.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promise.js","sourceRoot":"","sources":["../../src/utils/promise.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAsB,MAAM,CAC1B,GAAQ,EACR,QAAuC;;;;;;;oBAEjC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;oBACnB,qBAAM,OAAO,CAAC,GAAG,CACxB,GAAG,CAAC,GAAG,CAAC,UAAM,IAAI;;wCAAM,qBAAM,QAAQ,CAAC,IAAI,CAAC,EAAA;wCAAtB,sBAAA,CAAC,CAAC,SAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAA;;iCAAA,CAAC,CAC9D,EAAA;wBAFD,sBAAQ,CAAC,SAER,CAAC,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,IAAI,EAAV,CAAU,CAAyB,EAAC;;;;CACpD;AARD,wBAQC;AAEM,IAAM,KAAK,GAAG,UAAC,EAAU,IAAK,OAAA,IAAI,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,EAAnB,CAAmB,CAAC,EAAvC,CAAuC,CAAC;AAAhE,QAAA,KAAK,SAA2D"}
|
package/dist/utils/shell.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getShell: (namespace: string, podName: string) => Promise<void>;
|
package/dist/utils/shell.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
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;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
exports.__esModule = true;
|
|
50
|
-
exports.getShell = void 0;
|
|
51
|
-
var child_process_promise_1 = require("child-process-promise");
|
|
52
|
-
var getShell = function (namespace, podName) { return __awaiter(void 0, void 0, void 0, function () {
|
|
53
|
-
var command, e_1;
|
|
54
|
-
return __generator(this, function (_a) {
|
|
55
|
-
switch (_a.label) {
|
|
56
|
-
case 0:
|
|
57
|
-
command = "kubectl exec -it ".concat(podName, " -n ").concat(namespace, " -- /bin/sh -xc 'bash||sh'");
|
|
58
|
-
_a.label = 1;
|
|
59
|
-
case 1:
|
|
60
|
-
_a.trys.push([1, 3, , 4]);
|
|
61
|
-
return [4 /*yield*/, (0, child_process_promise_1.spawn)(command, {
|
|
62
|
-
stdio: "inherit",
|
|
63
|
-
shell: true,
|
|
64
|
-
env: __assign(__assign({}, process.env), { DEBUG: "" })
|
|
65
|
-
})];
|
|
66
|
-
case 2:
|
|
67
|
-
_a.sent();
|
|
68
|
-
return [3 /*break*/, 4];
|
|
69
|
-
case 3:
|
|
70
|
-
e_1 = _a.sent();
|
|
71
|
-
// tslint:disable-next-line:no-console
|
|
72
|
-
if (e_1.code !== 130) {
|
|
73
|
-
console.log(e_1);
|
|
74
|
-
}
|
|
75
|
-
return [3 /*break*/, 4];
|
|
76
|
-
case 4: return [2 /*return*/];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}); };
|
|
80
|
-
exports.getShell = getShell;
|
|
81
|
-
//# sourceMappingURL=shell.js.map
|
package/dist/utils/shell.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/utils/shell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA8C;AAEvC,IAAM,QAAQ,GAAG,UAAO,SAAiB,EAAE,OAAe;;;;;gBACzD,OAAO,GAAG,2BAAoB,OAAO,iBAAO,SAAS,+BAA4B,CAAC;;;;gBAEtF,qBAAM,IAAA,6BAAK,EAAC,OAAO,EAAE;wBACnB,KAAK,EAAE,SAAS;wBAChB,KAAK,EAAE,IAAI;wBACX,GAAG,wBACE,OAAO,CAAC,GAAG,KACd,KAAK,EAAE,EAAE,GACV;qBACF,CAAC,EAAA;;gBAPF,SAOE,CAAC;;;;gBAEH,sCAAsC;gBACtC,IAAI,GAAC,CAAC,IAAI,KAAK,GAAG,EAAE;oBAClB,OAAO,CAAC,GAAG,CAAC,GAAC,CAAC,CAAC;iBAChB;;;;;KAEJ,CAAC;AAjBW,QAAA,QAAQ,YAiBnB"}
|