@catladder/cli 0.0.0-fix-add-missing-openssl-to-node-deploy-docker-4c13843a → 0.0.0-fix-docs-build-55bf5d63

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 (84) hide show
  1. package/dist/bundles/catenv/index.js +182 -40
  2. package/dist/bundles/cli/index.js +202 -61
  3. package/dist/cli/src/apps/cli/commands/project/commandSetup.js +5 -3
  4. package/dist/cli/src/apps/cli/commands/project/commandSetup.js.map +1 -1
  5. package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +1 -1
  6. package/dist/cli/src/apps/cli/commands/project/setup/index.js +6 -17
  7. package/dist/cli/src/apps/cli/commands/project/setup/index.js.map +1 -1
  8. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +1 -0
  9. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +9 -1
  10. package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js.map +1 -1
  11. package/dist/cli/src/config/getProjectConfig.d.ts +1 -1
  12. package/dist/cli/src/config/getProjectConfig.js +7 -1
  13. package/dist/cli/src/config/getProjectConfig.js.map +1 -1
  14. package/dist/cli/src/utils/gitlab.js +1 -0
  15. package/dist/cli/src/utils/gitlab.js.map +1 -1
  16. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +3 -1
  17. package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
  18. package/dist/pipeline/src/build/base/index.d.ts +2 -3
  19. package/dist/pipeline/src/build/base/index.js.map +1 -1
  20. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +6 -4
  21. package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js.map +1 -1
  22. package/dist/pipeline/src/build/custom/buildJob.d.ts +2 -2
  23. package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
  24. package/dist/pipeline/src/build/custom/index.d.ts +2 -2
  25. package/dist/pipeline/src/build/custom/index.js.map +1 -1
  26. package/dist/pipeline/src/build/custom/testJob.d.ts +2 -2
  27. package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
  28. package/dist/pipeline/src/build/docker.d.ts +4 -4
  29. package/dist/pipeline/src/build/docker.js.map +1 -1
  30. package/dist/pipeline/src/build/index.d.ts +2 -2
  31. package/dist/pipeline/src/build/index.js +2 -2
  32. package/dist/pipeline/src/build/index.js.map +1 -1
  33. package/dist/pipeline/src/build/node/buildJob.d.ts +5 -3
  34. package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
  35. package/dist/pipeline/src/build/node/index.d.ts +4 -4
  36. package/dist/pipeline/src/build/node/index.js.map +1 -1
  37. package/dist/pipeline/src/build/node/meteor.d.ts +2 -2
  38. package/dist/pipeline/src/build/node/meteor.js.map +1 -1
  39. package/dist/pipeline/src/build/node/yarn.d.ts +1 -1
  40. package/dist/pipeline/src/build/node/yarn.js +3 -1
  41. package/dist/pipeline/src/build/node/yarn.js.map +1 -1
  42. package/dist/pipeline/src/build/rails/build.d.ts +2 -2
  43. package/dist/pipeline/src/build/rails/build.js.map +1 -1
  44. package/dist/pipeline/src/build/rails/index.d.ts +2 -2
  45. package/dist/pipeline/src/build/rails/index.js.map +1 -1
  46. package/dist/pipeline/src/build/sbom.d.ts +2 -2
  47. package/dist/pipeline/src/build/sbom.js.map +1 -1
  48. package/dist/pipeline/src/context/createComponentContext.js +17 -6
  49. package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
  50. package/dist/pipeline/src/context/getLabels.js +3 -1
  51. package/dist/pipeline/src/context/getLabels.js.map +1 -1
  52. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +2 -2
  53. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
  54. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +32 -7
  55. package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
  56. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +1 -2
  57. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +3 -10
  58. package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js.map +1 -1
  59. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +5 -0
  60. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +51 -0
  61. package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js.map +1 -0
  62. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +2 -0
  63. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +12 -0
  64. package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js.map +1 -0
  65. package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +2 -2
  66. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +3 -1
  67. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
  68. package/dist/pipeline/src/deploy/sbom.js +4 -3
  69. package/dist/pipeline/src/deploy/sbom.js.map +1 -1
  70. package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +90 -0
  71. package/dist/pipeline/src/deploy/types/googleCloudRun.js +16 -0
  72. package/dist/pipeline/src/deploy/types/googleCloudRun.js.map +1 -1
  73. package/dist/pipeline/src/pipeline/createJobsForComponent.js +3 -1
  74. package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
  75. package/dist/pipeline/src/types/config.d.ts +1 -1
  76. package/dist/pipeline/src/types/context.d.ts +6 -1
  77. package/dist/pipeline/src/types/context.js.map +1 -1
  78. package/dist/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +1 -1
  80. package/src/apps/cli/commands/project/commandSetup.ts +5 -3
  81. package/src/apps/cli/commands/project/setup/index.ts +9 -19
  82. package/src/apps/cli/commands/project/utils/autocompletions.ts +9 -0
  83. package/src/config/getProjectConfig.ts +12 -1
  84. package/src/utils/gitlab.ts +1 -0
@@ -330,9 +330,15 @@ const getAllComponentsWithAllEnvsHierarchical = async () => {
330
330
  ]));
331
331
  };
332
332
  exports.getAllComponentsWithAllEnvsHierarchical = getAllComponentsWithAllEnvsHierarchical;
333
- const getAllPipelineContexts = async () => {
333
+ const getAllPipelineContexts = async (onlyComponent) => {
334
+ const onlyComponentsArray = onlyComponent
335
+ ? Array.isArray(onlyComponent)
336
+ ? onlyComponent
337
+ : [onlyComponent]
338
+ : null;
334
339
  return Promise.all((await (0, exports.getAllComponentsWithAllEnvsFlat)())
335
340
  .filter((c) => c.env !== "local")
341
+ .filter((c) => !onlyComponentsArray || onlyComponentsArray.includes(c.componentName))
336
342
  .map(({ env, componentName }) => (0, exports.getPipelineContextByChoice)(env, componentName)));
337
343
  };
338
344
  exports.getAllPipelineContexts = getAllPipelineContexts;
@@ -522,6 +528,7 @@ const setupGitlabToken = async (vorpal) => {
522
528
  vorpal.log("");
523
529
  vorpal.log("☝ in order to access the api, we need a personal access token");
524
530
  vorpal.log("Its best to create one specifically for catladder");
531
+ vorpal.log("Scopes needed: api");
525
532
  vorpal.log("");
526
533
  vorpal.log("☝ we open up the settings page for you!");
527
534
  vorpal.log("");
@@ -1226,7 +1233,9 @@ exports.createBuildJobArtifacts = createBuildJobArtifacts;
1226
1233
  const getArtifactsPathForComponent = (c, additionalPaths) => {
1227
1234
  var _a, _b;
1228
1235
  return (_b = [
1229
- ...((_a = c.build.config.artifactsPaths) !== null && _a !== void 0 ? _a : []),
1236
+ ...(c.build.type !== "disabled"
1237
+ ? ((_a = c.build.config.artifactsPaths) !== null && _a !== void 0 ? _a : [])
1238
+ : []),
1230
1239
  ...(additionalPaths !== null && additionalPaths !== void 0 ? additionalPaths : []),
1231
1240
  ]) === null || _b === void 0 ? void 0 : _b.flatMap((artifact) => c.build
1232
1241
  // in theory, we only need "direct",
@@ -1602,10 +1611,12 @@ const getAllCacheConfigsFromConfig = (context, configWithCache) => {
1602
1611
  // we would probably need to introduce a path to the right config property (build-->test or so)
1603
1612
  context.components.flatMap((componentContext) => {
1604
1613
  var _a;
1605
- return (_a = (0, index_1.ensureArray)(componentContext.build.config.cache).map((c) => ({
1606
- ...c,
1607
- baseDir: componentContext.build.dir,
1608
- }))) !== null && _a !== void 0 ? _a : [];
1614
+ return componentContext.build.type !== "disabled"
1615
+ ? ((_a = (0, index_1.ensureArray)(componentContext.build.config.cache).map((c) => ({
1616
+ ...c,
1617
+ baseDir: componentContext.build.dir,
1618
+ }))) !== null && _a !== void 0 ? _a : [])
1619
+ : [];
1609
1620
  })
1610
1621
  : []),
1611
1622
  ];
@@ -1998,8 +2009,8 @@ exports.BUILD_TYPES = {
1998
2009
  defaults: () => ({
1999
2010
  startCommand: "/cnb/process/web",
2000
2011
  cnbBuilder: {
2001
- image: "heroku/builder:22",
2002
- packVersion: "0.32.1",
2012
+ image: "heroku/builder:24",
2013
+ packVersion: "0.36.4",
2003
2014
  },
2004
2015
  }),
2005
2016
  },
@@ -2373,7 +2384,9 @@ const ensureNodeVersion = (context) => (0, gitlab_1.collapseableSection)("nodein
2373
2384
  ]);
2374
2385
  exports.ensureNodeVersion = ensureNodeVersion;
2375
2386
  const getYarnInstall = (context, options) => {
2376
- const postInstall = context.type !== "workspace" && "postInstall" in context.build.config
2387
+ const postInstall = context.type !== "workspace" &&
2388
+ context.build.type !== "disabled" &&
2389
+ "postInstall" in context.build.config
2377
2390
  ? context.build.config.postInstall
2378
2391
  : null;
2379
2392
  return [
@@ -2831,19 +2844,23 @@ const createComponentContext = async (ctx) => {
2831
2844
  const packageManagerInfo = await (0, packageManager_1.getPackageManagerInfoForComponent)(ctx.config, ctx.componentName);
2832
2845
  const envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
2833
2846
  const componentConfigWithoutDefaults = envContext.envConfigRaw;
2834
- const resolvedBuildType = (0, build_1.isStandaloneBuildConfig)(componentConfigWithoutDefaults.build)
2835
- ? componentConfigWithoutDefaults.build.type
2836
- : (_a = ctx.config.builds) === null || _a === void 0 ? void 0 : _a[componentConfigWithoutDefaults.build.from].type;
2837
- if (!resolvedBuildType) {
2847
+ const resolvedBuildType = componentConfigWithoutDefaults.build === false
2848
+ ? false
2849
+ : (0, build_1.isStandaloneBuildConfig)(componentConfigWithoutDefaults.build)
2850
+ ? componentConfigWithoutDefaults.build.type
2851
+ : (_a = ctx.config.builds) === null || _a === void 0 ? void 0 : _a[componentConfigWithoutDefaults.build.from].type;
2852
+ if (resolvedBuildType === undefined) {
2838
2853
  throw new Error("build type not found, is the build config correct?");
2839
2854
  }
2840
2855
  const defaults = componentConfigWithoutDefaults.deploy
2841
2856
  ? {
2842
- build: build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
2857
+ build: resolvedBuildType &&
2858
+ build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
2843
2859
  deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
2844
2860
  }
2845
2861
  : {
2846
- build: build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
2862
+ build: resolvedBuildType &&
2863
+ build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
2847
2864
  deploy: {},
2848
2865
  };
2849
2866
  const componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
@@ -2861,6 +2878,13 @@ const createComponentContext = async (ctx) => {
2861
2878
  };
2862
2879
  const _getBuildContext = () => {
2863
2880
  var _a;
2881
+ if (build === false) {
2882
+ return {
2883
+ type: "disabled",
2884
+ getComponentDirs,
2885
+ dir,
2886
+ };
2887
+ }
2864
2888
  if ((0, build_1.isStandaloneBuildConfig)(build)) {
2865
2889
  return {
2866
2890
  dir: dir,
@@ -3277,7 +3301,9 @@ const getLabels = (context) => {
3277
3301
  "app-name": sanitize(context.fullConfig.appName),
3278
3302
  "env-type": sanitize(context.environment.envType),
3279
3303
  "env-name": sanitize(context.env),
3280
- "build-type": sanitize(context.build.buildType),
3304
+ "build-type": context.build.type === "disabled"
3305
+ ? "disabled"
3306
+ : sanitize(context.build.buildType),
3281
3307
  ...((_b = (_a = context.fullConfig.meta) === null || _a === void 0 ? void 0 : _a.labels) !== null && _b !== void 0 ? _b : {}),
3282
3308
  };
3283
3309
  return labels;
@@ -3871,7 +3897,7 @@ const jobName_1 = __nccwpck_require__(9626);
3871
3897
  const common_1 = __nccwpck_require__(3325);
3872
3898
  const constants_1 = __nccwpck_require__(8865);
3873
3899
  const volumes_1 = __nccwpck_require__(847);
3874
- const onDeploy_1 = __nccwpck_require__(2358);
3900
+ const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
3875
3901
  const getDeleteJobsScripts = (context) => {
3876
3902
  const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
3877
3903
  const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
@@ -3891,7 +3917,7 @@ const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(c
3891
3917
  const { image: commonImage, project, region, ...deployArgs } = (0, common_1.getCommonDeployArgs)(context);
3892
3918
  const commonDeployArgsString = (0, createArgsString_1.createArgsString)({
3893
3919
  command: `"${commandArray.join(",")}"`,
3894
- args: (0, onDeploy_1.getCloudRunJobArgsArg)(job.args),
3920
+ args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(job.args),
3895
3921
  labels: `"${(0, common_1.makeLabelString)((0, getLabels_1.getLabels)(context))},cloud-run-job-name=$current_job_name"`,
3896
3922
  image: `"${(_a = job.image) !== null && _a !== void 0 ? _a : commonImage}"`,
3897
3923
  project,
@@ -3951,17 +3977,21 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
3951
3977
  exports.getServiceDeleteScript = exports.getServiceDeployScript = void 0;
3952
3978
  const getLabels_1 = __nccwpck_require__(920);
3953
3979
  const createArgsString_1 = __nccwpck_require__(9598);
3980
+ const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
3954
3981
  const getServiceName_1 = __nccwpck_require__(8128);
3955
3982
  const common_1 = __nccwpck_require__(3325);
3956
3983
  const constants_1 = __nccwpck_require__(8865);
3984
+ const healthCheck_1 = __nccwpck_require__(193);
3957
3985
  const volumes_1 = __nccwpck_require__(847);
3958
3986
  const getServiceDeployScript = (context, service, nameSuffix) => {
3959
- var _a, _b, _c, _d, _e;
3987
+ var _a, _b, _c, _d, _e, _f;
3960
3988
  const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
3961
3989
  const serviceName = (0, getServiceName_1.getServiceName)(context);
3962
3990
  const customConfig = service !== true ? service : undefined;
3963
3991
  const command = service !== true
3964
- ? ((_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.build.config.startCommand)
3992
+ ? ((_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : (context.build.type !== "disabled"
3993
+ ? context.build.config.startCommand
3994
+ : undefined))
3965
3995
  : undefined;
3966
3996
  const commandArray = command
3967
3997
  ? Array.isArray(command)
@@ -3972,14 +4002,16 @@ const getServiceDeployScript = (context, service, nameSuffix) => {
3972
4002
  const argsString = (0, createArgsString_1.createArgsString)({
3973
4003
  // command as empty string resets it to default (uses the image's entrypoint)
3974
4004
  command: commandArray ? '"' + commandArray.join(",") + '"' : '""',
4005
+ args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.args),
3975
4006
  ...commonDeployArgs,
4007
+ image: (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.image) !== null && _b !== void 0 ? _b : commonDeployArgs.image,
3976
4008
  labels: (0, common_1.makeLabelString)({
3977
4009
  ...(0, getLabels_1.getLabels)(context),
3978
4010
  "cloud-run-service-name": fullServiceName,
3979
4011
  }),
3980
4012
  "env-vars-file": constants_1.ENV_VARS_FILENAME,
3981
- "min-instances": (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _b !== void 0 ? _b : 0,
3982
- "max-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _c !== void 0 ? _c : 100,
4013
+ "min-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _c !== void 0 ? _c : 0,
4014
+ "max-instances": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _d !== void 0 ? _d : 100,
3983
4015
  "cpu-throttling": (customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling) !== true,
3984
4016
  cpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.cpu,
3985
4017
  memory: customConfig === null || customConfig === void 0 ? void 0 : customConfig.memory,
@@ -3989,12 +4021,16 @@ const getServiceDeployScript = (context, service, nameSuffix) => {
3989
4021
  network: customConfig === null || customConfig === void 0 ? void 0 : customConfig.network,
3990
4022
  subnet: customConfig === null || customConfig === void 0 ? void 0 : customConfig.subnet,
3991
4023
  "use-http2": customConfig === null || customConfig === void 0 ? void 0 : customConfig.http2,
3992
- "allow-unauthenticated": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _d !== void 0 ? _d : true,
3993
- ingress: (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _e !== void 0 ? _e : "all",
4024
+ "allow-unauthenticated": (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _e !== void 0 ? _e : true,
4025
+ ingress: (_f = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _f !== void 0 ? _f : "all",
3994
4026
  "cpu-boost": true,
3995
4027
  "execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment,
4028
+ gpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.gpu,
4029
+ "gpu-type": customConfig === null || customConfig === void 0 ? void 0 : customConfig.gpuType,
4030
+ ...(0, healthCheck_1.healthCheckCliArgs)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.healthCheck),
3996
4031
  }, ...(0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service"));
3997
- return `${(0, common_1.gcloudRunCmd)()} deploy ${fullServiceName} ${argsString}`;
4032
+ const version = requiresBeta(customConfig) ? "beta" : undefined;
4033
+ return `${(0, common_1.gcloudRunCmd)(version)} deploy ${fullServiceName} ${argsString}`;
3998
4034
  };
3999
4035
  exports.getServiceDeployScript = getServiceDeployScript;
4000
4036
  const getServiceDeleteScript = (context, serviceSuffix) => {
@@ -4009,6 +4045,21 @@ const getServiceDeleteScript = (context, serviceSuffix) => {
4009
4045
  ];
4010
4046
  };
4011
4047
  exports.getServiceDeleteScript = getServiceDeleteScript;
4048
+ const requiresBeta = (config) => {
4049
+ if (!config) {
4050
+ return false;
4051
+ }
4052
+ if (config.gpuType) {
4053
+ return true;
4054
+ }
4055
+ if (config.gpu && config.gpu > 0) {
4056
+ return true;
4057
+ }
4058
+ if (config.healthCheck !== undefined) {
4059
+ return true;
4060
+ }
4061
+ return false;
4062
+ };
4012
4063
  //# sourceMappingURL=cloudRunServices.js.map
4013
4064
 
4014
4065
  /***/ }),
@@ -4095,8 +4146,9 @@ exports.ENV_VARS_FILENAME = "____envvars.yaml";
4095
4146
  "use strict";
4096
4147
 
4097
4148
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4098
- exports.getCloudRunJobArgsArg = exports.getOnDeployExecuteScript = void 0;
4149
+ exports.getOnDeployExecuteScript = void 0;
4099
4150
  const createArgsString_1 = __nccwpck_require__(9598);
4151
+ const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
4100
4152
  const jobName_1 = __nccwpck_require__(9626);
4101
4153
  const cloudRunJobs_1 = __nccwpck_require__(1224);
4102
4154
  const common_1 = __nccwpck_require__(3325);
@@ -4164,19 +4216,11 @@ const getJobRunScriptForExecute = (context, { jobName, config }) => {
4164
4216
  const argString = (0, createArgsString_1.createArgsString)({
4165
4217
  ...commonArgs,
4166
4218
  wait: waitForCompletion === true ? true : undefined,
4167
- args: (0, exports.getCloudRunJobArgsArg)(config.args),
4219
+ args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(config.args),
4168
4220
  });
4169
4221
  const fullJobName = (0, jobName_1.getFullJobName)(context, jobName);
4170
4222
  return `${(0, common_1.gcloudRunCmd)()} jobs execute ${fullJobName.toString()} ${argString}`;
4171
4223
  };
4172
- const getCloudRunJobArgsArg = (args) => {
4173
- return args !== undefined
4174
- ? args.length > 0
4175
- ? args === null || args === void 0 ? void 0 : args.map((arg) => `"${arg}"`).join(",")
4176
- : ""
4177
- : undefined;
4178
- };
4179
- exports.getCloudRunJobArgsArg = getCloudRunJobArgsArg;
4180
4224
  //# sourceMappingURL=onDeploy.js.map
4181
4225
 
4182
4226
  /***/ }),
@@ -4416,6 +4460,64 @@ exports.getCloudRunStopScripts = getCloudRunStopScripts;
4416
4460
 
4417
4461
  /***/ }),
4418
4462
 
4463
+ /***/ 193:
4464
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4465
+
4466
+ "use strict";
4467
+
4468
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4469
+ exports.healthCheckCliArgs = void 0;
4470
+ const types_1 = __nccwpck_require__(5781);
4471
+ const PORT = 8080;
4472
+ function healthCheckCliArgs(healthCheck) {
4473
+ const shouldNotSetHealthCheck = healthCheck === undefined;
4474
+ if (shouldNotSetHealthCheck) {
4475
+ return undefined;
4476
+ }
4477
+ const shouldUseDefaultProbe = healthCheck === true;
4478
+ if (shouldUseDefaultProbe) {
4479
+ return {
4480
+ "startup-probe": toArgValue(probeToKeyValuePairs(types_1.defaultStartupProbe)),
4481
+ "liveness-probe": toArgValue(probeToKeyValuePairs(types_1.defaultLivenessProbe)),
4482
+ };
4483
+ }
4484
+ return {
4485
+ "startup-probe": toArgValue(probeToKeyValuePairs(healthCheck.startupProbe)),
4486
+ "liveness-probe": healthCheck.livenessProbe
4487
+ ? toArgValue(probeToKeyValuePairs(healthCheck.livenessProbe))
4488
+ : "", // NOTE: empty string ("") removes liveness probe
4489
+ };
4490
+ }
4491
+ exports.healthCheckCliArgs = healthCheckCliArgs;
4492
+ function probeToKeyValuePairs(probe) {
4493
+ const sharedArgs = Object.entries({
4494
+ initialDelaySeconds: probe.initialDelaySeconds,
4495
+ timeoutSeconds: probe.timeoutSeconds,
4496
+ periodSeconds: probe.periodSeconds,
4497
+ failureThreshold: probe.failureThreshold,
4498
+ });
4499
+ switch (probe.type) {
4500
+ case "tcp":
4501
+ return [...sharedArgs, ["tcpSocket.port", PORT]];
4502
+ case "http1":
4503
+ return [
4504
+ ...sharedArgs,
4505
+ ["httpGet.port", PORT],
4506
+ ["httpGet.path", probe.path],
4507
+ // NOTE: headers are not supported by "gcloud beta" at the moment
4508
+ ];
4509
+ default:
4510
+ probe;
4511
+ return [];
4512
+ }
4513
+ }
4514
+ function toArgValue(keyValues) {
4515
+ return keyValues.map(([key, value]) => `${key}=${value}`).join(",");
4516
+ }
4517
+ //# sourceMappingURL=healthCheck.js.map
4518
+
4519
+ /***/ }),
4520
+
4419
4521
  /***/ 4069:
4420
4522
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4421
4523
 
@@ -4721,6 +4823,25 @@ exports.gcloudServiceAccountLoginCommands = gcloudServiceAccountLoginCommands;
4721
4823
 
4722
4824
  /***/ }),
4723
4825
 
4826
+ /***/ 1741:
4827
+ /***/ ((__unused_webpack_module, exports) => {
4828
+
4829
+ "use strict";
4830
+
4831
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4832
+ exports.getCloudRunServiceOrJobArgsArg = void 0;
4833
+ const getCloudRunServiceOrJobArgsArg = (args) => {
4834
+ return args !== undefined
4835
+ ? args.length > 0
4836
+ ? args === null || args === void 0 ? void 0 : args.map((arg) => `"${arg}"`).join(",")
4837
+ : ""
4838
+ : undefined;
4839
+ };
4840
+ exports.getCloudRunServiceOrJobArgsArg = getCloudRunServiceOrJobArgsArg;
4841
+ //# sourceMappingURL=getJobOrServiceArgs.js.map
4842
+
4843
+ /***/ }),
4844
+
4724
4845
  /***/ 8128:
4725
4846
  /***/ ((__unused_webpack_module, exports) => {
4726
4847
 
@@ -5263,7 +5384,9 @@ const createAppConfig = (context, application) => {
5263
5384
  const { healthRoute, command, ...rest } = application !== null && application !== void 0 ? application : {};
5264
5385
  return (0, utils_1.mergeWithMergingArrays)({
5265
5386
  host: context.environment.envVars.HOSTNAME,
5266
- command: command !== null && command !== void 0 ? command : context.build.config.startCommand,
5387
+ command: command !== null && command !== void 0 ? command : (context.build.type !== "disabled"
5388
+ ? context.build.config.startCommand
5389
+ : undefined),
5267
5390
  livenessProbe: {
5268
5391
  httpGet: {
5269
5392
  path: healthRoute !== null && healthRoute !== void 0 ? healthRoute : "__health",
@@ -5443,9 +5566,10 @@ exports.getDependencyTrackDeleteScript = exports.getDependencyTrackUploadScript
5443
5566
  const BashExpression_1 = __nccwpck_require__(2376);
5444
5567
  const sbom_1 = __nccwpck_require__(7038);
5445
5568
  const context_1 = __nccwpck_require__(1724);
5446
- const sbomDeactivated = (context) => (0, context_1.componentContextIsStandaloneBuild)(context) &&
5447
- context.build.config.type === "custom" &&
5448
- context.build.config.sbom === false;
5569
+ const sbomDeactivated = (context) => context.build.type === "disabled" ||
5570
+ ((0, context_1.componentContextIsStandaloneBuild)(context) &&
5571
+ context.build.config.type === "custom" &&
5572
+ context.build.config.sbom === false);
5449
5573
  exports.sbomDeactivated = sbomDeactivated;
5450
5574
  const getDependencyTrackUploadScript = (context) => {
5451
5575
  return (0, exports.sbomDeactivated)(context)
@@ -5495,6 +5619,22 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
5495
5619
  "use strict";
5496
5620
 
5497
5621
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5622
+ exports.defaultLivenessProbe = exports.defaultStartupProbe = void 0;
5623
+ exports.defaultStartupProbe = {
5624
+ type: "http1",
5625
+ path: "/__health",
5626
+ initialDelaySeconds: 5,
5627
+ timeoutSeconds: 1,
5628
+ periodSeconds: 30,
5629
+ failureThreshold: 3,
5630
+ };
5631
+ exports.defaultLivenessProbe = {
5632
+ ...exports.defaultStartupProbe,
5633
+ initialDelaySeconds: 0,
5634
+ timeoutSeconds: 10,
5635
+ periodSeconds: 30,
5636
+ failureThreshold: 3,
5637
+ };
5498
5638
  //# sourceMappingURL=googleCloudRun.js.map
5499
5639
 
5500
5640
  /***/ }),
@@ -5738,7 +5878,9 @@ const getCustomJobs = (context) => {
5738
5878
  return injectDefaultVarsInCustomJobs(context, rawJobs);
5739
5879
  };
5740
5880
  const createJobsForComponentContext = (context) => {
5741
- const buildJobs = build_1.BUILD_TYPES[context.build.buildType].jobs(context);
5881
+ const buildJobs = context.build.type !== "disabled"
5882
+ ? build_1.BUILD_TYPES[context.build.buildType].jobs(context)
5883
+ : [];
5742
5884
  const deployJobs = context.componentConfig.deploy !== false
5743
5885
  ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context)
5744
5886
  : [];