@catladder/cli 0.0.0-fix-scripts-set-e-ae9c708f → 0.0.0-fix-values-as-files-73f39da5

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 (59) hide show
  1. package/README.md +2 -1
  2. package/dist/apps/cli/commands/general/index.js +17 -9
  3. package/dist/apps/cli/commands/general/index.js.map +1 -1
  4. package/dist/apps/cli/commands/general/portForward.js +5 -6
  5. package/dist/apps/cli/commands/general/portForward.js.map +1 -1
  6. package/dist/apps/cli/commands/project/commandCloudSqlProxy.js +24 -19
  7. package/dist/apps/cli/commands/project/commandCloudSqlProxy.js.map +1 -1
  8. package/dist/apps/cli/commands/project/commandConfigSecrets.js +21 -14
  9. package/dist/apps/cli/commands/project/commandConfigSecrets.js.map +1 -1
  10. package/dist/apps/cli/commands/project/commandDeletePods.js +4 -3
  11. package/dist/apps/cli/commands/project/commandDeletePods.js.map +1 -1
  12. package/dist/apps/cli/commands/project/commandTriggerCronjob.js +2 -2
  13. package/dist/apps/cli/commands/project/commandTriggerCronjob.js.map +1 -1
  14. package/dist/apps/cli/commands/project/index.js +0 -2
  15. package/dist/apps/cli/commands/project/index.js.map +1 -1
  16. package/dist/apps/cli/commands/project/setup/setupAccessTokens.js +23 -14
  17. package/dist/apps/cli/commands/project/setup/setupAccessTokens.js.map +1 -1
  18. package/dist/apps/cli/commands/project/utils/ensureNamespace.js +6 -8
  19. package/dist/apps/cli/commands/project/utils/ensureNamespace.js.map +1 -1
  20. package/dist/apps/cli/config/writeConfig.js +1 -4
  21. package/dist/apps/cli/config/writeConfig.js.map +1 -1
  22. package/dist/config/getProjectConfig.d.ts +3 -3
  23. package/dist/config/getProjectConfig.js +58 -31
  24. package/dist/config/getProjectConfig.js.map +1 -1
  25. package/dist/k8sApi/index.d.ts +7 -5
  26. package/dist/k8sApi/index.js +23 -9
  27. package/dist/k8sApi/index.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/dist/utils/cluster.js +0 -2
  30. package/dist/utils/cluster.js.map +1 -1
  31. package/dist/utils/gitlab.d.ts +1 -0
  32. package/dist/utils/gitlab.js +17 -1
  33. package/dist/utils/gitlab.js.map +1 -1
  34. package/dist/utils/projects/index.js +7 -8
  35. package/dist/utils/projects/index.js.map +1 -1
  36. package/package.json +2 -2
  37. package/src/apps/cli/commands/general/index.ts +6 -7
  38. package/src/apps/cli/commands/general/portForward.ts +2 -1
  39. package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +19 -6
  40. package/src/apps/cli/commands/project/commandConfigSecrets.ts +19 -16
  41. package/src/apps/cli/commands/project/commandDeletePods.ts +2 -1
  42. package/src/apps/cli/commands/project/commandTriggerCronjob.ts +3 -3
  43. package/src/apps/cli/commands/project/index.ts +0 -2
  44. package/src/apps/cli/commands/project/setup/setupAccessTokens.ts +7 -5
  45. package/src/apps/cli/commands/project/utils/ensureNamespace.ts +2 -1
  46. package/src/apps/cli/config/writeConfig.ts +0 -2
  47. package/src/config/getProjectConfig.ts +52 -28
  48. package/src/k8sApi/index.ts +20 -8
  49. package/src/utils/cluster.ts +0 -2
  50. package/src/utils/gitlab.ts +11 -0
  51. package/src/utils/projects/index.ts +3 -1
  52. package/dist/apps/cli/commands/project/commandReloadConfig.d.ts +0 -3
  53. package/dist/apps/cli/commands/project/commandReloadConfig.js +0 -62
  54. package/dist/apps/cli/commands/project/commandReloadConfig.js.map +0 -1
  55. package/dist/utils/formatEnvVars.d.ts +0 -2
  56. package/dist/utils/formatEnvVars.js +0 -10
  57. package/dist/utils/formatEnvVars.js.map +0 -1
  58. package/src/apps/cli/commands/project/commandReloadConfig.ts +0 -12
  59. package/src/utils/formatEnvVars.ts +0 -7
@@ -1,7 +1,7 @@
1
1
  import { $ } from "zx";
2
2
  import { join } from "path";
3
3
  import { getProjectConfig, parseChoice } from "../../config/getProjectConfig";
4
- import k8sApi from "../../k8sApi";
4
+ import { getk8sApi } from "../../k8sApi";
5
5
  import { readFileOrError } from "../files";
6
6
 
7
7
  export const getGitRoot = async (): Promise<string> => {
@@ -32,6 +32,7 @@ export const getProjectNamespace = async (envComponent: string) => {
32
32
 
33
33
  export const getProjectPods = async (envComponent: string) => {
34
34
  const namespace = await getProjectNamespace(envComponent);
35
+ const k8sApi = getk8sApi();
35
36
  const res = await k8sApi.listNamespacedPod(namespace);
36
37
 
37
38
  return res.body.items;
@@ -39,6 +40,7 @@ export const getProjectPods = async (envComponent: string) => {
39
40
 
40
41
  export const getProjectPvcs = async (envComponent: string) => {
41
42
  const namespace = await getProjectNamespace(envComponent);
43
+ const k8sApi = getk8sApi();
42
44
  const res = await k8sApi.listNamespacedPersistentVolumeClaim(namespace);
43
45
 
44
46
  return res.body.items;
@@ -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,2 +0,0 @@
1
- declare const _default: (envVars?: {}) => {};
2
- export default _default;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var lodash_1 = require("lodash");
4
- exports["default"] = (function (envVars) {
5
- if (envVars === void 0) { envVars = {}; }
6
- return (0, lodash_1.mapValues)(envVars, function (value) {
7
- return (0, lodash_1.isObject)(value) ? JSON.stringify(value) : "".concat(value);
8
- });
9
- });
10
- //# sourceMappingURL=formatEnvVars.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatEnvVars.js","sourceRoot":"","sources":["../../src/utils/formatEnvVars.ts"],"names":[],"mappings":";;AAAA,iCAA6C;AAE7C,sBAAe,UAAC,OAAY;IAAZ,wBAAA,EAAA,YAAY;IAC1B,OAAO,IAAA,kBAAS,EAAC,OAAO,EAAE,UAAA,KAAK;QAC7B,OAAA,IAAA,iBAAQ,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAG,KAAK,CAAE;IAApD,CAAoD,CACrD,CAAC;AACJ,CAAC,EAAC"}
@@ -1,12 +0,0 @@
1
- import Vorpal from "vorpal";
2
- import { reloadConfig } from "../../../../config/getProjectConfig";
3
- import { showProjectBanner } from "./utils/showProjectBanner";
4
-
5
- export default async (vorpal: Vorpal) =>
6
- vorpal
7
- .command("project-reload-config", "reloads the config")
8
-
9
- .action(async function () {
10
- await reloadConfig();
11
- await showProjectBanner(vorpal);
12
- });
@@ -1,7 +0,0 @@
1
- import { isObject, mapValues } from "lodash";
2
-
3
- export default (envVars = {}) => {
4
- return mapValues(envVars, value =>
5
- isObject(value) ? JSON.stringify(value) : `${value}`
6
- );
7
- };