@catladder/cli 0.0.0-next-d71e41ba → 0.0.0-next-dccc0a36
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/apps/cli/src/scripts/generateCliSkillReference.js +3 -2
- package/dist/apps/cli/src/scripts/generateCliSkillReference.js.map +1 -1
- package/dist/bundles/catenv/index.js +790 -272
- package/dist/bundles/cli/index.js +790 -272
- package/dist/bundles/runner-images/docker-build/scripts/ensureNodeDockerfile +8 -1
- package/dist/bundles/runner-images/jobs-default/Dockerfile +4 -0
- package/dist/bundles/skills/catladder-builds/SKILL.md +68 -5
- package/dist/bundles/skills/catladder-builds/references/build-types.md +8 -6
- package/dist/bundles/skills/catladder-cli/references/commands.md +3 -2
- package/dist/bundles/skills/catladder-config/SKILL.md +5 -0
- package/dist/bundles/skills/catladder-deploys/SKILL.md +1 -1
- package/dist/bundles/skills/catladder-deploys/references/deploy-types.md +2 -2
- package/dist/bundles/skills/catladder-pipelines/SKILL.md +16 -4
- package/dist/packages/pipeline/src/backends/github/GithubBackend.js +4 -4
- package/dist/packages/pipeline/src/backends/github/GithubBackend.js.map +1 -1
- package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js +4 -4
- package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
- package/dist/packages/pipeline/src/build/base/createAppBuildJob.js +2 -2
- package/dist/packages/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/packages/pipeline/src/build/index.d.ts +3 -3
- package/dist/packages/pipeline/src/build/index.js +16 -11
- package/dist/packages/pipeline/src/build/index.js.map +1 -1
- package/dist/packages/pipeline/src/build/node/buildJob.js +49 -8
- package/dist/packages/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/packages/pipeline/src/build/node/cache.d.ts +5 -0
- package/dist/packages/pipeline/src/build/node/cache.js +58 -19
- package/dist/packages/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/packages/pipeline/src/build/node/meteor.js +9 -4
- package/dist/packages/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/packages/pipeline/src/build/node/packageManagerInstall.d.ts +14 -0
- package/dist/packages/pipeline/src/build/node/packageManagerInstall.js +145 -0
- package/dist/packages/pipeline/src/build/node/packageManagerInstall.js.map +1 -0
- package/dist/packages/pipeline/src/build/node/testJob.js +9 -11
- package/dist/packages/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/packages/pipeline/src/build/types.d.ts +6 -5
- package/dist/packages/pipeline/src/build/types.js.map +1 -1
- package/dist/packages/pipeline/src/context/createComponentContext.js +3 -2
- package/dist/packages/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/packages/pipeline/src/context/createWorkspaceContext.js +3 -2
- package/dist/packages/pipeline/src/context/createWorkspaceContext.js.map +1 -1
- package/dist/packages/pipeline/src/customImages/hash.d.ts +9 -0
- package/dist/packages/pipeline/src/customImages/hash.js +41 -16
- package/dist/packages/pipeline/src/customImages/hash.js.map +1 -1
- package/dist/packages/pipeline/src/customImages/jobImagesPlan.d.ts +23 -5
- package/dist/packages/pipeline/src/customImages/jobImagesPlan.js +177 -43
- package/dist/packages/pipeline/src/customImages/jobImagesPlan.js.map +1 -1
- package/dist/packages/pipeline/src/customImages/projectImages.d.ts +67 -0
- package/dist/packages/pipeline/src/customImages/projectImages.js +9 -0
- package/dist/packages/pipeline/src/customImages/projectImages.js.map +1 -0
- package/dist/packages/pipeline/src/deploy/custom/deployJob.js +7 -6
- package/dist/packages/pipeline/src/deploy/custom/deployJob.js.map +1 -1
- package/dist/packages/pipeline/src/deploy/pages/deployJob.js +6 -4
- package/dist/packages/pipeline/src/deploy/pages/deployJob.js.map +1 -1
- package/dist/packages/pipeline/src/deploy/types/custom.d.ts +9 -3
- package/dist/packages/pipeline/src/deploy/types/index.d.ts +4 -4
- package/dist/packages/pipeline/src/deploy/types/pages.d.ts +9 -3
- package/dist/packages/pipeline/src/index.d.ts +2 -0
- package/dist/packages/pipeline/src/index.js +2 -0
- package/dist/packages/pipeline/src/index.js.map +1 -1
- package/dist/packages/pipeline/src/pipeline/detectPackageManager.d.ts +18 -0
- package/dist/packages/pipeline/src/pipeline/detectPackageManager.js +76 -0
- package/dist/packages/pipeline/src/pipeline/detectPackageManager.js.map +1 -0
- package/dist/packages/pipeline/src/pipeline/packageManager.d.ts +1 -1
- package/dist/packages/pipeline/src/pipeline/packageManager.js +43 -9
- package/dist/packages/pipeline/src/pipeline/packageManager.js.map +1 -1
- package/dist/packages/pipeline/src/pipeline/pnpm/pnpmUtils.d.ts +14 -0
- package/dist/packages/pipeline/src/pipeline/pnpm/pnpmUtils.js +93 -0
- package/dist/packages/pipeline/src/pipeline/pnpm/pnpmUtils.js.map +1 -0
- package/dist/packages/pipeline/src/types/config.d.ts +16 -1
- package/dist/packages/pipeline/src/types/config.js.map +1 -1
- package/dist/packages/pipeline/src/types/context.d.ts +11 -3
- package/dist/packages/pipeline/src/types/context.js.map +1 -1
- package/dist/packages/pipeline/src/types/jobs.d.ts +2 -1
- package/dist/packages/pipeline/src/types/jobs.js.map +1 -1
- package/dist/packages/pipeline/src/verify/createVerifyJobs.js +5 -5
- package/dist/packages/pipeline/src/verify/createVerifyJobs.js.map +1 -1
- package/dist/runner-images/docker-build/scripts/ensureNodeDockerfile +8 -1
- package/dist/runner-images/jobs-default/Dockerfile +4 -0
- package/dist/skills/catladder-builds/SKILL.md +68 -5
- package/dist/skills/catladder-builds/references/build-types.md +8 -6
- package/dist/skills/catladder-cli/references/commands.md +3 -2
- package/dist/skills/catladder-config/SKILL.md +5 -0
- package/dist/skills/catladder-deploys/SKILL.md +1 -1
- package/dist/skills/catladder-deploys/references/deploy-types.md +2 -2
- package/dist/skills/catladder-pipelines/SKILL.md +16 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/scripts/generateCliSkillReference.ts +3 -2
- package/dist/packages/pipeline/src/build/node/yarn.d.ts +0 -8
- package/dist/packages/pipeline/src/build/node/yarn.js +0 -78
- package/dist/packages/pipeline/src/build/node/yarn.js.map +0 -1
package/package.json
CHANGED
|
@@ -64,8 +64,9 @@ export const renderCliReference = (): string => {
|
|
|
64
64
|
"<!-- rendered from the command definitions by",
|
|
65
65
|
" apps/cli/src/scripts/generateCliSkillReference.ts — do not edit -->",
|
|
66
66
|
"",
|
|
67
|
-
"All commands run non-interactively as `yarn catladder <command>
|
|
68
|
-
"see SKILL.md for how to
|
|
67
|
+
"All commands run non-interactively as `yarn catladder <command> ...`",
|
|
68
|
+
"(`pnpm catladder ...` in pnpm projects); see SKILL.md for how to",
|
|
69
|
+
"pass inputs.",
|
|
69
70
|
"",
|
|
70
71
|
defs.map(renderCommand).join("\n\n"),
|
|
71
72
|
"",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BashExpression } from "../../../../bash/src/index.js";
|
|
2
|
-
import type { ComponentContextWithBuild } from "../../types";
|
|
3
|
-
import { type Context } from "../../types";
|
|
4
|
-
export declare const ensureNodeVersion: (context: Context) => string[];
|
|
5
|
-
export declare const getYarnInstall: (context: Context, options?: {
|
|
6
|
-
noCustomPostInstall: boolean;
|
|
7
|
-
}) => Promise<string[]>;
|
|
8
|
-
export declare const getDockerAppCopyAndBuildScript: (context: ComponentContextWithBuild) => Promise<BashExpression>;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDockerAppCopyAndBuildScript = exports.getYarnInstall = exports.ensureNodeVersion = void 0;
|
|
4
|
-
const bash_1 = require("../../../../bash/src/index.js");
|
|
5
|
-
const utils_1 = require("../../utils");
|
|
6
|
-
const gitlab_1 = require("../../utils/gitlab");
|
|
7
|
-
const YARN_INSTALL_CLASSIC = `yarn install --frozen-lockfile`;
|
|
8
|
-
const YARN_BERRY_PROD_INSTALL = `yarn workspaces focus --production`;
|
|
9
|
-
// FIXME: check why and when rebuild is needed
|
|
10
|
-
const YARN_BERRY_PROD_REBUILD = `yarn rebuild`;
|
|
11
|
-
const getYarnInstallCommand = async (context) => {
|
|
12
|
-
const packageManagerInfo = await context.packageManagerInfo;
|
|
13
|
-
if (packageManagerInfo.isClassic) {
|
|
14
|
-
return YARN_INSTALL_CLASSIC;
|
|
15
|
-
}
|
|
16
|
-
// inline builds make debugging easier as it prints it out in the logs, instead of writing it in temp files
|
|
17
|
-
return `yarn install --immutable --inline-builds`;
|
|
18
|
-
};
|
|
19
|
-
const ensureNodeVersion = (context) => (0, gitlab_1.collapseableSection)("nodeinstall", "Ensure node version")([
|
|
20
|
-
// github actions overrides HOME in container jobs, so also look
|
|
21
|
-
// for nvm where the catladder images install it (/root/.nvm)
|
|
22
|
-
'if [ -f "$HOME/.nvm/nvm.sh" ]; then source "$HOME/.nvm/nvm.sh"; elif [ -f /root/.nvm/nvm.sh ]; then export NVM_DIR=/root/.nvm; source /root/.nvm/nvm.sh; fi',
|
|
23
|
-
"if command -v nvm &> /dev/null && [ -f ./.nvmrc ]; then nvm install; fi",
|
|
24
|
-
]);
|
|
25
|
-
exports.ensureNodeVersion = ensureNodeVersion;
|
|
26
|
-
const getYarnInstall = async (context, options) => {
|
|
27
|
-
const postInstall = context.type !== "workspace" &&
|
|
28
|
-
context.build.type !== "disabled" &&
|
|
29
|
-
"postInstall" in context.build.config
|
|
30
|
-
? context.build.config.postInstall
|
|
31
|
-
: null;
|
|
32
|
-
return [
|
|
33
|
-
...(0, exports.ensureNodeVersion)(context),
|
|
34
|
-
...(0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([await getYarnInstallCommand(context)]),
|
|
35
|
-
...(postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
36
|
-
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((0, utils_1.ensureArray)(postInstall))
|
|
37
|
-
: []),
|
|
38
|
-
];
|
|
39
|
-
};
|
|
40
|
-
exports.getYarnInstall = getYarnInstall;
|
|
41
|
-
const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
|
|
42
|
-
const getDockerAppCopyAndBuildScript = async (context) => {
|
|
43
|
-
var _a, _b, _c;
|
|
44
|
-
const packageManagerInfo = await context.packageManagerInfo;
|
|
45
|
-
if (packageManagerInfo.isClassic) {
|
|
46
|
-
return new bash_1.BashExpression(`
|
|
47
|
-
RUN ${YARN_INSTALL_CLASSIC} --production --ignore-scripts
|
|
48
|
-
${DOCKER_COPY_FILES}
|
|
49
|
-
RUN ${YARN_INSTALL_CLASSIC} --production
|
|
50
|
-
`.trim());
|
|
51
|
-
}
|
|
52
|
-
const yarnRebuildEnabledDefault = context.build.type === "fromWorkspace"
|
|
53
|
-
? ((_b = (_a = context.build.workspaceBuildConfig.dockerDefaults) === null || _a === void 0 ? void 0 : _a.yarnRebuildEnabled) !== null && _b !== void 0 ? _b : true)
|
|
54
|
-
: true;
|
|
55
|
-
const yarnRebuildEnabled = "docker" in context.build.config &&
|
|
56
|
-
context.build.config.docker &&
|
|
57
|
-
"yarnRebuildEnabled" in context.build.config.docker
|
|
58
|
-
? ((_c = context.build.config.docker.yarnRebuildEnabled) !== null && _c !== void 0 ? _c : yarnRebuildEnabledDefault)
|
|
59
|
-
: yarnRebuildEnabledDefault;
|
|
60
|
-
// yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
|
|
61
|
-
// trying to import those fail on this version
|
|
62
|
-
const doesNotShipWithBuiltInPlugins = ["2", "3"].some((v) => packageManagerInfo.version.startsWith(v));
|
|
63
|
-
const maybeAddWorkspaceToolsCommand = doesNotShipWithBuiltInPlugins
|
|
64
|
-
? "RUN yarn plugin import workspace-tools"
|
|
65
|
-
: "";
|
|
66
|
-
// copy first everything and then install
|
|
67
|
-
// rebuild first does not work as it will run postinstall and that might require files in the app
|
|
68
|
-
return new bash_1.BashExpression(`
|
|
69
|
-
ENV YARN_ENABLE_INLINE_BUILDS=1
|
|
70
|
-
${DOCKER_COPY_FILES}
|
|
71
|
-
${maybeAddWorkspaceToolsCommand}
|
|
72
|
-
RUN ${YARN_BERRY_PROD_INSTALL}
|
|
73
|
-
${yarnRebuildEnabled ? `RUN ${YARN_BERRY_PROD_REBUILD}` : ""}
|
|
74
|
-
|
|
75
|
-
`.trim());
|
|
76
|
-
};
|
|
77
|
-
exports.getDockerAppCopyAndBuildScript = getDockerAppCopyAndBuildScript;
|
|
78
|
-
//# sourceMappingURL=yarn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/build/node/yarn.ts"],"names":[],"mappings":";;;AAAA,0CAAiD;AAGjD,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,KAAK,EAAE,OAAgB,EAAE,EAAE;IACvD,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC;IAC5D,IAAI,kBAAkB,CAAC,SAAS,EAAE,CAAC;QACjC,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,gEAAgE;IAChE,6DAA6D;IAC7D,6JAA6J;IAC7J,yEAAyE;CAC1E,CAAC,CAAC;AATQ,QAAA,iBAAiB,qBASzB;AAEE,MAAM,cAAc,GAAG,KAAK,EACjC,OAAgB,EAChB,OAEC,EACD,EAAE;IACF,MAAM,WAAW,GACf,OAAO,CAAC,IAAI,KAAK,WAAW;QAC5B,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU;QACjC,aAAa,IAAI,OAAO,CAA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