@catladder/cli 0.0.0-main-ee0fff9f → 0.0.0-main-cda13e03
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 +10 -2
- package/dist/bundles/cli/index.js +10 -2
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -1
- package/dist/pipeline/src/build/node/yarn.js +10 -2
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +6 -0
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2383,8 +2383,9 @@ const BashExpression_1 = __nccwpck_require__(2376);
|
|
|
2383
2383
|
const utils_1 = __nccwpck_require__(2497);
|
|
2384
2384
|
const gitlab_1 = __nccwpck_require__(8490);
|
|
2385
2385
|
const YARN_INSTALL_CLASSIC = `yarn install --frozen-lockfile`;
|
|
2386
|
+
const YARN_BERRY_PROD_INSTALL = `yarn workspaces focus --production`;
|
|
2386
2387
|
// FIXME: check why and when rebuild is needed
|
|
2387
|
-
const YARN_BERRY_PROD_REBUILD = `yarn
|
|
2388
|
+
const YARN_BERRY_PROD_REBUILD = `yarn rebuild`;
|
|
2388
2389
|
const getYarnInstallCommand = (context) => {
|
|
2389
2390
|
if (context.packageManagerInfo.isClassic) {
|
|
2390
2391
|
return YARN_INSTALL_CLASSIC;
|
|
@@ -2414,6 +2415,7 @@ const getYarnInstall = (context, options) => {
|
|
|
2414
2415
|
exports.getYarnInstall = getYarnInstall;
|
|
2415
2416
|
const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
|
|
2416
2417
|
const getDockerAppCopyAndBuildScript = (context) => {
|
|
2418
|
+
var _a;
|
|
2417
2419
|
if (context.packageManagerInfo.isClassic) {
|
|
2418
2420
|
return new BashExpression_1.BashExpression(`
|
|
2419
2421
|
RUN ${YARN_INSTALL_CLASSIC} --production --ignore-scripts
|
|
@@ -2421,6 +2423,11 @@ ${DOCKER_COPY_FILES}
|
|
|
2421
2423
|
RUN ${YARN_INSTALL_CLASSIC} --production
|
|
2422
2424
|
`.trim());
|
|
2423
2425
|
}
|
|
2426
|
+
const yarnRebuildEnabled = "docker" in context.build.config &&
|
|
2427
|
+
context.build.config.docker &&
|
|
2428
|
+
"yarnRebuildEnabled" in context.build.config.docker
|
|
2429
|
+
? ((_a = context.build.config.docker.yarnRebuildEnabled) !== null && _a !== void 0 ? _a : true)
|
|
2430
|
+
: true;
|
|
2424
2431
|
// yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
|
|
2425
2432
|
// trying to import those fail on this version
|
|
2426
2433
|
const doesNotShipWithBuiltInPlugins = ["2", "3"].some((v) => context.packageManagerInfo.version.startsWith(v));
|
|
@@ -2433,7 +2440,8 @@ RUN ${YARN_INSTALL_CLASSIC} --production
|
|
|
2433
2440
|
ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
2434
2441
|
${DOCKER_COPY_FILES}
|
|
2435
2442
|
${maybeAddWorkspaceToolsCommand}
|
|
2436
|
-
RUN ${
|
|
2443
|
+
RUN ${YARN_BERRY_PROD_INSTALL}
|
|
2444
|
+
${yarnRebuildEnabled ? `RUN ${YARN_BERRY_PROD_REBUILD}` : ""}
|
|
2437
2445
|
|
|
2438
2446
|
`.trim());
|
|
2439
2447
|
};
|
|
@@ -5635,8 +5635,9 @@ const BashExpression_1 = __nccwpck_require__(42376);
|
|
|
5635
5635
|
const utils_1 = __nccwpck_require__(32497);
|
|
5636
5636
|
const gitlab_1 = __nccwpck_require__(38490);
|
|
5637
5637
|
const YARN_INSTALL_CLASSIC = `yarn install --frozen-lockfile`;
|
|
5638
|
+
const YARN_BERRY_PROD_INSTALL = `yarn workspaces focus --production`;
|
|
5638
5639
|
// FIXME: check why and when rebuild is needed
|
|
5639
|
-
const YARN_BERRY_PROD_REBUILD = `yarn
|
|
5640
|
+
const YARN_BERRY_PROD_REBUILD = `yarn rebuild`;
|
|
5640
5641
|
const getYarnInstallCommand = (context) => {
|
|
5641
5642
|
if (context.packageManagerInfo.isClassic) {
|
|
5642
5643
|
return YARN_INSTALL_CLASSIC;
|
|
@@ -5666,6 +5667,7 @@ const getYarnInstall = (context, options) => {
|
|
|
5666
5667
|
exports.getYarnInstall = getYarnInstall;
|
|
5667
5668
|
const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
|
|
5668
5669
|
const getDockerAppCopyAndBuildScript = (context) => {
|
|
5670
|
+
var _a;
|
|
5669
5671
|
if (context.packageManagerInfo.isClassic) {
|
|
5670
5672
|
return new BashExpression_1.BashExpression(`
|
|
5671
5673
|
RUN ${YARN_INSTALL_CLASSIC} --production --ignore-scripts
|
|
@@ -5673,6 +5675,11 @@ ${DOCKER_COPY_FILES}
|
|
|
5673
5675
|
RUN ${YARN_INSTALL_CLASSIC} --production
|
|
5674
5676
|
`.trim());
|
|
5675
5677
|
}
|
|
5678
|
+
const yarnRebuildEnabled = "docker" in context.build.config &&
|
|
5679
|
+
context.build.config.docker &&
|
|
5680
|
+
"yarnRebuildEnabled" in context.build.config.docker
|
|
5681
|
+
? ((_a = context.build.config.docker.yarnRebuildEnabled) !== null && _a !== void 0 ? _a : true)
|
|
5682
|
+
: true;
|
|
5676
5683
|
// yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
|
|
5677
5684
|
// trying to import those fail on this version
|
|
5678
5685
|
const doesNotShipWithBuiltInPlugins = ["2", "3"].some((v) => context.packageManagerInfo.version.startsWith(v));
|
|
@@ -5685,7 +5692,8 @@ RUN ${YARN_INSTALL_CLASSIC} --production
|
|
|
5685
5692
|
ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
5686
5693
|
${DOCKER_COPY_FILES}
|
|
5687
5694
|
${maybeAddWorkspaceToolsCommand}
|
|
5688
|
-
RUN ${
|
|
5695
|
+
RUN ${YARN_BERRY_PROD_INSTALL}
|
|
5696
|
+
${yarnRebuildEnabled ? `RUN ${YARN_BERRY_PROD_REBUILD}` : ""}
|
|
5689
5697
|
|
|
5690
5698
|
`.trim());
|
|
5691
5699
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BashExpression } from "../../bash/BashExpression";
|
|
2
|
+
import type { ComponentContextWithBuild } from "../../types";
|
|
2
3
|
import { type Context } from "../../types";
|
|
3
4
|
export declare const ensureNodeVersion: (context: Context) => string[];
|
|
4
5
|
export declare const getYarnInstall: (context: Context, options?: {
|
|
5
6
|
noCustomPostInstall: boolean;
|
|
6
7
|
}) => string[];
|
|
7
|
-
export declare const getDockerAppCopyAndBuildScript: (context:
|
|
8
|
+
export declare const getDockerAppCopyAndBuildScript: (context: ComponentContextWithBuild) => BashExpression;
|
|
@@ -5,8 +5,9 @@ const BashExpression_1 = require("../../bash/BashExpression");
|
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const gitlab_1 = require("../../utils/gitlab");
|
|
7
7
|
const YARN_INSTALL_CLASSIC = `yarn install --frozen-lockfile`;
|
|
8
|
+
const YARN_BERRY_PROD_INSTALL = `yarn workspaces focus --production`;
|
|
8
9
|
// FIXME: check why and when rebuild is needed
|
|
9
|
-
const YARN_BERRY_PROD_REBUILD = `yarn
|
|
10
|
+
const YARN_BERRY_PROD_REBUILD = `yarn rebuild`;
|
|
10
11
|
const getYarnInstallCommand = (context) => {
|
|
11
12
|
if (context.packageManagerInfo.isClassic) {
|
|
12
13
|
return YARN_INSTALL_CLASSIC;
|
|
@@ -36,6 +37,7 @@ const getYarnInstall = (context, options) => {
|
|
|
36
37
|
exports.getYarnInstall = getYarnInstall;
|
|
37
38
|
const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
|
|
38
39
|
const getDockerAppCopyAndBuildScript = (context) => {
|
|
40
|
+
var _a;
|
|
39
41
|
if (context.packageManagerInfo.isClassic) {
|
|
40
42
|
return new BashExpression_1.BashExpression(`
|
|
41
43
|
RUN ${YARN_INSTALL_CLASSIC} --production --ignore-scripts
|
|
@@ -43,6 +45,11 @@ ${DOCKER_COPY_FILES}
|
|
|
43
45
|
RUN ${YARN_INSTALL_CLASSIC} --production
|
|
44
46
|
`.trim());
|
|
45
47
|
}
|
|
48
|
+
const yarnRebuildEnabled = "docker" in context.build.config &&
|
|
49
|
+
context.build.config.docker &&
|
|
50
|
+
"yarnRebuildEnabled" in context.build.config.docker
|
|
51
|
+
? ((_a = context.build.config.docker.yarnRebuildEnabled) !== null && _a !== void 0 ? _a : true)
|
|
52
|
+
: true;
|
|
46
53
|
// yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
|
|
47
54
|
// trying to import those fail on this version
|
|
48
55
|
const doesNotShipWithBuiltInPlugins = ["2", "3"].some((v) => context.packageManagerInfo.version.startsWith(v));
|
|
@@ -55,7 +62,8 @@ RUN ${YARN_INSTALL_CLASSIC} --production
|
|
|
55
62
|
ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
56
63
|
${DOCKER_COPY_FILES}
|
|
57
64
|
${maybeAddWorkspaceToolsCommand}
|
|
58
|
-
RUN ${
|
|
65
|
+
RUN ${YARN_BERRY_PROD_INSTALL}
|
|
66
|
+
${yarnRebuildEnabled ? `RUN ${YARN_BERRY_PROD_REBUILD}` : ""}
|
|
59
67
|
|
|
60
68
|
`.trim());
|
|
61
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/yarn.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;
|
|
1
|
+
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/yarn.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAG3D,uCAA0C;AAC1C,+CAAyD;AAEzD,MAAM,oBAAoB,GAAG,gCAAgC,CAAC;AAE9D,MAAM,uBAAuB,GAAG,oCAAoC,CAAC;AACrE,8CAA8C;AAC9C,MAAM,uBAAuB,GAAG,cAA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* whether to run yarn rebuild after yarn install. Defaults to true.
|
|
173
|
+
*
|
|
174
|
+
* Future versions of catladder will default to false.
|
|
175
|
+
*/
|
|
176
|
+
yarnRebuildEnabled?: boolean;
|
|
171
177
|
} & BuildConfigDockerWithAdditions;
|
|
172
178
|
type BuildConfigDockerBuiltInMeteor = {
|
|
173
179
|
type: "meteor";
|
|
@@ -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":";;;AAqXO,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"}
|