@catladder/cli 0.0.0-main-c595e7af → 0.0.0-main-b38c122b

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 (40) hide show
  1. package/dist/bundles/catenv/index.js +94 -77
  2. package/dist/bundles/cli/index.js +86 -69
  3. package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +1 -2
  4. package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
  5. package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +3 -4
  6. package/dist/pipeline/src/build/base/createBuildJobDefinition.js.map +1 -1
  7. package/dist/pipeline/src/build/base/index.d.ts +1 -2
  8. package/dist/pipeline/src/build/base/index.js.map +1 -1
  9. package/dist/pipeline/src/build/cache/createJobCache.d.ts +3 -2
  10. package/dist/pipeline/src/build/cache/createJobCache.js +2 -2
  11. package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -1
  12. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +2 -2
  13. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +4 -7
  14. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js.map +1 -1
  15. package/dist/pipeline/src/build/docker.d.ts +2 -3
  16. package/dist/pipeline/src/build/docker.js.map +1 -1
  17. package/dist/pipeline/src/build/node/buildJob.d.ts +1 -2
  18. package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
  19. package/dist/pipeline/src/build/types.d.ts +6 -0
  20. package/dist/pipeline/src/build/types.js.map +1 -1
  21. package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
  22. package/dist/pipeline/src/deploy/base/deploy.d.ts +1 -1
  23. package/dist/pipeline/src/deploy/base/deploy.js +4 -1
  24. package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
  25. package/dist/pipeline/src/deploy/base/index.d.ts +1 -3
  26. package/dist/pipeline/src/deploy/base/index.js.map +1 -1
  27. package/dist/pipeline/src/deploy/base/rollback.d.ts +1 -1
  28. package/dist/pipeline/src/deploy/base/rollback.js.map +1 -1
  29. package/dist/pipeline/src/deploy/base/stop.d.ts +1 -1
  30. package/dist/pipeline/src/deploy/base/stop.js.map +1 -1
  31. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +70 -55
  32. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
  33. package/dist/pipeline/src/deploy/custom/deployJob.js +6 -4
  34. package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
  35. package/dist/pipeline/src/deploy/types/custom.d.ts +2 -6
  36. package/dist/pipeline/src/deploy/types/index.d.ts +3 -3
  37. package/dist/pipeline/src/types/config.d.ts +3 -3
  38. package/dist/pipeline/src/types/jobDefinition.d.ts +7 -1
  39. package/dist/tsconfig.tsbuildinfo +1 -1
  40. package/package.json +1 -1
@@ -1057,7 +1057,7 @@ const lodash_1 = __nccwpck_require__(3255);
1057
1057
  const __1 = __nccwpck_require__(603);
1058
1058
  const utils_1 = __nccwpck_require__(2497);
1059
1059
  const createBuildJobArtifact_1 = __nccwpck_require__(8774);
1060
- const createJobCache_1 = __nccwpck_require__(4372);
1060
+ const createJobCache_1 = __nccwpck_require__(340);
1061
1061
  const yarn_1 = __nccwpck_require__(5043);
1062
1062
  const constants_1 = __nccwpck_require__(2786);
1063
1063
  const writeBuildInfo_1 = __nccwpck_require__(9578);
@@ -1296,7 +1296,7 @@ exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDot
1296
1296
 
1297
1297
  /***/ }),
1298
1298
 
1299
- /***/ 4372:
1299
+ /***/ 340:
1300
1300
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
1301
1301
 
1302
1302
  "use strict";
@@ -1352,8 +1352,8 @@ const createJobCacheFromCacheConfigs = (context, caches) => {
1352
1352
  };
1353
1353
  exports.createJobCacheFromCacheConfigs = createJobCacheFromCacheConfigs;
1354
1354
  /** shortcut, used in some build types */
1355
- const createJobCacheFromConfig = (context, buildConfig) => {
1356
- return (0, exports.createJobCacheFromCacheConfigs)(context, (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, buildConfig));
1355
+ const createJobCacheFromConfig = (context, configWithCache) => {
1356
+ return (0, exports.createJobCacheFromCacheConfigs)(context, (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, configWithCache));
1357
1357
  };
1358
1358
  exports.createJobCacheFromConfig = createJobCacheFromConfig;
1359
1359
  //# sourceMappingURL=createJobCache.js.map
@@ -1369,15 +1369,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
1369
1369
  exports.getAllCacheConfigsFromConfig = void 0;
1370
1370
  const index_1 = __nccwpck_require__(2497);
1371
1371
  const transformLegacyJobCache_1 = __nccwpck_require__(6673);
1372
- const getAllCacheConfigsFromConfig = (context, buildConfig) => {
1372
+ const getAllCacheConfigsFromConfig = (context, configWithCache) => {
1373
1373
  return [
1374
- ...("jobCache" in buildConfig
1375
- ? (0, transformLegacyJobCache_1.transformLegacyJobCache)(buildConfig.jobCache)
1374
+ ...("jobCache" in configWithCache
1375
+ ? (0, transformLegacyJobCache_1.transformLegacyJobCache)(configWithCache.jobCache)
1376
1376
  : []),
1377
- ...(0, index_1.ensureArray)(buildConfig.cache).map((c) => ({
1378
- ...c,
1379
- context,
1380
- })),
1377
+ ...(0, index_1.ensureArray)(configWithCache.cache),
1381
1378
  ...(context.type === "workspace"
1382
1379
  ? // also add cache configs of the components of that workspace
1383
1380
  context.components.flatMap((componentContext) => {
@@ -1476,7 +1473,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
1476
1473
  exports.createCustomTestJobs = void 0;
1477
1474
  const utils_1 = __nccwpck_require__(2497);
1478
1475
  const createArtifactsConfig_1 = __nccwpck_require__(2820);
1479
- const createJobCache_1 = __nccwpck_require__(4372);
1476
+ const createJobCache_1 = __nccwpck_require__(340);
1480
1477
  const types_1 = __nccwpck_require__(4466);
1481
1478
  const RUNNER_CUSTOM_TEST_VARIABLES = {
1482
1479
  KUBERNETES_CPU_REQUEST: "0.45",
@@ -1561,7 +1558,7 @@ const artifactsRegistry_1 = __nccwpck_require__(4963);
1561
1558
  const gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(6320);
1562
1559
  const runner_1 = __nccwpck_require__(4058);
1563
1560
  const gitlab_1 = __nccwpck_require__(8490);
1564
- const createJobCache_1 = __nccwpck_require__(4372);
1561
+ const createJobCache_1 = __nccwpck_require__(340);
1565
1562
  const DOCKER_BUILD_RUNNER_REQUESTS = {
1566
1563
  KUBERNETES_CPU_REQUEST: "0.45",
1567
1564
  KUBERNETES_MEMORY_REQUEST: "1Gi",
@@ -2070,7 +2067,7 @@ const createArtifactsConfig_1 = __nccwpck_require__(2820);
2070
2067
  const cache_1 = __nccwpck_require__(2026);
2071
2068
  const constants_1 = __nccwpck_require__(1765);
2072
2069
  const yarn_1 = __nccwpck_require__(5043);
2073
- const createJobCache_1 = __nccwpck_require__(4372);
2070
+ const createJobCache_1 = __nccwpck_require__(340);
2074
2071
  const createNodeTestJobs = (context) => {
2075
2072
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
2076
2073
  // don't run tests after release
@@ -3306,6 +3303,7 @@ exports.BASE_RETRY = {
3306
3303
 
3307
3304
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3308
3305
  exports.createDeployJob = exports.DEPLOY_JOB_NAME = void 0;
3306
+ const createJobCache_1 = __nccwpck_require__(340);
3309
3307
  const docker_1 = __nccwpck_require__(9641);
3310
3308
  const sbom_1 = __nccwpck_require__(7038);
3311
3309
  const context_1 = __nccwpck_require__(1724);
@@ -3337,7 +3335,9 @@ const createDeployJob = (context, jobDefinition) => {
3337
3335
  name: exports.DEPLOY_JOB_NAME,
3338
3336
  script: jobDefinition.script,
3339
3337
  image: jobDefinition.image,
3340
- cache: jobDefinition.cache,
3338
+ cache: jobDefinition.cache
3339
+ ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, jobDefinition.cache)
3340
+ : undefined,
3341
3341
  artifacts: jobDefinition.artifacts,
3342
3342
  services: jobDefinition.services,
3343
3343
  envMode: "stagePerEnv", // makes it easier to run manual tasks er env
@@ -3736,13 +3736,13 @@ exports.getDeleteUnusedRevisionsCommands = getDeleteUnusedRevisionsCommands;
3736
3736
 
3737
3737
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3738
3738
  exports.getCreateScheduleScripts = exports.getJobCreateScripts = exports.getJobRunScripts = exports.getDeleteJobsScripts = exports.getDeleteSchedulesScripts = void 0;
3739
- const gitlab_1 = __nccwpck_require__(8490);
3740
3739
  const createArgsString_1 = __nccwpck_require__(9598);
3741
3740
  const jobName_1 = __nccwpck_require__(9626);
3742
3741
  const common_1 = __nccwpck_require__(3325);
3743
3742
  const getLabels_1 = __nccwpck_require__(920);
3744
3743
  const volumes_1 = __nccwpck_require__(847);
3745
3744
  const constants_1 = __nccwpck_require__(8865);
3745
+ const utils_1 = __nccwpck_require__(2497);
3746
3746
  const getJobRunScriptForJob = (context, jobName, wait) => {
3747
3747
  const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
3748
3748
  const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
@@ -3784,76 +3784,90 @@ const getJobRunScripts = (context, when) => {
3784
3784
  ["preStop", "postStop"].includes(when)));
3785
3785
  };
3786
3786
  exports.getJobRunScripts = getJobRunScripts;
3787
- const getJobCreateScripts = (context) => {
3788
- const jobsWithNames = getCloudRunJobsWithNames(context);
3789
- return jobsWithNames
3790
- .map(({ job, jobName }) => getJobCreateScriptsForJob(context, jobName, job))
3791
- .flat();
3792
- };
3793
- exports.getJobCreateScripts = getJobCreateScripts;
3794
- const getJobCreateScriptsForJob = (context, jobName, job) => {
3795
- const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
3796
- // due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
3797
- // lucky, update on the other hand accepts it... so let's just imediatly update it
3798
- // we cannot upsert a job, so we have to create it and catch the error and then update
3799
- const commandArray = Array.isArray(job.command)
3800
- ? job.command
3801
- : job.command.split(" ");
3787
+ const getJobCreateScripts = (context) => getCloudRunJobsWithNames(context).map(({ job: { command, image, cpu, memory = "512Mi", timeout = "10m", parallelism = 1, volumes, }, jobName, }, jobIndex) => {
3788
+ const commandArray = Array.isArray(command)
3789
+ ? command
3790
+ : command.split(" ");
3791
+ const { image: commonImage, project, region, ...deployArgs } = (0, common_1.getCommonDeployArgs)(context);
3802
3792
  const commonDeployArgsString = (0, createArgsString_1.createArgsString)({
3803
- command: '"' + commandArray.join(",") + '"',
3804
- ...commonDeployArgs,
3805
- labels: (0, common_1.makeLabelString)({
3806
- ...(0, getLabels_1.getLabels)(context),
3807
- "cloud-run-job-name": jobName.toString(),
3808
- }),
3809
- image: job.image || commonDeployArgs.image,
3810
- cpu: job === null || job === void 0 ? void 0 : job.cpu,
3811
- memory: job.memory || "512Mi",
3812
- "task-timeout": job.timeout || "10m",
3813
- parallelism: job.parallelism || 1,
3793
+ command: `"${commandArray.join(",")}"`,
3794
+ labels: `"${(0, common_1.makeLabelString)((0, getLabels_1.getLabels)(context))},cloud-run-job-name=$current_job_name"`,
3795
+ image: `"${image !== null && image !== void 0 ? image : commonImage}"`,
3796
+ project,
3797
+ region,
3798
+ cpu,
3799
+ memory,
3800
+ parallelism,
3801
+ "task-timeout": timeout,
3814
3802
  "env-vars-file": constants_1.ENV_VARS_FILENAME,
3815
3803
  "max-retries": 0,
3804
+ ...deployArgs,
3816
3805
  });
3817
- const requiresBeta = (job === null || job === void 0 ? void 0 : job.volumes) && Object.keys(job === null || job === void 0 ? void 0 : job.volumes).length > 0;
3818
- const argsString = `${jobName} ${commonDeployArgsString}`;
3806
+ // due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
3807
+ // lucky, update on the other hand accepts it... so let's just imediatly update it
3808
+ // we cannot upsert a job, so we have to create it and catch the error and then update
3809
+ const hasVolumes = Object.keys(volumes || {}).length > 0;
3810
+ const needsBeta = hasVolumes ? "beta" : undefined;
3811
+ const volumeArgs = hasVolumes
3812
+ ? (0, createArgsString_1.createArgsString)(...(0, volumes_1.createVolumeConfig)(volumes, "job"))
3813
+ : "";
3819
3814
  return [
3820
- ...(0, gitlab_1.allowFailureInScripts)([`${(0, common_1.gcloudRunCmd)()} jobs create ${argsString}`]),
3821
- `${(0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined)} jobs update ${argsString} ${(0, createArgsString_1.createArgsString)(...(0, volumes_1.createVolumeConfig)(job === null || job === void 0 ? void 0 : job.volumes, "job"))}`,
3822
- ];
3823
- };
3815
+ jobIndex === 0
3816
+ ? `exist_job_names="$(\n ${(0, common_1.gcloudRunCmd)()} jobs list --filter='metadata.name ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --project='${project}' --region='${region}'\n)"`
3817
+ : null,
3818
+ `current_job_name="${jobName}"`,
3819
+ 'if grep "$current_job_name" <<<"$exist_job_names" >/dev/null; then',
3820
+ ` ${(0, common_1.gcloudRunCmd)(needsBeta)} jobs update "$current_job_name" ${commonDeployArgsString} ${volumeArgs}`,
3821
+ "else",
3822
+ ` ${(0, common_1.gcloudRunCmd)()} jobs create "$current_job_name" ${commonDeployArgsString}`,
3823
+ "fi",
3824
+ ]
3825
+ .filter(utils_1.notNil)
3826
+ .join("\n");
3827
+ });
3828
+ exports.getJobCreateScripts = getJobCreateScripts;
3824
3829
  const getCreateScheduleScripts = (context) => {
3825
3830
  const jobsWithSchedule = getCloudRunJobsWithSchedule(context);
3826
- const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
3827
- return jobsWithSchedule
3828
- .map(({ job, jobName, schedulerName }) => {
3829
- var _a;
3831
+ const { region: location, projectId: project } = (0, common_1.getCloudRunDeployConfig)(context);
3832
+ const uriBase = `https://${location}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${project}/jobs`;
3833
+ const gcloudArgs = {
3834
+ project,
3835
+ location,
3836
+ uri: `"$current_job_uri"`,
3837
+ "http-method": "POST",
3838
+ "oauth-service-account-email": `"$GCLOUD_PROJECT_NUMBER-compute@developer.gserviceaccount.com"`,
3839
+ };
3840
+ return jobsWithSchedule.map(({ job: { maxRetryAttempts, schedule }, jobName, schedulerName }, jobIndex) => {
3830
3841
  const argsString = (0, createArgsString_1.createArgsString)({
3831
- project: deployConfig.projectId,
3832
- location: deployConfig.region,
3833
- schedule: `"${job.schedule}"`,
3834
- "max-retry-attempts": (_a = job.maxRetryAttempts) !== null && _a !== void 0 ? _a : 0,
3835
- uri: `"https://${deployConfig.region}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${deployConfig.projectId}/jobs/${jobName}:run"`,
3836
- "http-method": "POST",
3837
- "oauth-service-account-email": "$GCLOUD_PROJECT_NUMBER-compute@developer.gserviceaccount.com",
3842
+ ...gcloudArgs,
3843
+ schedule: `"${schedule}"`,
3844
+ "max-retry-attempts": maxRetryAttempts !== null && maxRetryAttempts !== void 0 ? maxRetryAttempts : 0,
3838
3845
  });
3839
- const commonArgs = `http ${schedulerName} ${argsString}`;
3840
3846
  return [
3841
- ...(0, gitlab_1.allowFailureInScripts)([
3842
- `${(0, common_1.gcloudSchedulerCmd)()} jobs create ${commonArgs}`,
3843
- ]),
3844
- `${(0, common_1.gcloudSchedulerCmd)()} jobs update ${commonArgs}`,
3845
- ];
3846
- })
3847
- .flat();
3847
+ jobIndex === 0
3848
+ ? `exist_scheduler_names="$(\n ${(0, common_1.gcloudSchedulerCmd)()} jobs list --filter='httpTarget.uri ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --location='${location}' --project='${project}'\n)"`
3849
+ : null,
3850
+ `current_job_uri="${uriBase}/${jobName}:run"`,
3851
+ `current_scheduler_name="${schedulerName}"`,
3852
+ `if grep "$current_scheduler_name" <<<"$exist_scheduler_names" >/dev/null; then`,
3853
+ ` ${(0, common_1.gcloudSchedulerCmd)()} jobs update http "$current_scheduler_name" ${argsString}`,
3854
+ `else`,
3855
+ ` ${(0, common_1.gcloudSchedulerCmd)()} jobs create http "$current_scheduler_name" ${argsString}`,
3856
+ `fi`,
3857
+ ]
3858
+ .filter(utils_1.notNil)
3859
+ .join("\n");
3860
+ });
3848
3861
  };
3849
3862
  exports.getCreateScheduleScripts = getCreateScheduleScripts;
3850
3863
  const getCloudRunJobsWithSchedule = (context) => {
3851
3864
  const jobsWithNames = getCloudRunJobsWithNames(context);
3852
3865
  return jobsWithNames
3853
3866
  .filter((entry) => entry.job.when === "schedule")
3854
- .map(({ job, jobName }) => ({
3867
+ .map(({ job, jobName, jobKey }) => ({
3855
3868
  job,
3856
3869
  jobName,
3870
+ jobKey,
3857
3871
  schedulerName: jobName.concat("-scheduler"),
3858
3872
  }));
3859
3873
  };
@@ -3864,9 +3878,10 @@ const getCloudRunJobsWithNames = (context) => {
3864
3878
  const jobsWithNames = Object.entries((_a = deployConfig.jobs) !== null && _a !== void 0 ? _a : {})
3865
3879
  // filter out disabled jobs
3866
3880
  .filter((entry) => Boolean(entry[1]))
3867
- .map(([name, job]) => ({
3868
- jobName: getFullJobName(name),
3881
+ .map(([jobKey, job]) => ({
3882
+ jobName: getFullJobName(jobKey),
3869
3883
  job,
3884
+ jobKey,
3870
3885
  }));
3871
3886
  return jobsWithNames;
3872
3887
  };
@@ -4467,13 +4482,14 @@ exports.getFullDbName = getFullDbName;
4467
4482
 
4468
4483
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4469
4484
  exports.createCustomDeployJobs = void 0;
4485
+ const getAllCacheConfigsFromConfig_1 = __nccwpck_require__(673);
4470
4486
  const yarn_1 = __nccwpck_require__(5043);
4471
4487
  const runner_1 = __nccwpck_require__(4058);
4472
4488
  const base_1 = __nccwpck_require__(2024);
4473
4489
  const sbom_1 = __nccwpck_require__(4986);
4474
4490
  const types_1 = __nccwpck_require__(5781);
4475
4491
  const createCustomDeployJobs = (context) => {
4476
- var _a, _b, _c, _d;
4492
+ var _a, _b, _c;
4477
4493
  const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
4478
4494
  if (!(0, types_1.isOfDeployType)(deployConfig, "custom")) {
4479
4495
  // should not happen
@@ -4483,10 +4499,10 @@ const createCustomDeployJobs = (context) => {
4483
4499
  const yarnInstall = (0, yarn_1.getYarnInstall)(context, {
4484
4500
  noCustomPostInstall: true,
4485
4501
  });
4486
- return (0, base_1.createDeployementJobs)(context, {
4502
+ const result = (0, base_1.createDeployementJobs)(context, {
4487
4503
  deploy: {
4488
4504
  image: (_b = deployConfig.jobImage) !== null && _b !== void 0 ? _b : (0, runner_1.getRunnerImage)("jobs-default"),
4489
- cache: (_c = deployConfig.jobCache) !== null && _c !== void 0 ? _c : [],
4505
+ cache: (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, deployConfig),
4490
4506
  script: [
4491
4507
  `cd ${context.build.dir}`,
4492
4508
  ...(deployConfig.requiresYarnInstall ? yarnInstall : []),
@@ -4497,7 +4513,7 @@ const createCustomDeployJobs = (context) => {
4497
4513
  },
4498
4514
  stop: deployConfig.stopScript
4499
4515
  ? {
4500
- image: (_d = deployConfig.jobImage) !== null && _d !== void 0 ? _d : (0, runner_1.getRunnerImage)("jobs-default"),
4516
+ image: (_c = deployConfig.jobImage) !== null && _c !== void 0 ? _c : (0, runner_1.getRunnerImage)("jobs-default"),
4501
4517
  script: [
4502
4518
  ...deployConfig.stopScript,
4503
4519
  ...(0, sbom_1.getDependencyTrackDeleteScript)(context),
@@ -4506,6 +4522,7 @@ const createCustomDeployJobs = (context) => {
4506
4522
  }
4507
4523
  : undefined,
4508
4524
  });
4525
+ return result;
4509
4526
  };
4510
4527
  exports.createCustomDeployJobs = createCustomDeployJobs;
4511
4528
  //# sourceMappingURL=deployJob.js.map
@@ -42732,7 +42749,7 @@ var Scalar = __nccwpck_require__(9387);
42732
42749
  var YAMLMap = __nccwpck_require__(1030);
42733
42750
  var YAMLSeq = __nccwpck_require__(1936);
42734
42751
  var cst = __nccwpck_require__(8164);
42735
- var lexer = __nccwpck_require__(340);
42752
+ var lexer = __nccwpck_require__(2269);
42736
42753
  var lineCounter = __nccwpck_require__(4211);
42737
42754
  var parser = __nccwpck_require__(4639);
42738
42755
  var publicApi = __nccwpck_require__(3019);
@@ -44225,7 +44242,7 @@ exports.tokenType = tokenType;
44225
44242
 
44226
44243
  /***/ }),
44227
44244
 
44228
- /***/ 340:
44245
+ /***/ 2269:
44229
44246
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
44230
44247
 
44231
44248
  "use strict";
@@ -45012,7 +45029,7 @@ exports.LineCounter = LineCounter;
45012
45029
 
45013
45030
 
45014
45031
  var cst = __nccwpck_require__(8164);
45015
- var lexer = __nccwpck_require__(340);
45032
+ var lexer = __nccwpck_require__(2269);
45016
45033
 
45017
45034
  function includesToken(list, type) {
45018
45035
  for (let i = 0; i < list.length; ++i)
@@ -4520,8 +4520,8 @@ const createJobCacheFromCacheConfigs = (context, caches) => {
4520
4520
  };
4521
4521
  exports.createJobCacheFromCacheConfigs = createJobCacheFromCacheConfigs;
4522
4522
  /** shortcut, used in some build types */
4523
- const createJobCacheFromConfig = (context, buildConfig) => {
4524
- return (0, exports.createJobCacheFromCacheConfigs)(context, (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, buildConfig));
4523
+ const createJobCacheFromConfig = (context, configWithCache) => {
4524
+ return (0, exports.createJobCacheFromCacheConfigs)(context, (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, configWithCache));
4525
4525
  };
4526
4526
  exports.createJobCacheFromConfig = createJobCacheFromConfig;
4527
4527
  //# sourceMappingURL=createJobCache.js.map
@@ -4537,15 +4537,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
4537
4537
  exports.getAllCacheConfigsFromConfig = void 0;
4538
4538
  const index_1 = __nccwpck_require__(32497);
4539
4539
  const transformLegacyJobCache_1 = __nccwpck_require__(96673);
4540
- const getAllCacheConfigsFromConfig = (context, buildConfig) => {
4540
+ const getAllCacheConfigsFromConfig = (context, configWithCache) => {
4541
4541
  return [
4542
- ...("jobCache" in buildConfig
4543
- ? (0, transformLegacyJobCache_1.transformLegacyJobCache)(buildConfig.jobCache)
4542
+ ...("jobCache" in configWithCache
4543
+ ? (0, transformLegacyJobCache_1.transformLegacyJobCache)(configWithCache.jobCache)
4544
4544
  : []),
4545
- ...(0, index_1.ensureArray)(buildConfig.cache).map((c) => ({
4546
- ...c,
4547
- context,
4548
- })),
4545
+ ...(0, index_1.ensureArray)(configWithCache.cache),
4549
4546
  ...(context.type === "workspace"
4550
4547
  ? // also add cache configs of the components of that workspace
4551
4548
  context.components.flatMap((componentContext) => {
@@ -6474,6 +6471,7 @@ exports.BASE_RETRY = {
6474
6471
 
6475
6472
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6476
6473
  exports.createDeployJob = exports.DEPLOY_JOB_NAME = void 0;
6474
+ const createJobCache_1 = __nccwpck_require__(10340);
6477
6475
  const docker_1 = __nccwpck_require__(9641);
6478
6476
  const sbom_1 = __nccwpck_require__(37038);
6479
6477
  const context_1 = __nccwpck_require__(61724);
@@ -6505,7 +6503,9 @@ const createDeployJob = (context, jobDefinition) => {
6505
6503
  name: exports.DEPLOY_JOB_NAME,
6506
6504
  script: jobDefinition.script,
6507
6505
  image: jobDefinition.image,
6508
- cache: jobDefinition.cache,
6506
+ cache: jobDefinition.cache
6507
+ ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, jobDefinition.cache)
6508
+ : undefined,
6509
6509
  artifacts: jobDefinition.artifacts,
6510
6510
  services: jobDefinition.services,
6511
6511
  envMode: "stagePerEnv", // makes it easier to run manual tasks er env
@@ -6904,13 +6904,13 @@ exports.getDeleteUnusedRevisionsCommands = getDeleteUnusedRevisionsCommands;
6904
6904
 
6905
6905
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6906
6906
  exports.getCreateScheduleScripts = exports.getJobCreateScripts = exports.getJobRunScripts = exports.getDeleteJobsScripts = exports.getDeleteSchedulesScripts = void 0;
6907
- const gitlab_1 = __nccwpck_require__(38490);
6908
6907
  const createArgsString_1 = __nccwpck_require__(49598);
6909
6908
  const jobName_1 = __nccwpck_require__(9626);
6910
6909
  const common_1 = __nccwpck_require__(73325);
6911
6910
  const getLabels_1 = __nccwpck_require__(30920);
6912
6911
  const volumes_1 = __nccwpck_require__(60847);
6913
6912
  const constants_1 = __nccwpck_require__(38865);
6913
+ const utils_1 = __nccwpck_require__(32497);
6914
6914
  const getJobRunScriptForJob = (context, jobName, wait) => {
6915
6915
  const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
6916
6916
  const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
@@ -6952,76 +6952,90 @@ const getJobRunScripts = (context, when) => {
6952
6952
  ["preStop", "postStop"].includes(when)));
6953
6953
  };
6954
6954
  exports.getJobRunScripts = getJobRunScripts;
6955
- const getJobCreateScripts = (context) => {
6956
- const jobsWithNames = getCloudRunJobsWithNames(context);
6957
- return jobsWithNames
6958
- .map(({ job, jobName }) => getJobCreateScriptsForJob(context, jobName, job))
6959
- .flat();
6960
- };
6961
- exports.getJobCreateScripts = getJobCreateScripts;
6962
- const getJobCreateScriptsForJob = (context, jobName, job) => {
6963
- const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
6964
- // due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
6965
- // lucky, update on the other hand accepts it... so let's just imediatly update it
6966
- // we cannot upsert a job, so we have to create it and catch the error and then update
6967
- const commandArray = Array.isArray(job.command)
6968
- ? job.command
6969
- : job.command.split(" ");
6955
+ const getJobCreateScripts = (context) => getCloudRunJobsWithNames(context).map(({ job: { command, image, cpu, memory = "512Mi", timeout = "10m", parallelism = 1, volumes, }, jobName, }, jobIndex) => {
6956
+ const commandArray = Array.isArray(command)
6957
+ ? command
6958
+ : command.split(" ");
6959
+ const { image: commonImage, project, region, ...deployArgs } = (0, common_1.getCommonDeployArgs)(context);
6970
6960
  const commonDeployArgsString = (0, createArgsString_1.createArgsString)({
6971
- command: '"' + commandArray.join(",") + '"',
6972
- ...commonDeployArgs,
6973
- labels: (0, common_1.makeLabelString)({
6974
- ...(0, getLabels_1.getLabels)(context),
6975
- "cloud-run-job-name": jobName.toString(),
6976
- }),
6977
- image: job.image || commonDeployArgs.image,
6978
- cpu: job === null || job === void 0 ? void 0 : job.cpu,
6979
- memory: job.memory || "512Mi",
6980
- "task-timeout": job.timeout || "10m",
6981
- parallelism: job.parallelism || 1,
6961
+ command: `"${commandArray.join(",")}"`,
6962
+ labels: `"${(0, common_1.makeLabelString)((0, getLabels_1.getLabels)(context))},cloud-run-job-name=$current_job_name"`,
6963
+ image: `"${image !== null && image !== void 0 ? image : commonImage}"`,
6964
+ project,
6965
+ region,
6966
+ cpu,
6967
+ memory,
6968
+ parallelism,
6969
+ "task-timeout": timeout,
6982
6970
  "env-vars-file": constants_1.ENV_VARS_FILENAME,
6983
6971
  "max-retries": 0,
6972
+ ...deployArgs,
6984
6973
  });
6985
- const requiresBeta = (job === null || job === void 0 ? void 0 : job.volumes) && Object.keys(job === null || job === void 0 ? void 0 : job.volumes).length > 0;
6986
- const argsString = `${jobName} ${commonDeployArgsString}`;
6974
+ // due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
6975
+ // lucky, update on the other hand accepts it... so let's just imediatly update it
6976
+ // we cannot upsert a job, so we have to create it and catch the error and then update
6977
+ const hasVolumes = Object.keys(volumes || {}).length > 0;
6978
+ const needsBeta = hasVolumes ? "beta" : undefined;
6979
+ const volumeArgs = hasVolumes
6980
+ ? (0, createArgsString_1.createArgsString)(...(0, volumes_1.createVolumeConfig)(volumes, "job"))
6981
+ : "";
6987
6982
  return [
6988
- ...(0, gitlab_1.allowFailureInScripts)([`${(0, common_1.gcloudRunCmd)()} jobs create ${argsString}`]),
6989
- `${(0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined)} jobs update ${argsString} ${(0, createArgsString_1.createArgsString)(...(0, volumes_1.createVolumeConfig)(job === null || job === void 0 ? void 0 : job.volumes, "job"))}`,
6990
- ];
6991
- };
6983
+ jobIndex === 0
6984
+ ? `exist_job_names="$(\n ${(0, common_1.gcloudRunCmd)()} jobs list --filter='metadata.name ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --project='${project}' --region='${region}'\n)"`
6985
+ : null,
6986
+ `current_job_name="${jobName}"`,
6987
+ 'if grep "$current_job_name" <<<"$exist_job_names" >/dev/null; then',
6988
+ ` ${(0, common_1.gcloudRunCmd)(needsBeta)} jobs update "$current_job_name" ${commonDeployArgsString} ${volumeArgs}`,
6989
+ "else",
6990
+ ` ${(0, common_1.gcloudRunCmd)()} jobs create "$current_job_name" ${commonDeployArgsString}`,
6991
+ "fi",
6992
+ ]
6993
+ .filter(utils_1.notNil)
6994
+ .join("\n");
6995
+ });
6996
+ exports.getJobCreateScripts = getJobCreateScripts;
6992
6997
  const getCreateScheduleScripts = (context) => {
6993
6998
  const jobsWithSchedule = getCloudRunJobsWithSchedule(context);
6994
- const deployConfig = (0, common_1.getCloudRunDeployConfig)(context);
6995
- return jobsWithSchedule
6996
- .map(({ job, jobName, schedulerName }) => {
6997
- var _a;
6999
+ const { region: location, projectId: project } = (0, common_1.getCloudRunDeployConfig)(context);
7000
+ const uriBase = `https://${location}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${project}/jobs`;
7001
+ const gcloudArgs = {
7002
+ project,
7003
+ location,
7004
+ uri: `"$current_job_uri"`,
7005
+ "http-method": "POST",
7006
+ "oauth-service-account-email": `"$GCLOUD_PROJECT_NUMBER-compute@developer.gserviceaccount.com"`,
7007
+ };
7008
+ return jobsWithSchedule.map(({ job: { maxRetryAttempts, schedule }, jobName, schedulerName }, jobIndex) => {
6998
7009
  const argsString = (0, createArgsString_1.createArgsString)({
6999
- project: deployConfig.projectId,
7000
- location: deployConfig.region,
7001
- schedule: `"${job.schedule}"`,
7002
- "max-retry-attempts": (_a = job.maxRetryAttempts) !== null && _a !== void 0 ? _a : 0,
7003
- uri: `"https://${deployConfig.region}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${deployConfig.projectId}/jobs/${jobName}:run"`,
7004
- "http-method": "POST",
7005
- "oauth-service-account-email": "$GCLOUD_PROJECT_NUMBER-compute@developer.gserviceaccount.com",
7010
+ ...gcloudArgs,
7011
+ schedule: `"${schedule}"`,
7012
+ "max-retry-attempts": maxRetryAttempts !== null && maxRetryAttempts !== void 0 ? maxRetryAttempts : 0,
7006
7013
  });
7007
- const commonArgs = `http ${schedulerName} ${argsString}`;
7008
7014
  return [
7009
- ...(0, gitlab_1.allowFailureInScripts)([
7010
- `${(0, common_1.gcloudSchedulerCmd)()} jobs create ${commonArgs}`,
7011
- ]),
7012
- `${(0, common_1.gcloudSchedulerCmd)()} jobs update ${commonArgs}`,
7013
- ];
7014
- })
7015
- .flat();
7015
+ jobIndex === 0
7016
+ ? `exist_scheduler_names="$(\n ${(0, common_1.gcloudSchedulerCmd)()} jobs list --filter='httpTarget.uri ~ ${context.env}.*${context.name}' --format='value(name)' --limit=999 --location='${location}' --project='${project}'\n)"`
7017
+ : null,
7018
+ `current_job_uri="${uriBase}/${jobName}:run"`,
7019
+ `current_scheduler_name="${schedulerName}"`,
7020
+ `if grep "$current_scheduler_name" <<<"$exist_scheduler_names" >/dev/null; then`,
7021
+ ` ${(0, common_1.gcloudSchedulerCmd)()} jobs update http "$current_scheduler_name" ${argsString}`,
7022
+ `else`,
7023
+ ` ${(0, common_1.gcloudSchedulerCmd)()} jobs create http "$current_scheduler_name" ${argsString}`,
7024
+ `fi`,
7025
+ ]
7026
+ .filter(utils_1.notNil)
7027
+ .join("\n");
7028
+ });
7016
7029
  };
7017
7030
  exports.getCreateScheduleScripts = getCreateScheduleScripts;
7018
7031
  const getCloudRunJobsWithSchedule = (context) => {
7019
7032
  const jobsWithNames = getCloudRunJobsWithNames(context);
7020
7033
  return jobsWithNames
7021
7034
  .filter((entry) => entry.job.when === "schedule")
7022
- .map(({ job, jobName }) => ({
7035
+ .map(({ job, jobName, jobKey }) => ({
7023
7036
  job,
7024
7037
  jobName,
7038
+ jobKey,
7025
7039
  schedulerName: jobName.concat("-scheduler"),
7026
7040
  }));
7027
7041
  };
@@ -7032,9 +7046,10 @@ const getCloudRunJobsWithNames = (context) => {
7032
7046
  const jobsWithNames = Object.entries((_a = deployConfig.jobs) !== null && _a !== void 0 ? _a : {})
7033
7047
  // filter out disabled jobs
7034
7048
  .filter((entry) => Boolean(entry[1]))
7035
- .map(([name, job]) => ({
7036
- jobName: getFullJobName(name),
7049
+ .map(([jobKey, job]) => ({
7050
+ jobName: getFullJobName(jobKey),
7037
7051
  job,
7052
+ jobKey,
7038
7053
  }));
7039
7054
  return jobsWithNames;
7040
7055
  };
@@ -7635,13 +7650,14 @@ exports.getFullDbName = getFullDbName;
7635
7650
 
7636
7651
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7637
7652
  exports.createCustomDeployJobs = void 0;
7653
+ const getAllCacheConfigsFromConfig_1 = __nccwpck_require__(30673);
7638
7654
  const yarn_1 = __nccwpck_require__(45043);
7639
7655
  const runner_1 = __nccwpck_require__(4058);
7640
7656
  const base_1 = __nccwpck_require__(84052);
7641
7657
  const sbom_1 = __nccwpck_require__(44986);
7642
7658
  const types_1 = __nccwpck_require__(75781);
7643
7659
  const createCustomDeployJobs = (context) => {
7644
- var _a, _b, _c, _d;
7660
+ var _a, _b, _c;
7645
7661
  const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
7646
7662
  if (!(0, types_1.isOfDeployType)(deployConfig, "custom")) {
7647
7663
  // should not happen
@@ -7651,10 +7667,10 @@ const createCustomDeployJobs = (context) => {
7651
7667
  const yarnInstall = (0, yarn_1.getYarnInstall)(context, {
7652
7668
  noCustomPostInstall: true,
7653
7669
  });
7654
- return (0, base_1.createDeployementJobs)(context, {
7670
+ const result = (0, base_1.createDeployementJobs)(context, {
7655
7671
  deploy: {
7656
7672
  image: (_b = deployConfig.jobImage) !== null && _b !== void 0 ? _b : (0, runner_1.getRunnerImage)("jobs-default"),
7657
- cache: (_c = deployConfig.jobCache) !== null && _c !== void 0 ? _c : [],
7673
+ cache: (0, getAllCacheConfigsFromConfig_1.getAllCacheConfigsFromConfig)(context, deployConfig),
7658
7674
  script: [
7659
7675
  `cd ${context.build.dir}`,
7660
7676
  ...(deployConfig.requiresYarnInstall ? yarnInstall : []),
@@ -7665,7 +7681,7 @@ const createCustomDeployJobs = (context) => {
7665
7681
  },
7666
7682
  stop: deployConfig.stopScript
7667
7683
  ? {
7668
- image: (_d = deployConfig.jobImage) !== null && _d !== void 0 ? _d : (0, runner_1.getRunnerImage)("jobs-default"),
7684
+ image: (_c = deployConfig.jobImage) !== null && _c !== void 0 ? _c : (0, runner_1.getRunnerImage)("jobs-default"),
7669
7685
  script: [
7670
7686
  ...deployConfig.stopScript,
7671
7687
  ...(0, sbom_1.getDependencyTrackDeleteScript)(context),
@@ -7674,6 +7690,7 @@ const createCustomDeployJobs = (context) => {
7674
7690
  }
7675
7691
  : undefined,
7676
7692
  });
7693
+ return result;
7677
7694
  };
7678
7695
  exports.createCustomDeployJobs = createCustomDeployJobs;
7679
7696
  //# sourceMappingURL=deployJob.js.map
@@ -1,5 +1,4 @@
1
1
  import type { BuildContextStandalone, ComponentContext, WorkspaceContext } from "../..";
2
- import type { JobDefintion } from "../../types/jobDefinition";
2
+ import type { AppBuildJobDefinition } from "../../types/jobDefinition";
3
3
  import type { CatladderJob } from "../../types/jobs";
4
- export type AppBuildJobDefinition = JobDefintion;
5
4
  export declare const createAppBuildJob: (context: ComponentContext<BuildContextStandalone> | WorkspaceContext, { script, variables, runnerVariables, cache, ...def }: AppBuildJobDefinition) => CatladderJob;
@@ -1 +1 @@
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"}
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;AAEhB,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"}
@@ -1,7 +1,6 @@
1
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"> & {
2
+ import type { AppBuildJobDefinition, Context } from "../../types";
3
+ export declare const createBuildJobDefinition: (context: Context, buildConfig: BuildConfigStandalone | WorkspaceBuildConfig, customize?: Pick<AppBuildJobDefinition, "cache"> & {
5
4
  prescript?: string[];
6
5
  postscript?: string[];
7
- }) => JobDefintion | undefined;
6
+ }) => AppBuildJobDefinition | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"createBuildJobDefinition.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createBuildJobDefinition.ts"],"names":[],"mappings":";;;AACA,yCAA8C;AAG9C,uCAA0C;AAC1C,wFAAqF;AACrF,iDAAgE;AAEzD,MAAM,wBAAwB,GAAG,CACtC,OAAgB,EAChB,WAAyD,EACzD,YAGI,EAAE,EACoB,EAAE;;IAC5B,IAAI,WAAW,CAAC,YAAY,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAExD,MAAM,YAAY,GAAG,IAAA,uBAAc,EAAC,cAAc,CAAC,CAAC;IAEpD,OAAO;QACL,KAAK,EAAE,MAAA,WAAW,CAAC,QAAQ,mCAAI,YAAY;QAC3C,eAAe,EAAE,uCAA2B;QAC5C,KAAK,EAAE;YACL,GAAG,CAAC,MAAA,SAAS,CAAC,KAAK,mCAAI,EAAE,CAAC;YAC1B,GAAG,IAAA,2DAA4B,EAAC,OAAO,EAAE,WAAW,CAAC;SACtD;QACD,QAAQ,EACN,aAAa,IAAI,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;QACpE,MAAM,EAAE;YACN,GAAG,CAAC,MAAA,SAAS,CAAC,SAAS,mCAAI,EAAE,CAAC;YAC9B,GAAG,IAAA,mBAAW,EAAC,WAAW,CAAC,YAAY,CAAC;YACxC,GAAG,CAAC,MAAA,SAAS,CAAC,UAAU,mCAAI,EAAE,CAAC;SAChC;QAED,OAAO,EAAE,WAAW,CAAC,OAAO;KAC7B,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,wBAAwB,4BA6BnC"}
1
+ {"version":3,"file":"createBuildJobDefinition.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createBuildJobDefinition.ts"],"names":[],"mappings":";;;AACA,yCAA8C;AAE9C,uCAA0C;AAC1C,wFAAqF;AACrF,iDAAgE;AAEzD,MAAM,wBAAwB,GAAG,CACtC,OAAgB,EAChB,WAAyD,EACzD,YAGI,EAAE,EAC6B,EAAE;;IACrC,IAAI,WAAW,CAAC,YAAY,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAExD,MAAM,YAAY,GAAG,IAAA,uBAAc,EAAC,cAAc,CAAC,CAAC;IAEpD,OAAO;QACL,KAAK,EAAE,MAAA,WAAW,CAAC,QAAQ,mCAAI,YAAY;QAC3C,eAAe,EAAE,uCAA2B;QAC5C,KAAK,EAAE;YACL,GAAG,CAAC,MAAA,SAAS,CAAC,KAAK,mCAAI,EAAE,CAAC;YAC1B,GAAG,IAAA,2DAA4B,EAAC,OAAO,EAAE,WAAW,CAAC;SACtD;QACD,QAAQ,EACN,aAAa,IAAI,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;QACpE,MAAM,EAAE;YACN,GAAG,CAAC,MAAA,SAAS,CAAC,SAAS,mCAAI,EAAE,CAAC;YAC9B,GAAG,IAAA,mBAAW,EAAC,WAAW,CAAC,YAAY,CAAC;YACxC,GAAG,CAAC,MAAA,SAAS,CAAC,UAAU,mCAAI,EAAE,CAAC;SAChC;QAED,OAAO,EAAE,WAAW,CAAC,OAAO;KAC7B,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,wBAAwB,4BA6BnC"}