@catladder/cli 1.149.2 → 1.149.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.
- package/dist/bundles/catenv/index.js +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/cli/src/catenv.js +2 -0
- package/dist/cli/src/catenv.js.map +1 -1
- package/dist/cli/src/config/getProjectConfig.js +3 -0
- package/dist/cli/src/config/getProjectConfig.js.map +1 -1
- package/dist/cli/src/utils/projects/index.d.ts +1 -1
- package/dist/cli/src/utils/projects/index.js +9 -1
- package/dist/cli/src/utils/projects/index.js.map +1 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js +1 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.d.ts +1 -0
- package/dist/pipeline/src/build/base/writeDotEnv.js +5 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +5 -3
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.js +5 -6
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +7 -7
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.js +5 -5
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/sbom.js +4 -4
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.d.ts +1 -2
- package/dist/pipeline/src/context/createComponentContext.js +8 -4
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/pipeline/createAllJobs.js +70 -16
- package/dist/pipeline/src/pipeline/createAllJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +3 -3
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +3 -55
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/pipeline/src/types/context.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/catenv.ts +2 -0
- package/src/config/getProjectConfig.ts +3 -0
- package/src/utils/projects/index.ts +7 -2
package/package.json
CHANGED
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
|
-
|
|
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 () => {
|