@catladder/pipeline 1.144.1 → 1.145.0

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 (307) hide show
  1. package/dist/bash/BashExpression.d.ts +40 -0
  2. package/dist/bash/BashExpression.js +124 -0
  3. package/dist/bash/bashExpressionPerPipelineType.d.ts +6 -0
  4. package/dist/bash/bashExpressionPerPipelineType.js +11 -0
  5. package/dist/bash/bashYaml.d.ts +10 -0
  6. package/dist/bash/bashYaml.js +46 -0
  7. package/dist/bash/getInjectVarsScript.d.ts +2 -0
  8. package/dist/bash/getInjectVarsScript.js +45 -0
  9. package/dist/bash/replaceAsync.d.ts +2 -0
  10. package/dist/{pipeline/commitInfo/getCommitInfo.js → bash/replaceAsync.js} +49 -21
  11. package/dist/build/base/__tests__/createArtifactsConfig.test.js +3 -1
  12. package/dist/build/base/constants.js +3 -1
  13. package/dist/build/base/createAppBuildJob.d.ts +2 -1
  14. package/dist/build/base/createAppBuildJob.js +10 -6
  15. package/dist/build/base/createArtifactsConfig.d.ts +1 -1
  16. package/dist/build/base/createArtifactsConfig.js +3 -1
  17. package/dist/build/base/index.js +3 -1
  18. package/dist/build/base/writeBuildInfo.js +4 -3
  19. package/dist/build/base/writeDotEnv.js +12 -3
  20. package/dist/build/custom/__tests__/testJob.test.js +3 -1
  21. package/dist/build/custom/buildJob.js +4 -12
  22. package/dist/build/custom/index.js +3 -1
  23. package/dist/build/custom/testJob.d.ts +1 -1
  24. package/dist/build/custom/testJob.js +18 -14
  25. package/dist/build/docker.d.ts +5 -31
  26. package/dist/build/docker.js +16 -9
  27. package/dist/build/index.d.ts +1 -1
  28. package/dist/build/index.js +13 -7
  29. package/dist/build/node/buildJob.js +4 -12
  30. package/dist/build/node/cache.js +6 -3
  31. package/dist/build/node/constants.js +3 -1
  32. package/dist/build/node/index.js +3 -1
  33. package/dist/build/node/meteor.js +5 -2
  34. package/dist/build/node/testJob.js +18 -14
  35. package/dist/build/node/yarn.d.ts +3 -2
  36. package/dist/build/node/yarn.js +6 -3
  37. package/dist/build/rails/build.js +3 -1
  38. package/dist/build/rails/index.js +3 -1
  39. package/dist/build/rails/test.js +15 -11
  40. package/dist/build/sbom.js +3 -1
  41. package/dist/build/types.d.ts +24 -18
  42. package/dist/build/types.js +3 -1
  43. package/dist/bundles/catladder-gitlab/index.js +3 -3
  44. package/dist/catladder-gitlab.js +10 -54
  45. package/dist/config/__tests__/configruedEnvs.test.js +3 -1
  46. package/dist/config/configruedEnvs.js +3 -1
  47. package/dist/config/index.js +13 -7
  48. package/dist/config/readConfig.js +6 -5
  49. package/dist/constants.js +5 -3
  50. package/dist/context/__tests__/resolveReferences.test.js +40 -8
  51. package/dist/context/getBuildInfoVariables.d.ts +7 -0
  52. package/dist/context/getBuildInfoVariables.js +29 -0
  53. package/dist/context/getEnvConfig.js +3 -1
  54. package/dist/context/getEnvType.js +3 -1
  55. package/dist/context/getEnvironment.d.ts +3 -3
  56. package/dist/context/getEnvironment.js +10 -14
  57. package/dist/context/getEnvironmentContext.d.ts +7 -3
  58. package/dist/context/getEnvironmentContext.js +21 -11
  59. package/dist/context/getEnvironmentVariables.d.ts +26 -5
  60. package/dist/context/getEnvironmentVariables.js +41 -25
  61. package/dist/context/getLabels.js +4 -2
  62. package/dist/context/getReviewSlug.d.ts +4 -0
  63. package/dist/context/getReviewSlug.js +22 -0
  64. package/dist/context/index.d.ts +12 -3
  65. package/dist/context/index.js +21 -15
  66. package/dist/context/resolveReferences.d.ts +3 -1
  67. package/dist/context/resolveReferences.js +53 -21
  68. package/dist/context/transformJobOnlyVars.d.ts +5 -2
  69. package/dist/context/transformJobOnlyVars.js +4 -2
  70. package/dist/context/utils/envVars.d.ts +1 -1
  71. package/dist/context/utils/envVars.js +5 -2
  72. package/dist/defaults/index.js +3 -1
  73. package/dist/deploy/base/deploy.d.ts +1 -1
  74. package/dist/deploy/base/deploy.js +12 -11
  75. package/dist/deploy/base/index.js +3 -1
  76. package/dist/deploy/base/rollback.d.ts +1 -1
  77. package/dist/deploy/base/rollback.js +13 -9
  78. package/dist/deploy/base/stop.d.ts +1 -1
  79. package/dist/deploy/base/stop.js +16 -11
  80. package/dist/deploy/base/types.d.ts +1 -1
  81. package/dist/deploy/base/types.js +3 -1
  82. package/dist/deploy/base/variables.js +3 -1
  83. package/dist/deploy/cloudRun/artifactsRegistry.d.ts +2 -1
  84. package/dist/deploy/cloudRun/artifactsRegistry.js +6 -4
  85. package/dist/deploy/cloudRun/cleanup.js +3 -1
  86. package/dist/deploy/cloudRun/cloudRunRevisions.js +3 -1
  87. package/dist/deploy/cloudRun/createJobs/cloudRunJobs.js +8 -5
  88. package/dist/deploy/cloudRun/createJobs/cloudRunServices.d.ts +2 -2
  89. package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +6 -3
  90. package/dist/deploy/cloudRun/createJobs/common.d.ts +3 -3
  91. package/dist/deploy/cloudRun/createJobs/common.js +3 -1
  92. package/dist/deploy/cloudRun/createJobs/constants.d.ts +1 -0
  93. package/dist/deploy/cloudRun/createJobs/constants.js +7 -0
  94. package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +9 -2
  95. package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +3 -1
  96. package/dist/deploy/cloudRun/createJobs/index.js +25 -8
  97. package/dist/deploy/cloudRun/createJobs/volumes.js +3 -1
  98. package/dist/deploy/cloudRun/index.js +5 -3
  99. package/dist/deploy/cloudRun/utils/createArgsString.d.ts +2 -1
  100. package/dist/deploy/cloudRun/utils/createArgsString.js +3 -1
  101. package/dist/deploy/cloudRun/utils/database.js +13 -13
  102. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +3 -1
  103. package/dist/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
  104. package/dist/deploy/cloudRun/utils/getServiceName.js +3 -1
  105. package/dist/deploy/cloudRun/utils/jobName.d.ts +2 -1
  106. package/dist/deploy/cloudRun/utils/jobName.js +4 -2
  107. package/dist/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +3 -1
  108. package/dist/deploy/cloudSql/utils.d.ts +2 -1
  109. package/dist/deploy/cloudSql/utils.js +7 -2
  110. package/dist/deploy/custom/deployJob.js +3 -1
  111. package/dist/deploy/custom/index.js +3 -1
  112. package/dist/deploy/dockerTag/deployJob.js +3 -1
  113. package/dist/deploy/dockerTag/index.js +3 -1
  114. package/dist/deploy/index.d.ts +4 -3
  115. package/dist/deploy/index.js +13 -7
  116. package/dist/deploy/kubernetes/additionalSecretKeys.js +3 -1
  117. package/dist/deploy/kubernetes/cloudSql/index.d.ts +3 -2
  118. package/dist/deploy/kubernetes/cloudSql/index.js +6 -4
  119. package/dist/deploy/kubernetes/deployJob.js +22 -15
  120. package/dist/deploy/kubernetes/index.js +51 -14
  121. package/dist/deploy/kubernetes/kubeEnv.d.ts +3 -2
  122. package/dist/deploy/kubernetes/kubeEnv.js +7 -4
  123. package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
  124. package/dist/deploy/kubernetes/kubeValues.js +3 -2
  125. package/dist/deploy/kubernetes/mongodb.js +3 -1
  126. package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +2 -1
  127. package/dist/deploy/kubernetes/processSecretsAsFiles.js +3 -1
  128. package/dist/deploy/sbom.js +3 -1
  129. package/dist/deploy/types/base.d.ts +8 -2
  130. package/dist/deploy/types/base.js +3 -1
  131. package/dist/deploy/types/custom.d.ts +1 -1
  132. package/dist/deploy/types/custom.js +3 -1
  133. package/dist/deploy/types/dockerTag.d.ts +1 -1
  134. package/dist/deploy/types/dockerTag.js +3 -1
  135. package/dist/deploy/types/googleCloudRun.d.ts +19 -18
  136. package/dist/deploy/types/googleCloudRun.js +3 -1
  137. package/dist/deploy/types/index.d.ts +6 -6
  138. package/dist/deploy/types/index.js +13 -7
  139. package/dist/deploy/types/kubernetes.d.ts +22 -22
  140. package/dist/deploy/types/kubernetes.js +3 -1
  141. package/dist/deploy/utils.js +3 -1
  142. package/dist/index.d.ts +3 -2
  143. package/dist/index.js +16 -9
  144. package/dist/packageInfos.d.ts +2 -0
  145. package/dist/packageInfos.js +14 -0
  146. package/dist/pipeline/createAllJobs.d.ts +13 -5
  147. package/dist/pipeline/createAllJobs.js +21 -10
  148. package/dist/pipeline/createChildPipeline.d.ts +1 -1
  149. package/dist/pipeline/createChildPipeline.js +24 -7
  150. package/dist/pipeline/createJobsForComponent.d.ts +3 -3
  151. package/dist/pipeline/createJobsForComponent.js +19 -18
  152. package/dist/pipeline/createMainPipeline.d.ts +3 -0
  153. package/dist/pipeline/createMainPipeline.js +248 -0
  154. package/dist/pipeline/generatePipelineFiles.d.ts +2 -0
  155. package/dist/pipeline/generatePipelineFiles.js +178 -0
  156. package/dist/pipeline/getPipelineStages.js +3 -1
  157. package/dist/pipeline/gitlab/createGitlabJobs.d.ts +15 -5
  158. package/dist/pipeline/gitlab/createGitlabJobs.js +98 -25
  159. package/dist/pipeline/gitlab/createGitlabPipeline.d.ts +7 -2
  160. package/dist/pipeline/gitlab/createGitlabPipeline.js +34 -17
  161. package/dist/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.d.ts +1 -0
  162. package/dist/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js +29 -0
  163. package/dist/pipeline/gitlab/gitlabReleaseJobs.d.ts +33 -0
  164. package/dist/pipeline/gitlab/gitlabReleaseJobs.js +24 -0
  165. package/dist/pipeline/index.d.ts +3 -1
  166. package/dist/pipeline/index.js +16 -8
  167. package/dist/pipeline/packageManager.js +4 -2
  168. package/dist/pipeline/yarn/yarnUtils.js +6 -4
  169. package/dist/rules/index.d.ts +4 -1
  170. package/dist/rules/index.js +25 -18
  171. package/dist/runner/index.d.ts +1 -1
  172. package/dist/runner/index.js +3 -1
  173. package/dist/tsconfig.tsbuildinfo +1 -1
  174. package/dist/types/config.d.ts +18 -15
  175. package/dist/types/config.js +5 -2
  176. package/dist/types/context.d.ts +37 -32
  177. package/dist/types/context.js +3 -1
  178. package/dist/types/environmentContext.d.ts +11 -7
  179. package/dist/types/environmentContext.js +3 -1
  180. package/dist/types/gitlab-ci-yml.d.ts +30 -30
  181. package/dist/types/gitlab-ci-yml.js +3 -2
  182. package/dist/types/gitlab-types.d.ts +4 -6
  183. package/dist/types/gitlab-types.js +3 -1
  184. package/dist/types/index.js +13 -7
  185. package/dist/types/jobs.d.ts +23 -6
  186. package/dist/types/jobs.js +3 -1
  187. package/dist/types/pipeline.d.ts +4 -3
  188. package/dist/types/pipeline.js +3 -1
  189. package/dist/types/utils.d.ts +1 -1
  190. package/dist/types/utils.js +3 -1
  191. package/dist/utils/gitlab.js +3 -1
  192. package/dist/utils/index.d.ts +1 -1
  193. package/dist/utils/index.js +3 -1
  194. package/dist/utils/writeFiles.d.ts +7 -0
  195. package/dist/{pipeline/commitInfo/getBuildId.js → utils/writeFiles.js} +39 -22
  196. package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +480 -384
  197. package/examples/__snapshots__/cloud-run-meteor-with-worker.ts.snap +462 -366
  198. package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +480 -384
  199. package/examples/__snapshots__/cloud-run-no-service.ts.snap +501 -393
  200. package/examples/__snapshots__/cloud-run-non-public.ts.snap +480 -384
  201. package/examples/__snapshots__/cloud-run-post-stop-job.ts.snap +489 -392
  202. package/examples/__snapshots__/cloud-run-service-gen2.ts.snap +480 -384
  203. package/examples/__snapshots__/cloud-run-service-with-volumes.ts.snap +501 -401
  204. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +1155 -915
  205. package/examples/__snapshots__/cloud-run-with-sql.ts.snap +1116 -888
  206. package/examples/__snapshots__/cloud-run-with-worker.ts.snap +482 -386
  207. package/examples/__snapshots__/custom-build-job-with-tests.ts.snap +452 -356
  208. package/examples/__snapshots__/custom-build-job.ts.snap +434 -350
  209. package/examples/__snapshots__/custom-deploy.ts.snap +319 -223
  210. package/examples/__snapshots__/custom-envs.ts.snap +123 -81
  211. package/examples/__snapshots__/custom-sbom-java.ts.snap +434 -350
  212. package/examples/__snapshots__/kubernetes-application-customization.ts.snap +846 -969
  213. package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.ts.snap +886 -957
  214. package/examples/__snapshots__/kubernetes-with-cloud-sql.ts.snap +894 -969
  215. package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +1626 -1728
  216. package/examples/__snapshots__/kubernetes-with-mongodb.ts.snap +974 -1137
  217. package/examples/__snapshots__/local-dot-env.ts.snap +480 -384
  218. package/examples/__snapshots__/meteor-kubernetes.ts.snap +906 -1069
  219. package/examples/__snapshots__/multiline-var.ts.snap +4500 -0
  220. package/examples/__snapshots__/native-app.ts.snap +706 -578
  221. package/examples/__snapshots__/node-build-with-custom-image.ts.snap +480 -384
  222. package/examples/__snapshots__/node-build-with-docker-additions.ts.snap +488 -384
  223. package/examples/__snapshots__/rails-k8s-with-worker.ts.snap +1656 -1942
  224. package/examples/__snapshots__/wait-for-other-deploy.ts.snap +287 -231
  225. package/examples/custom-deploy.ts +7 -7
  226. package/examples/multiline-var.ts +64 -0
  227. package/package.json +5 -8
  228. package/src/bash/BashExpression.ts +81 -0
  229. package/src/bash/bashExpressionPerPipelineType.ts +16 -0
  230. package/src/bash/bashYaml.ts +46 -0
  231. package/src/bash/getInjectVarsScript.ts +12 -0
  232. package/src/bash/replaceAsync.ts +50 -0
  233. package/src/build/base/createAppBuildJob.ts +6 -2
  234. package/src/build/base/writeBuildInfo.ts +1 -1
  235. package/src/build/base/writeDotEnv.ts +6 -1
  236. package/src/build/custom/buildJob.ts +2 -4
  237. package/src/build/custom/testJob.ts +3 -2
  238. package/src/build/docker.ts +15 -7
  239. package/src/build/node/buildJob.ts +1 -3
  240. package/src/build/node/testJob.ts +3 -2
  241. package/src/build/node/yarn.ts +9 -4
  242. package/src/build/rails/test.ts +2 -1
  243. package/src/build/types.ts +8 -1
  244. package/src/catladder-gitlab.ts +8 -55
  245. package/src/config/readConfig.ts +2 -3
  246. package/src/constants.ts +5 -2
  247. package/src/context/__tests__/resolveReferences.test.ts +11 -6
  248. package/src/context/getBuildInfoVariables.ts +40 -0
  249. package/src/context/getEnvironment.ts +7 -30
  250. package/src/context/getEnvironmentContext.ts +25 -29
  251. package/src/context/getEnvironmentVariables.ts +61 -36
  252. package/src/context/getReviewSlug.ts +27 -0
  253. package/src/context/index.ts +24 -23
  254. package/src/context/resolveReferences.ts +28 -8
  255. package/src/context/transformJobOnlyVars.ts +5 -2
  256. package/src/context/utils/envVars.ts +2 -1
  257. package/src/deploy/base/deploy.ts +20 -18
  258. package/src/deploy/base/rollback.ts +8 -10
  259. package/src/deploy/base/stop.ts +8 -9
  260. package/src/deploy/cloudRun/artifactsRegistry.ts +9 -4
  261. package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +12 -7
  262. package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +3 -2
  263. package/src/deploy/cloudRun/createJobs/constants.ts +1 -0
  264. package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +20 -2
  265. package/src/deploy/cloudRun/createJobs/index.ts +17 -8
  266. package/src/deploy/cloudRun/index.ts +14 -6
  267. package/src/deploy/cloudRun/utils/createArgsString.ts +2 -1
  268. package/src/deploy/cloudRun/utils/database.ts +2 -2
  269. package/src/deploy/cloudRun/utils/jobName.ts +7 -2
  270. package/src/deploy/cloudSql/utils.ts +12 -9
  271. package/src/deploy/index.ts +2 -1
  272. package/src/deploy/kubernetes/cloudSql/index.ts +3 -2
  273. package/src/deploy/kubernetes/deployJob.ts +24 -10
  274. package/src/deploy/kubernetes/index.ts +15 -8
  275. package/src/deploy/kubernetes/kubeEnv.ts +8 -6
  276. package/src/deploy/kubernetes/kubeValues.ts +0 -1
  277. package/src/deploy/kubernetes/processSecretsAsFiles.ts +2 -1
  278. package/src/deploy/types/base.ts +6 -0
  279. package/src/deploy/types/googleCloudRun.ts +2 -0
  280. package/src/index.ts +2 -1
  281. package/src/packageInfos.ts +10 -0
  282. package/src/pipeline/createAllJobs.ts +24 -10
  283. package/src/pipeline/createChildPipeline.ts +19 -8
  284. package/src/pipeline/createJobsForComponent.ts +14 -22
  285. package/src/pipeline/createMainPipeline.ts +88 -0
  286. package/src/pipeline/generatePipelineFiles.ts +29 -0
  287. package/src/pipeline/gitlab/createGitlabJobs.ts +174 -51
  288. package/src/pipeline/gitlab/createGitlabPipeline.ts +16 -14
  289. package/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.ts +46 -0
  290. package/src/pipeline/gitlab/gitlabReleaseJobs.ts +20 -0
  291. package/src/pipeline/index.ts +2 -0
  292. package/src/rules/index.ts +15 -9
  293. package/src/types/config.ts +11 -2
  294. package/src/types/context.ts +39 -26
  295. package/src/types/environmentContext.ts +12 -6
  296. package/src/types/gitlab-ci-yml.ts +0 -1
  297. package/src/types/gitlab-types.ts +5 -4
  298. package/src/types/jobs.ts +28 -3
  299. package/src/types/pipeline.ts +4 -0
  300. package/src/utils/writeFiles.ts +40 -0
  301. package/dist/deploy/cloudRun/createJobs/variables.d.ts +0 -5
  302. package/dist/deploy/cloudRun/createJobs/variables.js +0 -19
  303. package/dist/pipeline/commitInfo/getBuildId.d.ts +0 -6
  304. package/dist/pipeline/commitInfo/getCommitInfo.d.ts +0 -2
  305. package/src/deploy/cloudRun/createJobs/variables.ts +0 -21
  306. package/src/pipeline/commitInfo/getBuildId.ts +0 -17
  307. package/src/pipeline/commitInfo/getCommitInfo.ts +0 -15
@@ -0,0 +1,40 @@
1
+ /**
2
+ * this class represents a string that can be evaluated in bash scripts.
3
+ *
4
+ * you can do basic transforms like lowercase, but that does not return you a lowercase string, but instead an experssion represeting a lowercase string
5
+ */
6
+ export declare class BashExpression {
7
+ private value;
8
+ constructor(value: string | BashExpression);
9
+ toJSON(): string;
10
+ toString(): string;
11
+ /**
12
+ *
13
+ * @returns a bash expression to lowercase the string
14
+ */
15
+ toLowerCase(): BashExpression;
16
+ /**
17
+ * concats a value to this one and returns a new BashExpression
18
+ * @param value
19
+ * @returns
20
+ */
21
+ concat(...values: Array<string | BashExpression>): BashExpression;
22
+ transformWithCommand(command: string): BashExpression;
23
+ }
24
+ export type StringOrBashExpression = string | BashExpression;
25
+ export declare const getBashVariable: (name: string) => BashExpression;
26
+ /**
27
+ * joins bash expressions together with a joiner
28
+ * returns a bash expression if any of the parts is a bash expression
29
+ * returns a string otherwise
30
+ *
31
+ * @param parts
32
+ * @param joiner
33
+ * @returns
34
+ */
35
+ export declare const joinBashExpressions: (parts: Array<StringOrBashExpression>, joiner?: string) => StringOrBashExpression;
36
+ /**
37
+ * escapes a string or bash expression for bash
38
+ * it mainly escapes double quotes
39
+ */
40
+ export declare const bashEscape: (value: StringOrBashExpression | any) => any;
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+
3
+ var __read = this && this.__read || function (o, n) {
4
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
5
+ if (!m) return o;
6
+ var i = m.call(o),
7
+ r,
8
+ ar = [],
9
+ e;
10
+ try {
11
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
12
+ } catch (error) {
13
+ e = {
14
+ error: error
15
+ };
16
+ } finally {
17
+ try {
18
+ if (r && !r.done && (m = i["return"])) m.call(i);
19
+ } finally {
20
+ if (e) throw e.error;
21
+ }
22
+ }
23
+ return ar;
24
+ };
25
+ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
26
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
27
+ if (ar || !(i in from)) {
28
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
29
+ ar[i] = from[i];
30
+ }
31
+ }
32
+ return to.concat(ar || Array.prototype.slice.call(from));
33
+ };
34
+ Object.defineProperty(exports, "__esModule", {
35
+ value: true
36
+ });
37
+ exports.bashEscape = exports.joinBashExpressions = exports.getBashVariable = exports.BashExpression = void 0;
38
+ /**
39
+ * this class represents a string that can be evaluated in bash scripts.
40
+ *
41
+ * you can do basic transforms like lowercase, but that does not return you a lowercase string, but instead an experssion represeting a lowercase string
42
+ */
43
+ var BashExpression = /** @class */function () {
44
+ function BashExpression(value) {
45
+ this.value = value;
46
+ }
47
+ BashExpression.prototype.toJSON = function () {
48
+ return this.toString();
49
+ };
50
+ BashExpression.prototype.toString = function () {
51
+ return this.value.toString();
52
+ };
53
+ /**
54
+ *
55
+ * @returns a bash expression to lowercase the string
56
+ */
57
+ BashExpression.prototype.toLowerCase = function () {
58
+ return this.transformWithCommand("awk '{print tolower($0)}'");
59
+ };
60
+ /**
61
+ * concats a value to this one and returns a new BashExpression
62
+ * @param value
63
+ * @returns
64
+ */
65
+ BashExpression.prototype.concat = function () {
66
+ var _a;
67
+ var values = [];
68
+ for (var _i = 0; _i < arguments.length; _i++) {
69
+ values[_i] = arguments[_i];
70
+ }
71
+ return new BashExpression((_a = this.toString()).concat.apply(_a, __spreadArray([], __read(values.map(function (v) {
72
+ return v.toString();
73
+ })), false)));
74
+ };
75
+ BashExpression.prototype.transformWithCommand = function (command) {
76
+ return new BashExpression(
77
+ // see https://stackoverflow.com/a/2264537
78
+ "$(printf %s \"".concat(this.toString(), "\" | ").concat(command, ")"));
79
+ };
80
+ return BashExpression;
81
+ }();
82
+ exports.BashExpression = BashExpression;
83
+ var getBashVariable = function (name) {
84
+ return new BashExpression("$".concat(name));
85
+ };
86
+ exports.getBashVariable = getBashVariable;
87
+ /**
88
+ * joins bash expressions together with a joiner
89
+ * returns a bash expression if any of the parts is a bash expression
90
+ * returns a string otherwise
91
+ *
92
+ * @param parts
93
+ * @param joiner
94
+ * @returns
95
+ */
96
+ var joinBashExpressions = function (parts, joiner) {
97
+ if (joiner === void 0) {
98
+ joiner = "";
99
+ }
100
+ var anyIsBashExpression = parts.some(function (p) {
101
+ return p instanceof BashExpression;
102
+ });
103
+ if (anyIsBashExpression) {
104
+ return new BashExpression(parts.map(function (p) {
105
+ return p instanceof BashExpression ? p.toString() : p;
106
+ }).join(joiner));
107
+ } else {
108
+ return parts.join(joiner);
109
+ }
110
+ };
111
+ exports.joinBashExpressions = joinBashExpressions;
112
+ /**
113
+ * escapes a string or bash expression for bash
114
+ * it mainly escapes double quotes
115
+ */
116
+ var bashEscape = function (value) {
117
+ if (value instanceof BashExpression) {
118
+ return value.toString(); // no need to escape bash expressions, as we want them to evaluate
119
+ }
120
+ // we wrap it in double quotes, so we need to escape them
121
+ if (typeof value === "string") return value.replace(/"/g, '\\"');
122
+ return value;
123
+ };
124
+ exports.bashEscape = bashEscape;
@@ -0,0 +1,6 @@
1
+ import type { PipelineType } from "../types/pipeline";
2
+ import type { BashExpression } from "./BashExpression";
3
+ export type BashExpressionPerPipelineType = { [type in PipelineType]?: BashExpression | string } & {
4
+ default: BashExpression | string;
5
+ };
6
+ export declare const getBashExpressionPerPipelineType: (definition: BashExpressionPerPipelineType, pipelineType?: PipelineType) => string | BashExpression;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getBashExpressionPerPipelineType = void 0;
7
+ var getBashExpressionPerPipelineType = function (definition, pipelineType) {
8
+ if (!pipelineType) return definition.default;
9
+ return definition[pipelineType] || definition.default;
10
+ };
11
+ exports.getBashExpressionPerPipelineType = getBashExpressionPerPipelineType;
@@ -0,0 +1,10 @@
1
+ /***
2
+ * creates a yaml string that can be used in bash scripts
3
+ * it handles BashExpressions correctly so that they can be evaluated in bash
4
+ */
5
+ export declare const yamlBashString: (value: any) => string;
6
+ /**
7
+ * creates a bash script that writes a yaml string to a file
8
+ * @param value the yaml value to write, it supports BashExpressions
9
+ */
10
+ export declare const writeBashYamlToFileScript: (value: any, filename: string) => string[];
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.writeBashYamlToFileScript = exports.yamlBashString = void 0;
7
+ var yaml_1 = require("yaml");
8
+ var BashExpression_1 = require("./BashExpression");
9
+ var bashExpressionType = {
10
+ tag: "",
11
+ resolve: function (str) {
12
+ // not really needed,but let's make typescript happy
13
+ return new BashExpression_1.BashExpression(str);
14
+ },
15
+ stringify: function (node, ctx) {
16
+ // we create a BLOCK_LITERAL
17
+ // but because bash will interpret the value, it may resolve to a multiline string
18
+ // so we need to indent every line using sed
19
+ return "|-\n" + node.value.transformWithCommand("sed 's/^/".concat(ctx.indent, "/'"));
20
+ },
21
+ identify: function (v) {
22
+ return v instanceof BashExpression_1.BashExpression;
23
+ }
24
+ };
25
+ /***
26
+ * creates a yaml string that can be used in bash scripts
27
+ * it handles BashExpressions correctly so that they can be evaluated in bash
28
+ */
29
+ var yamlBashString = function (value) {
30
+ return (0, yaml_1.stringify)(value, {
31
+ defaultStringType: "BLOCK_LITERAL",
32
+ defaultKeyType: "PLAIN",
33
+ customTags: [bashExpressionType],
34
+ aliasDuplicateObjects: false,
35
+ lineWidth: 0
36
+ });
37
+ };
38
+ exports.yamlBashString = yamlBashString;
39
+ /**
40
+ * creates a bash script that writes a yaml string to a file
41
+ * @param value the yaml value to write, it supports BashExpressions
42
+ */
43
+ var writeBashYamlToFileScript = function (value, filename) {
44
+ return ["cat > ".concat(filename, " <<EOF\n").concat((0, exports.yamlBashString)(value), "\nEOF\n")];
45
+ };
46
+ exports.writeBashYamlToFileScript = writeBashYamlToFileScript;
@@ -0,0 +1,2 @@
1
+ import type { UnspecifiedEnvVars } from "../types";
2
+ export declare const getInjectVarsScript: (vars?: UnspecifiedEnvVars) => string[];
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ var __read = this && this.__read || function (o, n) {
4
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
5
+ if (!m) return o;
6
+ var i = m.call(o),
7
+ r,
8
+ ar = [],
9
+ e;
10
+ try {
11
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
12
+ } catch (error) {
13
+ e = {
14
+ error: error
15
+ };
16
+ } finally {
17
+ try {
18
+ if (r && !r.done && (m = i["return"])) m.call(i);
19
+ } finally {
20
+ if (e) throw e.error;
21
+ }
22
+ }
23
+ return ar;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", {
26
+ value: true
27
+ });
28
+ exports.getInjectVarsScript = void 0;
29
+ var lodash_1 = require("lodash");
30
+ var BashExpression_1 = require("./BashExpression");
31
+ var getInjectVarsScript = function (vars) {
32
+ if (!vars) return [];
33
+ // filter out null and undefined values
34
+ return Object.entries(vars).filter(function (_a) {
35
+ var _b = __read(_a, 2),
36
+ value = _b[1];
37
+ return !(0, lodash_1.isNil)(value);
38
+ }).map(function (_a) {
39
+ var _b = __read(_a, 2),
40
+ key = _b[0],
41
+ value = _b[1];
42
+ return "export ".concat(key, "=\"").concat(value ? (0, BashExpression_1.bashEscape)(value) : "", "\"");
43
+ });
44
+ };
45
+ exports.getInjectVarsScript = getInjectVarsScript;
@@ -0,0 +1,2 @@
1
+ import { BashExpression } from "./BashExpression";
2
+ export default function replaceAsync(string: string | BashExpression, searchValue: any, replacer: (substring: string, ...args: any[]) => Promise<string | BashExpression>): Promise<string | BashExpression>;
@@ -55,7 +55,7 @@ var __generator = this && this.__generator || function (thisArg, body) {
55
55
  }
56
56
  function step(op) {
57
57
  if (f) throw new TypeError("Generator is already executing.");
58
- while (_) try {
58
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
59
59
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
60
60
  if (y = 0, t) op = [op[0] & 2, t.value];
61
61
  switch (op[0]) {
@@ -115,29 +115,57 @@ var __generator = this && this.__generator || function (thisArg, body) {
115
115
  };
116
116
  }
117
117
  };
118
- exports.__esModule = true;
119
- exports.getBaseCommitInfo = void 0;
120
- var getBuildId_1 = require("./getBuildId");
121
- var getBaseCommitInfo = function () {
122
- return __awaiter(void 0, void 0, void 0, function () {
123
- var _a;
124
- var _b;
125
- return __generator(this, function (_c) {
126
- switch (_c.label) {
118
+ Object.defineProperty(exports, "__esModule", {
119
+ value: true
120
+ });
121
+ var BashExpression_1 = require("./BashExpression");
122
+ // from https://github.com/dsblv/string-replace-async/blob/main/index.js
123
+ // and adjusted a bit
124
+ function replaceAsync(string, searchValue, replacer) {
125
+ return __awaiter(this, void 0, void 0, function () {
126
+ var wasBashExpression, values_1, resolvedValues_1, containsBashExpression, result, error_1;
127
+ return __generator(this, function (_a) {
128
+ switch (_a.label) {
127
129
  case 0:
128
- _a = {
129
- refName: (_b = process.env.CI_COMMIT_REF_NAME) !== null && _b !== void 0 ? _b : "unknown",
130
- reviewSlug: process.env.CI_MERGE_REQUEST_IID ? "mr".concat(process.env.CI_MERGE_REQUEST_IID) : process.env.CI_COMMIT_REF_SLUG ? "hf".concat(process.env.CI_COMMIT_REF_SLUG) : "unknown",
131
- buildTime: new Date().toISOString()
132
- };
133
- return [4 /*yield*/, (0, getBuildId_1.getBuildId)()];
130
+ wasBashExpression = string instanceof BashExpression_1.BashExpression;
131
+ _a.label = 1;
134
132
  case 1:
135
- _a.buildId = _c.sent();
136
- return [4 /*yield*/, (0, getBuildId_1.getCurrentVersionString)()];
133
+ _a.trys.push([1, 3,, 4]);
134
+ values_1 = [];
135
+ String.prototype.replace.call(string.toString(), searchValue, function () {
136
+ var args = [];
137
+ for (var _i = 0; _i < arguments.length; _i++) {
138
+ args[_i] = arguments[_i];
139
+ }
140
+ // eslint-disable-next-line prefer-spread
141
+ var result = replacer.apply(undefined, args);
142
+ values_1.push(result);
143
+ return "";
144
+ });
145
+ return [4 /*yield*/, Promise.all(values_1)];
137
146
  case 2:
138
- return [2 /*return*/, (_a.currentVersion = _c.sent(), _a)];
147
+ resolvedValues_1 = _a.sent();
148
+ containsBashExpression = resolvedValues_1.some(function (value) {
149
+ return value instanceof BashExpression_1.BashExpression;
150
+ });
151
+ result = String.prototype.replace.call(string.toString(), searchValue, function () {
152
+ var _a, _b;
153
+ return (_b = (_a = resolvedValues_1.shift()) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : "";
154
+ });
155
+ if (wasBashExpression || containsBashExpression) {
156
+ return [2 /*return*/, new BashExpression_1.BashExpression(result)];
157
+ } else {
158
+ return [2 /*return*/, result];
159
+ }
160
+ return [3 /*break*/, 4];
161
+ case 3:
162
+ error_1 = _a.sent();
163
+ return [2 /*return*/, Promise.reject(error_1)];
164
+ case 4:
165
+ return [2 /*return*/];
139
166
  }
140
167
  });
141
168
  });
142
- };
143
- exports.getBaseCommitInfo = getBaseCommitInfo;
169
+ }
170
+
171
+ exports.default = replaceAsync;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  var createArtifactsConfig_1 = require("../createArtifactsConfig");
5
7
  describe("createArtifactsConfig", function () {
6
8
  it("returns undefined if no artifacts or artifactsReports", function () {
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.RUNNER_BUILD_RESOURCE_VARIABLES = exports.APP_BUILD_JOB_NAME = void 0;
5
7
  exports.APP_BUILD_JOB_NAME = "🔨 app";
6
8
  exports.RUNNER_BUILD_RESOURCE_VARIABLES = {
@@ -1,8 +1,9 @@
1
1
  import type { Context } from "../..";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare type AppBuildJobDefinition = Partial<CatladderJob>;
3
+ export type AppBuildJobDefinition = Partial<CatladderJob>;
4
4
  export declare const createAppBuildJob: (context: Context, {
5
5
  script,
6
6
  variables,
7
+ runnerVariables,
7
8
  ...def
8
9
  }: AppBuildJobDefinition) => CatladderJob;
@@ -49,7 +49,9 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
49
49
  }
50
50
  return to.concat(ar || Array.prototype.slice.call(from));
51
51
  };
52
- exports.__esModule = true;
52
+ Object.defineProperty(exports, "__esModule", {
53
+ value: true
54
+ });
53
55
  exports.createAppBuildJob = void 0;
54
56
  var lodash_1 = require("lodash");
55
57
  var path_1 = require("path");
@@ -60,10 +62,11 @@ var constants_1 = require("./constants");
60
62
  var writeBuildInfo_1 = require("./writeBuildInfo");
61
63
  var writeDotEnv_1 = require("./writeDotEnv");
62
64
  var createAppBuildJob = function (context, _a) {
63
- var _b, _c, _d, _e;
65
+ var _b, _c, _d, _e, _f;
64
66
  var script = _a.script,
65
67
  variables = _a.variables,
66
- def = __rest(_a, ["script", "variables"]);
68
+ runnerVariables = _a.runnerVariables,
69
+ def = __rest(_a, ["script", "variables", "runnerVariables"]);
67
70
  return (0, lodash_1.merge)({
68
71
  name: constants_1.APP_BUILD_JOB_NAME,
69
72
  envMode: "jobPerEnv",
@@ -71,13 +74,14 @@ var createAppBuildJob = function (context, _a) {
71
74
  image: (0, __1.getRunnerImage)("jobs-default"),
72
75
  needs: [],
73
76
  cache: [],
74
- variables: __assign(__assign(__assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), variables !== null && variables !== void 0 ? variables : {}), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), (_b = context.componentConfig.build.extraVars) !== null && _b !== void 0 ? _b : {}),
77
+ variables: __assign(__assign(__assign(__assign({}, variables !== null && variables !== void 0 ? variables : {}), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), (_b = context.componentConfig.build.extraVars) !== null && _b !== void 0 ? _b : {}),
78
+ runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}), (_c = context.componentConfig.build.runnerVariables) !== null && _c !== void 0 ? _c : {}),
75
79
  script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(context.componentConfig.dotEnv === true // don't build when set to `local`
76
- ? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_c = (0, utils_1.ensureArray)(script)) !== null && _c !== void 0 ? _c : []), false),
80
+ ? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : []), false),
77
81
  artifacts: {
78
82
  paths: [(0, path_1.join)(context.componentConfig.dir, "__build_info.json")],
79
83
  reports: {
80
- junit: (_e = (_d = context.componentConfig.build.artifactsReports) === null || _d === void 0 ? void 0 : _d.junit) === null || _e === void 0 ? void 0 : _e.map(function (p) {
84
+ junit: (_f = (_e = context.componentConfig.build.artifactsReports) === null || _e === void 0 ? void 0 : _e.junit) === null || _f === void 0 ? void 0 : _f.map(function (p) {
81
85
  return (0, path_1.join)(context.componentConfig.dir, p);
82
86
  })
83
87
  }
@@ -1,4 +1,4 @@
1
1
  import type { BuildConfigArtifactsReports } from "../types";
2
2
  import type { Artifacts } from "../../types";
3
3
  import type { OptionalArtifacts } from "../custom/testJob";
4
- export declare const createArtifactsConfig: (rootPath: string, artifactsReports?: BuildConfigArtifactsReports | undefined, artifacts?: Artifacts | undefined) => OptionalArtifacts;
4
+ export declare const createArtifactsConfig: (rootPath: string, artifactsReports?: BuildConfigArtifactsReports, artifacts?: Artifacts) => OptionalArtifacts;
@@ -41,7 +41,9 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
41
41
  }
42
42
  return to.concat(ar || Array.prototype.slice.call(from));
43
43
  };
44
- exports.__esModule = true;
44
+ Object.defineProperty(exports, "__esModule", {
45
+ value: true
46
+ });
45
47
  exports.createArtifactsConfig = void 0;
46
48
  var path_1 = require("path");
47
49
  var createArtifactsConfig = function (rootPath, artifactsReports, artifacts) {
@@ -41,7 +41,9 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
41
41
  }
42
42
  return to.concat(ar || Array.prototype.slice.call(from));
43
43
  };
44
- exports.__esModule = true;
44
+ Object.defineProperty(exports, "__esModule", {
45
+ value: true
46
+ });
45
47
  exports.createBuildJobs = void 0;
46
48
  var sbom_1 = require("../../deploy/sbom");
47
49
  var docker_1 = require("../docker");
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.writeBuildInfo = void 0;
5
7
  var writeBuildInfo = function (context) {
6
- var _a, _b;
7
- return ["echo '{\"id\":\"".concat((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.buildId, "\",\"time\":\"").concat((_b = context.commitInfo) === null || _b === void 0 ? void 0 : _b.buildTime, "\"}' > ").concat(context.componentConfig.dir, "/__build_info.json")];
8
+ return ["echo '{\"id\":\"".concat(context.environment.envVars.BUILD_INFO_BUILD_ID, "\",\"time\":\"").concat(context.environment.envVars.BUILD_INFO_BUILD_TIME, "\"}' > ").concat(context.componentConfig.dir, "/__build_info.json")];
8
9
  };
9
10
  exports.writeBuildInfo = writeBuildInfo;
@@ -22,8 +22,11 @@ var __read = this && this.__read || function (o, n) {
22
22
  }
23
23
  return ar;
24
24
  };
25
- exports.__esModule = true;
25
+ Object.defineProperty(exports, "__esModule", {
26
+ value: true
27
+ });
26
28
  exports.writeDotEnv = void 0;
29
+ var lodash_1 = require("lodash");
27
30
  /**
28
31
  * writes a .env file in the components folder
29
32
  * @param context
@@ -32,11 +35,17 @@ exports.writeDotEnv = void 0;
32
35
  var writeDotEnv = function (context) {
33
36
  var envVars = context.environment.envVars;
34
37
  // make key=value and sanitize multiline
35
- var keyValueString = Object.entries(envVars).map(function (_a) {
38
+ var keyValueString = Object.entries(envVars)
39
+ // filter out null and undefined values
40
+ .filter(function (_a) {
41
+ var _b = __read(_a, 2),
42
+ value = _b[1];
43
+ return !(0, lodash_1.isNil)(value);
44
+ }).map(function (_a) {
36
45
  var _b = __read(_a, 2),
37
46
  key = _b[0],
38
47
  value = _b[1];
39
- return "".concat(key, "=").concat(value.replaceAll("\n", "\\n"));
48
+ return "".concat(key, "=").concat(value === null || value === void 0 ? void 0 : value.toString().replaceAll("\n", "\\n"));
40
49
  }).join("\n");
41
50
  return ["cat <<EOF > ".concat(context.componentConfig.dir, "/.env\n").concat(keyValueString, "\nEOF")];
42
51
  };
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  var testJob_1 = require("../testJob");
5
7
  describe("createCustomTestJobs", function () {
6
8
  var componentConfig = {
@@ -1,15 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var __assign = this && this.__assign || function () {
4
- __assign = Object.assign || function (t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
3
  var __read = this && this.__read || function (o, n) {
14
4
  var m = typeof Symbol === "function" && o[Symbol.iterator];
15
5
  if (!m) return o;
@@ -41,7 +31,9 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
41
31
  }
42
32
  return to.concat(ar || Array.prototype.slice.call(from));
43
33
  };
44
- exports.__esModule = true;
34
+ Object.defineProperty(exports, "__esModule", {
35
+ value: true
36
+ });
45
37
  exports.createCustomBuildJobs = void 0;
46
38
  var path_1 = require("path");
47
39
  var utils_1 = require("../../utils");
@@ -62,7 +54,7 @@ var createCustomBuildJobs = function (context) {
62
54
  return (0, base_1.createBuildJobs)(context, {
63
55
  appBuild: buildConfig.buildCommand !== null ? {
64
56
  image: buildConfig.jobImage,
65
- variables: __assign({}, RUNNER_BUILD_VARIABLES),
57
+ runnerVariables: RUNNER_BUILD_VARIABLES,
66
58
  cache: buildConfig.jobCache,
67
59
  services: buildConfig.jobServices,
68
60
  script: __spreadArray([], __read((_a = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _a !== void 0 ? _a : []), false),
@@ -31,7 +31,9 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
31
31
  }
32
32
  return to.concat(ar || Array.prototype.slice.call(from));
33
33
  };
34
- exports.__esModule = true;
34
+ Object.defineProperty(exports, "__esModule", {
35
+ value: true
36
+ });
35
37
  exports.createCustomJobs = void 0;
36
38
  var buildJob_1 = require("./buildJob");
37
39
  var testJob_1 = require("./testJob");
@@ -2,6 +2,6 @@ import type { Context } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  import type { Artifacts } from "../../types";
4
4
  export declare const createCustomTestJobs: (context: Context) => CatladderJob[];
5
- export declare type OptionalArtifacts = {
5
+ export type OptionalArtifacts = {
6
6
  artifacts: Artifacts;
7
7
  } | undefined;