@catladder/cli 3.26.0 → 3.28.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 +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -1
- package/dist/pipeline/src/build/node/yarn.js +13 -3
- 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/pipeline/src/deploy/types/googleCloudRun.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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,13 +5,15 @@ 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;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
// inline builds make debugging easier as it prints it out in the logs, instead of writing it in temp files
|
|
16
|
+
return `yarn install --immutable --inline-builds`;
|
|
15
17
|
};
|
|
16
18
|
const ensureNodeVersion = (context) => (0, gitlab_1.collapseableSection)("nodeinstall", "Ensure node version")([
|
|
17
19
|
"if [ -f ~/.nvm/nvm.sh ]; then source ~/.nvm/nvm.sh; fi",
|
|
@@ -35,6 +37,7 @@ const getYarnInstall = (context, options) => {
|
|
|
35
37
|
exports.getYarnInstall = getYarnInstall;
|
|
36
38
|
const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
|
|
37
39
|
const getDockerAppCopyAndBuildScript = (context) => {
|
|
40
|
+
var _a;
|
|
38
41
|
if (context.packageManagerInfo.isClassic) {
|
|
39
42
|
return new BashExpression_1.BashExpression(`
|
|
40
43
|
RUN ${YARN_INSTALL_CLASSIC} --production --ignore-scripts
|
|
@@ -42,6 +45,11 @@ ${DOCKER_COPY_FILES}
|
|
|
42
45
|
RUN ${YARN_INSTALL_CLASSIC} --production
|
|
43
46
|
`.trim());
|
|
44
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;
|
|
45
53
|
// yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
|
|
46
54
|
// trying to import those fail on this version
|
|
47
55
|
const doesNotShipWithBuiltInPlugins = ["2", "3"].some((v) => context.packageManagerInfo.version.startsWith(v));
|
|
@@ -51,9 +59,11 @@ RUN ${YARN_INSTALL_CLASSIC} --production
|
|
|
51
59
|
// copy first everything and then install
|
|
52
60
|
// rebuild first does not work as it will run postinstall and that might require files in the app
|
|
53
61
|
return new BashExpression_1.BashExpression(`
|
|
62
|
+
ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
54
63
|
${DOCKER_COPY_FILES}
|
|
55
64
|
${maybeAddWorkspaceToolsCommand}
|
|
56
|
-
RUN ${
|
|
65
|
+
RUN ${YARN_BERRY_PROD_INSTALL}
|
|
66
|
+
${yarnRebuildEnabled ? `RUN ${YARN_BERRY_PROD_REBUILD}` : ""}
|
|
57
67
|
|
|
58
68
|
`.trim());
|
|
59
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,cAAc,CAAC;AAE/C,MAAM,qBAAqB,GAAG,CAAC,OAAgB,EAAE,EAAE;IACjD,IAAI,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,CAAC;QACzC,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,2GAA2G;IAC3G,OAAO,0CAA0C,CAAC;AACpD,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE,CACpD,IAAA,4BAAmB,EACjB,aAAa,EACb,qBAAqB,CACtB,CAAC;IACA,yDAAyD;IACzD,yEAAyE;CAC1E,CAAC,CAAC;AAPQ,QAAA,iBAAiB,qBAOzB;AAEE,MAAM,cAAc,GAAG,CAC5B,OAAgB,EAChB,OAEC,EACD,EAAE;IACF,MAAM,WAAW,GACf,OAAO,CAAC,IAAI,KAAK,WAAW;QAC5B,OAAO,CAAC,K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8C;IAC9C,MAAM,6BAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1D,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CACjD,CAAC;IACF,MAAM,6BAA6B,GAAG,6BAA6B;QACjE,CAAC,CAAC,wCAAwC;QAC1C,CAAC,CAAC,EAAE,CAAC;IAEP,yCAAyC;IACzC,iGAAiG;IACjG,OAAO,IAAI,+BAAc,CACvB;;EAEF,iBAAiB;EACjB,6BAA6B;MACzB,uBAAuB;EAC3B,kBAAkB,CAAC,CAAC,CAAC,OAAO,uBAAuB,EAAE,CAAC,CAAC,CAAC,EAAE;;KAEvD,CAAC,IAAI,EAAE,CACT,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,8BAA8B,kCAyCzC"}
|
|
@@ -168,6 +168,12 @@ type BuildConfigDockerWithAdditions = {
|
|
|
168
168
|
};
|
|
169
169
|
type BuildConfigDockerBuiltInNode = {
|
|
170
170
|
type: "node";
|
|
171
|
+
/**
|
|
172
|
+
* 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"}
|
|
@@ -422,7 +422,7 @@ export type DeployConfigCloudRunExecuteHttp = {
|
|
|
422
422
|
/**
|
|
423
423
|
* the http-method to use. Defaults to "POST" (as specified by google cloud scheduler)
|
|
424
424
|
*/
|
|
425
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
425
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "PURGE";
|
|
426
426
|
/**
|
|
427
427
|
* the body to send
|
|
428
428
|
*/
|