@catladder/cli 1.149.1 → 1.149.3

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 (39) hide show
  1. package/dist/bundles/catenv/index.js +1 -1
  2. package/dist/bundles/cli/index.js +1 -1
  3. package/dist/cli/src/catenv.js +2 -0
  4. package/dist/cli/src/catenv.js.map +1 -1
  5. package/dist/cli/src/config/getProjectConfig.js +3 -0
  6. package/dist/cli/src/config/getProjectConfig.js.map +1 -1
  7. package/dist/cli/src/utils/projects/index.d.ts +1 -1
  8. package/dist/cli/src/utils/projects/index.js +9 -1
  9. package/dist/cli/src/utils/projects/index.js.map +1 -1
  10. package/dist/pipeline/src/build/base/createAppBuildJob.js +1 -1
  11. package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
  12. package/dist/pipeline/src/build/base/writeDotEnv.d.ts +1 -0
  13. package/dist/pipeline/src/build/base/writeDotEnv.js +5 -1
  14. package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
  15. package/dist/pipeline/src/build/node/buildJob.js +5 -3
  16. package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
  17. package/dist/pipeline/src/build/node/cache.js +5 -6
  18. package/dist/pipeline/src/build/node/cache.js.map +1 -1
  19. package/dist/pipeline/src/build/node/testJob.js +7 -7
  20. package/dist/pipeline/src/build/node/testJob.js.map +1 -1
  21. package/dist/pipeline/src/build/node/yarn.js +5 -5
  22. package/dist/pipeline/src/build/node/yarn.js.map +1 -1
  23. package/dist/pipeline/src/build/sbom.js +4 -4
  24. package/dist/pipeline/src/build/sbom.js.map +1 -1
  25. package/dist/pipeline/src/context/createComponentContext.d.ts +15 -0
  26. package/dist/pipeline/src/context/createComponentContext.js +116 -0
  27. package/dist/pipeline/src/context/createComponentContext.js.map +1 -0
  28. package/dist/pipeline/src/context/index.d.ts +1 -16
  29. package/dist/pipeline/src/context/index.js +1 -109
  30. package/dist/pipeline/src/context/index.js.map +1 -1
  31. package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +1 -1
  32. package/dist/pipeline/src/pipeline/createJobsForComponent.js +2 -6
  33. package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
  34. package/dist/pipeline/src/types/context.d.ts +2 -2
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +1 -1
  37. package/src/catenv.ts +2 -0
  38. package/src/config/getProjectConfig.ts +3 -0
  39. package/src/utils/projects/index.ts +7 -2
package/package.json CHANGED
@@ -52,7 +52,7 @@
52
52
  }
53
53
  ],
54
54
  "license": "MIT",
55
- "version": "1.149.1",
55
+ "version": "1.149.3",
56
56
  "scripts": {
57
57
  "lint": "eslint \"src/**/*.ts\"",
58
58
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
package/src/catenv.ts CHANGED
@@ -4,7 +4,9 @@ import { parseChoice } from "./config/parseChoice";
4
4
 
5
5
  const choice = process.argv[2] ? parseChoice(process.argv[2]) : null;
6
6
 
7
+ const now = performance.now();
7
8
  catenv(choice).then(() => {
9
+ console.log("catenv", performance.now() - now);
8
10
  // we have to exit manually, because we have some file watches
9
11
  process.exit();
10
12
  });
@@ -21,6 +21,9 @@ let currentConfig: Config | null = null;
21
21
  // reload the config on change
22
22
  const reloadConfigAndObserve = async () => {
23
23
  const gitRoot = await getGitRoot();
24
+ if (!gitRoot) {
25
+ return;
26
+ }
24
27
  const result = readConfigSync(gitRoot);
25
28
  if (!result) {
26
29
  // can't do anything, there is no config
@@ -4,8 +4,13 @@ import { getProjectConfig, parseChoice } from "../../config/getProjectConfig";
4
4
  import { readFileOrError } from "../files";
5
5
  import { exec } from "child-process-promise";
6
6
 
7
- export const getGitRoot = async (): Promise<string> => {
8
- return (await exec(`git rev-parse --show-toplevel`)).stdout.trim();
7
+ export const getGitRoot = async (): Promise<string | null> => {
8
+ try {
9
+ return (await exec(`git rev-parse --show-toplevel`)).stdout.trim();
10
+ } catch (e) {
11
+ // not a git repo
12
+ return null;
13
+ }
9
14
  };
10
15
 
11
16
  export const getRootGitlabCiFile = async () => {