@catladder/cli 3.23.1 → 3.24.0
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 +2 -2
- package/dist/bundles/cli/index.js +3 -3
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +16 -7
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +10 -0
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -10,10 +10,9 @@ const createBuildJobArtifacts = (context) => {
|
|
|
10
10
|
const paths = context.type === "workspace"
|
|
11
11
|
? context.components.flatMap((c) => getArtifactsPathForComponent(c))
|
|
12
12
|
: getArtifactsPathForComponent(context, ["__build_info.json"]);
|
|
13
|
-
// esxclude .env files if generated
|
|
14
13
|
const exclude = context.type === "workspace"
|
|
15
|
-
? context.components.flatMap((c) =>
|
|
16
|
-
:
|
|
14
|
+
? context.components.flatMap((c) => getAllArtifactExcludePathsForComponent(c))
|
|
15
|
+
: getAllArtifactExcludePathsForComponent(context);
|
|
17
16
|
return {
|
|
18
17
|
paths: (0, lodash_1.uniq)(paths).sort((a, b) => a.localeCompare(b)),
|
|
19
18
|
...(exclude.length > 0 ? { exclude } : {}),
|
|
@@ -29,12 +28,10 @@ const createBuildJobArtifacts = (context) => {
|
|
|
29
28
|
};
|
|
30
29
|
};
|
|
31
30
|
exports.createBuildJobArtifacts = createBuildJobArtifacts;
|
|
32
|
-
const
|
|
31
|
+
const _getArtifactPathsForComponent = (c, configKey, additionalPaths) => {
|
|
33
32
|
var _a, _b;
|
|
34
33
|
return (_b = [
|
|
35
|
-
...(c.build.type !== "disabled"
|
|
36
|
-
? ((_a = c.build.config.artifactsPaths) !== null && _a !== void 0 ? _a : [])
|
|
37
|
-
: []),
|
|
34
|
+
...(c.build.type !== "disabled" ? ((_a = c.build.config[configKey]) !== null && _a !== void 0 ? _a : []) : []),
|
|
38
35
|
...(additionalPaths !== null && additionalPaths !== void 0 ? additionalPaths : []),
|
|
39
36
|
]) === null || _b === void 0 ? void 0 : _b.flatMap((artifact) => c.build
|
|
40
37
|
// in theory, we only need "direct",
|
|
@@ -43,6 +40,18 @@ const getArtifactsPathForComponent = (c, additionalPaths) => {
|
|
|
43
40
|
.getComponentDirs("all")
|
|
44
41
|
.flatMap((cDir) => (0, path_1.join)(cDir, artifact)));
|
|
45
42
|
};
|
|
43
|
+
const getArtifactsPathForComponent = (c, additionalPaths) => {
|
|
44
|
+
return _getArtifactPathsForComponent(c, "artifactsPaths", additionalPaths);
|
|
45
|
+
};
|
|
46
|
+
const getAllArtifactExcludePathsForComponent = (c) => {
|
|
47
|
+
return [
|
|
48
|
+
...getDotEnvPathsForComponent(c), // always exclude .env files
|
|
49
|
+
...getArtifactExcludePathsForComponent(c),
|
|
50
|
+
];
|
|
51
|
+
};
|
|
52
|
+
const getArtifactExcludePathsForComponent = (c, additionalPaths) => {
|
|
53
|
+
return _getArtifactPathsForComponent(c, "artifactsExcludePaths", additionalPaths);
|
|
54
|
+
};
|
|
46
55
|
const getDotEnvPathsForComponent = (c) => {
|
|
47
56
|
if ((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(c)) {
|
|
48
57
|
return [(0, path_1.join)(c.build.dir, ".env")];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBuildJobArtifact.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/artifacts/createBuildJobArtifact.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,uCAIqB;AAErB,mCAA8B;AAC9B,qDAA2E;AAEpE,MAAM,uBAAuB,GAAG,CACrC,OAAgB,EACW,EAAE;;IAC7B,MAAM,KAAK,GACT,OAAO,CAAC,IAAI,KAAK,WAAW;QAC1B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC,CAAC,4BAA4B,CAAC,OAAO,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"createBuildJobArtifact.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/artifacts/createBuildJobArtifact.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,uCAIqB;AAErB,mCAA8B;AAC9B,qDAA2E;AAEpE,MAAM,uBAAuB,GAAG,CACrC,OAAgB,EACW,EAAE;;IAC7B,MAAM,KAAK,GACT,OAAO,CAAC,IAAI,KAAK,WAAW;QAC1B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC,CAAC,4BAA4B,CAAC,OAAO,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAEnE,MAAM,OAAO,GACX,OAAO,CAAC,IAAI,KAAK,WAAW;QAC1B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAC/B,sCAAsC,CAAC,CAAC,CAAC,CAC1C;QACH,CAAC,CAAC,sCAAsC,CAAC,OAAO,CAAC,CAAC;IACtD,OAAO;QACL,KAAK,EAAE,IAAA,aAAI,EAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACrD,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,SAAS,EAAE,OAAO;QAClB,IAAI,EAAE,QAAQ;QACd,OAAO;QACL,kDAAkD;QAClD,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,IAAA,yCAAiC,EAAC,O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9D,GAAG,mCAAmC,CAAC,CAAC,CAAC;KAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,mCAAmC,GAAG,CAC1C,CAAmB,EACnB,eAA0B,EAChB,EAAE;IACZ,OAAO,6BAA6B,CAClC,CAAC,EACD,uBAAuB,EACvB,eAAe,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,CAAmB,EAAY,EAAE;IACnE,IAAI,IAAA,kDAAoC,EAAC,CAAC,CAAC,EAAE,CAAC;QAC5C,OAAO,CAAC,IAAA,WAAI,EAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC"}
|
|
@@ -100,6 +100,11 @@ export type BuildConfigBase = {
|
|
|
100
100
|
* by default "dist" and ".next" are allways included
|
|
101
101
|
*/
|
|
102
102
|
artifactsPaths?: string[];
|
|
103
|
+
/**
|
|
104
|
+
* paths for artifacts to exclude,
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
artifactsExcludePaths?: string[];
|
|
103
108
|
/**
|
|
104
109
|
* additional CI/CD artifacts reports,
|
|
105
110
|
* use to display information in merge requests, pipeline views and security dashboards.
|
|
@@ -277,6 +282,11 @@ export type BuildConfigFromWorkspace = {
|
|
|
277
282
|
* by default "dist" and ".next" are allways included
|
|
278
283
|
*/
|
|
279
284
|
artifactsPaths?: string[];
|
|
285
|
+
/**
|
|
286
|
+
* paths for artifacts to exclude,
|
|
287
|
+
*
|
|
288
|
+
*/
|
|
289
|
+
artifactsExcludePaths?: string[];
|
|
280
290
|
} & WithCacheConfig;
|
|
281
291
|
export type BuildConfigStandalone = BuildConfigNode | BuildConfigNodeStatic | BuildConfigStorybook | BuildConfigMeteor | BuildConfigCustom | BuildConfigRails;
|
|
282
292
|
export type BuildConfig = BuildConfigFromWorkspace | BuildConfigStandalone;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../pipeline/src/build/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../pipeline/src/build/types.ts"],"names":[],"mappings":";;;AA+WO,MAAM,uBAAuB,GAAG,CACrC,CAAsB,EACM,EAAE;IAC9B,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;AACxB,CAAC,CAAC;AALW,QAAA,uBAAuB,2BAKlC;AAEK,MAAM,aAAa,GAAG,CAC3B,CAAc,EACd,GAAG,KAAQ,EACqC,EAAE;IAClD,IAAI,CAAC,IAAA,+BAAuB,EAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB"}
|