@catladder/cli 0.0.0-main-d05b00fd → 0.0.0-main-d53664e5

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.
Files changed (56) hide show
  1. package/dist/bundles/catenv/index.js +233 -88
  2. package/dist/bundles/cli/index.js +231 -86
  3. package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +3 -2
  4. package/dist/pipeline/src/build/base/createAppBuildJob.js +5 -4
  5. package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
  6. package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +7 -0
  7. package/dist/pipeline/src/build/base/createBuildJobDefinition.js +30 -0
  8. package/dist/pipeline/src/build/base/createBuildJobDefinition.js.map +1 -0
  9. package/dist/pipeline/src/build/cache/createJobCache.d.ts +6 -0
  10. package/dist/pipeline/src/build/cache/createJobCache.js +57 -0
  11. package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -0
  12. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +3 -0
  13. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +28 -0
  14. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js.map +1 -0
  15. package/dist/pipeline/src/build/cache/transformLegacyJobCache.d.ts +3 -0
  16. package/dist/pipeline/src/build/cache/transformLegacyJobCache.js +17 -0
  17. package/dist/pipeline/src/build/cache/transformLegacyJobCache.js.map +1 -0
  18. package/dist/pipeline/src/build/custom/buildJob.js +2 -14
  19. package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
  20. package/dist/pipeline/src/build/custom/testJob.d.ts +1 -1
  21. package/dist/pipeline/src/build/custom/testJob.js +12 -11
  22. package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
  23. package/dist/pipeline/src/build/docker.d.ts +3 -3
  24. package/dist/pipeline/src/build/docker.js +3 -1
  25. package/dist/pipeline/src/build/docker.js.map +1 -1
  26. package/dist/pipeline/src/build/node/buildJob.js +5 -22
  27. package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
  28. package/dist/pipeline/src/build/node/cache.d.ts +6 -6
  29. package/dist/pipeline/src/build/node/cache.js +13 -15
  30. package/dist/pipeline/src/build/node/cache.js.map +1 -1
  31. package/dist/pipeline/src/build/node/meteor.js +5 -6
  32. package/dist/pipeline/src/build/node/meteor.js.map +1 -1
  33. package/dist/pipeline/src/build/node/testJob.js +6 -5
  34. package/dist/pipeline/src/build/node/testJob.js.map +1 -1
  35. package/dist/pipeline/src/build/node/yarn.js +1 -2
  36. package/dist/pipeline/src/build/node/yarn.js.map +1 -1
  37. package/dist/pipeline/src/build/rails/test.js +3 -3
  38. package/dist/pipeline/src/build/rails/test.js.map +1 -1
  39. package/dist/pipeline/src/build/sbom.js +1 -1
  40. package/dist/pipeline/src/build/sbom.js.map +1 -1
  41. package/dist/pipeline/src/build/types.d.ts +43 -4
  42. package/dist/pipeline/src/build/types.js.map +1 -1
  43. package/dist/pipeline/src/types/gitlab-types.d.ts +2 -2
  44. package/dist/pipeline/src/types/index.d.ts +1 -0
  45. package/dist/pipeline/src/types/index.js +1 -0
  46. package/dist/pipeline/src/types/index.js.map +1 -1
  47. package/dist/pipeline/src/types/jobDefinition.d.ts +5 -0
  48. package/dist/pipeline/src/types/jobDefinition.js +3 -0
  49. package/dist/pipeline/src/types/jobDefinition.js.map +1 -0
  50. package/dist/pipeline/src/types/jobs.d.ts +3 -2
  51. package/dist/pipeline/src/types/jobs.js.map +1 -1
  52. package/dist/pipeline/src/utils/index.d.ts +2 -1
  53. package/dist/pipeline/src/utils/index.js +4 -2
  54. package/dist/pipeline/src/utils/index.js.map +1 -1
  55. package/dist/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +1 -1
@@ -4225,19 +4225,20 @@ const lodash_1 = __nccwpck_require__(23255);
4225
4225
  const __1 = __nccwpck_require__(10603);
4226
4226
  const utils_1 = __nccwpck_require__(32497);
4227
4227
  const createBuildJobArtifact_1 = __nccwpck_require__(43397);
4228
+ const createJobCache_1 = __nccwpck_require__(10340);
4228
4229
  const yarn_1 = __nccwpck_require__(45043);
4229
4230
  const constants_1 = __nccwpck_require__(82786);
4230
4231
  const writeBuildInfo_1 = __nccwpck_require__(99578);
4231
4232
  const writeDotEnv_1 = __nccwpck_require__(48052);
4232
- const createAppBuildJob = (context, { script, variables, runnerVariables, ...def }) => {
4233
- var _a, _b, _c;
4233
+ const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
4234
+ var _a, _b;
4234
4235
  return (0, lodash_1.merge)({
4235
4236
  name: constants_1.APP_BUILD_JOB_NAME,
4236
4237
  envMode: "jobPerEnv",
4237
4238
  stage: "build",
4238
4239
  image: (0, __1.getRunnerImage)("jobs-default"),
4239
4240
  needs: [],
4240
- cache: [],
4241
+ cache: cache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, cache) : undefined,
4241
4242
  variables: {
4242
4243
  ...(variables !== null && variables !== void 0 ? variables : {}),
4243
4244
  ...(context.type === "component"
@@ -4266,7 +4267,7 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, ...def
4266
4267
  ...(context.type === "component" ? (0, writeBuildInfo_1.writeBuildInfo)(context) : []),
4267
4268
  ...(0, yarn_1.ensureNodeVersion)(context), // in pure node repos, we might want to have the nvmrc file in top-level
4268
4269
  `cd ${context.build.dir}`,
4269
- ...((_c = (0, utils_1.ensureArray)(script)) !== null && _c !== void 0 ? _c : []),
4270
+ ...(0, utils_1.ensureArray)(script),
4270
4271
  ],
4271
4272
  artifacts: (0, createBuildJobArtifact_1.createBuildJobArtifacts)(context),
4272
4273
  }, def);
@@ -4313,6 +4314,43 @@ exports.createArtifactsConfig = createArtifactsConfig;
4313
4314
 
4314
4315
  /***/ }),
4315
4316
 
4317
+ /***/ 56354:
4318
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4319
+
4320
+ "use strict";
4321
+
4322
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4323
+ exports.createBuildJobDefinition = void 0;
4324
+ const runner_1 = __nccwpck_require__(4058);
4325
+ const utils_1 = __nccwpck_require__(32497);
4326
+ const getAllCacheConfigsFromConfig_1 = __nccwpck_require__(30673);
4327
+ const constants_1 = __nccwpck_require__(31765);
4328
+ const createBuildJobDefinition = (context, buildConfig, customize = {}) => {
4329
+ var _a, _b, _c, _d;
4330
+ if (buildConfig.buildCommand === null)
4331
+ return undefined;
4332
+ const defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
4333
+ return {
4334
+ image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
4335
+ runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
4336
+ cache: [
4337
+ ...((_b = customize.cache) !== null && _b !== void 0 ? _b : []),
4338
+ ...(0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, buildConfig),
4339
+ ],
4340
+ services: "jobServices" in buildConfig ? buildConfig.jobServices : undefined,
4341
+ script: [
4342
+ ...((_c = customize.prescript) !== null && _c !== void 0 ? _c : []),
4343
+ ...(0, utils_1.ensureArray)(buildConfig.buildCommand),
4344
+ ...((_d = customize.postscript) !== null && _d !== void 0 ? _d : []),
4345
+ ],
4346
+ jobTags: buildConfig.jobTags,
4347
+ };
4348
+ };
4349
+ exports.createBuildJobDefinition = createBuildJobDefinition;
4350
+ //# sourceMappingURL=createBuildJobDefinition.js.map
4351
+
4352
+ /***/ }),
4353
+
4316
4354
  /***/ 9366:
4317
4355
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4318
4356
 
@@ -4426,6 +4464,129 @@ exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDot
4426
4464
 
4427
4465
  /***/ }),
4428
4466
 
4467
+ /***/ 10340:
4468
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4469
+
4470
+ "use strict";
4471
+
4472
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4473
+ exports.createJobCacheFromConfig = exports.createJobCacheFromCacheConfigs = void 0;
4474
+ const path_1 = __nccwpck_require__(71017);
4475
+ const getAllCacheConfigsFromConfig_1 = __nccwpck_require__(30673);
4476
+ const createJobCacheFromCacheConfigs = (context, caches) => {
4477
+ if (caches.length === 0)
4478
+ return undefined;
4479
+ const simpleCacheDefs = caches.filter((c) => !("key" in c));
4480
+ const advancedCacheDefs = caches.filter((c) => "key" in c);
4481
+ // simple caches are merged together into one. This is because e.g. gitlab has a limit of 4 caches, see https://gitlab.com/gitlab-org/gitlab/-/issues/421962
4482
+ const simpleCaches = simpleCacheDefs.length > 0
4483
+ ? [
4484
+ {
4485
+ key: context.name + "-default",
4486
+ policy: "pull-push",
4487
+ paths: simpleCacheDefs.flatMap((c) => c.paths.map((p) => {
4488
+ var _a;
4489
+ const baseDir = c.pathMode === "absolute"
4490
+ ? ""
4491
+ : (_a = c.baseDir) !== null && _a !== void 0 ? _a : context.build.dir;
4492
+ return (0, path_1.join)(baseDir, p);
4493
+ })),
4494
+ },
4495
+ ]
4496
+ : [];
4497
+ const advancedCaches = advancedCacheDefs.map(({ key, paths, policy, scope, pathMode, buildDir, ...rest }) => {
4498
+ var _a;
4499
+ const baseDir = pathMode === "absolute" ? "" : buildDir !== null && buildDir !== void 0 ? buildDir : context.build.dir;
4500
+ const transformedKey = scope === "global"
4501
+ ? key
4502
+ : typeof key === "string"
4503
+ ? (scope === "buildDir" // really edge case...
4504
+ ? baseDir
4505
+ : context.name) +
4506
+ "-" +
4507
+ key
4508
+ : {
4509
+ ...key,
4510
+ files: (_a = key.files) === null || _a === void 0 ? void 0 : _a.map((f) => pathMode === "absolute" ? f : (0, path_1.join)(baseDir, f)),
4511
+ };
4512
+ return {
4513
+ key: transformedKey,
4514
+ policy: policy !== null && policy !== void 0 ? policy : "pull-push",
4515
+ paths: pathMode === "absolute" ? paths : paths === null || paths === void 0 ? void 0 : paths.map((p) => (0, path_1.join)(baseDir, p)),
4516
+ ...rest,
4517
+ };
4518
+ });
4519
+ return [...advancedCaches, ...simpleCaches];
4520
+ };
4521
+ exports.createJobCacheFromCacheConfigs = createJobCacheFromCacheConfigs;
4522
+ /** shortcut, used in some build types */
4523
+ const createJobCacheFromConfig = (context, buildConfig) => {
4524
+ return (0, exports.createJobCacheFromCacheConfigs)(context, (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, buildConfig));
4525
+ };
4526
+ exports.createJobCacheFromConfig = createJobCacheFromConfig;
4527
+ //# sourceMappingURL=createJobCache.js.map
4528
+
4529
+ /***/ }),
4530
+
4531
+ /***/ 30673:
4532
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4533
+
4534
+ "use strict";
4535
+
4536
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4537
+ exports.getAllCacheConfigsFromConfig = void 0;
4538
+ const index_1 = __nccwpck_require__(32497);
4539
+ const transformLegacyJobCache_1 = __nccwpck_require__(96673);
4540
+ const getAllCacheConfigsFromConfig = (context, buildConfig) => {
4541
+ return [
4542
+ ...("jobCache" in buildConfig
4543
+ ? (0, transformLegacyJobCache_1.transformLegacyJobCache)(buildConfig.jobCache)
4544
+ : []),
4545
+ ...(0, index_1.ensureArray)(buildConfig.cache).map((c) => ({
4546
+ ...c,
4547
+ context,
4548
+ })),
4549
+ ...(context.type === "workspace"
4550
+ ? // also add cache configs of the components of that workspace
4551
+ context.components.flatMap((componentContext) => {
4552
+ var _a;
4553
+ return (_a = (0, index_1.ensureArray)(componentContext.build.config.cache).map((c) => ({
4554
+ ...c,
4555
+ baseDir: componentContext.build.dir,
4556
+ }))) !== null && _a !== void 0 ? _a : [];
4557
+ })
4558
+ : []),
4559
+ ];
4560
+ };
4561
+ exports.getAllCacheConfigsFromConfig = getAllCacheConfigsFromConfig;
4562
+ //# sourceMappingURL=getAllCacheConfigsFromConfig.js.map
4563
+
4564
+ /***/ }),
4565
+
4566
+ /***/ 96673:
4567
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4568
+
4569
+ "use strict";
4570
+
4571
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4572
+ exports.transformLegacyJobCache = void 0;
4573
+ const utils_1 = __nccwpck_require__(32497);
4574
+ function transformLegacyJobCache(jobCache) {
4575
+ return (0, utils_1.ensureArray)(jobCache).map((cache) => {
4576
+ var _a, _b;
4577
+ return ({
4578
+ pathMode: "absolute",
4579
+ ...cache,
4580
+ key: (_a = cache.key) !== null && _a !== void 0 ? _a : "default",
4581
+ paths: (_b = cache.paths) !== null && _b !== void 0 ? _b : [],
4582
+ });
4583
+ });
4584
+ }
4585
+ exports.transformLegacyJobCache = transformLegacyJobCache;
4586
+ //# sourceMappingURL=transformLegacyJobCache.js.map
4587
+
4588
+ /***/ }),
4589
+
4429
4590
  /***/ 31637:
4430
4591
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4431
4592
 
@@ -4433,30 +4594,18 @@ exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDot
4433
4594
 
4434
4595
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4435
4596
  exports.createCustomBuildJobs = void 0;
4436
- const utils_1 = __nccwpck_require__(32497);
4437
4597
  const docker_1 = __nccwpck_require__(9641);
4438
4598
  const types_1 = __nccwpck_require__(84466);
4439
4599
  const base_1 = __nccwpck_require__(9366);
4440
- const RUNNER_BUILD_VARIABLES = {
4441
- KUBERNETES_CPU_REQUEST: "0.45",
4442
- KUBERNETES_MEMORY_REQUEST: "1Gi",
4443
- KUBERNETES_MEMORY_LIMIT: "4Gi",
4444
- };
4600
+ const createBuildJobDefinition_1 = __nccwpck_require__(56354);
4445
4601
  const createCustomBuildJobs = (context) => {
4446
- var _a;
4447
4602
  const buildConfig = context.build.config;
4448
4603
  if (!(0, types_1.isOfBuildType)(buildConfig, "custom")) {
4449
4604
  throw new Error("deploy config is not custom");
4450
4605
  }
4451
4606
  return (0, base_1.createComponentBuildJobs)(context, {
4452
4607
  appBuild: buildConfig.buildCommand !== null
4453
- ? {
4454
- image: buildConfig.jobImage,
4455
- runnerVariables: RUNNER_BUILD_VARIABLES,
4456
- cache: buildConfig.jobCache,
4457
- services: buildConfig.jobServices,
4458
- script: [...((_a = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _a !== void 0 ? _a : [])],
4459
- }
4608
+ ? (0, createBuildJobDefinition_1.createBuildJobDefinition)(context, buildConfig)
4460
4609
  : undefined,
4461
4610
  dockerBuild: {
4462
4611
  script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context),
@@ -4494,15 +4643,16 @@ exports.createCustomJobs = createCustomJobs;
4494
4643
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4495
4644
  exports.createCustomTestJobs = void 0;
4496
4645
  const utils_1 = __nccwpck_require__(32497);
4497
- const types_1 = __nccwpck_require__(84466);
4498
4646
  const createArtifactsConfig_1 = __nccwpck_require__(12820);
4647
+ const createJobCache_1 = __nccwpck_require__(10340);
4648
+ const types_1 = __nccwpck_require__(84466);
4499
4649
  const RUNNER_CUSTOM_TEST_VARIABLES = {
4500
4650
  KUBERNETES_CPU_REQUEST: "0.45",
4501
4651
  KUBERNETES_MEMORY_REQUEST: "1Gi",
4502
4652
  KUBERNETES_MEMORY_LIMIT: "4Gi",
4503
4653
  };
4504
4654
  const createCustomTestJobs = (context) => {
4505
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
4655
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
4506
4656
  // don't run tests after release
4507
4657
  // TODO: this will be replaced by using rules
4508
4658
  if (context.trigger === "taggedRelease") {
@@ -4520,7 +4670,7 @@ const createCustomTestJobs = (context) => {
4520
4670
  },
4521
4671
  runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
4522
4672
  services: buildConfig.jobServices,
4523
- cache: buildConfig.jobCache,
4673
+ cache: (0, createJobCache_1.createJobCacheFromConfig)(context, buildConfig),
4524
4674
  stage: "test",
4525
4675
  needs: [],
4526
4676
  envMode: "none",
@@ -4531,27 +4681,27 @@ const createCustomTestJobs = (context) => {
4531
4681
  ...base,
4532
4682
  image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
4533
4683
  cache: undefined,
4534
- script: [...((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [])],
4684
+ script: [...(0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)],
4535
4685
  allow_failure: true,
4536
- ...(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),
4686
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.artifactsReports, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifacts),
4537
4687
  }
4538
4688
  : null;
4539
4689
  const lintJob = buildConfig.lint
4540
4690
  ? {
4541
4691
  name: "👮 lint",
4542
4692
  ...base,
4543
- image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : buildConfig.jobImage,
4544
- script: [...((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : [])],
4545
- ...(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),
4693
+ image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
4694
+ script: [...(0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)],
4695
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifactsReports, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifacts),
4546
4696
  }
4547
4697
  : null;
4548
4698
  const testJob = buildConfig.test
4549
4699
  ? {
4550
4700
  name: "🧪 test",
4551
4701
  ...base,
4552
- image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : buildConfig.jobImage,
4553
- script: [...((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : [])],
4554
- ...(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),
4702
+ image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
4703
+ script: [...(0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)],
4704
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifactsReports, (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.artifacts),
4555
4705
  }
4556
4706
  : null;
4557
4707
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
@@ -4579,6 +4729,7 @@ const artifactsRegistry_1 = __nccwpck_require__(44963);
4579
4729
  const gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(46320);
4580
4730
  const runner_1 = __nccwpck_require__(4058);
4581
4731
  const gitlab_1 = __nccwpck_require__(38490);
4732
+ const createJobCache_1 = __nccwpck_require__(10340);
4582
4733
  const DOCKER_BUILD_RUNNER_REQUESTS = {
4583
4734
  KUBERNETES_CPU_REQUEST: "0.45",
4584
4735
  KUBERNETES_MEMORY_REQUEST: "1Gi",
@@ -4668,11 +4819,12 @@ const getDockerJobBaseProps = () => {
4668
4819
  };
4669
4820
  };
4670
4821
  exports.getDockerJobBaseProps = getDockerJobBaseProps;
4671
- const createDockerBuildJobBase = (context, { script, ...def }) => {
4822
+ const createDockerBuildJobBase = (context, { script, cache, ...def }) => {
4672
4823
  return (0, lodash_1.merge)({
4673
4824
  name: exports.DOCKER_BUILD_JOB_NAME,
4674
4825
  envMode: "jobPerEnv",
4675
4826
  stage: "build",
4827
+ cache: cache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, cache) : undefined,
4676
4828
  ...(0, exports.getDockerJobBaseProps)(),
4677
4829
  script: script || [],
4678
4830
  }, {
@@ -4826,14 +4978,11 @@ exports.WORKSPACE_BUILD_TYPES = {
4826
4978
 
4827
4979
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4828
4980
  exports.createNodeDockerJobDefinition = exports.createNodeBuildJobDefinition = exports.createNodeBuildJobs = void 0;
4829
- const runner_1 = __nccwpck_require__(4058);
4830
4981
  const context_1 = __nccwpck_require__(61724);
4831
- const utils_1 = __nccwpck_require__(32497);
4832
4982
  const base_1 = __nccwpck_require__(9366);
4983
+ const createBuildJobDefinition_1 = __nccwpck_require__(56354);
4833
4984
  const docker_1 = __nccwpck_require__(9641);
4834
- const types_1 = __nccwpck_require__(84466);
4835
4985
  const cache_1 = __nccwpck_require__(72026);
4836
- const constants_1 = __nccwpck_require__(31765);
4837
4986
  const yarn_1 = __nccwpck_require__(45043);
4838
4987
  const createNodeBuildJobs = (context) => {
4839
4988
  if (context.type === "workspace") {
@@ -4850,26 +4999,12 @@ const createNodeBuildJobs = (context) => {
4850
4999
  };
4851
5000
  exports.createNodeBuildJobs = createNodeBuildJobs;
4852
5001
  const createNodeBuildJobDefinition = (context) => {
4853
- var _a, _b, _c;
4854
5002
  const buildConfig = context.build.config;
4855
- if (!(0, types_1.isOfBuildType)(buildConfig, "node", "node-static", "storybook")) {
4856
- throw new Error("deploy config is not node, node-static or storybook");
4857
- }
4858
- if (buildConfig.buildCommand === null)
4859
- return undefined;
4860
- const defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
4861
5003
  const yarnInstall = (0, yarn_1.getYarnInstall)(context);
4862
- return {
4863
- image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
4864
- runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
4865
- cache: [
4866
- ...((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : []),
4867
- ...(0, cache_1.getNodeCache)(context),
4868
- ...(0, cache_1.getNextCache)(context),
4869
- ],
4870
- script: [...yarnInstall, ...((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])],
4871
- jobTags: buildConfig.jobTags,
4872
- };
5004
+ return (0, createBuildJobDefinition_1.createBuildJobDefinition)(context, buildConfig, {
5005
+ prescript: yarnInstall,
5006
+ cache: [...(0, cache_1.getNodeCache)(context), ...(0, cache_1.getNextCache)(context)],
5007
+ });
4873
5008
  };
4874
5009
  exports.createNodeBuildJobDefinition = createNodeBuildJobDefinition;
4875
5010
  const createNodeDockerJobDefinition = (context) => {
@@ -4911,17 +5046,13 @@ const getYarnCache = (context, policy = "pull-push") => {
4911
5046
  const componentIsInWorkspace = context.type === "component" &&
4912
5047
  context.packageManagerInfo.componentIsInWorkspace;
4913
5048
  return [
4914
- componentIsInWorkspace
4915
- ? {
4916
- key: "yarn",
4917
- policy,
4918
- paths: [".yarn"],
4919
- }
4920
- : {
4921
- key: (0, slugify_1.default)(context.build.dir) + "-yarn",
4922
- policy,
4923
- paths: [(0, path_1.join)(context.build.dir, ".yarn")],
4924
- },
5049
+ {
5050
+ scope: componentIsInWorkspace ? "global" : "buildDir",
5051
+ pathMode: componentIsInWorkspace ? "absolute" : "relative",
5052
+ key: "yarn",
5053
+ policy,
5054
+ paths: [".yarn"],
5055
+ },
4925
5056
  ];
4926
5057
  };
4927
5058
  exports.getYarnCache = getYarnCache;
@@ -4933,6 +5064,8 @@ const getNodeModulesCache = (context, policy = "pull-push") => {
4933
5064
  // It would slow down all pipelines whenever one adds a new dependency as it will need to download all node_modules again.
4934
5065
  return [
4935
5066
  {
5067
+ scope: "global",
5068
+ pathMode: "absolute",
4936
5069
  // if component is in a shared workspace, use workspace cache. use individual cache else
4937
5070
  key: componentIsInWorkspace
4938
5071
  ? "node-modules-workspace"
@@ -4959,13 +5092,13 @@ const getNodeCache = (context, policy = "pull-push") => {
4959
5092
  };
4960
5093
  exports.getNodeCache = getNodeCache;
4961
5094
  const getNextCache = (context) => {
4962
- const key = context.name + "-next-cache";
4963
5095
  const paths = context.build
4964
5096
  .getComponentDirs("direct")
4965
5097
  .map((c) => (0, path_1.join)(c, ".next/cache"));
4966
5098
  return [
4967
5099
  {
4968
- key,
5100
+ pathMode: "absolute",
5101
+ key: "next-cache",
4969
5102
  policy: "pull-push",
4970
5103
  paths,
4971
5104
  },
@@ -4976,9 +5109,9 @@ const getWorkspaceDefaultCaches = (context) => {
4976
5109
  return [
4977
5110
  {
4978
5111
  // turbo repo
4979
- key: context.name + "-turbo",
5112
+ key: "turbo",
4980
5113
  policy: "pull-push",
4981
- paths: [(0, path_1.join)(context.build.dir, ".turbo")],
5114
+ paths: [".turbo"],
4982
5115
  },
4983
5116
  ];
4984
5117
  };
@@ -5036,7 +5169,6 @@ exports.createMeteorJobs = createMeteorJobs;
5036
5169
 
5037
5170
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5038
5171
  exports.createMeteorBuildJobs = void 0;
5039
- const path_1 = __nccwpck_require__(71017);
5040
5172
  const runner_1 = __nccwpck_require__(4058);
5041
5173
  const base_1 = __nccwpck_require__(9366);
5042
5174
  const docker_1 = __nccwpck_require__(9641);
@@ -5045,13 +5177,13 @@ const cache_1 = __nccwpck_require__(72026);
5045
5177
  const yarn_1 = __nccwpck_require__(45043);
5046
5178
  const getMeteorCache = (context) => [
5047
5179
  {
5048
- key: context.name + "-meteor-build-cache",
5180
+ key: "meteor-build-cache",
5049
5181
  policy: "pull-push",
5050
5182
  paths: [
5051
- (0, path_1.join)(context.build.dir, ".meteor/local/resolver-result-cache.json"),
5052
- (0, path_1.join)(context.build.dir, ".meteor/local/plugin-cache"),
5053
- (0, path_1.join)(context.build.dir, ".meteor/local/isopacks"),
5054
- (0, path_1.join)(context.build.dir, ".meteor/local/bundler-cache/scanner"),
5183
+ ".meteor/local/resolver-result-cache.json",
5184
+ ".meteor/local/plugin-cache",
5185
+ ".meteor/local/isopacks",
5186
+ ".meteor/local/bundler-cache/scanner",
5055
5187
  ],
5056
5188
  },
5057
5189
  ];
@@ -5106,6 +5238,7 @@ const createArtifactsConfig_1 = __nccwpck_require__(12820);
5106
5238
  const cache_1 = __nccwpck_require__(72026);
5107
5239
  const constants_1 = __nccwpck_require__(31765);
5108
5240
  const yarn_1 = __nccwpck_require__(45043);
5241
+ const createJobCache_1 = __nccwpck_require__(10340);
5109
5242
  const createNodeTestJobs = (context) => {
5110
5243
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
5111
5244
  // don't run tests after release
@@ -5144,7 +5277,7 @@ const createNodeTestJobs = (context) => {
5144
5277
  cache: undefined, // audit does not need yarn install and no cache
5145
5278
  script: [
5146
5279
  `cd ${context.build.dir}`,
5147
- ...((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
5280
+ ...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
5148
5281
  context.packageManagerInfo.isClassic
5149
5282
  ? "yarn audit"
5150
5283
  : "yarn npm audit --environment production", // yarn 2
@@ -5159,12 +5292,12 @@ const createNodeTestJobs = (context) => {
5159
5292
  name: "👮 lint",
5160
5293
  ...base,
5161
5294
  image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
5162
- cache: (0, cache_1.getNodeCache)(context),
5295
+ cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
5163
5296
  script: [
5164
5297
  ...(0, yarn_1.ensureNodeVersion)(context),
5165
5298
  `cd ${context.build.dir}`,
5166
5299
  ...yarnInstall,
5167
- ...((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"]),
5300
+ ...((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"]),
5168
5301
  ],
5169
5302
  ...(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),
5170
5303
  }
@@ -5174,12 +5307,12 @@ const createNodeTestJobs = (context) => {
5174
5307
  name: "🧪 test",
5175
5308
  ...base,
5176
5309
  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"),
5177
- cache: (0, cache_1.getNodeCache)(context),
5310
+ cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
5178
5311
  script: [
5179
5312
  ...(0, yarn_1.ensureNodeVersion)(context),
5180
5313
  `cd ${context.build.dir}`,
5181
5314
  ...yarnInstall,
5182
- ...((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"]),
5315
+ ...((_s = (0, utils_1.ensureArrayOrNull)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"]),
5183
5316
  ],
5184
5317
  ...(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),
5185
5318
  }
@@ -5216,7 +5349,6 @@ const ensureNodeVersion = (context) => (0, gitlab_1.collapseableSection)("nodein
5216
5349
  ]);
5217
5350
  exports.ensureNodeVersion = ensureNodeVersion;
5218
5351
  const getYarnInstall = (context, options) => {
5219
- var _a;
5220
5352
  const postInstall = context.type !== "workspace" && "postInstall" in context.build.config
5221
5353
  ? context.build.config.postInstall
5222
5354
  : null;
@@ -5224,7 +5356,7 @@ const getYarnInstall = (context, options) => {
5224
5356
  ...(0, exports.ensureNodeVersion)(context),
5225
5357
  ...(0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)]),
5226
5358
  ...(postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
5227
- ? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
5359
+ ? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((0, utils_1.ensureArray)(postInstall))
5228
5360
  : []),
5229
5361
  ];
5230
5362
  };
@@ -5387,7 +5519,7 @@ const createRailsTestJobs = (context) => {
5387
5519
  image: (_d = (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage) !== null && _d !== void 0 ? _d : defaultImage,
5388
5520
  script: [
5389
5521
  `cd ${context.build.dir}`,
5390
- ...((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [
5522
+ ...((_f = (0, utils_1.ensureArrayOrNull)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [
5391
5523
  "gem install bundler-audit",
5392
5524
  "bundle audit check",
5393
5525
  ]),
@@ -5404,7 +5536,7 @@ const createRailsTestJobs = (context) => {
5404
5536
  script: [
5405
5537
  `cd ${context.build.dir}`,
5406
5538
  ...bundlerInstall,
5407
- ...((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : [
5539
+ ...((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : [
5408
5540
  "bundle exec rubocop",
5409
5541
  ]),
5410
5542
  ],
@@ -5419,7 +5551,7 @@ const createRailsTestJobs = (context) => {
5419
5551
  script: [
5420
5552
  `cd ${context.build.dir}`,
5421
5553
  ...bundlerInstall,
5422
- ...((_r = (0, utils_1.ensureArray)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : [
5554
+ ...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : [
5423
5555
  "bundle exec rspec",
5424
5556
  ]),
5425
5557
  ],
@@ -5460,7 +5592,7 @@ const createSbomBuildJob = (context) => {
5460
5592
  const script = (0, _1.isStandaloneBuildConfig)(buildConfig) &&
5461
5593
  buildConfig.type === "custom" &&
5462
5594
  buildConfig.sbom !== false
5463
- ? (_d = (0, utils_1.ensureArray)((_c = buildConfig.sbom) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : defaultScript
5595
+ ? (_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.sbom) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : defaultScript
5464
5596
  : defaultScript;
5465
5597
  return {
5466
5598
  name: exports.SBOM_BUILD_JOB_NAME,
@@ -9473,11 +9605,22 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
9473
9605
  __exportStar(__nccwpck_require__(47770), exports);
9474
9606
  __exportStar(__nccwpck_require__(30688), exports);
9475
9607
  __exportStar(__nccwpck_require__(61724), exports);
9608
+ __exportStar(__nccwpck_require__(28207), exports);
9476
9609
  __exportStar(__nccwpck_require__(32074), exports);
9477
9610
  //# sourceMappingURL=index.js.map
9478
9611
 
9479
9612
  /***/ }),
9480
9613
 
9614
+ /***/ 28207:
9615
+ /***/ ((__unused_webpack_module, exports) => {
9616
+
9617
+ "use strict";
9618
+
9619
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
9620
+ //# sourceMappingURL=jobDefinition.js.map
9621
+
9622
+ /***/ }),
9623
+
9481
9624
  /***/ 17432:
9482
9625
  /***/ ((__unused_webpack_module, exports) => {
9483
9626
 
@@ -9551,13 +9694,15 @@ exports.collapseableSection = collapseableSection;
9551
9694
  "use strict";
9552
9695
 
9553
9696
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9554
- exports.mergeWithMergingArrays = exports.ensureArray = exports.notNil = void 0;
9697
+ exports.mergeWithMergingArrays = exports.ensureArray = exports.ensureArrayOrNull = exports.notNil = void 0;
9555
9698
  const lodash_1 = __nccwpck_require__(23255);
9556
9699
  function notNil(value) {
9557
9700
  return value !== null && value !== undefined;
9558
9701
  }
9559
9702
  exports.notNil = notNil;
9560
- const ensureArray = (s) => (0, lodash_1.isNil)(s) ? null : Array.isArray(s) ? s : [s];
9703
+ const ensureArrayOrNull = (s) => (0, lodash_1.isNil)(s) ? null : Array.isArray(s) ? s : [s];
9704
+ exports.ensureArrayOrNull = ensureArrayOrNull;
9705
+ const ensureArray = (s) => { var _a; return (_a = (0, exports.ensureArrayOrNull)(s)) !== null && _a !== void 0 ? _a : []; };
9561
9706
  exports.ensureArray = ensureArray;
9562
9707
  // see https://github.com/lodash/lodash/issues/5384
9563
9708
  const mergeWithMergingArrays = (obj1, obj2) => {
@@ -1,4 +1,5 @@
1
1
  import type { BuildContextStandalone, ComponentContext, WorkspaceContext } from "../..";
2
+ import type { JobDefintion } from "../../types/jobDefinition";
2
3
  import type { CatladderJob } from "../../types/jobs";
3
- export type AppBuildJobDefinition = Partial<Omit<CatladderJob, "artifacts">>;
4
- export declare const createAppBuildJob: (context: ComponentContext<BuildContextStandalone> | WorkspaceContext, { script, variables, runnerVariables, ...def }: AppBuildJobDefinition) => CatladderJob;
4
+ export type AppBuildJobDefinition = JobDefintion;
5
+ export declare const createAppBuildJob: (context: ComponentContext<BuildContextStandalone> | WorkspaceContext, { script, variables, runnerVariables, cache, ...def }: AppBuildJobDefinition) => CatladderJob;
@@ -5,19 +5,20 @@ const lodash_1 = require("lodash");
5
5
  const __1 = require("../..");
6
6
  const utils_1 = require("../../utils");
7
7
  const createBuildJobArtifact_1 = require("../artifacts/createBuildJobArtifact");
8
+ const createJobCache_1 = require("../cache/createJobCache");
8
9
  const yarn_1 = require("../node/yarn");
9
10
  const constants_1 = require("./constants");
10
11
  const writeBuildInfo_1 = require("./writeBuildInfo");
11
12
  const writeDotEnv_1 = require("./writeDotEnv");
12
- const createAppBuildJob = (context, { script, variables, runnerVariables, ...def }) => {
13
- var _a, _b, _c;
13
+ const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
14
+ var _a, _b;
14
15
  return (0, lodash_1.merge)({
15
16
  name: constants_1.APP_BUILD_JOB_NAME,
16
17
  envMode: "jobPerEnv",
17
18
  stage: "build",
18
19
  image: (0, __1.getRunnerImage)("jobs-default"),
19
20
  needs: [],
20
- cache: [],
21
+ cache: cache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, cache) : undefined,
21
22
  variables: {
22
23
  ...(variables !== null && variables !== void 0 ? variables : {}),
23
24
  ...(context.type === "component"
@@ -46,7 +47,7 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, ...def
46
47
  ...(context.type === "component" ? (0, writeBuildInfo_1.writeBuildInfo)(context) : []),
47
48
  ...(0, yarn_1.ensureNodeVersion)(context), // in pure node repos, we might want to have the nvmrc file in top-level
48
49
  `cd ${context.build.dir}`,
49
- ...((_c = (0, utils_1.ensureArray)(script)) !== null && _c !== void 0 ? _c : []),
50
+ ...(0, utils_1.ensureArray)(script),
50
51
  ],
51
52
  artifacts: (0, createBuildJobArtifact_1.createBuildJobArtifacts)(context),
52
53
  }, def);
@@ -1 +1 @@
1
- {"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAM/B,6BAAuC;AAEvC,uCAA0C;AAC1C,gFAA8E;AAC9E,uCAAiD;AACjD,2CAGqB;AACrB,qDAAkD;AAClD,+CAGuB;AAGhB,MAAM,iBAAiB,GAAG,CAC/B,OAAoE,EACpE,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,GAAG,EAAyB,EACvD,EAAE;;IAChB,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,EAAE;YACT,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC;oBACE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO;oBAC9B,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;oBAChD,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC;iBAC1C;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,eAAe,EAAE;YACf,GAAG,2CAA+B;YAClC,GAAG,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC;YAC1B,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC;SAChD;QAED,MAAM,EAAE;YACN,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;oBAC7C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,EAAE;gBACN,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;oBAC5B,CAAC,CAAC,OAAO,CAAC,UAAU;yBACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,kDAAoC,EAAC,CAAC,CAAC,CAAC;yBACtD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC;oBACnC,CAAC,CAAC,EAAE,CAAC;YACT,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,EAAE,wEAAwE;YACvG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;YACzB,GAAG,CAAC,MAAA,IAAA,mBAAW,EAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;SAC/B;QACD,SAAS,EAAE,IAAA,gDAAuB,EAAC,OAAO,CAAC;KAC5C,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,iBAAiB,qBA+C5B"}
1
+ {"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAM/B,6BAAuC;AAGvC,uCAA0C;AAC1C,gFAA8E;AAC9E,4DAAyE;AACzE,uCAAiD;AACjD,2CAGqB;AACrB,qDAAkD;AAClD,+CAGuB;AAGhB,MAAM,iBAAiB,GAAG,CAC/B,OAAoE,EACpE,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,GAAG,EAAyB,EAC9D,EAAE;;IAChB,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,KAAK,CAAC,CAAC,CAAC,IAAA,+CAA8B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,SAAS,EAAE;YACT,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC;oBACE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO;oBAC9B,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;oBAChD,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC;iBAC1C;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,eAAe,EAAE;YACf,GAAG,2CAA+B;YAClC,GAAG,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC;YAC1B,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC;SAChD;QAED,MAAM,EAAE;YACN,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;oBAC7C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,EAAE;gBACN,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;oBAC5B,CAAC,CAAC,OAAO,CAAC,UAAU;yBACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,kDAAoC,EAAC,CAAC,CAAC,CAAC;yBACtD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC;oBACnC,CAAC,CAAC,EAAE,CAAC;YACT,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,EAAE,wEAAwE;YACvG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;YACzB,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC;SACvB;QACD,SAAS,EAAE,IAAA,gDAAuB,EAAC,OAAO,CAAC;KAC5C,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,iBAAiB,qBA+C5B"}
@@ -0,0 +1,7 @@
1
+ import type { BuildConfigStandalone, WorkspaceBuildConfig } from "..";
2
+ import type { Context } from "../../types";
3
+ import type { JobDefintion } from "../../types/jobDefinition";
4
+ export declare const createBuildJobDefinition: (context: Context, buildConfig: BuildConfigStandalone | WorkspaceBuildConfig, customize?: Pick<JobDefintion, "cache"> & {
5
+ prescript?: string[];
6
+ postscript?: string[];
7
+ }) => JobDefintion | undefined;