@catladder/cli 0.0.0-test4 → 1.0.0
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/.nvmrc +1 -1
- package/bin/catenv +3 -0
- package/bin/catladder +1 -1
- package/dist/apps/catenv/catenv.d.ts +2 -0
- package/dist/apps/catenv/catenv.js +135 -0
- package/dist/apps/catenv/catenv.js.map +1 -0
- package/dist/apps/cli/cli.d.ts +2 -0
- package/dist/apps/cli/cli.js +81 -0
- package/dist/apps/cli/cli.js.map +1 -0
- package/dist/apps/cli/commands/general/index.d.ts +4 -0
- package/dist/apps/cli/commands/general/index.js +274 -0
- package/dist/apps/cli/commands/general/index.js.map +1 -0
- package/dist/apps/cli/commands/general/namespaceAutoCompletion.d.ts +3 -0
- package/dist/apps/cli/commands/general/namespaceAutoCompletion.js +56 -0
- package/dist/apps/cli/commands/general/namespaceAutoCompletion.js.map +1 -0
- package/dist/apps/cli/commands/general/portForward.d.ts +3 -0
- package/dist/apps/cli/commands/general/portForward.js +98 -0
- package/dist/apps/cli/commands/general/portForward.js.map +1 -0
- package/dist/apps/cli/commands/mongodb/index.d.ts +3 -0
- package/dist/apps/cli/commands/mongodb/index.js +53 -0
- package/dist/apps/cli/commands/mongodb/index.js.map +1 -0
- package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.d.ts +3 -0
- package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.js +190 -0
- package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.js.map +1 -0
- package/dist/apps/cli/commands/mongodb/projectMongoGetShell.d.ts +3 -0
- package/dist/apps/cli/commands/mongodb/projectMongoGetShell.js +96 -0
- package/dist/apps/cli/commands/mongodb/projectMongoGetShell.js.map +1 -0
- package/dist/apps/cli/commands/mongodb/projectMongoPortForward.d.ts +3 -0
- package/dist/apps/cli/commands/mongodb/projectMongoPortForward.js +105 -0
- package/dist/apps/cli/commands/mongodb/projectMongoPortForward.js.map +1 -0
- package/dist/apps/cli/commands/mongodb/utils/index.d.ts +13 -0
- package/dist/apps/cli/commands/mongodb/utils/index.js +167 -0
- package/dist/apps/cli/commands/mongodb/utils/index.js.map +1 -0
- package/dist/apps/cli/commands/project/commandCloudSqlProxy.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandCloudSqlProxy.js +128 -0
- package/dist/apps/cli/commands/project/commandCloudSqlProxy.js.map +1 -0
- package/dist/apps/cli/commands/project/commandConfigSecrets.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandConfigSecrets.js +254 -0
- package/dist/apps/cli/commands/project/commandConfigSecrets.js.map +1 -0
- package/dist/apps/cli/commands/project/commandCopyDB.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandCopyDB.js +102 -0
- package/dist/apps/cli/commands/project/commandCopyDB.js.map +1 -0
- package/dist/apps/cli/commands/project/commandDeletePods.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandDeletePods.js +119 -0
- package/dist/apps/cli/commands/project/commandDeletePods.js.map +1 -0
- package/dist/apps/cli/commands/project/commandDeleteProject.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandDeleteProject.js +97 -0
- package/dist/apps/cli/commands/project/commandDeleteProject.js.map +1 -0
- package/dist/apps/cli/commands/project/commandEnvVars.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandEnvVars.js +74 -0
- package/dist/apps/cli/commands/project/commandEnvVars.js.map +1 -0
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js +58 -0
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js.map +1 -0
- package/dist/apps/cli/commands/project/commandGetShell.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandGetShell.js +92 -0
- package/dist/apps/cli/commands/project/commandGetShell.js.map +1 -0
- package/dist/apps/cli/commands/project/commandGitlabCi.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandGitlabCi.js +185 -0
- package/dist/apps/cli/commands/project/commandGitlabCi.js.map +1 -0
- package/dist/apps/cli/commands/project/commandInitGitlab.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandInitGitlab.js +245 -0
- package/dist/apps/cli/commands/project/commandInitGitlab.js.map +1 -0
- package/dist/apps/cli/commands/project/commandInitProject.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandInitProject.js +345 -0
- package/dist/apps/cli/commands/project/commandInitProject.js.map +1 -0
- package/dist/apps/cli/commands/project/commandListPods.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandListPods.js +78 -0
- package/dist/apps/cli/commands/project/commandListPods.js.map +1 -0
- package/dist/apps/cli/commands/project/commandMigrateHelm3.d.ts +7 -0
- package/dist/apps/cli/commands/project/commandMigrateHelm3.js +113 -0
- package/dist/apps/cli/commands/project/commandMigrateHelm3.js.map +1 -0
- package/dist/apps/cli/commands/project/commandNamespace.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandNamespace.js +70 -0
- package/dist/apps/cli/commands/project/commandNamespace.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenCostDashboard.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenCostDashboard.js +83 -0
- package/dist/apps/cli/commands/project/commandOpenCostDashboard.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenDashboard.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenDashboard.js +92 -0
- package/dist/apps/cli/commands/project/commandOpenDashboard.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenEnv.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenEnv.js +80 -0
- package/dist/apps/cli/commands/project/commandOpenEnv.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenGit.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenGit.js +56 -0
- package/dist/apps/cli/commands/project/commandOpenGit.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenGrafana.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenGrafana.js +83 -0
- package/dist/apps/cli/commands/project/commandOpenGrafana.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenGrafanaPod.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenGrafanaPod.js +99 -0
- package/dist/apps/cli/commands/project/commandOpenGrafanaPod.js.map +1 -0
- package/dist/apps/cli/commands/project/commandOpenLogs.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandOpenLogs.js +87 -0
- package/dist/apps/cli/commands/project/commandOpenLogs.js.map +1 -0
- package/dist/apps/cli/commands/project/commandPauseProject.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandPauseProject.js +97 -0
- package/dist/apps/cli/commands/project/commandPauseProject.js.map +1 -0
- package/dist/apps/cli/commands/project/commandPortForward.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandPortForward.js +106 -0
- package/dist/apps/cli/commands/project/commandPortForward.js.map +1 -0
- package/dist/apps/cli/commands/project/commandReloadConfig.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandReloadConfig.js +62 -0
- package/dist/apps/cli/commands/project/commandReloadConfig.js.map +1 -0
- package/dist/apps/cli/commands/project/commandTriggerCronjob.d.ts +3 -0
- package/dist/apps/cli/commands/project/commandTriggerCronjob.js +144 -0
- package/dist/apps/cli/commands/project/commandTriggerCronjob.js.map +1 -0
- package/dist/apps/cli/commands/project/index.d.ts +3 -0
- package/dist/apps/cli/commands/project/index.js +97 -0
- package/dist/apps/cli/commands/project/index.js.map +1 -0
- package/dist/apps/cli/commands/project/utils/autocompletions.d.ts +3 -0
- package/dist/apps/cli/commands/project/utils/autocompletions.js +96 -0
- package/dist/apps/cli/commands/project/utils/autocompletions.js.map +1 -0
- package/dist/apps/cli/commands/project/utils/ensureCluster.d.ts +1 -0
- package/dist/apps/cli/commands/project/utils/ensureCluster.js +84 -0
- package/dist/apps/cli/commands/project/utils/ensureCluster.js.map +1 -0
- package/dist/apps/cli/commands/project/utils/ensureNamespace.d.ts +1 -0
- package/dist/apps/cli/commands/project/utils/ensureNamespace.js +92 -0
- package/dist/apps/cli/commands/project/utils/ensureNamespace.js.map +1 -0
- package/dist/apps/cli/commands/project/utils/showProjectBanner.d.ts +2 -0
- package/dist/apps/cli/commands/project/utils/showProjectBanner.js +58 -0
- package/dist/apps/cli/commands/project/utils/showProjectBanner.js.map +1 -0
- package/dist/apps/cli/commands/shared/index.d.ts +2 -0
- package/dist/apps/cli/commands/shared/index.js +72 -0
- package/dist/apps/cli/commands/shared/index.js.map +1 -0
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.d.ts +3 -0
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js +131 -0
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js.map +1 -0
- package/dist/apps/cli/config/writeConfig.d.ts +5 -0
- package/dist/apps/cli/config/writeConfig.js +104 -0
- package/dist/apps/cli/config/writeConfig.js.map +1 -0
- package/dist/apps/cli/utils/getGoogleAuthUserNumber.d.ts +1 -0
- package/dist/apps/cli/utils/getGoogleAuthUserNumber.js +69 -0
- package/dist/apps/cli/utils/getGoogleAuthUserNumber.js.map +1 -0
- package/dist/apps/cli/verify/index.d.ts +2 -0
- package/dist/apps/cli/verify/index.js +90 -0
- package/dist/apps/cli/verify/index.js.map +1 -0
- package/dist/apps/cli/verify/migration/fromv2.d.ts +3 -0
- package/dist/apps/cli/verify/migration/fromv2.js +322 -0
- package/dist/apps/cli/verify/migration/fromv2.js.map +1 -0
- package/dist/apps/cli/verify/migration/migrateSecrets.d.ts +4 -0
- package/dist/apps/cli/verify/migration/migrateSecrets.js +88 -0
- package/dist/apps/cli/verify/migration/migrateSecrets.js.map +1 -0
- package/dist/apps/cli/verify/migration/oldGitlabCi.d.ts +17 -0
- package/dist/apps/cli/verify/migration/oldGitlabCi.js +26 -0
- package/dist/apps/cli/verify/migration/oldGitlabCi.js.map +1 -0
- package/dist/catenv.d.ts +1 -0
- package/dist/catenv.js +8 -0
- package/dist/catenv.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +13 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/clusters.d.ts +14 -0
- package/dist/config/clusters.js +72 -0
- package/dist/config/clusters.js.map +1 -0
- package/dist/config/constants.d.ts +4 -0
- package/dist/config/constants.js +8 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/getProjectConfig.d.ts +21 -0
- package/dist/config/getProjectConfig.js +212 -0
- package/dist/config/getProjectConfig.js.map +1 -0
- package/dist/k8sApi/index.d.ts +5 -0
- package/dist/k8sApi/index.js +11 -0
- package/dist/k8sApi/index.js.map +1 -0
- package/dist/packageInfos.d.ts +2 -0
- package/dist/packageInfos.js +6 -0
- package/dist/packageInfos.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/types.d.ts +18 -0
- package/dist/types/types.js +3 -0
- package/dist/types/types.js.map +1 -0
- package/dist/utils/cluster.d.ts +12 -0
- package/dist/utils/cluster.js +100 -0
- package/dist/utils/cluster.js.map +1 -0
- package/dist/utils/dashboardToken.d.ts +2 -0
- package/dist/utils/dashboardToken.js +89 -0
- package/dist/utils/dashboardToken.js.map +1 -0
- package/dist/utils/editAsFile.d.ts +1 -0
- package/dist/utils/editAsFile.js +85 -0
- package/dist/utils/editAsFile.js.map +1 -0
- package/dist/utils/files.d.ts +2 -0
- package/dist/utils/files.js +83 -0
- package/dist/utils/files.js.map +1 -0
- package/dist/utils/formatEnvVars.d.ts +2 -0
- package/dist/utils/formatEnvVars.js +10 -0
- package/dist/utils/formatEnvVars.js.map +1 -0
- package/dist/utils/getEditor.d.ts +4 -0
- package/dist/utils/getEditor.js +70 -0
- package/dist/utils/getEditor.js.map +1 -0
- package/dist/utils/gitlab.d.ts +21 -0
- package/dist/utils/gitlab.js +258 -0
- package/dist/utils/gitlab.js.map +1 -0
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/log.js +14 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/passwordstore/index.d.ts +8 -0
- package/dist/utils/passwordstore/index.js +378 -0
- package/dist/utils/passwordstore/index.js.map +1 -0
- package/dist/utils/portForward.d.ts +4 -0
- package/dist/utils/portForward.js +116 -0
- package/dist/utils/portForward.js.map +1 -0
- package/dist/utils/preferences/index.d.ts +3 -0
- package/dist/utils/preferences/index.js +119 -0
- package/dist/utils/preferences/index.js.map +1 -0
- package/dist/utils/projects/index.d.ts +8 -0
- package/dist/utils/projects/index.js +150 -0
- package/dist/utils/projects/index.js.map +1 -0
- package/dist/utils/promise.d.ts +2 -0
- package/dist/utils/promise.js +62 -0
- package/dist/utils/promise.js.map +1 -0
- package/dist/utils/shell.d.ts +1 -0
- package/dist/utils/shell.js +81 -0
- package/dist/utils/shell.js.map +1 -0
- package/package.json +10 -11
- package/src/apps/catenv/catenv.ts +48 -27
- package/src/apps/{shell/shell.ts → cli/cli.ts} +12 -2
- package/src/apps/{shell → cli}/commands/general/index.ts +1 -1
- package/src/apps/{shell → cli}/commands/general/namespaceAutoCompletion.ts +0 -0
- package/src/apps/{shell → cli}/commands/general/portForward.ts +1 -1
- package/src/apps/{shell → cli}/commands/mongodb/index.ts +1 -1
- package/src/apps/{shell → cli}/commands/mongodb/projectMongoDestroyMember.ts +18 -18
- package/src/apps/{shell → cli}/commands/mongodb/projectMongoGetShell.ts +12 -10
- package/src/apps/{shell → cli}/commands/mongodb/projectMongoPortForward.ts +13 -8
- package/src/apps/{shell → cli}/commands/mongodb/utils/index.ts +9 -8
- package/src/apps/{shell → cli}/commands/project/commandCloudSqlProxy.ts +23 -17
- package/src/apps/cli/commands/project/commandConfigSecrets.ts +204 -0
- package/src/apps/{shell → cli}/commands/project/commandCopyDB.ts +22 -23
- package/src/apps/{shell → cli}/commands/project/commandDeletePods.ts +8 -9
- package/src/apps/{shell → cli}/commands/project/commandDeleteProject.ts +7 -8
- package/src/apps/cli/commands/project/commandEnvVars.ts +15 -0
- package/src/apps/{shell → cli}/commands/project/commandGetMyTotalWorktime.ts +2 -2
- package/src/apps/{shell → cli}/commands/project/commandGetShell.ts +10 -10
- package/src/apps/{shell → cli}/commands/project/commandGitlabCi.ts +1 -1
- package/src/apps/cli/commands/project/commandInitGitlab.ts +203 -0
- package/src/apps/{shell → cli}/commands/project/commandInitProject.ts +14 -6
- package/src/apps/cli/commands/project/commandListPods.ts +18 -0
- package/src/apps/{shell → cli}/commands/project/commandMigrateHelm3.ts +16 -7
- package/src/apps/cli/commands/project/commandNamespace.ts +14 -0
- package/src/apps/{shell → cli}/commands/project/commandOpenCostDashboard.ts +10 -7
- package/src/apps/cli/commands/project/commandOpenDashboard.ts +45 -0
- package/src/apps/cli/commands/project/commandOpenEnv.ts +22 -0
- package/src/apps/{shell → cli}/commands/project/commandOpenGit.ts +1 -1
- package/src/apps/{shell → cli}/commands/project/commandOpenGrafana.ts +7 -7
- package/src/apps/{shell → cli}/commands/project/commandOpenGrafanaPod.ts +9 -10
- package/src/apps/{shell → cli}/commands/project/commandOpenLogs.ts +7 -7
- package/src/apps/{shell → cli}/commands/project/commandPauseProject.ts +9 -7
- package/src/apps/{shell → cli}/commands/project/commandPortForward.ts +8 -8
- package/src/apps/cli/commands/project/commandReloadConfig.ts +12 -0
- package/src/apps/{shell → cli}/commands/project/commandTriggerCronjob.ts +7 -7
- package/src/apps/{shell → cli}/commands/project/index.ts +4 -3
- package/src/apps/cli/commands/project/utils/autocompletions.ts +26 -0
- package/src/apps/cli/commands/project/utils/ensureCluster.ts +37 -0
- package/src/apps/{shell → cli}/commands/project/utils/ensureNamespace.ts +2 -3
- package/src/apps/cli/commands/project/utils/showProjectBanner.ts +11 -0
- package/src/apps/{shell → cli}/commands/shared/index.ts +0 -0
- package/src/apps/{shell → cli}/commands/theStuffThatReallyMatters/index.ts +11 -11
- package/src/apps/cli/config/writeConfig.ts +69 -0
- package/src/apps/{shell → cli}/utils/getGoogleAuthUserNumber.ts +0 -0
- package/src/apps/cli/verify/index.ts +34 -0
- package/src/apps/cli/verify/migration/fromv2.ts +242 -0
- package/src/apps/cli/verify/migration/migrateSecrets.ts +37 -0
- package/src/apps/cli/verify/migration/oldGitlabCi.ts +43 -0
- package/src/catenv.ts +3 -0
- package/src/cli.ts +8 -0
- package/src/config/getProjectConfig.ts +118 -0
- package/src/types/types.ts +0 -2
- package/src/utils/cluster.ts +15 -2
- package/src/utils/editAsFile.ts +31 -0
- package/src/utils/files.ts +6 -2
- package/src/utils/gitlab.ts +126 -32
- package/src/utils/passwordstore/index.ts +19 -21
- package/src/utils/preferences/index.ts +6 -3
- package/src/utils/projects/index.ts +14 -134
- package/tsconfig.json +3 -7
- package/bin/catenv.sh +0 -1
- package/src/apps/shell/commands/project/commandConfigSecrets.ts +0 -245
- package/src/apps/shell/commands/project/commandEnvVars.ts +0 -17
- package/src/apps/shell/commands/project/commandInitGitlab.ts +0 -157
- package/src/apps/shell/commands/project/commandListPods.ts +0 -21
- package/src/apps/shell/commands/project/commandNamespace.ts +0 -12
- package/src/apps/shell/commands/project/commandOpenDashboard.ts +0 -27
- package/src/apps/shell/commands/project/commandOpenEnv.ts +0 -18
- package/src/apps/shell/commands/project/commandVariables.ts +0 -13
- package/src/apps/shell/commands/project/utils/autocompletions.ts +0 -7
- package/src/apps/shell/commands/project/utils/ensureCluster.ts +0 -31
- package/src/apps/shell/commands/project/utils/monorepo.ts +0 -45
- package/src/index.ts +0 -17
|
@@ -0,0 +1,345 @@
|
|
|
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
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
58
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
+
};
|
|
61
|
+
exports.__esModule = true;
|
|
62
|
+
var fs_extra_1 = require("fs-extra");
|
|
63
|
+
var js_yaml_1 = require("js-yaml");
|
|
64
|
+
var lodash_1 = require("lodash");
|
|
65
|
+
var path_1 = __importDefault(require("path"));
|
|
66
|
+
var projects_1 = require("../../../../utils/projects");
|
|
67
|
+
var transformVar = function (key) { return (0, lodash_1.toUpper)((0, lodash_1.snakeCase)(key)); };
|
|
68
|
+
var DEFAULT_VARIABLES = {
|
|
69
|
+
clusterName: "production"
|
|
70
|
+
};
|
|
71
|
+
// TODO: we should find a way how to fetch the variables of the inclues directly from gitlab
|
|
72
|
+
var DEFAULT_NODE_asdfAPPLICATION = {};
|
|
73
|
+
var DEFAULT_FILES_TO_CREATE = [
|
|
74
|
+
{
|
|
75
|
+
filename: ".envrc",
|
|
76
|
+
content: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
77
|
+
return [2 /*return*/, (0, fs_extra_1.readFile)(path_1["default"].resolve(__dirname, "../includes/envrc"), "utf8")];
|
|
78
|
+
}); }); }
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
/*
|
|
82
|
+
|
|
83
|
+
TODO: reimplement as PRESETS ?
|
|
84
|
+
const PLATFORMS: { [platformName: string]: PlatformDefinition } = {
|
|
85
|
+
nextJS: {
|
|
86
|
+
variables: {},
|
|
87
|
+
gitlabCiInclude: {
|
|
88
|
+
project: "catladder/gitlab-ci",
|
|
89
|
+
ref: "v1",
|
|
90
|
+
file: "node-kubernetes.yml",
|
|
91
|
+
},
|
|
92
|
+
values: {
|
|
93
|
+
application: DEFAULT_NODE_APPLICATION,
|
|
94
|
+
},
|
|
95
|
+
filesToCreate: [
|
|
96
|
+
{
|
|
97
|
+
content: "v14",
|
|
98
|
+
filename: ".nvmrc",
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
nestJS: {
|
|
103
|
+
variables: {},
|
|
104
|
+
gitlabCiInclude: {
|
|
105
|
+
project: "catladder/gitlab-ci",
|
|
106
|
+
ref: "v1",
|
|
107
|
+
file: "node-kubernetes.yml",
|
|
108
|
+
},
|
|
109
|
+
values: {
|
|
110
|
+
application: {
|
|
111
|
+
command: "yarn start:prod --port $(PORT)",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
filesToCreate: [
|
|
115
|
+
{
|
|
116
|
+
content: "v14",
|
|
117
|
+
filename: ".nvmrc",
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
node: {
|
|
122
|
+
variables: {},
|
|
123
|
+
gitlabCiInclude: {
|
|
124
|
+
project: "catladder/gitlab-ci",
|
|
125
|
+
ref: "v1",
|
|
126
|
+
file: "node-kubernetes.yml",
|
|
127
|
+
},
|
|
128
|
+
values: {
|
|
129
|
+
application: DEFAULT_NODE_APPLICATION,
|
|
130
|
+
},
|
|
131
|
+
filesToCreate: [
|
|
132
|
+
{
|
|
133
|
+
content: "v14",
|
|
134
|
+
filename: ".nvmrc",
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
staticJs: {
|
|
139
|
+
variables: {},
|
|
140
|
+
gitlabCiInclude: {
|
|
141
|
+
project: "catladder/gitlab-ci",
|
|
142
|
+
ref: "v1",
|
|
143
|
+
file: "static-js-kubernetes.yml",
|
|
144
|
+
},
|
|
145
|
+
values: {},
|
|
146
|
+
},
|
|
147
|
+
meteor: {
|
|
148
|
+
variables: {},
|
|
149
|
+
gitlabCiInclude: {
|
|
150
|
+
project: "gitlab-ci/meteor-kubernetes",
|
|
151
|
+
ref: "v1",
|
|
152
|
+
file: "meteor-kubernetes.yml",
|
|
153
|
+
},
|
|
154
|
+
values: {},
|
|
155
|
+
},
|
|
156
|
+
rails: {
|
|
157
|
+
variables: {},
|
|
158
|
+
gitlabCiInclude: {
|
|
159
|
+
project: "catladder/gitlab-ci",
|
|
160
|
+
ref: "v1",
|
|
161
|
+
file: "rails-kubernetes.yml",
|
|
162
|
+
},
|
|
163
|
+
values: {
|
|
164
|
+
env: {
|
|
165
|
+
public: {
|
|
166
|
+
RAILS_ENV: "production",
|
|
167
|
+
PORT: 8080,
|
|
168
|
+
},
|
|
169
|
+
secret: {
|
|
170
|
+
POSTGRESQL_PASSWORD: "app-secrets",
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
application: {
|
|
174
|
+
command: ["/cnb/process/web"],
|
|
175
|
+
livenessProbe: {
|
|
176
|
+
httpGet: {
|
|
177
|
+
path: "/robots.txt",
|
|
178
|
+
httpHeaders: null,
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
readinessProbe: {
|
|
182
|
+
httpGet: {
|
|
183
|
+
path: "/robots.txt",
|
|
184
|
+
httpHeaders: null,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
cloudsql: { enabled: true },
|
|
189
|
+
jobs: {
|
|
190
|
+
"db-prepare": {
|
|
191
|
+
hook: "post-install,post-upgrade",
|
|
192
|
+
command: "/cnb/lifecycle/launcher bundle exec rake db:prepare",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
filesToCreate: [
|
|
197
|
+
{
|
|
198
|
+
filename: "values-review.yml",
|
|
199
|
+
content: async () =>
|
|
200
|
+
dump({
|
|
201
|
+
jobs: {
|
|
202
|
+
"db-prepare-seed": {
|
|
203
|
+
hook: "post-install",
|
|
204
|
+
command:
|
|
205
|
+
"/cnb/lifecycle/launcher bundle exec rake db:prepare db:seed",
|
|
206
|
+
},
|
|
207
|
+
"db-prepare": {
|
|
208
|
+
hook: "post-upgrade",
|
|
209
|
+
command: "/cnb/lifecycle/launcher bundle exec rake db:prepare",
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
}),
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
other: {
|
|
217
|
+
variables: {},
|
|
218
|
+
gitlabCiInclude: {
|
|
219
|
+
project: "catladder/gitlab-ci",
|
|
220
|
+
ref: "v1",
|
|
221
|
+
file: "panter-kubernetes-base.yml",
|
|
222
|
+
},
|
|
223
|
+
values: {},
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
*/
|
|
228
|
+
var PLATFORMS = {};
|
|
229
|
+
exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
|
|
230
|
+
return __generator(this, function (_a) {
|
|
231
|
+
return [2 /*return*/, vorpal
|
|
232
|
+
.command("project-init", "Inits a new project")
|
|
233
|
+
.action(function () {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
+
var hasGitlabFile, questions, _a, customerName, appName, componentName, platform, _b, gitlabCiInclude, platformVariables, values, filesToCreate, allVariables, allFilesToCreate, transformedVariables, gitlabCiContentObj, gitlabCiContent, shouldContinue;
|
|
236
|
+
var _this = this;
|
|
237
|
+
return __generator(this, function (_c) {
|
|
238
|
+
switch (_c.label) {
|
|
239
|
+
case 0: throw new Error("needs reimplementation");
|
|
240
|
+
case 1:
|
|
241
|
+
hasGitlabFile = _c.sent();
|
|
242
|
+
if (!hasGitlabFile) return [3 /*break*/, 2];
|
|
243
|
+
this.log("there is already a gitlab-ci.yml file. Skipping");
|
|
244
|
+
return [3 /*break*/, 6];
|
|
245
|
+
case 2:
|
|
246
|
+
this.log("Alright. Let's do this! 😼");
|
|
247
|
+
this.log("");
|
|
248
|
+
questions = [
|
|
249
|
+
{
|
|
250
|
+
type: "input",
|
|
251
|
+
name: "customerName",
|
|
252
|
+
"default": "pan",
|
|
253
|
+
message: "Which customer?"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: "input",
|
|
257
|
+
name: "appName",
|
|
258
|
+
message: "What is the app's name?"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
type: "input",
|
|
262
|
+
name: "componentName",
|
|
263
|
+
"default": "web",
|
|
264
|
+
message: "And the componentName?\n(in multi-app projects, you have to chose a different componentName for each app, e.g. frontend and backend)\n\n"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
type: "list",
|
|
268
|
+
name: "platform",
|
|
269
|
+
choices: Object.keys(PLATFORMS),
|
|
270
|
+
message: "What is your app platform?"
|
|
271
|
+
},
|
|
272
|
+
].map(function (q) { return (__assign(__assign({}, q), { validate: Boolean, message: "".concat(q.message, " ") })); });
|
|
273
|
+
return [4 /*yield*/, this.prompt(questions)];
|
|
274
|
+
case 3:
|
|
275
|
+
_a = _c.sent(), customerName = _a.customerName, appName = _a.appName, componentName = _a.componentName, platform = _a.platform;
|
|
276
|
+
_b = PLATFORMS[platform], gitlabCiInclude = _b.gitlabCiInclude, platformVariables = _b.variables, values = _b.values, filesToCreate = _b.filesToCreate;
|
|
277
|
+
allVariables = __assign(__assign({ customerName: customerName, appName: appName, componentName: componentName }, DEFAULT_VARIABLES), platformVariables);
|
|
278
|
+
allFilesToCreate = __spreadArray(__spreadArray([], DEFAULT_FILES_TO_CREATE, true), (filesToCreate !== null && filesToCreate !== void 0 ? filesToCreate : []), true);
|
|
279
|
+
transformedVariables = (0, lodash_1.mapKeys)(allVariables, function (value, key) {
|
|
280
|
+
return transformVar(key);
|
|
281
|
+
});
|
|
282
|
+
gitlabCiContentObj = {
|
|
283
|
+
include: [gitlabCiInclude],
|
|
284
|
+
variables: transformedVariables
|
|
285
|
+
};
|
|
286
|
+
gitlabCiContent = (0, js_yaml_1.dump)(gitlabCiContentObj);
|
|
287
|
+
return [4 /*yield*/, (0, fs_extra_1.writeFile)(".gitlab-ci.yml", gitlabCiContent)];
|
|
288
|
+
case 4:
|
|
289
|
+
_c.sent();
|
|
290
|
+
allFilesToCreate.forEach(function (_a) {
|
|
291
|
+
var filename = _a.filename, content = _a.content;
|
|
292
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
293
|
+
var theContent, _b;
|
|
294
|
+
return __generator(this, function (_c) {
|
|
295
|
+
switch (_c.label) {
|
|
296
|
+
case 0:
|
|
297
|
+
if (!(typeof content === "function")) return [3 /*break*/, 2];
|
|
298
|
+
return [4 /*yield*/, content()];
|
|
299
|
+
case 1:
|
|
300
|
+
_b = _c.sent();
|
|
301
|
+
return [3 /*break*/, 3];
|
|
302
|
+
case 2:
|
|
303
|
+
_b = content;
|
|
304
|
+
_c.label = 3;
|
|
305
|
+
case 3:
|
|
306
|
+
theContent = _b;
|
|
307
|
+
return [4 /*yield*/, (0, fs_extra_1.writeFile)(filename, theContent)];
|
|
308
|
+
case 4:
|
|
309
|
+
_c.sent();
|
|
310
|
+
return [2 /*return*/];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
return [4 /*yield*/, (0, fs_extra_1.writeFile)("values.yml", (0, js_yaml_1.dump)(values))];
|
|
316
|
+
case 5:
|
|
317
|
+
_c.sent();
|
|
318
|
+
this.log("");
|
|
319
|
+
this.log("gitlab-ci created! 💪😻");
|
|
320
|
+
this.log("feel free to adjust it to your needs!");
|
|
321
|
+
this.log("");
|
|
322
|
+
this.log("we also create an .envrc for you which works with direnv");
|
|
323
|
+
this.log("");
|
|
324
|
+
_c.label = 6;
|
|
325
|
+
case 6: return [4 /*yield*/, this.prompt({
|
|
326
|
+
"default": true,
|
|
327
|
+
message: "should we continue with setting up your gitlab? 🤔 (connecting cluster and stuff)",
|
|
328
|
+
name: "shouldContinue",
|
|
329
|
+
type: "confirm"
|
|
330
|
+
})];
|
|
331
|
+
case 7:
|
|
332
|
+
shouldContinue = (_c.sent()).shouldContinue;
|
|
333
|
+
if (!shouldContinue) return [3 /*break*/, 9];
|
|
334
|
+
return [4 /*yield*/, vorpal.execSync("project-init-gitlab")];
|
|
335
|
+
case 8:
|
|
336
|
+
_c.sent();
|
|
337
|
+
_c.label = 9;
|
|
338
|
+
case 9: return [2 /*return*/];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
})];
|
|
343
|
+
});
|
|
344
|
+
}); });
|
|
345
|
+
//# sourceMappingURL=commandInitProject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandInitProject.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandInitProject.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
var js_yaml_1 = require("js-yaml");
|
|
43
|
+
var lodash_1 = require("lodash");
|
|
44
|
+
var projects_1 = require("../../../../utils/projects");
|
|
45
|
+
var autocompletions_1 = require("./utils/autocompletions");
|
|
46
|
+
var ensureCluster_1 = __importDefault(require("./utils/ensureCluster"));
|
|
47
|
+
exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return __generator(this, function (_c) {
|
|
50
|
+
switch (_c.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
_b = (_a = vorpal
|
|
53
|
+
.command("project-list-pods <envComponent>", "list pods of local project"))
|
|
54
|
+
.autocomplete;
|
|
55
|
+
return [4 /*yield*/, (0, autocompletions_1.envAndComponents)()];
|
|
56
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])
|
|
57
|
+
.action(function (_a) {
|
|
58
|
+
var envComponent = _a.envComponent;
|
|
59
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60
|
+
var pods;
|
|
61
|
+
return __generator(this, function (_b) {
|
|
62
|
+
switch (_b.label) {
|
|
63
|
+
case 0: return [4 /*yield*/, ensureCluster_1["default"].call(this, envComponent)];
|
|
64
|
+
case 1:
|
|
65
|
+
_b.sent();
|
|
66
|
+
return [4 /*yield*/, (0, projects_1.getProjectPods)(envComponent)];
|
|
67
|
+
case 2:
|
|
68
|
+
pods = _b.sent();
|
|
69
|
+
this.log((0, js_yaml_1.dump)(pods.map(function (p) { return (0, lodash_1.pick)(p, ["metadata.name", "status.startTime"]); })));
|
|
70
|
+
return [2 /*return*/];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
})];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}); });
|
|
78
|
+
//# sourceMappingURL=commandListPods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandListPods.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandListPods.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAC/B,iCAA8B;AAE9B,uDAA4D;AAC5D,2DAA2D;AAC3D,wEAAkD;AAElD,sBAAe,UAAO,MAAc;;;;;gBAClC,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CAAC,kCAAkC,EAAE,4BAA4B,CAAC,CAAA;qBACzE,YAAY,CAAA;gBAAC,qBAAM,IAAA,kCAAgB,GAAE,EAAA;oBAFxC,sBAAA,cAEgB,SAAwB,EAAC;qBACtC,MAAM,CAAC,UAAgB,EAAgB;wBAAd,YAAY,kBAAA;;;;;wCACpC,qBAAM,0BAAa,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,EAAA;;oCAA5C,SAA4C,CAAC;oCAChC,qBAAM,IAAA,yBAAc,EAAC,YAAY,CAAC,EAAA;;oCAAzC,IAAI,GAAG,SAAkC;oCAC/C,IAAI,CAAC,GAAG,CACN,IAAA,cAAI,EAAC,IAAI,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,IAAA,aAAI,EAAC,CAAC,EAAE,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,EAA9C,CAA8C,CAAC,CAAC,CACtE,CAAC;;;;;iBACH,CAAC,EAAA;;;KAAA,EAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Vorpal from "vorpal";
|
|
2
|
+
declare const _default: (vorpal: Vorpal) => Promise<Vorpal.Command>;
|
|
3
|
+
/**
|
|
4
|
+
* Error: rendered manifests contain a resource that already exists.
|
|
5
|
+
* Unable to continue with install: ConfigMap "web-app-env" in namespace "pvl-bike2school-dev" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "pvl-bike2school-dev-web"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "pvl-bike2school-dev"
|
|
6
|
+
*/
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
var child_process_promise_1 = require("child-process-promise");
|
|
40
|
+
var getProjectConfig_1 = require("../../../../config/getProjectConfig");
|
|
41
|
+
var log_1 = require("../../../../utils/log");
|
|
42
|
+
var autocompletions_1 = require("./utils/autocompletions");
|
|
43
|
+
/**
|
|
44
|
+
* Error: rendered manifests contain a resource that already exists.
|
|
45
|
+
* Unable to continue with install: ConfigMap "web-app-env" in namespace "pvl-bike2school-dev" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "pvl-bike2school-dev-web"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "pvl-bike2school-dev"
|
|
46
|
+
*/
|
|
47
|
+
exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return __generator(this, function (_c) {
|
|
50
|
+
switch (_c.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
_b = (_a = vorpal
|
|
53
|
+
.command("project-migrate-helm3 <envComponent>", "Do manual step for helm2 to helm3 migration"))
|
|
54
|
+
.autocomplete;
|
|
55
|
+
return [4 /*yield*/, (0, autocompletions_1.envAndComponents)()];
|
|
56
|
+
case 1: return [2 /*return*/, _b.apply(_a, [(_c.sent()).filter(function (e) { return !e.startsWith("local") && !e.startsWith("review"); })])
|
|
57
|
+
.action(function (_a) {
|
|
58
|
+
var envComponent = _a.envComponent;
|
|
59
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60
|
+
var _b, env, componentName, result, version, e_1, releaseName, r, e_2;
|
|
61
|
+
return __generator(this, function (_c) {
|
|
62
|
+
switch (_c.label) {
|
|
63
|
+
case 0:
|
|
64
|
+
_c.trys.push([0, 8, , 9]);
|
|
65
|
+
_b = (0, getProjectConfig_1.parseChoice)(envComponent), env = _b.env, componentName = _b.componentName;
|
|
66
|
+
return [4 /*yield*/, (0, child_process_promise_1.exec)("helm version --short")];
|
|
67
|
+
case 1:
|
|
68
|
+
result = _c.sent();
|
|
69
|
+
version = result.stdout;
|
|
70
|
+
this.log("your helm version: ".concat(version));
|
|
71
|
+
if (!version.startsWith("v3")) {
|
|
72
|
+
throw new Error("no helm3");
|
|
73
|
+
}
|
|
74
|
+
_c.label = 2;
|
|
75
|
+
case 2:
|
|
76
|
+
_c.trys.push([2, 4, , 5]);
|
|
77
|
+
return [4 /*yield*/, (0, child_process_promise_1.exec)("helm plugin install https://github.com/helm/helm-2to3.git")];
|
|
78
|
+
case 3:
|
|
79
|
+
_c.sent();
|
|
80
|
+
this.log("successfully installed plugin https://github.com/helm/helm-2to3.git");
|
|
81
|
+
return [3 /*break*/, 5];
|
|
82
|
+
case 4:
|
|
83
|
+
e_1 = _c.sent();
|
|
84
|
+
return [3 /*break*/, 5];
|
|
85
|
+
case 5: return [4 /*yield*/, (0, getProjectConfig_1.getEnvironment)(env, componentName)];
|
|
86
|
+
case 6:
|
|
87
|
+
releaseName = (_c.sent()).envVars
|
|
88
|
+
.RELEASE_NAME;
|
|
89
|
+
this.log("helm release name: ".concat(releaseName));
|
|
90
|
+
this.log("");
|
|
91
|
+
this.log("migrating now... 😼. This may take a moment");
|
|
92
|
+
this.log("");
|
|
93
|
+
return [4 /*yield*/, (0, child_process_promise_1.exec)("helm 2to3 convert --delete-v2-releases ".concat(releaseName))];
|
|
94
|
+
case 7:
|
|
95
|
+
r = _c.sent();
|
|
96
|
+
this.log(r);
|
|
97
|
+
return [3 /*break*/, 9];
|
|
98
|
+
case 8:
|
|
99
|
+
e_2 = _c.sent();
|
|
100
|
+
(0, log_1.logError)(this, e_2.message);
|
|
101
|
+
this.log("make sure that you have installed latest helm3 locally");
|
|
102
|
+
this.log("(e.g. brew upgrade helm)");
|
|
103
|
+
this.log("");
|
|
104
|
+
return [3 /*break*/, 9];
|
|
105
|
+
case 9: return [2 /*return*/];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
})];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}); });
|
|
113
|
+
//# sourceMappingURL=commandMigrateHelm3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandMigrateHelm3.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandMigrateHelm3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA6C;AAE7C,wEAG6C;AAC7C,6CAAiD;AAEjD,2DAA2D;AAE3D;;;GAGG;AACH,sBAAe,UAAO,MAAc;;;;;gBAClC,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CACN,sCAAsC,EACtC,6CAA6C,CAC9C,CAAA;qBACA,YAAY,CAAA;gBACV,qBAAM,IAAA,kCAAgB,GAAE,EAAA;oBAN7B,sBAAA,cAMI,CAAC,SAAwB,CAAC,CAAC,MAAM,CAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAjD,CAAiD,CACzD,EACF;qBACA,MAAM,CAAC,UAAgB,EAAgB;wBAAd,YAAY,kBAAA;;;;;;;oCAE5B,KAAyB,IAAA,8BAAW,EAAC,YAAY,CAAC,EAAhD,GAAG,SAAA,EAAE,aAAa,mBAAA,CAA+B;oCAC1C,qBAAM,IAAA,4BAAI,EAAC,sBAAsB,CAAC,EAAA;;oCAA3C,MAAM,GAAG,SAAkC;oCAC3C,OAAO,GAAG,MAAM,CAAC,MAAgB,CAAC;oCACxC,IAAI,CAAC,GAAG,CAAC,6BAAsB,OAAO,CAAE,CAAC,CAAC;oCAC1C,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;wCAC7B,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;qCAC7B;;;;oCAEC,qBAAM,IAAA,4BAAI,EACR,2DAA2D,CAC5D,EAAA;;oCAFD,SAEC,CAAC;oCACF,IAAI,CAAC,GAAG,CACN,qEAAqE,CACtE,CAAC;;;;;wCAKiB,qBAAM,IAAA,iCAAc,EAAC,GAAG,EAAE,aAAa,CAAC,EAAA;;oCAAvD,WAAW,GAAG,CAAC,SAAwC,CAAC,CAAC,OAAO;yCACnE,YAAY;oCACf,IAAI,CAAC,GAAG,CAAC,6BAAsB,WAAW,CAAE,CAAC,CAAC;oCAC9C,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oCACb,IAAI,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;oCACxD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oCACH,qBAAM,IAAA,4BAAI,EAClB,iDAA0C,WAAW,CAAE,CACxD,EAAA;;oCAFK,CAAC,GAAG,SAET;oCACD,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;;;;oCAEZ,IAAA,cAAQ,EAAC,IAAI,EAAE,GAAC,CAAC,OAAO,CAAC,CAAC;oCAC1B,IAAI,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;oCACnE,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;oCACrC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;;;;;iBAEhB,CAAC,EAAA;;;KAAA,EAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
var projects_1 = require("../../../../utils/projects");
|
|
40
|
+
var autocompletions_1 = require("./utils/autocompletions");
|
|
41
|
+
exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
return __generator(this, function (_c) {
|
|
44
|
+
switch (_c.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
_b = (_a = vorpal
|
|
47
|
+
.command("project-namespace <envComponent>", "show namespace of local project"))
|
|
48
|
+
.autocomplete;
|
|
49
|
+
return [4 /*yield*/, (0, autocompletions_1.envAndComponents)()];
|
|
50
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])
|
|
51
|
+
.action(function (_a) {
|
|
52
|
+
var envComponent = _a.envComponent;
|
|
53
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
+
var _b;
|
|
55
|
+
return __generator(this, function (_c) {
|
|
56
|
+
switch (_c.label) {
|
|
57
|
+
case 0:
|
|
58
|
+
_b = this.log;
|
|
59
|
+
return [4 /*yield*/, (0, projects_1.getProjectNamespace)(envComponent)];
|
|
60
|
+
case 1:
|
|
61
|
+
_b.apply(this, [_c.sent()]);
|
|
62
|
+
return [2 /*return*/];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
})];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}); });
|
|
70
|
+
//# sourceMappingURL=commandNamespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandNamespace.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandNamespace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uDAAiE;AACjE,2DAA2D;AAE3D,sBAAe,UAAO,MAAc;;;;;gBAClC,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CACN,kCAAkC,EAClC,iCAAiC,CAClC,CAAA;qBACA,YAAY,CAAA;gBAAC,qBAAM,IAAA,kCAAgB,GAAE,EAAA;oBALxC,sBAAA,cAKgB,SAAwB,EAAC;qBACtC,MAAM,CAAC,UAAgB,EAAgB;wBAAd,YAAY,kBAAA;;;;;;oCACpC,KAAA,IAAI,CAAC,GAAG,CAAA;oCAAC,qBAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,EAAA;;oCAAhD,SAAA,IAAI,GAAK,SAAuC,EAAC,CAAC;;;;;iBACnD,CAAC,EAAA;;;KAAA,EAAC"}
|