@catladder/cli 4.2.0 → 4.2.2

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 (60) hide show
  1. package/bin/catenv +0 -1
  2. package/bin/catladder +0 -1
  3. package/dist/bundles/catenv/index.js +275 -8
  4. package/dist/bundles/cli/index.js +296 -29
  5. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +3 -3
  6. package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js.map +1 -1
  7. package/dist/cli/src/catenv.js +15 -0
  8. package/dist/cli/src/catenv.js.map +1 -1
  9. package/dist/cli/src/cli.js +15 -0
  10. package/dist/cli/src/cli.js.map +1 -1
  11. package/dist/cli/src/commands/project/commandGitlabCi.js +2 -2
  12. package/dist/cli/src/commands/project/commandGitlabCi.js.map +1 -1
  13. package/dist/cli/src/commands/project/k8s/commandListPods.js +2 -2
  14. package/dist/cli/src/commands/project/k8s/commandListPods.js.map +1 -1
  15. package/dist/cli/src/utils/gitlab.js +3 -3
  16. package/dist/cli/src/utils/gitlab.js.map +1 -1
  17. package/dist/pipeline/src/bash/getInjectVarsScript.js +2 -2
  18. package/dist/pipeline/src/bash/getInjectVarsScript.js.map +1 -1
  19. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +2 -2
  20. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
  21. package/dist/pipeline/src/build/base/createAppBuildJob.js +2 -2
  22. package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
  23. package/dist/pipeline/src/build/base/writeDotEnv.js +2 -2
  24. package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
  25. package/dist/pipeline/src/build/docker.js +2 -2
  26. package/dist/pipeline/src/build/docker.js.map +1 -1
  27. package/dist/pipeline/src/build/node/cache.js +2 -2
  28. package/dist/pipeline/src/build/node/cache.js.map +1 -1
  29. package/dist/pipeline/src/config/readConfig.js +7 -10
  30. package/dist/pipeline/src/config/readConfig.js.map +1 -1
  31. package/dist/pipeline/src/constants.js +1 -1
  32. package/dist/pipeline/src/context/createComponentContext.js +2 -2
  33. package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
  34. package/dist/pipeline/src/context/createWorkspaceContext.js +2 -2
  35. package/dist/pipeline/src/context/createWorkspaceContext.js.map +1 -1
  36. package/dist/pipeline/src/context/getEnvConfig.js +3 -3
  37. package/dist/pipeline/src/context/getEnvConfig.js.map +1 -1
  38. package/dist/pipeline/src/context/utils/envVars.js +2 -2
  39. package/dist/pipeline/src/context/utils/envVars.js.map +1 -1
  40. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +2 -2
  41. package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js.map +1 -1
  42. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +2 -2
  43. package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js.map +1 -1
  44. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +2 -2
  45. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
  46. package/dist/pipeline/src/deploy/kubernetes/mongodb.js +2 -2
  47. package/dist/pipeline/src/deploy/kubernetes/mongodb.js.map +1 -1
  48. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +7 -7
  49. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
  50. package/dist/pipeline/src/utils/index.js +3 -3
  51. package/dist/pipeline/src/utils/index.js.map +1 -1
  52. package/dist/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +3 -3
  54. package/scripts/bundle +2 -2
  55. package/src/apps/cli/commands/project/commandConfigSecrets.ts +1 -1
  56. package/src/catenv.ts +14 -0
  57. package/src/cli.ts +14 -0
  58. package/src/commands/project/commandGitlabCi.ts +1 -1
  59. package/src/commands/project/k8s/commandListPods.ts +1 -1
  60. package/src/utils/gitlab.ts +1 -1
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "4.2.0",
56
+ "version": "4.2.2",
57
57
  "scripts": {
58
58
  "lint": "eslint \"src/**/*.ts\"",
59
59
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
@@ -84,7 +84,7 @@
84
84
  "@tsconfig/node14": "^1.0.1",
85
85
  "@types/common-tags": "^1.8.4",
86
86
  "@types/fs-extra": "^5.0.4",
87
- "@types/lodash": "^4.17.7",
87
+ "@types/lodash-es": "^4.17.12",
88
88
  "@types/memoizee": "^0.4.2",
89
89
  "@types/node-fetch": "^2.6.11",
90
90
  "@types/request": "^2.48.12",
@@ -101,7 +101,7 @@
101
101
  "connection-string-parser": "^1.0.4",
102
102
  "date-fns": "^3.6.0",
103
103
  "fs-extra": "^7.0.1",
104
- "lodash": "^4.17.21",
104
+ "lodash-es": "^4.18.1",
105
105
  "memoizee": "^0.4.17",
106
106
  "node-fetch": "^2.3.0",
107
107
  "open": "^8.4.0",
package/scripts/bundle CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/bin/bash
2
- ncc build dist/cli/src/catenv.js -o dist/bundles/catenv -e 'tsx/cjs/api' $( ((SHOULD_MINIFY == 1)) && printf %s '-m')
2
+ ncc build dist/cli/src/catenv.js -o dist/bundles/catenv $( ((SHOULD_MINIFY == 1)) && printf %s '-m')
3
3
 
4
- ncc build dist/cli/src/cli.js -o dist/bundles/cli -e 'tsx/cjs/api' $( ((SHOULD_MINIFY == 1)) && printf %s '-m')
4
+ ncc build dist/cli/src/cli.js -o dist/bundles/cli $( ((SHOULD_MINIFY == 1)) && printf %s '-m')
@@ -1,6 +1,6 @@
1
1
  import { getSecretVarName } from "@catladder/pipeline";
2
2
  import { stripIndents } from "common-tags";
3
- import { difference } from "lodash";
3
+ import { difference } from "lodash-es";
4
4
  import type { IO } from "../../../../core/types";
5
5
  import {
6
6
  getAllComponentsWithAllEnvsHierarchical,
package/src/catenv.ts CHANGED
@@ -27,4 +27,18 @@ program
27
27
  },
28
28
  );
29
29
 
30
+ // Prevent Node.js from printing the (minified) source line on uncaught errors
31
+ process.on("uncaughtException", (err) => {
32
+ console.error(err.stack ?? `${err.name}: ${err.message}`);
33
+ process.exit(1);
34
+ });
35
+ process.on("unhandledRejection", (reason) => {
36
+ if (reason instanceof Error) {
37
+ console.error(reason.stack ?? `${reason.name}: ${reason.message}`);
38
+ } else {
39
+ console.error(reason);
40
+ }
41
+ process.exit(1);
42
+ });
43
+
30
44
  program.parse();
package/src/cli.ts CHANGED
@@ -227,4 +227,18 @@ process.on("exit", () => {
227
227
  stopAllPortForwards();
228
228
  });
229
229
 
230
+ // Prevent Node.js from printing the (minified) source line on uncaught errors
231
+ process.on("uncaughtException", (err) => {
232
+ console.error(err.stack ?? `${err.name}: ${err.message}`);
233
+ process.exit(1);
234
+ });
235
+ process.on("unhandledRejection", (reason) => {
236
+ if (reason instanceof Error) {
237
+ console.error(reason.stack ?? `${reason.name}: ${reason.message}`);
238
+ } else {
239
+ console.error(reason);
240
+ }
241
+ process.exit(1);
242
+ });
243
+
230
244
  registerAllCommands().then(() => program.parse());
@@ -1,5 +1,5 @@
1
1
  import { exec } from "child-process-promise";
2
- import { last } from "lodash";
2
+ import { last } from "lodash-es";
3
3
  import open from "open";
4
4
  import { defineCommand } from "../../core/defineCommand";
5
5
  import {
@@ -1,5 +1,5 @@
1
1
  import { stringify } from "yaml";
2
- import { pick } from "lodash";
2
+ import { pick } from "lodash-es";
3
3
  import { defineCommand } from "../../../core/defineCommand";
4
4
  import { getProjectPods } from "../../../kubernetes";
5
5
  import { ensureCluster } from "../../../apps/cli/commands/project/utils/ensureCluster";
@@ -1,5 +1,5 @@
1
1
  import { getSecretVarName } from "@catladder/pipeline";
2
- import { has, isObject } from "lodash";
2
+ import { has, isObject } from "lodash-es";
3
3
  import memoizee from "memoizee";
4
4
  import fetch from "node-fetch";
5
5
  import open from "open";