@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,131 +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 child_process_promise_1 = require("child-process-promise");
43
- var node_fetch_1 = __importDefault(require("node-fetch"));
44
- exports["default"] = (function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
45
- var starwarsPromise;
46
- return __generator(this, function (_a) {
47
- vorpal.command("dadjoke", "something for jonas.").action(function () {
48
- return __awaiter(this, void 0, void 0, function () {
49
- var result, text;
50
- return __generator(this, function (_a) {
51
- switch (_a.label) {
52
- case 0: return [4 /*yield*/, (0, node_fetch_1["default"])("https://icanhazdadjoke.com/", {
53
- headers: {
54
- Accept: "text/plain"
55
- }
56
- })];
57
- case 1:
58
- result = _a.sent();
59
- return [4 /*yield*/, result.text()];
60
- case 2:
61
- text = _a.sent();
62
- this.log("");
63
- this.log(text);
64
- this.log("");
65
- return [2 /*return*/];
66
- }
67
- });
68
- });
69
- });
70
- vorpal.command("pantobot", "the allknowing oracle").action(function () {
71
- return __awaiter(this, void 0, void 0, function () {
72
- var message, result, text;
73
- return __generator(this, function (_a) {
74
- switch (_a.label) {
75
- case 0: return [4 /*yield*/, this.prompt({
76
- type: "string",
77
- name: "message",
78
- message: "Your question, unworthy?: "
79
- })];
80
- case 1:
81
- message = (_a.sent()).message;
82
- return [4 /*yield*/, (0, node_fetch_1["default"])("https://paas.panter.cloud/api/pantobot/".concat(message), {
83
- headers: {
84
- Accept: "text/plain"
85
- }
86
- })];
87
- case 2:
88
- result = _a.sent();
89
- return [4 /*yield*/, result.text()];
90
- case 3:
91
- text = _a.sent();
92
- this.log("");
93
- this.log(text);
94
- this.log("");
95
- return [2 /*return*/];
96
- }
97
- });
98
- });
99
- });
100
- vorpal
101
- .command("starwars", "Long time ago... in a galaxy far far away...")
102
- .action(function () {
103
- return __awaiter(this, void 0, void 0, function () {
104
- return __generator(this, function (_a) {
105
- switch (_a.label) {
106
- case 0:
107
- starwarsPromise = (0, child_process_promise_1.spawn)("telnet", ["towel.blinkenlights.nl"], {
108
- stdio: ["pipe", "inherit", "pipe"]
109
- });
110
- return [4 /*yield*/, starwarsPromise];
111
- case 1:
112
- _a.sent();
113
- return [2 /*return*/];
114
- }
115
- });
116
- });
117
- })
118
- // we need to close it properly, because telnet towel.blinkenlights.nl has no way to cancel and stop itself
119
- // this is also why we need to only inherit the stdout and not the stdin
120
- .cancel(function () {
121
- return __awaiter(this, void 0, void 0, function () {
122
- return __generator(this, function (_a) {
123
- starwarsPromise.childProcess.kill();
124
- return [2 /*return*/];
125
- });
126
- });
127
- });
128
- return [2 /*return*/];
129
- });
130
- }); });
131
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/apps/cli/commands/theStuffThatReallyMatters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA8C;AAC9C,0DAA+B;AAG/B,sBAAe,UAAO,MAAc;;;QAClC,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,MAAM,CAAC;;;;;gCACxC,qBAAM,IAAA,uBAAK,EAAC,6BAA6B,EAAE;gCACxD,OAAO,EAAE;oCACP,MAAM,EAAE,YAAY;iCACrB;6BACF,CAAC,EAAA;;4BAJI,MAAM,GAAG,SAIb;4BACW,qBAAM,MAAM,CAAC,IAAI,EAAE,EAAA;;4BAA1B,IAAI,GAAG,SAAmB;4BAChC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;4BACb,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;4BACf,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;;;;SACd,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAC,MAAM,CAAC;;;;;gCACrC,qBAAM,IAAI,CAAC,MAAM,CAAC;gCACpC,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,SAAS;gCAEf,OAAO,EAAE,4BAA4B;6BACtC,CAAC,EAAA;;4BALM,OAAO,GAAK,CAAA,SAKlB,CAAA,QALa;4BAMA,qBAAM,IAAA,uBAAK,EACxB,iDAA0C,OAAO,CAAE,EACnD;oCACE,OAAO,EAAE;wCACP,MAAM,EAAE,YAAY;qCACrB;iCACF,CACF,EAAA;;4BAPK,MAAM,GAAG,SAOd;4BACY,qBAAM,MAAM,CAAC,IAAI,EAAE,EAAA;;4BAA1B,IAAI,GAAG,SAAmB;4BAChC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;4BACb,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;4BACf,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;;;;SACd,CAAC,CAAC;QAEH,MAAM;aACH,OAAO,CAAC,UAAU,EAAE,8CAA8C,CAAC;aACnE,MAAM,CAAC;;;;;4BACN,eAAe,GAAG,IAAA,6BAAK,EAAC,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE;gCAC5D,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC;6BACnC,CAAC,CAAC;4BACH,qBAAM,eAAe,EAAA;;4BAArB,SAAqB,CAAC;;;;;SACvB,CAAC;YACF,2GAA2G;YAC3G,wEAAwE;aACvE,MAAM,CAAC;;;oBACN,eAAe,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;;;;SACrC,CAAC,CAAC;;;KACN,EAAC"}
@@ -1,5 +0,0 @@
1
- import { Config } from "@catladder/pipeline";
2
- import { CommandInstance } from "vorpal";
3
- export declare const writeConfig: (vorpal: CommandInstance, config: Config, options?: {
4
- endComment?: string;
5
- }) => Promise<void>;
@@ -1,104 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- exports.__esModule = true;
39
- exports.writeConfig = void 0;
40
- var child_process_promise_1 = require("child-process-promise");
41
- var fs_extra_1 = require("fs-extra");
42
- var js_yaml_1 = require("js-yaml");
43
- var prettier_1 = require("prettier");
44
- var projects_1 = require("../../../utils/projects");
45
- var writeConfig = function (vorpal, config, options) { return __awaiter(void 0, void 0, void 0, function () {
46
- var gitRoot, TS, configType, content, content;
47
- return __generator(this, function (_a) {
48
- switch (_a.label) {
49
- case 0: return [4 /*yield*/, (0, projects_1.getGitRoot)()];
50
- case 1:
51
- gitRoot = _a.sent();
52
- TS = "typescript (recommended)";
53
- return [4 /*yield*/, vorpal.prompt({
54
- type: "list",
55
- name: "configType",
56
- choices: [TS, "yaml"],
57
- message: "In which format do you want the config? 🤔"
58
- })];
59
- case 2:
60
- configType = (_a.sent()).configType;
61
- vorpal.log("");
62
- if (!(configType === TS)) return [3 /*break*/, 6];
63
- content = (0, prettier_1.format)("\n import type { Config } from \"@catladder/pipeline\";\n \n const config: Config = ".concat(JSON.stringify(config), ";\n\n export default config;\n\n \n ").concat((options === null || options === void 0 ? void 0 : options.endComment) ? "/*".concat(options.endComment, "*/") : "", "\n \n "), {
64
- parser: "babel"
65
- });
66
- return [4 /*yield*/, (0, fs_extra_1.writeFile)(gitRoot + "/catladder.ts", content, {
67
- encoding: "utf-8"
68
- })];
69
- case 3:
70
- _a.sent();
71
- vorpal.log("adding type @catladder/pipeline....");
72
- return [4 /*yield*/, (0, child_process_promise_1.spawn)("yarn add @catladder/pipeline -DW", {
73
- shell: true
74
- })];
75
- case 4:
76
- _a.sent();
77
- return [4 /*yield*/, (0, child_process_promise_1.exec)("git add " + gitRoot + "/catladder.ts")];
78
- case 5:
79
- _a.sent();
80
- return [3 /*break*/, 9];
81
- case 6:
82
- content = (0, js_yaml_1.dump)(config);
83
- return [4 /*yield*/, (0, fs_extra_1.writeFile)(gitRoot + "/catladder.yml", content +
84
- "\n\n" +
85
- (options.endComment
86
- ? "# " + options.endComment.split("\n").join("\n# ")
87
- : ""), {
88
- encoding: "utf-8"
89
- })];
90
- case 7:
91
- _a.sent();
92
- return [4 /*yield*/, (0, child_process_promise_1.exec)("git add " + gitRoot + "/catladder.ts")];
93
- case 8:
94
- _a.sent();
95
- _a.label = 9;
96
- case 9:
97
- vorpal.log("done!");
98
- vorpal.log("");
99
- return [2 /*return*/];
100
- }
101
- });
102
- }); };
103
- exports.writeConfig = writeConfig;
104
- //# sourceMappingURL=writeConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writeConfig.js","sourceRoot":"","sources":["../../../../src/apps/cli/config/writeConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+DAAoD;AACpD,qCAAqC;AACrC,mCAA+B;AAC/B,qCAAkC;AAElC,oDAAqD;AAE9C,IAAM,WAAW,GAAG,UACzB,MAAuB,EACvB,MAAc,EACd,OAEC;;;;oBAEe,qBAAM,IAAA,qBAAU,GAAE,EAAA;;gBAA5B,OAAO,GAAG,SAAkB;gBAC5B,EAAE,GAAG,0BAA0B,CAAC;gBACf,qBAAM,MAAM,CAAC,MAAM,CAAC;wBACzC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,YAAY;wBAClB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC;wBACrB,OAAO,EAAE,4CAA4C;qBACtD,CAAC,EAAA;;gBALM,UAAU,GAAK,CAAA,SAKrB,CAAA,WALgB;gBAMlB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;qBACX,CAAA,UAAU,KAAK,EAAE,CAAA,EAAjB,wBAAiB;gBACb,OAAO,GAAG,IAAA,iBAAM,EACpB,6GAGyB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,+DAK7C,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,EAAC,CAAC,CAAC,YAAK,OAAO,CAAC,UAAU,OAAI,CAAC,CAAC,CAAC,EAAE,qBAEvD,EACD;oBACE,MAAM,EAAE,OAAO;iBAChB,CACF,CAAC;gBAEF,qBAAM,IAAA,oBAAS,EAAC,OAAO,GAAG,eAAe,EAAE,OAAO,EAAE;wBAClD,QAAQ,EAAE,OAAO;qBAClB,CAAC,EAAA;;gBAFF,SAEE,CAAC;gBACH,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;gBAClD,qBAAM,IAAA,6BAAK,EAAC,kCAAkC,EAAE;wBAC9C,KAAK,EAAE,IAAI;qBACZ,CAAC,EAAA;;gBAFF,SAEE,CAAC;gBACH,qBAAM,IAAA,4BAAI,EAAC,UAAU,GAAG,OAAO,GAAG,eAAe,CAAC,EAAA;;gBAAlD,SAAkD,CAAC;;;gBAE7C,OAAO,GAAG,IAAA,cAAI,EAAC,MAAM,CAAC,CAAC;gBAE7B,qBAAM,IAAA,oBAAS,EACb,OAAO,GAAG,gBAAgB,EAC1B,OAAO;wBACL,MAAM;wBACN,CAAC,OAAO,CAAC,UAAU;4BACjB,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;4BACpD,CAAC,CAAC,EAAE,CAAC,EACT;wBACE,QAAQ,EAAE,OAAO;qBAClB,CACF,EAAA;;gBAVD,SAUC,CAAC;gBACF,qBAAM,IAAA,4BAAI,EAAC,UAAU,GAAG,OAAO,GAAG,eAAe,CAAC,EAAA;;gBAAlD,SAAkD,CAAC;;;gBAErD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACpB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;;;KAChB,CAAC;AA5DW,QAAA,WAAW,eA4DtB"}
@@ -1 +0,0 @@
1
- export declare const getGoogleAuthUserNumber: () => Promise<string>;
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- exports.__esModule = true;
39
- exports.getGoogleAuthUserNumber = void 0;
40
- var preferences_1 = require("../../../utils/preferences");
41
- var KEY = "googleAuthUserNumber";
42
- var getGoogleAuthUserNumber = function () {
43
- return __awaiter(this, void 0, void 0, function () {
44
- var authUserNumber;
45
- return __generator(this, function (_a) {
46
- switch (_a.label) {
47
- case 0: return [4 /*yield*/, (0, preferences_1.hasPreference)(KEY)];
48
- case 1:
49
- if (!!(_a.sent())) return [3 /*break*/, 4];
50
- this.log("Please type in your google auth user number (0 if you have only one google account or maybe 1 if you have multiple)");
51
- return [4 /*yield*/, this.prompt({
52
- type: "number",
53
- name: "authUserNumber",
54
- "default": "0",
55
- message: "Auth user "
56
- })];
57
- case 2:
58
- authUserNumber = (_a.sent()).authUserNumber;
59
- return [4 /*yield*/, (0, preferences_1.setPreference)(KEY, authUserNumber)];
60
- case 3:
61
- _a.sent();
62
- _a.label = 4;
63
- case 4: return [2 /*return*/, (0, preferences_1.getPreference)(KEY)];
64
- }
65
- });
66
- });
67
- };
68
- exports.getGoogleAuthUserNumber = getGoogleAuthUserNumber;
69
- //# sourceMappingURL=getGoogleAuthUserNumber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getGoogleAuthUserNumber.js","sourceRoot":"","sources":["../../../../src/apps/cli/utils/getGoogleAuthUserNumber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAIoC;AAEpC,IAAM,GAAG,GAAG,sBAAsB,CAAC;AAC5B,IAAM,uBAAuB,GAAG;;;;;wBAC/B,qBAAM,IAAA,2BAAa,EAAC,GAAG,CAAC,EAAA;;yBAA1B,CAAC,CAAC,SAAwB,CAAC,EAA3B,wBAA2B;oBAC7B,IAAI,CAAC,GAAG,CACN,qHAAqH,CACtH,CAAC;oBAEyB,qBAAM,IAAI,CAAC,MAAM,CAAC;4BAC3C,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,gBAAgB;4BACtB,SAAO,EAAE,GAAG;4BACZ,OAAO,EAAE,YAAY;yBACtB,CAAC,EAAA;;oBALM,cAAc,GAAK,CAAA,SAKzB,CAAA,eALoB;oBAMtB,qBAAM,IAAA,2BAAa,EAAC,GAAG,EAAE,cAAc,CAAC,EAAA;;oBAAxC,SAAwC,CAAC;;wBAE3C,sBAAO,IAAA,2BAAa,EAAC,GAAG,CAAC,EAAC;;;;CAC3B,CAAC;AAfW,QAAA,uBAAuB,2BAelC"}
@@ -1,2 +0,0 @@
1
- import Vorpal from "vorpal";
2
- export declare const verify: (vorpal: Vorpal) => Promise<void>;
@@ -1,90 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- exports.__esModule = true;
39
- exports.verify = void 0;
40
- var getProjectConfig_1 = require("../../../config/getProjectConfig");
41
- var gitlab_1 = require("../../../utils/gitlab");
42
- var fromv2_1 = require("./migration/fromv2");
43
- var verify = function (vorpal) { return __awaiter(void 0, void 0, void 0, function () {
44
- var projectConfig, gitlabCi, e_1;
45
- return __generator(this, function (_a) {
46
- switch (_a.label) {
47
- case 0: return [4 /*yield*/, (0, gitlab_1.hasGitlabToken)()];
48
- case 1:
49
- // check if has all settings
50
- if (!(_a.sent())) {
51
- vorpal.command("setup-gitlab-token").action(function () {
52
- return __awaiter(this, void 0, void 0, function () {
53
- return __generator(this, function (_a) {
54
- switch (_a.label) {
55
- case 0: return [4 /*yield*/, (0, gitlab_1.setupGitlabToken)(this)];
56
- case 1:
57
- _a.sent();
58
- return [2 /*return*/];
59
- }
60
- });
61
- });
62
- });
63
- vorpal.exec("setup-gitlab-token");
64
- }
65
- return [4 /*yield*/, (0, getProjectConfig_1.getProjectConfig)()];
66
- case 2:
67
- projectConfig = _a.sent();
68
- _a.label = 3;
69
- case 3:
70
- _a.trys.push([3, 6, , 7]);
71
- gitlabCi = (0, getProjectConfig_1.getGitlabCi)();
72
- if (!gitlabCi) {
73
- vorpal.log("not initialized");
74
- }
75
- if (!!projectConfig) return [3 /*break*/, 5];
76
- vorpal.log("no project config, needs migration");
77
- return [4 /*yield*/, (0, fromv2_1.migrateV2)(vorpal)];
78
- case 4:
79
- _a.sent();
80
- _a.label = 5;
81
- case 5: return [3 /*break*/, 7];
82
- case 6:
83
- e_1 = _a.sent();
84
- return [3 /*break*/, 7];
85
- case 7: return [2 /*return*/];
86
- }
87
- });
88
- }); };
89
- exports.verify = verify;
90
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apps/cli/verify/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qEAG0C;AAC1C,gDAAyE;AACzE,6CAA+C;AAExC,IAAM,MAAM,GAAG,UAAO,MAAc;;;;oBAGnC,qBAAM,IAAA,uBAAc,GAAE,EAAA;;gBAF5B,4BAA4B;gBAE5B,IAAI,CAAC,CAAC,SAAsB,CAAC,EAAE;oBAC7B,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC;;;;4CAC1C,qBAAM,IAAA,yBAAgB,EAAC,IAAI,CAAC,EAAA;;wCAA5B,SAA4B,CAAC;;;;;qBAC9B,CAAC,CAAC;oBACH,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;iBACnC;gBAEqB,qBAAM,IAAA,mCAAgB,GAAE,EAAA;;gBAAxC,aAAa,GAAG,SAAwB;;;;gBAEtC,QAAQ,GAAG,IAAA,8BAAW,GAAE,CAAC;gBAE/B,IAAI,CAAC,QAAQ,EAAE;oBACb,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;iBAC/B;qBAEG,CAAC,aAAa,EAAd,wBAAc;gBAChB,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;gBACjD,qBAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,EAAA;;gBAAvB,SAAuB,CAAC;;;;;;;;;KAK7B,CAAC;AAzBW,QAAA,MAAM,UAyBjB"}
@@ -1,3 +0,0 @@
1
- import Vorpal from "vorpal";
2
- export declare const LEGACY_ENVS: readonly ["dev-local", "dev", "review", "stage", "prod"];
3
- export declare const migrateV2: (vorpal: Vorpal) => Promise<void>;