@catladder/cli 0.0.0-main-c009adef โ 0.0.0-main-85a0b1ad
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 +24 -25
- package/dist/bundles/cli/index.js +24 -23
- package/dist/cli/src/catenv.js +0 -2
- package/dist/cli/src/catenv.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/node/buildJob.js +6 -7
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.d.ts +4 -4
- package/dist/pipeline/src/build/node/cache.js +5 -5
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.js +2 -2
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +4 -4
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +4 -4
- package/dist/pipeline/src/build/node/yarn.js +3 -1
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/sbom.js +1 -1
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +1 -1
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
- package/dist/pipeline/src/types/context.d.ts +1 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/catenv.ts +0 -2
|
@@ -666,9 +666,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
666
666
|
var catenv_1 = __importDefault(__nccwpck_require__(6965));
|
|
667
667
|
var parseChoice_1 = __nccwpck_require__(3941);
|
|
668
668
|
var choice = process.argv[2] ? (0, parseChoice_1.parseChoice)(process.argv[2]) : null;
|
|
669
|
-
var now = performance.now();
|
|
670
669
|
(0, catenv_1.default)(choice).then(function () {
|
|
671
|
-
console.log("catenv", performance.now() - now);
|
|
672
670
|
// we have to exit manually, because we have some file watches
|
|
673
671
|
process.exit();
|
|
674
672
|
});
|
|
@@ -2284,7 +2282,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
2284
2282
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
|
|
2285
2283
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
|
|
2286
2284
|
? (0, writeDotEnv_1.writeDotEnv)(context)
|
|
2287
|
-
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context
|
|
2285
|
+
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
2288
2286
|
"cd ".concat(context.build.dir)
|
|
2289
2287
|
], false), __read(((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : [])), false),
|
|
2290
2288
|
artifacts: {
|
|
@@ -3020,19 +3018,18 @@ var createNodeBuildJobs = function (context) {
|
|
|
3020
3018
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
3021
3019
|
}
|
|
3022
3020
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
3023
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
3021
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
3024
3022
|
return (0, base_1.createBuildJobs)(context, {
|
|
3025
3023
|
appBuild: buildConfig.buildCommand !== null
|
|
3026
3024
|
? {
|
|
3027
3025
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
3028
3026
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
3029
|
-
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context
|
|
3027
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
3030
3028
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read(((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])), false),
|
|
3031
3029
|
artifacts: {
|
|
3032
3030
|
paths: __spreadArray([
|
|
3033
3031
|
context.build.dir
|
|
3034
|
-
], __read(((_d = context.
|
|
3035
|
-
.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
3032
|
+
], __read(((_d = context.packageManagerInfo.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
3036
3033
|
var _a, _b;
|
|
3037
3034
|
return __spreadArray([
|
|
3038
3035
|
(0, path_1.join)(dir, "__build_info.json"),
|
|
@@ -3052,11 +3049,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
3052
3049
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
3053
3050
|
? "nginx"
|
|
3054
3051
|
: "node"),
|
|
3055
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context
|
|
3052
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
3056
3053
|
variables: {
|
|
3057
3054
|
// only required for non static
|
|
3058
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context
|
|
3059
|
-
DOCKER_COPY_WORKSPACE_FILES: (_e = context.
|
|
3055
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
3056
|
+
DOCKER_COPY_WORKSPACE_FILES: (_e = context.packageManagerInfo.pathsToCopyInDocker
|
|
3060
3057
|
.map(function (dir) { return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir); })) === null || _e === void 0 ? void 0 : _e.join("\n"),
|
|
3061
3058
|
},
|
|
3062
3059
|
},
|
|
@@ -3102,9 +3099,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3102
3099
|
};
|
|
3103
3100
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3104
3101
|
exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
3102
|
+
var lodash_1 = __nccwpck_require__(3255);
|
|
3105
3103
|
var path_1 = __nccwpck_require__(1017);
|
|
3106
3104
|
var slugify_1 = __importDefault(__nccwpck_require__(4035));
|
|
3107
|
-
var lodash_1 = __nccwpck_require__(3255);
|
|
3108
3105
|
var getYarnCache = function (context, policy) {
|
|
3109
3106
|
if (policy === void 0) { policy = "pull-push"; }
|
|
3110
3107
|
var componentIsInWorkspace = context.packageManagerInfo.componentIsInWorkspace;
|
|
@@ -3116,9 +3113,9 @@ var getYarnCache = function (context, policy) {
|
|
|
3116
3113
|
paths: [".yarn"],
|
|
3117
3114
|
}
|
|
3118
3115
|
: {
|
|
3119
|
-
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
3116
|
+
key: (0, slugify_1.default)(context.build.dir) + "-yarn",
|
|
3120
3117
|
policy: policy,
|
|
3121
|
-
paths: [(0, path_1.join)(context.dir, ".yarn")],
|
|
3118
|
+
paths: [(0, path_1.join)(context.build.dir, ".yarn")],
|
|
3122
3119
|
},
|
|
3123
3120
|
];
|
|
3124
3121
|
};
|
|
@@ -3134,7 +3131,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
3134
3131
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
3135
3132
|
key: componentIsInWorkspace
|
|
3136
3133
|
? "node-modules-workspace"
|
|
3137
|
-
: (0, slugify_1.default)(context.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
3134
|
+
: (0, slugify_1.default)(context.build.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
3138
3135
|
policy: policy,
|
|
3139
3136
|
paths: __spreadArray([], __read((componentIsInWorkspace
|
|
3140
3137
|
? (0, lodash_1.uniq)(__spreadArray([
|
|
@@ -3142,7 +3139,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
3142
3139
|
], __read(((_a = context.packageManagerInfo.workspaces.map(function (w) {
|
|
3143
3140
|
return (0, path_1.join)(w.location, "node_modules");
|
|
3144
3141
|
})) !== null && _a !== void 0 ? _a : [])), false))
|
|
3145
|
-
: [(0, path_1.join)(context.dir, "node_modules")])), false),
|
|
3142
|
+
: [(0, path_1.join)(context.build.dir, "node_modules")])), false),
|
|
3146
3143
|
},
|
|
3147
3144
|
];
|
|
3148
3145
|
};
|
|
@@ -3287,11 +3284,11 @@ var createMeteorBuildJobs = function (context) {
|
|
|
3287
3284
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
3288
3285
|
throw new Error("deploy config is not meteor");
|
|
3289
3286
|
}
|
|
3290
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
3287
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
3291
3288
|
return (0, base_1.createBuildJobs)(context, {
|
|
3292
3289
|
appBuild: buildConfig.buildCommand !== null
|
|
3293
3290
|
? {
|
|
3294
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context
|
|
3291
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
3295
3292
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
3296
3293
|
variables: {
|
|
3297
3294
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1", // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -3389,21 +3386,21 @@ var createNodeTestJobs = function (context) {
|
|
|
3389
3386
|
needs: [],
|
|
3390
3387
|
envMode: "none",
|
|
3391
3388
|
};
|
|
3392
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
3389
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
3393
3390
|
var auditJob = buildConfig.audit !== false
|
|
3394
3391
|
? __assign(__assign(__assign({ name: "๐ก audit" }, base), { image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage, cache: undefined, script: __spreadArray([
|
|
3395
3392
|
"cd ".concat(context.build.dir)
|
|
3396
3393
|
], __read(((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
3397
|
-
context.
|
|
3394
|
+
context.packageManagerInfo.isClassic
|
|
3398
3395
|
? "yarn audit"
|
|
3399
3396
|
: "yarn npm audit --environment production", // yarn 2
|
|
3400
3397
|
])), false), allow_failure: true }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
|
|
3401
3398
|
var lintJob = buildConfig.lint !== false
|
|
3402
|
-
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context
|
|
3399
|
+
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
3403
3400
|
"cd ".concat(context.build.dir)
|
|
3404
3401
|
], false), __read(yarnInstall), false), __read(((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
|
|
3405
3402
|
var testJob = buildConfig.test !== false
|
|
3406
|
-
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context
|
|
3403
|
+
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
3407
3404
|
"cd ".concat(context.build.dir)
|
|
3408
3405
|
], false), __read(yarnInstall), false), __read(((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
|
|
3409
3406
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -3466,7 +3463,9 @@ var ensureNodeVersion = function (context) {
|
|
|
3466
3463
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
3467
3464
|
var getYarnInstall = function (context, options) {
|
|
3468
3465
|
var _a;
|
|
3469
|
-
var postInstall = "postInstall" in context.
|
|
3466
|
+
var postInstall = "postInstall" in context.build.config
|
|
3467
|
+
? context.build.config.postInstall
|
|
3468
|
+
: null;
|
|
3470
3469
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read((postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
3471
3470
|
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
|
|
3472
3471
|
: [])), false);
|
|
@@ -3739,7 +3738,7 @@ var createSbomBuildJob = function (context) {
|
|
|
3739
3738
|
var buildConfig = context.build.config;
|
|
3740
3739
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
3741
3740
|
var defaultScript = [
|
|
3742
|
-
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.
|
|
3741
|
+
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace
|
|
3743
3742
|
? "."
|
|
3744
3743
|
: context.build.dir),
|
|
3745
3744
|
];
|
|
@@ -4043,9 +4042,9 @@ var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, v
|
|
|
4043
4042
|
context = {
|
|
4044
4043
|
fullConfig: ctx.config,
|
|
4045
4044
|
componentConfig: componentConfig,
|
|
4045
|
+
env: ctx.env,
|
|
4046
4046
|
build: {
|
|
4047
4047
|
dir: dir,
|
|
4048
|
-
packageManagerInfo: packageManagerInfo,
|
|
4049
4048
|
config: build,
|
|
4050
4049
|
},
|
|
4051
4050
|
deploy: deploy
|
|
@@ -6425,7 +6424,7 @@ var createCustomDeployJobs = function (context) {
|
|
|
6425
6424
|
throw new Error("deploy config is not custom");
|
|
6426
6425
|
}
|
|
6427
6426
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
6428
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
6427
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
6429
6428
|
noCustomPostInstall: true,
|
|
6430
6429
|
});
|
|
6431
6430
|
return (0, base_1.createDeployementJobs)(context, {
|
|
@@ -9728,7 +9728,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
9728
9728
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
|
|
9729
9729
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
|
|
9730
9730
|
? (0, writeDotEnv_1.writeDotEnv)(context)
|
|
9731
|
-
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context
|
|
9731
|
+
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
9732
9732
|
"cd ".concat(context.build.dir)
|
|
9733
9733
|
], false), __read(((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : [])), false),
|
|
9734
9734
|
artifacts: {
|
|
@@ -10464,19 +10464,18 @@ var createNodeBuildJobs = function (context) {
|
|
|
10464
10464
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
10465
10465
|
}
|
|
10466
10466
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
10467
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
10467
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
10468
10468
|
return (0, base_1.createBuildJobs)(context, {
|
|
10469
10469
|
appBuild: buildConfig.buildCommand !== null
|
|
10470
10470
|
? {
|
|
10471
10471
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
10472
10472
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
10473
|
-
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context
|
|
10473
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
10474
10474
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read(((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])), false),
|
|
10475
10475
|
artifacts: {
|
|
10476
10476
|
paths: __spreadArray([
|
|
10477
10477
|
context.build.dir
|
|
10478
|
-
], __read(((_d = context.
|
|
10479
|
-
.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
10478
|
+
], __read(((_d = context.packageManagerInfo.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
10480
10479
|
var _a, _b;
|
|
10481
10480
|
return __spreadArray([
|
|
10482
10481
|
(0, path_1.join)(dir, "__build_info.json"),
|
|
@@ -10496,11 +10495,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
10496
10495
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
10497
10496
|
? "nginx"
|
|
10498
10497
|
: "node"),
|
|
10499
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context
|
|
10498
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
10500
10499
|
variables: {
|
|
10501
10500
|
// only required for non static
|
|
10502
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context
|
|
10503
|
-
DOCKER_COPY_WORKSPACE_FILES: (_e = context.
|
|
10501
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
10502
|
+
DOCKER_COPY_WORKSPACE_FILES: (_e = context.packageManagerInfo.pathsToCopyInDocker
|
|
10504
10503
|
.map(function (dir) { return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir); })) === null || _e === void 0 ? void 0 : _e.join("\n"),
|
|
10505
10504
|
},
|
|
10506
10505
|
},
|
|
@@ -10546,9 +10545,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10546
10545
|
};
|
|
10547
10546
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10548
10547
|
exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
10548
|
+
var lodash_1 = __nccwpck_require__(23255);
|
|
10549
10549
|
var path_1 = __nccwpck_require__(71017);
|
|
10550
10550
|
var slugify_1 = __importDefault(__nccwpck_require__(44035));
|
|
10551
|
-
var lodash_1 = __nccwpck_require__(23255);
|
|
10552
10551
|
var getYarnCache = function (context, policy) {
|
|
10553
10552
|
if (policy === void 0) { policy = "pull-push"; }
|
|
10554
10553
|
var componentIsInWorkspace = context.packageManagerInfo.componentIsInWorkspace;
|
|
@@ -10560,9 +10559,9 @@ var getYarnCache = function (context, policy) {
|
|
|
10560
10559
|
paths: [".yarn"],
|
|
10561
10560
|
}
|
|
10562
10561
|
: {
|
|
10563
|
-
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
10562
|
+
key: (0, slugify_1.default)(context.build.dir) + "-yarn",
|
|
10564
10563
|
policy: policy,
|
|
10565
|
-
paths: [(0, path_1.join)(context.dir, ".yarn")],
|
|
10564
|
+
paths: [(0, path_1.join)(context.build.dir, ".yarn")],
|
|
10566
10565
|
},
|
|
10567
10566
|
];
|
|
10568
10567
|
};
|
|
@@ -10578,7 +10577,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
10578
10577
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
10579
10578
|
key: componentIsInWorkspace
|
|
10580
10579
|
? "node-modules-workspace"
|
|
10581
|
-
: (0, slugify_1.default)(context.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
10580
|
+
: (0, slugify_1.default)(context.build.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
10582
10581
|
policy: policy,
|
|
10583
10582
|
paths: __spreadArray([], __read((componentIsInWorkspace
|
|
10584
10583
|
? (0, lodash_1.uniq)(__spreadArray([
|
|
@@ -10586,7 +10585,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
10586
10585
|
], __read(((_a = context.packageManagerInfo.workspaces.map(function (w) {
|
|
10587
10586
|
return (0, path_1.join)(w.location, "node_modules");
|
|
10588
10587
|
})) !== null && _a !== void 0 ? _a : [])), false))
|
|
10589
|
-
: [(0, path_1.join)(context.dir, "node_modules")])), false),
|
|
10588
|
+
: [(0, path_1.join)(context.build.dir, "node_modules")])), false),
|
|
10590
10589
|
},
|
|
10591
10590
|
];
|
|
10592
10591
|
};
|
|
@@ -10731,11 +10730,11 @@ var createMeteorBuildJobs = function (context) {
|
|
|
10731
10730
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
10732
10731
|
throw new Error("deploy config is not meteor");
|
|
10733
10732
|
}
|
|
10734
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
10733
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
10735
10734
|
return (0, base_1.createBuildJobs)(context, {
|
|
10736
10735
|
appBuild: buildConfig.buildCommand !== null
|
|
10737
10736
|
? {
|
|
10738
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context
|
|
10737
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
10739
10738
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
10740
10739
|
variables: {
|
|
10741
10740
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1", // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -10833,21 +10832,21 @@ var createNodeTestJobs = function (context) {
|
|
|
10833
10832
|
needs: [],
|
|
10834
10833
|
envMode: "none",
|
|
10835
10834
|
};
|
|
10836
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
10835
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
10837
10836
|
var auditJob = buildConfig.audit !== false
|
|
10838
10837
|
? __assign(__assign(__assign({ name: "๐ก audit" }, base), { image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage, cache: undefined, script: __spreadArray([
|
|
10839
10838
|
"cd ".concat(context.build.dir)
|
|
10840
10839
|
], __read(((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
10841
|
-
context.
|
|
10840
|
+
context.packageManagerInfo.isClassic
|
|
10842
10841
|
? "yarn audit"
|
|
10843
10842
|
: "yarn npm audit --environment production", // yarn 2
|
|
10844
10843
|
])), false), allow_failure: true }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
|
|
10845
10844
|
var lintJob = buildConfig.lint !== false
|
|
10846
|
-
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context
|
|
10845
|
+
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
10847
10846
|
"cd ".concat(context.build.dir)
|
|
10848
10847
|
], false), __read(yarnInstall), false), __read(((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
|
|
10849
10848
|
var testJob = buildConfig.test !== false
|
|
10850
|
-
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context
|
|
10849
|
+
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
10851
10850
|
"cd ".concat(context.build.dir)
|
|
10852
10851
|
], false), __read(yarnInstall), false), __read(((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
|
|
10853
10852
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -10910,7 +10909,9 @@ var ensureNodeVersion = function (context) {
|
|
|
10910
10909
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
10911
10910
|
var getYarnInstall = function (context, options) {
|
|
10912
10911
|
var _a;
|
|
10913
|
-
var postInstall = "postInstall" in context.
|
|
10912
|
+
var postInstall = "postInstall" in context.build.config
|
|
10913
|
+
? context.build.config.postInstall
|
|
10914
|
+
: null;
|
|
10914
10915
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read((postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
10915
10916
|
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
|
|
10916
10917
|
: [])), false);
|
|
@@ -11183,7 +11184,7 @@ var createSbomBuildJob = function (context) {
|
|
|
11183
11184
|
var buildConfig = context.build.config;
|
|
11184
11185
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
11185
11186
|
var defaultScript = [
|
|
11186
|
-
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.
|
|
11187
|
+
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace
|
|
11187
11188
|
? "."
|
|
11188
11189
|
: context.build.dir),
|
|
11189
11190
|
];
|
|
@@ -11487,9 +11488,9 @@ var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, v
|
|
|
11487
11488
|
context = {
|
|
11488
11489
|
fullConfig: ctx.config,
|
|
11489
11490
|
componentConfig: componentConfig,
|
|
11491
|
+
env: ctx.env,
|
|
11490
11492
|
build: {
|
|
11491
11493
|
dir: dir,
|
|
11492
|
-
packageManagerInfo: packageManagerInfo,
|
|
11493
11494
|
config: build,
|
|
11494
11495
|
},
|
|
11495
11496
|
deploy: deploy
|
|
@@ -13869,7 +13870,7 @@ var createCustomDeployJobs = function (context) {
|
|
|
13869
13870
|
throw new Error("deploy config is not custom");
|
|
13870
13871
|
}
|
|
13871
13872
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
13872
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
13873
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
13873
13874
|
noCustomPostInstall: true,
|
|
13874
13875
|
});
|
|
13875
13876
|
return (0, base_1.createDeployementJobs)(context, {
|
package/dist/cli/src/catenv.js
CHANGED
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
var catenv_1 = __importDefault(require("./apps/catenv/catenv"));
|
|
7
7
|
var parseChoice_1 = require("./config/parseChoice");
|
|
8
8
|
var choice = process.argv[2] ? (0, parseChoice_1.parseChoice)(process.argv[2]) : null;
|
|
9
|
-
var now = performance.now();
|
|
10
9
|
(0, catenv_1.default)(choice).then(function () {
|
|
11
|
-
console.log("catenv", performance.now() - now);
|
|
12
10
|
// we have to exit manually, because we have some file watches
|
|
13
11
|
process.exit();
|
|
14
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catenv.js","sourceRoot":"","sources":["../../../src/catenv.ts"],"names":[],"mappings":";;;;;AAAA,gEAA0C;AAE1C,oDAAmD;AAEnD,IAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAErE,
|
|
1
|
+
{"version":3,"file":"catenv.js","sourceRoot":"","sources":["../../../src/catenv.ts"],"names":[],"mappings":";;;;;AAAA,gEAA0C;AAE1C,oDAAmD;AAEnD,IAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAErE,IAAA,gBAAM,EAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IAClB,8DAA8D;IAC9D,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
|
@@ -70,7 +70,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
70
70
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
|
|
71
71
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
|
|
72
72
|
? (0, writeDotEnv_1.writeDotEnv)(context)
|
|
73
|
-
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context
|
|
73
|
+
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
74
74
|
"cd ".concat(context.build.dir)
|
|
75
75
|
], false), __read(((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : [])), false),
|
|
76
76
|
artifacts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAC/B,6BAA4B;AAE5B,2BAAuC;AAEvC,qCAA0C;AAC1C,qCAAiD;AACjD,yCAGqB;AACrB,mDAAkD;AAClD,6CAGuB;AAGhB,IAAM,iBAAiB,GAAG,UAC/B,OAAyB,EACzB,EAAqE;;IAAnE,IAAA,MAAM,YAAA,EAAE,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAK,GAAG,cAA5C,0CAA8C,CAAF;IAE5C,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,SAAS,0CACJ,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,GACjB,OAAO,CAAC,WAAW,CAAC,OAAO,GAC3B,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,GAC7C,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC,CAC1C;QACD,eAAe,iCACV,2CAA+B,GAC/B,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,GACvB,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC,CAChD;QAED,MAAM,mFACD,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;YAC/C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;YACtB,CAAC,CAAC,EAAE,CAAC,kBACJ,IAAA,+BAAc,EAAC,OAAO,CAAC,kBACvB,IAAA,wBAAiB,EAAC,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAC/B,6BAA4B;AAE5B,2BAAuC;AAEvC,qCAA0C;AAC1C,qCAAiD;AACjD,yCAGqB;AACrB,mDAAkD;AAClD,6CAGuB;AAGhB,IAAM,iBAAiB,GAAG,UAC/B,OAAyB,EACzB,EAAqE;;IAAnE,IAAA,MAAM,YAAA,EAAE,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAK,GAAG,cAA5C,0CAA8C,CAAF;IAE5C,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,SAAS,0CACJ,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,GACjB,OAAO,CAAC,WAAW,CAAC,OAAO,GAC3B,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,GAC7C,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC,CAC1C;QACD,eAAe,iCACV,2CAA+B,GAC/B,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,GACvB,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC,CAChD;QAED,MAAM,mFACD,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;YAC/C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;YACtB,CAAC,CAAC,EAAE,CAAC,kBACJ,IAAA,+BAAc,EAAC,OAAO,CAAC,kBACvB,IAAA,wBAAiB,EAAC,OAAO,CAAC;YAC7B,aAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAE;0BACtB,CAAC,MAAA,IAAA,mBAAW,EAAC,MAAM,CAAC,mCAAI,EAAE,CAAC,SAC/B;QACD,SAAS,EAAE;YACT,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YACrD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAA,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,0CAAE,KAAK,0CAAE,GAAG,CAAC,UAAC,CAAC;oBACzD,OAAA,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBAA1B,CAA0B,CAC3B;aACF;SACF;KACF,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,iBAAiB,qBA4C5B"}
|
|
@@ -42,19 +42,18 @@ var createNodeBuildJobs = function (context) {
|
|
|
42
42
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
43
43
|
}
|
|
44
44
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
45
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
45
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
46
46
|
return (0, base_1.createBuildJobs)(context, {
|
|
47
47
|
appBuild: buildConfig.buildCommand !== null
|
|
48
48
|
? {
|
|
49
49
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
50
50
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
51
|
-
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context
|
|
51
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
52
52
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read(((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])), false),
|
|
53
53
|
artifacts: {
|
|
54
54
|
paths: __spreadArray([
|
|
55
55
|
context.build.dir
|
|
56
|
-
], __read(((_d = context.
|
|
57
|
-
.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
56
|
+
], __read(((_d = context.packageManagerInfo.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
58
57
|
var _a, _b;
|
|
59
58
|
return __spreadArray([
|
|
60
59
|
(0, path_1.join)(dir, "__build_info.json"),
|
|
@@ -74,11 +73,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
74
73
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
75
74
|
? "nginx"
|
|
76
75
|
: "node"),
|
|
77
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context
|
|
76
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
78
77
|
variables: {
|
|
79
78
|
// only required for non static
|
|
80
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context
|
|
81
|
-
DOCKER_COPY_WORKSPACE_FILES: (_e = context.
|
|
79
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
80
|
+
DOCKER_COPY_WORKSPACE_FILES: (_e = context.packageManagerInfo.pathsToCopyInDocker
|
|
82
81
|
.map(function (dir) { return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir); })) === null || _e === void 0 ? void 0 : _e.join("\n"),
|
|
83
82
|
},
|
|
84
83
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/buildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,uCAA8C;AAG9C,qCAA0C;AAC1C,gCAA0C;AAC1C,oCAAsE;AACtE,kCAAyC;AACzC,iCAAmE;AACnE,yCAA0D;AAC1D,+BAAwE;AAEjE,IAAM,mBAAmB,GAAG,UACjC,OAAyB;;IAEzB,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAEzC,IAAI,CAAC,IAAA,qBAAa,EAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,IAAM,YAAY,GAAG,IAAA,uBAAc,EAAC,cAAc,CAAC,CAAC;IACpD,IAAM,WAAW,GAAG,IAAA,qBAAc,EAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"buildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/buildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,uCAA8C;AAG9C,qCAA0C;AAC1C,gCAA0C;AAC1C,oCAAsE;AACtE,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EAAC,GAAG,EAAE,OAAO,CAAC;kCACf,CAAC,MAAA,MAAA,WAAW,CAAC,cAAc,0CAAE,GAAG,CAAC,UAAC,IAAI;4BACvC,OAAA,IAAA,WAAI,EAAC,GAAG,EAAE,IAAI,CAAC;wBAAf,CAAe,CAChB,mCAAI,EAAE,CAAC,UACT;qBAAA,CAAC;oBACF,SAAS,EAAE,OAAO;oBAClB,IAAI,EAAE,QAAQ;iBACf;gBACD,OAAO,EAAE,WAAW,CAAC,OAAO;aAC7B;YACH,CAAC,CAAC,SAAS;QAEf,WAAW,EAAE;YACX,MAAM,EAAE,IAAA,kDAAyC,EAC/C,OAAO,EACP,WAAW,CAAC,IAAI,KAAK,aAAa,IAAI,WAAW,CAAC,IAAI,KAAK,WAAW;gBACpE,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC,MAAM,CACX;YACD,KAAK,2BAAM,IAAA,oBAAY,EAAC,OAAO,EAAE,MAAM,CAAC,SAAC;YACzC,SAAS,EAAE;gBACT,+BAA+B;gBAC/B,2BAA2B,EAAE,IAAA,qCAA8B,EAAC,OAAO,CAAC;gBACpE,2BAA2B,EACzB,MAAA,OAAO,CAAC,kBAAkB,CAAC,mBAAmB;qBAC3C,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,iCAA0B,GAAG,mBAAS,GAAG,CAAE,EAA3C,CAA2C,CAAC,0CACxD,IAAI,CAAC,IAAI,CAAC;aACjB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAlEW,QAAA,mBAAmB,uBAkE9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext, Context } from "../../types/context";
|
|
2
2
|
import type { GitlabJobCache } from "../../types/gitlab-types";
|
|
3
|
-
export declare const getYarnCache: (context:
|
|
4
|
-
export declare const getNodeModulesCache: (context:
|
|
5
|
-
export declare const getNodeCache: (context:
|
|
3
|
+
export declare const getYarnCache: (context: Context, policy?: string) => GitlabJobCache[];
|
|
4
|
+
export declare const getNodeModulesCache: (context: Context, policy?: string) => GitlabJobCache[];
|
|
5
|
+
export declare const getNodeCache: (context: Context, policy?: string) => GitlabJobCache[];
|
|
6
6
|
export declare const getNextCache: (context: ComponentContext) => GitlabJobCache[];
|
|
@@ -29,9 +29,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
32
|
+
var lodash_1 = require("lodash");
|
|
32
33
|
var path_1 = require("path");
|
|
33
34
|
var slugify_1 = __importDefault(require("slugify"));
|
|
34
|
-
var lodash_1 = require("lodash");
|
|
35
35
|
var getYarnCache = function (context, policy) {
|
|
36
36
|
if (policy === void 0) { policy = "pull-push"; }
|
|
37
37
|
var componentIsInWorkspace = context.packageManagerInfo.componentIsInWorkspace;
|
|
@@ -43,9 +43,9 @@ var getYarnCache = function (context, policy) {
|
|
|
43
43
|
paths: [".yarn"],
|
|
44
44
|
}
|
|
45
45
|
: {
|
|
46
|
-
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
46
|
+
key: (0, slugify_1.default)(context.build.dir) + "-yarn",
|
|
47
47
|
policy: policy,
|
|
48
|
-
paths: [(0, path_1.join)(context.dir, ".yarn")],
|
|
48
|
+
paths: [(0, path_1.join)(context.build.dir, ".yarn")],
|
|
49
49
|
},
|
|
50
50
|
];
|
|
51
51
|
};
|
|
@@ -61,7 +61,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
61
61
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
62
62
|
key: componentIsInWorkspace
|
|
63
63
|
? "node-modules-workspace"
|
|
64
|
-
: (0, slugify_1.default)(context.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
64
|
+
: (0, slugify_1.default)(context.build.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
65
65
|
policy: policy,
|
|
66
66
|
paths: __spreadArray([], __read((componentIsInWorkspace
|
|
67
67
|
? (0, lodash_1.uniq)(__spreadArray([
|
|
@@ -69,7 +69,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
69
69
|
], __read(((_a = context.packageManagerInfo.workspaces.map(function (w) {
|
|
70
70
|
return (0, path_1.join)(w.location, "node_modules");
|
|
71
71
|
})) !== null && _a !== void 0 ? _a : [])), false))
|
|
72
|
-
: [(0, path_1.join)(context.dir, "node_modules")])), false),
|
|
72
|
+
: [(0, path_1.join)(context.build.dir, "node_modules")])), false),
|
|
73
73
|
},
|
|
74
74
|
];
|
|
75
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,oDAA8B;
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,6BAA4B;AAC5B,oDAA8B;AAIvB,IAAM,YAAY,GAAG,UAC1B,OAAgB,EAChB,MAAoB;IAApB,uBAAA,EAAA,oBAAoB;IAEpB,IAAM,sBAAsB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC;IACpD,OAAO;QACL,sBAAsB;YACpB,CAAC,CAAC;gBACE,GAAG,EAAE,MAAM;gBACX,MAAM,QAAA;gBACN,KAAK,EAAE,CAAC,OAAO,CAAC;aACjB;YACH,CAAC,CAAC;gBACE,GAAG,EAAE,IAAA,iBAAO,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO;gBACzC,MAAM,QAA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B;AAEK,IAAM,YAAY,GAAG,UAAC,OAAyB,IAAuB,OAAA;IAC3E;QACE,GAAG,EAAE,OAAO,CAAC,aAAa,GAAG,aAAa;QAC1C,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,eAAe,CAAC;KAC7C;CACF,EAN4E,CAM5E,CAAC;AANW,QAAA,YAAY,gBAMvB"}
|
|
@@ -50,11 +50,11 @@ var createMeteorBuildJobs = function (context) {
|
|
|
50
50
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
51
51
|
throw new Error("deploy config is not meteor");
|
|
52
52
|
}
|
|
53
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
53
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
54
54
|
return (0, base_1.createBuildJobs)(context, {
|
|
55
55
|
appBuild: buildConfig.buildCommand !== null
|
|
56
56
|
? {
|
|
57
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context
|
|
57
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
58
58
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
59
59
|
variables: {
|
|
60
60
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1", // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meteor.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/meteor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,uCAA8C;AAM9C,gCAA0C;AAC1C,oCAAsE;AACtE,kCAAyC;AACzC,iCAAuC;AACvC,+BAAwC;AAExC,IAAM,cAAc,GAAG,UAAC,OAAyB,IAAuB,OAAA;IACtE;QACE,GAAG,EAAE,OAAO,CAA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AC,MAAM,CAAC,CAAC,CAAC,EAAE;aACjE;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AA9CW,QAAA,qBAAqB,yBA8ChC"}
|
|
@@ -59,21 +59,21 @@ var createNodeTestJobs = function (context) {
|
|
|
59
59
|
needs: [],
|
|
60
60
|
envMode: "none",
|
|
61
61
|
};
|
|
62
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
62
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
63
63
|
var auditJob = buildConfig.audit !== false
|
|
64
64
|
? __assign(__assign(__assign({ name: "๐ก audit" }, base), { image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage, cache: undefined, script: __spreadArray([
|
|
65
65
|
"cd ".concat(context.build.dir)
|
|
66
66
|
], __read(((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
67
|
-
context.
|
|
67
|
+
context.packageManagerInfo.isClassic
|
|
68
68
|
? "yarn audit"
|
|
69
69
|
: "yarn npm audit --environment production", // yarn 2
|
|
70
70
|
])), false), allow_failure: true }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
|
|
71
71
|
var lintJob = buildConfig.lint !== false
|
|
72
|
-
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context
|
|
72
|
+
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
73
73
|
"cd ".concat(context.build.dir)
|
|
74
74
|
], false), __read(yarnInstall), false), __read(((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
|
|
75
75
|
var testJob = buildConfig.test !== false
|
|
76
|
-
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context
|
|
76
|
+
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
77
77
|
"cd ".concat(context.build.dir)
|
|
78
78
|
], false), __read(yarnInstall), false), __read(((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
|
|
79
79
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/testJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA8C;AAG9C,qCAAkD;AAClD,iCAAuC;AACvC,yCAA0D;AAC1D,+BAA2D;AAC3D,uEAAsE;AAE/D,IAAM,kBAAkB,GAAG,UAChC,OAAyB;;IAEzB,gCAAgC;IAChC,6CAA6C;IAC7C,IAAI,OAAO,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAEzC,IAAM,YAAY,GAAG,IAAA,uBAAc,EAAC,cAAc,CAAC,CAAC;IACpD,IAAM,IAAI,GAA0C;QAClD,SAAS,sBACP,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IACxB,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,GAC7C,CAAC,MAAA,WAAW,CAAC,SAAS,mCAAI,EAAE,CAAC,CACjC;QACD,eAAe,EAAE,uCAA2B;QAC5C,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,MAAM;KAChB,CAAC;IACF,IAAM,WAAW,GAAG,IAAA,qBAAc,EAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"testJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/testJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA8C;AAG9C,qCAAkD;AAClD,iCAAuC;AACvC,yCAA0D;AAC1D,+BAA2D;AAC3D,uEAAsE;AAE/D,IAAM,kBAAkB,GAAG,UAChC,OAAyB;;IAEzB,gCAAgC;IAChC,6CAA6C;IAC7C,IAAI,OAAO,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;QACxC,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AAS,CAC5B,EAEL,CAAC,CAAC,IAAI,CAAC;IACX,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,cAAM,CAAC,CAAC;AACrD,CAAC,CAAC;AA3FW,QAAA,kBAAkB,sBA2F7B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BashExpression } from "../../bash/BashExpression";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const ensureNodeVersion: (context:
|
|
4
|
-
export declare const getYarnInstall: (context:
|
|
2
|
+
import type { Context } from "../../types";
|
|
3
|
+
export declare const ensureNodeVersion: (context: Context) => string[];
|
|
4
|
+
export declare const getYarnInstall: (context: Context, options?: {
|
|
5
5
|
noCustomPostInstall: boolean;
|
|
6
6
|
}) => string[];
|
|
7
|
-
export declare const getDockerAppCopyAndBuildScript: (context:
|
|
7
|
+
export declare const getDockerAppCopyAndBuildScript: (context: Context) => BashExpression;
|
|
@@ -47,7 +47,9 @@ var ensureNodeVersion = function (context) {
|
|
|
47
47
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
48
48
|
var getYarnInstall = function (context, options) {
|
|
49
49
|
var _a;
|
|
50
|
-
var postInstall = "postInstall" in context.
|
|
50
|
+
var postInstall = "postInstall" in context.build.config
|
|
51
|
+
? context.build.config.postInstall
|
|
52
|
+
: null;
|
|
51
53
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read((postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
52
54
|
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
|
|
53
55
|
: [])), false);
|