@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.
Files changed (209) hide show
  1. package/package.json +2 -2
  2. package/dist/apps/catenv/catenv.d.ts +0 -2
  3. package/dist/apps/catenv/catenv.js +0 -135
  4. package/dist/apps/catenv/catenv.js.map +0 -1
  5. package/dist/apps/cli/cli.d.ts +0 -2
  6. package/dist/apps/cli/cli.js +0 -81
  7. package/dist/apps/cli/cli.js.map +0 -1
  8. package/dist/apps/cli/commands/general/index.d.ts +0 -4
  9. package/dist/apps/cli/commands/general/index.js +0 -274
  10. package/dist/apps/cli/commands/general/index.js.map +0 -1
  11. package/dist/apps/cli/commands/general/namespaceAutoCompletion.d.ts +0 -3
  12. package/dist/apps/cli/commands/general/namespaceAutoCompletion.js +0 -56
  13. package/dist/apps/cli/commands/general/namespaceAutoCompletion.js.map +0 -1
  14. package/dist/apps/cli/commands/general/portForward.d.ts +0 -3
  15. package/dist/apps/cli/commands/general/portForward.js +0 -98
  16. package/dist/apps/cli/commands/general/portForward.js.map +0 -1
  17. package/dist/apps/cli/commands/mongodb/index.d.ts +0 -3
  18. package/dist/apps/cli/commands/mongodb/index.js +0 -53
  19. package/dist/apps/cli/commands/mongodb/index.js.map +0 -1
  20. package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.d.ts +0 -3
  21. package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.js +0 -190
  22. package/dist/apps/cli/commands/mongodb/projectMongoDestroyMember.js.map +0 -1
  23. package/dist/apps/cli/commands/mongodb/projectMongoGetShell.d.ts +0 -3
  24. package/dist/apps/cli/commands/mongodb/projectMongoGetShell.js +0 -96
  25. package/dist/apps/cli/commands/mongodb/projectMongoGetShell.js.map +0 -1
  26. package/dist/apps/cli/commands/mongodb/projectMongoPortForward.d.ts +0 -3
  27. package/dist/apps/cli/commands/mongodb/projectMongoPortForward.js +0 -105
  28. package/dist/apps/cli/commands/mongodb/projectMongoPortForward.js.map +0 -1
  29. package/dist/apps/cli/commands/mongodb/utils/index.d.ts +0 -13
  30. package/dist/apps/cli/commands/mongodb/utils/index.js +0 -167
  31. package/dist/apps/cli/commands/mongodb/utils/index.js.map +0 -1
  32. package/dist/apps/cli/commands/project/commandCloudSqlProxy.d.ts +0 -3
  33. package/dist/apps/cli/commands/project/commandCloudSqlProxy.js +0 -128
  34. package/dist/apps/cli/commands/project/commandCloudSqlProxy.js.map +0 -1
  35. package/dist/apps/cli/commands/project/commandConfigSecrets.d.ts +0 -3
  36. package/dist/apps/cli/commands/project/commandConfigSecrets.js +0 -254
  37. package/dist/apps/cli/commands/project/commandConfigSecrets.js.map +0 -1
  38. package/dist/apps/cli/commands/project/commandCopyDB.d.ts +0 -3
  39. package/dist/apps/cli/commands/project/commandCopyDB.js +0 -102
  40. package/dist/apps/cli/commands/project/commandCopyDB.js.map +0 -1
  41. package/dist/apps/cli/commands/project/commandDeletePods.d.ts +0 -3
  42. package/dist/apps/cli/commands/project/commandDeletePods.js +0 -119
  43. package/dist/apps/cli/commands/project/commandDeletePods.js.map +0 -1
  44. package/dist/apps/cli/commands/project/commandDeleteProject.d.ts +0 -3
  45. package/dist/apps/cli/commands/project/commandDeleteProject.js +0 -97
  46. package/dist/apps/cli/commands/project/commandDeleteProject.js.map +0 -1
  47. package/dist/apps/cli/commands/project/commandEnvVars.d.ts +0 -3
  48. package/dist/apps/cli/commands/project/commandEnvVars.js +0 -74
  49. package/dist/apps/cli/commands/project/commandEnvVars.js.map +0 -1
  50. package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.d.ts +0 -3
  51. package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js +0 -58
  52. package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js.map +0 -1
  53. package/dist/apps/cli/commands/project/commandGetShell.d.ts +0 -3
  54. package/dist/apps/cli/commands/project/commandGetShell.js +0 -92
  55. package/dist/apps/cli/commands/project/commandGetShell.js.map +0 -1
  56. package/dist/apps/cli/commands/project/commandGitlabCi.d.ts +0 -3
  57. package/dist/apps/cli/commands/project/commandGitlabCi.js +0 -185
  58. package/dist/apps/cli/commands/project/commandGitlabCi.js.map +0 -1
  59. package/dist/apps/cli/commands/project/commandInitGitlab.d.ts +0 -3
  60. package/dist/apps/cli/commands/project/commandInitGitlab.js +0 -245
  61. package/dist/apps/cli/commands/project/commandInitGitlab.js.map +0 -1
  62. package/dist/apps/cli/commands/project/commandInitProject.d.ts +0 -3
  63. package/dist/apps/cli/commands/project/commandInitProject.js +0 -345
  64. package/dist/apps/cli/commands/project/commandInitProject.js.map +0 -1
  65. package/dist/apps/cli/commands/project/commandListPods.d.ts +0 -3
  66. package/dist/apps/cli/commands/project/commandListPods.js +0 -78
  67. package/dist/apps/cli/commands/project/commandListPods.js.map +0 -1
  68. package/dist/apps/cli/commands/project/commandMigrateHelm3.d.ts +0 -7
  69. package/dist/apps/cli/commands/project/commandMigrateHelm3.js +0 -113
  70. package/dist/apps/cli/commands/project/commandMigrateHelm3.js.map +0 -1
  71. package/dist/apps/cli/commands/project/commandNamespace.d.ts +0 -3
  72. package/dist/apps/cli/commands/project/commandNamespace.js +0 -70
  73. package/dist/apps/cli/commands/project/commandNamespace.js.map +0 -1
  74. package/dist/apps/cli/commands/project/commandOpenCostDashboard.d.ts +0 -3
  75. package/dist/apps/cli/commands/project/commandOpenCostDashboard.js +0 -83
  76. package/dist/apps/cli/commands/project/commandOpenCostDashboard.js.map +0 -1
  77. package/dist/apps/cli/commands/project/commandOpenDashboard.d.ts +0 -3
  78. package/dist/apps/cli/commands/project/commandOpenDashboard.js +0 -92
  79. package/dist/apps/cli/commands/project/commandOpenDashboard.js.map +0 -1
  80. package/dist/apps/cli/commands/project/commandOpenEnv.d.ts +0 -3
  81. package/dist/apps/cli/commands/project/commandOpenEnv.js +0 -80
  82. package/dist/apps/cli/commands/project/commandOpenEnv.js.map +0 -1
  83. package/dist/apps/cli/commands/project/commandOpenGit.d.ts +0 -3
  84. package/dist/apps/cli/commands/project/commandOpenGit.js +0 -56
  85. package/dist/apps/cli/commands/project/commandOpenGit.js.map +0 -1
  86. package/dist/apps/cli/commands/project/commandOpenGrafana.d.ts +0 -3
  87. package/dist/apps/cli/commands/project/commandOpenGrafana.js +0 -83
  88. package/dist/apps/cli/commands/project/commandOpenGrafana.js.map +0 -1
  89. package/dist/apps/cli/commands/project/commandOpenGrafanaPod.d.ts +0 -3
  90. package/dist/apps/cli/commands/project/commandOpenGrafanaPod.js +0 -99
  91. package/dist/apps/cli/commands/project/commandOpenGrafanaPod.js.map +0 -1
  92. package/dist/apps/cli/commands/project/commandOpenLogs.d.ts +0 -3
  93. package/dist/apps/cli/commands/project/commandOpenLogs.js +0 -87
  94. package/dist/apps/cli/commands/project/commandOpenLogs.js.map +0 -1
  95. package/dist/apps/cli/commands/project/commandPauseProject.d.ts +0 -3
  96. package/dist/apps/cli/commands/project/commandPauseProject.js +0 -97
  97. package/dist/apps/cli/commands/project/commandPauseProject.js.map +0 -1
  98. package/dist/apps/cli/commands/project/commandPortForward.d.ts +0 -3
  99. package/dist/apps/cli/commands/project/commandPortForward.js +0 -106
  100. package/dist/apps/cli/commands/project/commandPortForward.js.map +0 -1
  101. package/dist/apps/cli/commands/project/commandReloadConfig.d.ts +0 -3
  102. package/dist/apps/cli/commands/project/commandReloadConfig.js +0 -62
  103. package/dist/apps/cli/commands/project/commandReloadConfig.js.map +0 -1
  104. package/dist/apps/cli/commands/project/commandTriggerCronjob.d.ts +0 -3
  105. package/dist/apps/cli/commands/project/commandTriggerCronjob.js +0 -144
  106. package/dist/apps/cli/commands/project/commandTriggerCronjob.js.map +0 -1
  107. package/dist/apps/cli/commands/project/index.d.ts +0 -3
  108. package/dist/apps/cli/commands/project/index.js +0 -97
  109. package/dist/apps/cli/commands/project/index.js.map +0 -1
  110. package/dist/apps/cli/commands/project/utils/autocompletions.d.ts +0 -3
  111. package/dist/apps/cli/commands/project/utils/autocompletions.js +0 -96
  112. package/dist/apps/cli/commands/project/utils/autocompletions.js.map +0 -1
  113. package/dist/apps/cli/commands/project/utils/ensureCluster.d.ts +0 -1
  114. package/dist/apps/cli/commands/project/utils/ensureCluster.js +0 -84
  115. package/dist/apps/cli/commands/project/utils/ensureCluster.js.map +0 -1
  116. package/dist/apps/cli/commands/project/utils/ensureNamespace.d.ts +0 -1
  117. package/dist/apps/cli/commands/project/utils/ensureNamespace.js +0 -92
  118. package/dist/apps/cli/commands/project/utils/ensureNamespace.js.map +0 -1
  119. package/dist/apps/cli/commands/project/utils/showProjectBanner.d.ts +0 -2
  120. package/dist/apps/cli/commands/project/utils/showProjectBanner.js +0 -58
  121. package/dist/apps/cli/commands/project/utils/showProjectBanner.js.map +0 -1
  122. package/dist/apps/cli/commands/shared/index.d.ts +0 -2
  123. package/dist/apps/cli/commands/shared/index.js +0 -72
  124. package/dist/apps/cli/commands/shared/index.js.map +0 -1
  125. package/dist/apps/cli/commands/theStuffThatReallyMatters/index.d.ts +0 -3
  126. package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js +0 -131
  127. package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js.map +0 -1
  128. package/dist/apps/cli/config/writeConfig.d.ts +0 -5
  129. package/dist/apps/cli/config/writeConfig.js +0 -104
  130. package/dist/apps/cli/config/writeConfig.js.map +0 -1
  131. package/dist/apps/cli/utils/getGoogleAuthUserNumber.d.ts +0 -1
  132. package/dist/apps/cli/utils/getGoogleAuthUserNumber.js +0 -69
  133. package/dist/apps/cli/utils/getGoogleAuthUserNumber.js.map +0 -1
  134. package/dist/apps/cli/verify/index.d.ts +0 -2
  135. package/dist/apps/cli/verify/index.js +0 -90
  136. package/dist/apps/cli/verify/index.js.map +0 -1
  137. package/dist/apps/cli/verify/migration/fromv2.d.ts +0 -3
  138. package/dist/apps/cli/verify/migration/fromv2.js +0 -322
  139. package/dist/apps/cli/verify/migration/fromv2.js.map +0 -1
  140. package/dist/apps/cli/verify/migration/migrateSecrets.d.ts +0 -4
  141. package/dist/apps/cli/verify/migration/migrateSecrets.js +0 -88
  142. package/dist/apps/cli/verify/migration/migrateSecrets.js.map +0 -1
  143. package/dist/apps/cli/verify/migration/oldGitlabCi.d.ts +0 -17
  144. package/dist/apps/cli/verify/migration/oldGitlabCi.js +0 -26
  145. package/dist/apps/cli/verify/migration/oldGitlabCi.js.map +0 -1
  146. package/dist/catenv.d.ts +0 -1
  147. package/dist/catenv.js +0 -8
  148. package/dist/catenv.js.map +0 -1
  149. package/dist/cli.d.ts +0 -1
  150. package/dist/cli.js +0 -13
  151. package/dist/cli.js.map +0 -1
  152. package/dist/config/clusters.d.ts +0 -14
  153. package/dist/config/clusters.js +0 -72
  154. package/dist/config/clusters.js.map +0 -1
  155. package/dist/config/constants.d.ts +0 -4
  156. package/dist/config/constants.js +0 -8
  157. package/dist/config/constants.js.map +0 -1
  158. package/dist/config/getProjectConfig.d.ts +0 -21
  159. package/dist/config/getProjectConfig.js +0 -212
  160. package/dist/config/getProjectConfig.js.map +0 -1
  161. package/dist/k8sApi/index.d.ts +0 -5
  162. package/dist/k8sApi/index.js +0 -11
  163. package/dist/k8sApi/index.js.map +0 -1
  164. package/dist/packageInfos.d.ts +0 -2
  165. package/dist/packageInfos.js +0 -6
  166. package/dist/packageInfos.js.map +0 -1
  167. package/dist/tsconfig.tsbuildinfo +0 -1
  168. package/dist/types/types.d.ts +0 -18
  169. package/dist/types/types.js +0 -3
  170. package/dist/types/types.js.map +0 -1
  171. package/dist/utils/cluster.d.ts +0 -12
  172. package/dist/utils/cluster.js +0 -100
  173. package/dist/utils/cluster.js.map +0 -1
  174. package/dist/utils/editAsFile.d.ts +0 -1
  175. package/dist/utils/editAsFile.js +0 -85
  176. package/dist/utils/editAsFile.js.map +0 -1
  177. package/dist/utils/files.d.ts +0 -2
  178. package/dist/utils/files.js +0 -83
  179. package/dist/utils/files.js.map +0 -1
  180. package/dist/utils/formatEnvVars.d.ts +0 -2
  181. package/dist/utils/formatEnvVars.js +0 -10
  182. package/dist/utils/formatEnvVars.js.map +0 -1
  183. package/dist/utils/getEditor.d.ts +0 -4
  184. package/dist/utils/getEditor.js +0 -70
  185. package/dist/utils/getEditor.js.map +0 -1
  186. package/dist/utils/gitlab.d.ts +0 -21
  187. package/dist/utils/gitlab.js +0 -258
  188. package/dist/utils/gitlab.js.map +0 -1
  189. package/dist/utils/log.d.ts +0 -1
  190. package/dist/utils/log.js +0 -14
  191. package/dist/utils/log.js.map +0 -1
  192. package/dist/utils/passwordstore/index.d.ts +0 -8
  193. package/dist/utils/passwordstore/index.js +0 -378
  194. package/dist/utils/passwordstore/index.js.map +0 -1
  195. package/dist/utils/portForward.d.ts +0 -4
  196. package/dist/utils/portForward.js +0 -116
  197. package/dist/utils/portForward.js.map +0 -1
  198. package/dist/utils/preferences/index.d.ts +0 -3
  199. package/dist/utils/preferences/index.js +0 -119
  200. package/dist/utils/preferences/index.js.map +0 -1
  201. package/dist/utils/projects/index.d.ts +0 -8
  202. package/dist/utils/projects/index.js +0 -150
  203. package/dist/utils/projects/index.js.map +0 -1
  204. package/dist/utils/promise.d.ts +0 -2
  205. package/dist/utils/promise.js +0 -62
  206. package/dist/utils/promise.js.map +0 -1
  207. package/dist/utils/shell.d.ts +0 -1
  208. package/dist/utils/shell.js +0 -81
  209. package/dist/utils/shell.js.map +0 -1
@@ -1,87 +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
- var cluster_1 = require("../../../../utils/cluster");
43
- var projects_1 = require("../../../../utils/projects");
44
- var getGoogleAuthUserNumber_1 = require("../../utils/getGoogleAuthUserNumber");
45
- var shared_1 = require("../shared");
46
- var autocompletions_1 = require("./utils/autocompletions");
47
- var ensureCluster_1 = __importDefault(require("./utils/ensureCluster"));
48
- exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
49
- var _a, _b;
50
- return __generator(this, function (_c) {
51
- switch (_c.label) {
52
- case 0:
53
- _b = (_a = vorpal
54
- .command("project-open-logs <envComponent>", "open google cloud logs (stackdriver logs)"))
55
- .autocomplete;
56
- return [4 /*yield*/, (0, autocompletions_1.envAndComponents)()];
57
- case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])
58
- .action(function (_a) {
59
- var envComponent = _a.envComponent;
60
- return __awaiter(this, void 0, void 0, function () {
61
- var clustername, namespace, authGoogleNumber;
62
- return __generator(this, function (_b) {
63
- switch (_b.label) {
64
- case 0: return [4 /*yield*/, ensureCluster_1["default"].call(this, envComponent)];
65
- case 1:
66
- _b.sent();
67
- return [4 /*yield*/, (0, cluster_1.getCurrentConnectedClusterName)()];
68
- case 2:
69
- clustername = _b.sent();
70
- return [4 /*yield*/, (0, projects_1.getProjectNamespace)(envComponent)];
71
- case 3:
72
- namespace = _b.sent();
73
- return [4 /*yield*/, getGoogleAuthUserNumber_1.getGoogleAuthUserNumber.call(this, vorpal)];
74
- case 4:
75
- authGoogleNumber = _b.sent();
76
- return [4 /*yield*/, (0, shared_1.openGoogleCloudLogs)(authGoogleNumber, clustername, namespace)];
77
- case 5:
78
- _b.sent();
79
- return [2 /*return*/];
80
- }
81
- });
82
- });
83
- })];
84
- }
85
- });
86
- }); });
87
- //# sourceMappingURL=commandOpenLogs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandOpenLogs.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandOpenLogs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qDAA2E;AAC3E,uDAAiE;AACjE,+EAA8E;AAC9E,oCAAgD;AAChD,2DAA2D;AAC3D,wEAAkD;AAElD,sBAAe,UAAO,MAAc;;;;;gBAClC,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CACN,kCAAkC,EAClC,2CAA2C,CAC5C,CAAA;qBACA,YAAY,CAAA;gBAAC,qBAAM,IAAA,kCAAgB,GAAE,EAAA;oBALxC,sBAAA,cAKgB,SAAwB,EAAC;qBACtC,MAAM,CAAC,UAAgB,EAAgB;wBAAd,YAAY,kBAAA;;;;;wCACpC,qBAAM,0BAAa,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,EAAA;;oCAA5C,SAA4C,CAAC;oCACzB,qBAAM,IAAA,wCAA8B,GAAE,EAAA;;oCAApD,WAAW,GAAG,SAAsC;oCACxC,qBAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,EAAA;;oCAAnD,SAAS,GAAG,SAAuC;oCAChC,qBAAM,iDAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAA;;oCAAnE,gBAAgB,GAAG,SAAgD;oCAEzE,qBAAM,IAAA,4BAAmB,EAAC,gBAAgB,EAAE,WAAW,EAAE,SAAS,CAAC,EAAA;;oCAAnE,SAAmE,CAAC;;;;;iBACrE,CAAC,EAAA;;;KAAA,EAAC"}
@@ -1,3 +0,0 @@
1
- import Vorpal from "vorpal";
2
- declare const _default: (vorpal: Vorpal) => Promise<Vorpal.Command>;
3
- export default _default;
@@ -1,97 +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
- var child_process_promise_1 = require("child-process-promise");
51
- var projects_1 = require("../../../../utils/projects");
52
- var autocompletions_1 = require("./utils/autocompletions");
53
- exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
54
- var _a, _b;
55
- return __generator(this, function (_c) {
56
- switch (_c.label) {
57
- case 0:
58
- _b = (_a = vorpal
59
- .command("project-pause <envComponent>", "halts all running pods (scales to 0)"))
60
- .autocomplete;
61
- return [4 /*yield*/, (0, autocompletions_1.envAndComponents)()];
62
- case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])
63
- .action(function (_a) {
64
- var envComponent = _a.envComponent;
65
- return __awaiter(this, void 0, void 0, function () {
66
- var namespace, shouldContinue, fullCommand, stdout;
67
- return __generator(this, function (_b) {
68
- switch (_b.label) {
69
- case 0: return [4 /*yield*/, (0, projects_1.getProjectNamespace)(envComponent)];
70
- case 1:
71
- namespace = _b.sent();
72
- return [4 /*yield*/, this.prompt({
73
- type: "confirm",
74
- name: "shouldContinue",
75
- message: "This will STOP all running pods in the namespace ".concat(namespace, ". You will need to manually scale back up or re-deploy. Continue? \uD83E\uDD14 ")
76
- })];
77
- case 2:
78
- shouldContinue = (_b.sent()).shouldContinue;
79
- if (!shouldContinue) {
80
- return [2 /*return*/];
81
- }
82
- fullCommand = "kubectl scale statefulset,deployment --all --replicas=0 --namespace=".concat(namespace);
83
- return [4 /*yield*/, (0, child_process_promise_1.exec)(fullCommand, {
84
- env: __assign(__assign({}, process.env), { DEBUG: "" })
85
- })];
86
- case 3:
87
- stdout = (_b.sent()).stdout;
88
- this.log(stdout);
89
- return [2 /*return*/];
90
- }
91
- });
92
- });
93
- })];
94
- }
95
- });
96
- }); });
97
- //# sourceMappingURL=commandPauseProject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandPauseProject.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandPauseProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+DAA6C;AAC7C,uDAAiE;AACjE,2DAA2D;AAE3D,sBAAe,UAAO,MAAc;;;;;gBAClC,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CACN,8BAA8B,EAC9B,sCAAsC,CACvC,CAAA;qBACA,YAAY,CAAA;gBAAC,qBAAM,IAAA,kCAAgB,GAAE,EAAA;oBALxC,sBAAA,cAKgB,SAAwB,EAAC;qBACtC,MAAM,CAAC,UAAgB,EAAgB;wBAAd,YAAY,kBAAA;;;;;wCAClB,qBAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,EAAA;;oCAAnD,SAAS,GAAG,SAAuC;oCAC9B,qBAAM,IAAI,CAAC,MAAM,CAAC;4CAC3C,IAAI,EAAE,SAAS;4CACf,IAAI,EAAE,gBAAgB;4CACtB,OAAO,EAAE,2DAAoD,SAAS,oFAAuE;yCAC9I,CAAC,EAAA;;oCAJM,cAAc,GAAK,CAAA,SAIzB,CAAA,eAJoB;oCAMtB,IAAI,CAAC,cAAc,EAAE;wCACnB,sBAAO;qCACR;oCAEK,WAAW,GAAG,8EAAuE,SAAS,CAAE,CAAC;oCACpF,qBAAM,IAAA,4BAAI,EAAC,WAAW,EAAE;4CACzC,GAAG,wBACE,OAAO,CAAC,GAAG,KACd,KAAK,EAAE,EAAE,GACV;yCACF,CAAC,EAAA;;oCALM,MAAM,GAAK,CAAA,SAKjB,CAAA,OALY;oCAMd,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;;;;;iBAClB,CAAC,EAAA;;;KAAA,EAAC"}
@@ -1,3 +0,0 @@
1
- import Vorpal from "vorpal";
2
- declare const _default: (vorpal: Vorpal) => Promise<Vorpal.Command>;
3
- export default _default;
@@ -1,106 +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
- var log_1 = require("../../../../utils/log");
43
- var portForward_1 = require("../../../../utils/portForward");
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-port-forward <envComponent>", "start port-forwarding"))
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 namespace, podNames, podName, localPort, remotePort;
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.getProjectNamespace)(envComponent)];
67
- case 2:
68
- namespace = _b.sent();
69
- return [4 /*yield*/, (0, projects_1.getProjectPodNames)(envComponent)];
70
- case 3:
71
- podNames = _b.sent();
72
- if (podNames.length === 0) {
73
- (0, log_1.logError)(this, "sorry, no pods found");
74
- return [2 /*return*/];
75
- }
76
- return [4 /*yield*/, this.prompt({
77
- type: "list",
78
- name: "podName",
79
- choices: podNames,
80
- message: "Which pod? 🤔"
81
- })];
82
- case 4:
83
- podName = (_b.sent()).podName;
84
- return [4 /*yield*/, this.prompt({
85
- type: "number",
86
- name: "localPort",
87
- message: "Local port: "
88
- })];
89
- case 5:
90
- localPort = (_b.sent()).localPort;
91
- return [4 /*yield*/, this.prompt({
92
- type: "number",
93
- name: "remotePort",
94
- message: "Remote port: "
95
- })];
96
- case 6:
97
- remotePort = (_b.sent()).remotePort;
98
- return [2 /*return*/, (0, portForward_1.startPortForward)(podName, localPort, remotePort, namespace)];
99
- }
100
- });
101
- });
102
- })];
103
- }
104
- });
105
- }); });
106
- //# sourceMappingURL=commandPortForward.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandPortForward.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandPortForward.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAiD;AACjD,6DAAiE;AACjE,uDAGoC;AACpC,2DAA2D;AAC3D,wEAAkD;AAElD,sBAAe,UAAO,MAAc;;;;;gBAClC,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CAAC,qCAAqC,EAAE,uBAAuB,CAAC,CAAA;qBACvE,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;oCAC3B,qBAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,EAAA;;oCAAnD,SAAS,GAAG,SAAuC;oCACxC,qBAAM,IAAA,6BAAkB,EAAC,YAAY,CAAC,EAAA;;oCAAjD,QAAQ,GAAG,SAAsC;oCACvD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;wCACzB,IAAA,cAAQ,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;wCACvC,sBAAO;qCACR;oCACmB,qBAAM,IAAI,CAAC,MAAM,CAAC;4CACpC,IAAI,EAAE,MAAM;4CACZ,IAAI,EAAE,SAAS;4CACf,OAAO,EAAE,QAAQ;4CACjB,OAAO,EAAE,eAAe;yCACzB,CAAC,EAAA;;oCALM,OAAO,GAAK,CAAA,SAKlB,CAAA,QALa;oCAOO,qBAAM,IAAI,CAAC,MAAM,CAAC;4CACtC,IAAI,EAAE,QAAQ;4CACd,IAAI,EAAE,WAAW;4CAEjB,OAAO,EAAE,cAAc;yCACxB,CAAC,EAAA;;oCALM,SAAS,GAAK,CAAA,SAKpB,CAAA,UALe;oCAOM,qBAAM,IAAI,CAAC,MAAM,CAAC;4CACvC,IAAI,EAAE,QAAQ;4CACd,IAAI,EAAE,YAAY;4CAElB,OAAO,EAAE,eAAe;yCACzB,CAAC,EAAA;;oCALM,UAAU,GAAK,CAAA,SAKrB,CAAA,WALgB;oCAOlB,sBAAO,IAAA,8BAAgB,EAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,EAAC;;;;iBACpE,CAAC,EAAA;;;KAAA,EAAC"}
@@ -1,3 +0,0 @@
1
- import Vorpal from "vorpal";
2
- declare const _default: (vorpal: Vorpal) => Promise<Vorpal.Command>;
3
- export default _default;
@@ -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
- var getProjectConfig_1 = require("../../../../config/getProjectConfig");
40
- var showProjectBanner_1 = require("./utils/showProjectBanner");
41
- exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
42
- return __generator(this, function (_a) {
43
- return [2 /*return*/, vorpal
44
- .command("project-reload-config", "reloads the config")
45
- .action(function () {
46
- return __awaiter(this, void 0, void 0, function () {
47
- return __generator(this, function (_a) {
48
- switch (_a.label) {
49
- case 0: return [4 /*yield*/, (0, getProjectConfig_1.reloadConfig)()];
50
- case 1:
51
- _a.sent();
52
- return [4 /*yield*/, (0, showProjectBanner_1.showProjectBanner)(vorpal)];
53
- case 2:
54
- _a.sent();
55
- return [2 /*return*/];
56
- }
57
- });
58
- });
59
- })];
60
- });
61
- }); });
62
- //# sourceMappingURL=commandReloadConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandReloadConfig.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandReloadConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wEAAmE;AACnE,+DAA8D;AAE9D,sBAAe,UAAO,MAAc;;QAClC,sBAAA,MAAM;iBACH,OAAO,CAAC,uBAAuB,EAAE,oBAAoB,CAAC;iBAEtD,MAAM,CAAC;;;;oCACN,qBAAM,IAAA,+BAAY,GAAE,EAAA;;gCAApB,SAAoB,CAAC;gCACrB,qBAAM,IAAA,qCAAiB,EAAC,MAAM,CAAC,EAAA;;gCAA/B,SAA+B,CAAC;;;;;aACjC,CAAC,EAAA;;KAAA,EAAC"}
@@ -1,3 +0,0 @@
1
- import Vorpal from "vorpal";
2
- declare const _default: (vorpal: Vorpal) => Promise<void>;
3
- export default _default;
@@ -1,144 +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
- var client_node_1 = require("@kubernetes/client-node");
43
- var k8sApi_1 = require("../../../../k8sApi");
44
- var log_1 = require("../../../../utils/log");
45
- var namespaceAutoCompletion_1 = require("../general/namespaceAutoCompletion");
46
- var projects_1 = require("../../../../utils/projects");
47
- var autocompletions_1 = require("./utils/autocompletions");
48
- var ensureCluster_1 = __importDefault(require("./utils/ensureCluster"));
49
- function triggerCronjob(namespace) {
50
- return __awaiter(this, void 0, void 0, function () {
51
- var jobs, jobNames, jobName, cronjob, jobSpec, job, metadata, result, e_1;
52
- return __generator(this, function (_a) {
53
- switch (_a.label) {
54
- case 0: return [4 /*yield*/, k8sApi_1.k8sApiBatchBeta.listNamespacedCronJob(namespace)];
55
- case 1:
56
- jobs = (_a.sent()).body.items;
57
- jobNames = jobs.map(function (j) { return j.metadata.name; });
58
- return [4 /*yield*/, this.prompt({
59
- type: "list",
60
- name: "jobName",
61
- choices: jobNames,
62
- message: "Which cronjob? 🤔"
63
- })];
64
- case 2:
65
- jobName = (_a.sent()).jobName;
66
- cronjob = jobs.find(function (j) { return j.metadata.name === jobName; });
67
- jobSpec = cronjob.spec.jobTemplate.spec;
68
- job = new client_node_1.V1Job();
69
- metadata = {
70
- name: "manual-".concat(Math.round(Date.now() / 1000), "-").concat(cronjob.metadata.name)
71
- };
72
- job.metadata = metadata;
73
- job.spec = jobSpec;
74
- _a.label = 3;
75
- case 3:
76
- _a.trys.push([3, 5, , 6]);
77
- return [4 /*yield*/, k8sApi_1.k8sApiBatch.createNamespacedJob(namespace, job)];
78
- case 4:
79
- result = _a.sent();
80
- this.log("");
81
- this.log("yeah, you got a job, man. \uD83D\uDE3A ".concat(result.body.metadata.name));
82
- this.log("");
83
- return [3 /*break*/, 6];
84
- case 5:
85
- e_1 = _a.sent();
86
- (0, log_1.logError)(this, "command failed", e_1.body);
87
- return [3 /*break*/, 6];
88
- case 6: return [2 /*return*/];
89
- }
90
- });
91
- });
92
- }
93
- exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
94
- var _a, _b;
95
- return __generator(this, function (_c) {
96
- switch (_c.label) {
97
- case 0:
98
- vorpal
99
- .command("trigger-cronjob <namespace>", "trigger cronjob")
100
- .autocomplete(namespaceAutoCompletion_1.namespaceAutoCompletion)
101
- .action(function (_a) {
102
- var namespace = _a.namespace;
103
- return __awaiter(this, void 0, void 0, function () {
104
- return __generator(this, function (_b) {
105
- switch (_b.label) {
106
- case 0: return [4 /*yield*/, triggerCronjob.call(this, namespace)];
107
- case 1:
108
- _b.sent();
109
- return [2 /*return*/];
110
- }
111
- });
112
- });
113
- });
114
- _b = (_a = vorpal
115
- .command("project-trigger-cronjob <envComponent>", "trigger cronjob"))
116
- .autocomplete;
117
- return [4 /*yield*/, (0, autocompletions_1.envAndComponents)()];
118
- case 1:
119
- _b.apply(_a, [_c.sent()])
120
- .action(function (_a) {
121
- var envComponent = _a.envComponent;
122
- return __awaiter(this, void 0, void 0, function () {
123
- var namespace;
124
- return __generator(this, function (_b) {
125
- switch (_b.label) {
126
- case 0: return [4 /*yield*/, ensureCluster_1["default"].call(this, envComponent)];
127
- case 1:
128
- _b.sent();
129
- return [4 /*yield*/, (0, projects_1.getProjectNamespace)(envComponent)];
130
- case 2:
131
- namespace = _b.sent();
132
- return [4 /*yield*/, triggerCronjob.call(this, namespace)];
133
- case 3:
134
- _b.sent();
135
- return [2 /*return*/];
136
- }
137
- });
138
- });
139
- });
140
- return [2 /*return*/];
141
- }
142
- });
143
- }); });
144
- //# sourceMappingURL=commandTriggerCronjob.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandTriggerCronjob.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/project/commandTriggerCronjob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAA8D;AAG9D,6CAAkE;AAClE,6CAAiD;AACjD,8EAA6E;AAE7E,uDAAiE;AACjE,2DAA2D;AAC3D,wEAAkD;AAElD,SAAe,cAAc,CAAC,SAAiB;;;;;wBAGzC,qBAAM,wBAAe,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAA;;oBADzC,IAAI,GACjB,CAAA,SAAsD,CAAA,WADrC;oBAGf,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAf,CAAe,CAAC,CAAC;oBAE9B,qBAAM,IAAI,CAAC,MAAM,CAAC;4BACpC,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,QAAQ;4BACjB,OAAO,EAAE,mBAAmB;yBAC7B,CAAC,EAAA;;oBALM,OAAO,GAAK,CAAA,SAKlB,CAAA,QALa;oBAOT,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,OAAO,EAA3B,CAA2B,CAAC,CAAC;oBACxD,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;oBAExC,GAAG,GAAG,IAAI,mBAAK,EAAE,CAAC;oBAClB,QAAQ,GAA0B;wBACtC,IAAI,EAAE,iBAAU,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,cAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAE;qBACzE,CAAC;oBAEF,GAAG,CAAC,QAAQ,GAAG,QAAwB,CAAC;oBACxC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC;;;;oBAEF,qBAAM,oBAAW,CAAC,mBAAmB,CAAC,SAAS,EAAE,GAAG,CAAC,EAAA;;oBAA9D,MAAM,GAAG,SAAqD;oBAEpE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBACb,IAAI,CAAC,GAAG,CAAC,iDAAgC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAE,CAAC,CAAC;oBACtE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;;;oBAEb,IAAA,cAAQ,EAAC,IAAI,EAAE,gBAAgB,EAAE,GAAC,CAAC,IAAI,CAAC,CAAC;;;;;;CAE5C;AACD,sBAAe,UAAO,MAAc;;;;;gBAClC,MAAM;qBACH,OAAO,CAAC,6BAA6B,EAAE,iBAAiB,CAAC;qBACzD,YAAY,CAAC,iDAAuB,CAAC;qBACrC,MAAM,CAAC,UAAgB,EAAa;wBAAX,SAAS,eAAA;;;;wCACjC,qBAAM,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAA;;oCAA1C,SAA0C,CAAC;;;;;iBAC5C,CAAC,CAAC;gBACL,KAAA,CAAA,KAAA,MAAM;qBACH,OAAO,CAAC,wCAAwC,EAAE,iBAAiB,CAAC,CAAA;qBACpE,YAAY,CAAA;gBAAC,qBAAM,IAAA,kCAAgB,GAAE,EAAA;;gBAFxC,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;oCAC3B,qBAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,EAAA;;oCAAnD,SAAS,GAAG,SAAuC;oCACzD,qBAAM,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAA;;oCAA1C,SAA0C,CAAC;;;;;iBAC5C,CAAC,CAAC;;;;KACN,EAAC"}
@@ -1,3 +0,0 @@
1
- import Vorpal from "vorpal";
2
- declare const _default: (vorpal: Vorpal) => Promise<void>;
3
- export default _default;