@catladder/pipeline 0.0.0-refactor-docker-de6b3576 → 0.0.0-refactor-docker-9fda97e9

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 (85) hide show
  1. package/dist/bundles/catladder-gitlab/index.js +8 -4
  2. package/dist/constants.js +1 -1
  3. package/dist/context/getEnvironmentVariables.js +2 -1
  4. package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +2 -1
  5. package/dist/deploy/kubernetes/kubeValues.js +3 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/dist/types/config.d.ts +1 -1
  8. package/dist/types/jobs.d.ts +1 -1
  9. package/examples/__utils__/helpers.ts +2 -2
  10. package/package.json +1 -1
  11. package/scripts/generate-gitlab-ci-types.ts +2 -2
  12. package/src/bash/BashExpression.ts +4 -4
  13. package/src/bash/bashExpressionPerPipelineType.ts +1 -1
  14. package/src/bash/replaceAsync.ts +4 -4
  15. package/src/build/base/__tests__/createArtifactsConfig.test.ts +3 -3
  16. package/src/build/base/createArtifactsConfig.ts +2 -2
  17. package/src/build/base/writeDotEnv.ts +1 -1
  18. package/src/build/custom/__tests__/testJob.test.ts +1 -1
  19. package/src/build/custom/testJob.ts +3 -3
  20. package/src/build/index.ts +1 -1
  21. package/src/build/node/cache.ts +4 -4
  22. package/src/build/node/testJob.ts +3 -3
  23. package/src/build/node/yarn.ts +7 -7
  24. package/src/config/configruedEnvs.ts +6 -6
  25. package/src/config/readConfig.ts +2 -2
  26. package/src/context/__tests__/resolveReferences.test.ts +1 -1
  27. package/src/context/getBuildInfoVariables.ts +5 -5
  28. package/src/context/getEnvConfig.ts +1 -1
  29. package/src/context/getEnvType.ts +1 -1
  30. package/src/context/getEnvironment.ts +1 -1
  31. package/src/context/getEnvironmentContext.ts +2 -2
  32. package/src/context/getEnvironmentVariables.ts +12 -12
  33. package/src/context/getReviewSlug.ts +2 -2
  34. package/src/context/index.ts +3 -3
  35. package/src/context/resolveReferences.ts +9 -12
  36. package/src/context/transformJobOnlyVars.ts +1 -1
  37. package/src/context/utils/envVars.ts +3 -3
  38. package/src/deploy/base/deploy.ts +5 -5
  39. package/src/deploy/base/index.ts +1 -1
  40. package/src/deploy/base/rollback.ts +1 -1
  41. package/src/deploy/base/stop.ts +1 -1
  42. package/src/deploy/cloudRun/artifactsRegistry.ts +5 -5
  43. package/src/deploy/cloudRun/cleanup.ts +3 -3
  44. package/src/deploy/cloudRun/cloudRunRevisions.ts +3 -3
  45. package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +10 -10
  46. package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +4 -4
  47. package/src/deploy/cloudRun/createJobs/common.ts +1 -1
  48. package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +7 -7
  49. package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +1 -1
  50. package/src/deploy/cloudRun/createJobs/index.ts +1 -1
  51. package/src/deploy/cloudRun/createJobs/volumes.ts +2 -2
  52. package/src/deploy/cloudRun/index.ts +6 -10
  53. package/src/deploy/cloudRun/utils/createArgsString.ts +1 -1
  54. package/src/deploy/cloudRun/utils/database.ts +5 -5
  55. package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +1 -1
  56. package/src/deploy/cloudRun/utils/jobName.ts +1 -1
  57. package/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.ts +1 -1
  58. package/src/deploy/cloudSql/utils.ts +2 -2
  59. package/src/deploy/index.ts +3 -3
  60. package/src/deploy/kubernetes/cloudSql/index.ts +3 -3
  61. package/src/deploy/kubernetes/deployJob.ts +6 -6
  62. package/src/deploy/kubernetes/index.ts +1 -1
  63. package/src/deploy/kubernetes/kubeEnv.ts +1 -1
  64. package/src/deploy/kubernetes/kubeValues.ts +5 -5
  65. package/src/deploy/kubernetes/mongodb.ts +1 -1
  66. package/src/deploy/kubernetes/processSecretsAsFiles.ts +3 -3
  67. package/src/deploy/utils.ts +2 -2
  68. package/src/pipeline/createAllJobs.ts +4 -4
  69. package/src/pipeline/createChildPipeline.ts +2 -2
  70. package/src/pipeline/createJobsForComponent.ts +3 -3
  71. package/src/pipeline/createMainPipeline.ts +17 -20
  72. package/src/pipeline/generatePipelineFiles.ts +3 -3
  73. package/src/pipeline/getPipelineStages.ts +1 -1
  74. package/src/pipeline/gitlab/createGitlabJobs.ts +24 -24
  75. package/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.ts +6 -6
  76. package/src/pipeline/packageManager.ts +2 -2
  77. package/src/pipeline/yarn/yarnUtils.ts +7 -7
  78. package/src/types/config.ts +2 -2
  79. package/src/types/context.ts +1 -1
  80. package/src/types/environmentContext.ts +1 -1
  81. package/src/types/jobs.ts +1 -1
  82. package/src/types/utils.ts +4 -4
  83. package/src/utils/gitlab.ts +1 -1
  84. package/src/utils/index.ts +2 -2
  85. package/src/utils/writeFiles.ts +2 -2
@@ -7,9 +7,9 @@ export const processSecretsAsFiles = <
7
7
  env: {
8
8
  secret: Record<string, StringOrBashExpression>;
9
9
  };
10
- } & DeployConfigKubernetesValues,
10
+ } & DeployConfigKubernetesValues
11
11
  >(
12
- values: T,
12
+ values: T
13
13
  ): T => {
14
14
  if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
15
15
  return values;
@@ -27,7 +27,7 @@ export const processSecretsAsFiles = <
27
27
  values.secretsAsFile.map((key) => [
28
28
  key + "_content",
29
29
  values.env.secret[key],
30
- ]),
30
+ ])
31
31
  ),
32
32
  },
33
33
  },
@@ -3,7 +3,7 @@ import type { DeployConfigKubernetesCluster } from "./types";
3
3
  import { isOfDeployType } from "./types";
4
4
 
5
5
  export const getFullKubernetesClusterName = (
6
- cluster: DeployConfigKubernetesCluster,
6
+ cluster: DeployConfigKubernetesCluster
7
7
  ) => {
8
8
  if (cluster.type === "gcloud") {
9
9
  return `gke_${cluster.projectId}_${cluster.region}_${cluster.name}`;
@@ -12,7 +12,7 @@ export const getFullKubernetesClusterName = (
12
12
 
13
13
  export const getKubernetesNamespace = (
14
14
  config: Pick<Config, "customerName" | "appName">,
15
- env: string,
15
+ env: string
16
16
  ) => {
17
17
  return `${config.customerName}-${config.appName}-${env}`;
18
18
  };
@@ -42,11 +42,11 @@ export const createAllJobs = async ({
42
42
  trigger,
43
43
  pipelineType,
44
44
  }),
45
- ]),
46
- ),
45
+ ])
46
+ )
47
47
  ),
48
48
  ];
49
- }),
50
- ),
49
+ })
50
+ )
51
51
  );
52
52
  };
@@ -10,7 +10,7 @@ import { createGitlabPipelineWithDefaults } from "./gitlab/createGitlabPipeline"
10
10
  export const createChildPipeline = async <T extends PipelineType>(
11
11
  pipelineType: T,
12
12
  trigger: PipelineTrigger,
13
- config: Config,
13
+ config: Config
14
14
  ): Promise<Pipeline<T>> => {
15
15
  const jobs = await createAllJobs({
16
16
  config,
@@ -27,7 +27,7 @@ export const createChildPipeline = async <T extends PipelineType>(
27
27
  },
28
28
  stages,
29
29
  jobs: Object.fromEntries(
30
- gitlabJobs.map(({ gitlabJob, name }) => [name, gitlabJob]),
30
+ gitlabJobs.map(({ gitlabJob, name }) => [name, gitlabJob])
31
31
  ),
32
32
  }) as Pipeline<T>;
33
33
  }
@@ -9,7 +9,7 @@ import { getPackageManagerInfo } from "./packageManager";
9
9
 
10
10
  const injectDefaultVarsInCustomJobs = (
11
11
  context: Context,
12
- jobs: CatladderJob[],
12
+ jobs: CatladderJob[]
13
13
  ) =>
14
14
  jobs.map(({ variables, ...job }) => ({
15
15
  variables: {
@@ -40,11 +40,11 @@ const createRawJobs = (context: Context): CatladderJob[] => {
40
40
  };
41
41
 
42
42
  export const createJobsForComponent = async (
43
- contextContext: Omit<CreateContextContext, "packageManagerInfo">,
43
+ contextContext: Omit<CreateContextContext, "packageManagerInfo">
44
44
  ): Promise<Array<CatladderJobWithContext>> => {
45
45
  const packageManagerInfo = await getPackageManagerInfo(
46
46
  contextContext.config,
47
- contextContext.componentName,
47
+ contextContext.componentName
48
48
  );
49
49
 
50
50
  const context = await createContext({
@@ -20,7 +20,7 @@ import { getGitlabReleaseJobs } from "./gitlab/gitlabReleaseJobs";
20
20
 
21
21
  export const createMainPipeline = async <T extends PipelineType>(
22
22
  pipelineType: T,
23
- config: Config,
23
+ config: Config
24
24
  ): Promise<Pipeline<T>> => {
25
25
  const stages = getPipelineStages(config);
26
26
 
@@ -32,9 +32,9 @@ export const createMainPipeline = async <T extends PipelineType>(
32
32
  async (trigger) =>
33
33
  await createGitlabJobs(
34
34
  await createAllJobs({ config, trigger, pipelineType }),
35
- getGitlabRulesForTrigger(trigger),
36
- ),
37
- ),
35
+ getGitlabRulesForTrigger(trigger)
36
+ )
37
+ )
38
38
  );
39
39
 
40
40
  const allJobs = allJobsPerTrigger
@@ -48,23 +48,20 @@ export const createMainPipeline = async <T extends PipelineType>(
48
48
  return aIndex - bIndex;
49
49
  })
50
50
 
51
- .reduce(
52
- (acc, { gitlabJob, name }) => {
53
- // merge jobs, if a job is already there, merge the rules
54
- // this is currently needed because of envMode: "none", which creates the same job for all triggers, so it can appear multiple times
55
- if (acc[name]) {
56
- acc[name].rules = [
57
- ...(acc[name].rules ?? []),
58
- ...(gitlabJob.rules ?? []),
59
- ];
60
- } else {
61
- acc[name] = gitlabJob;
62
- }
51
+ .reduce((acc, { gitlabJob, name }) => {
52
+ // merge jobs, if a job is already there, merge the rules
53
+ // this is currently needed because of envMode: "none", which creates the same job for all triggers, so it can appear multiple times
54
+ if (acc[name]) {
55
+ acc[name].rules = [
56
+ ...(acc[name].rules ?? []),
57
+ ...(gitlabJob.rules ?? []),
58
+ ];
59
+ } else {
60
+ acc[name] = gitlabJob;
61
+ }
63
62
 
64
- return acc;
65
- },
66
- {} as { [key: string]: GitlabJobDef },
67
- );
63
+ return acc;
64
+ }, {} as { [key: string]: GitlabJobDef });
68
65
 
69
66
  return createGitlabPipelineWithDefaults({
70
67
  stages: [...stages, "release"],
@@ -6,7 +6,7 @@ import { getPipelineTriggerForGitlabChildPipeline } from "./gitlab/getPipelineTr
6
6
  export async function generatePipelineFiles<T extends PipelineType>(
7
7
  config: Config,
8
8
  pipelineType: T,
9
- mode: PipelineMode<T>,
9
+ mode: PipelineMode<T>
10
10
  ) {
11
11
  if (mode === "childpipeline") {
12
12
  const trigger = getPipelineTriggerForGitlabChildPipeline();
@@ -14,14 +14,14 @@ export async function generatePipelineFiles<T extends PipelineType>(
14
14
  const { jobs, ...mainPipeline } = await createChildPipeline(
15
15
  pipelineType,
16
16
  trigger,
17
- config,
17
+ config
18
18
  );
19
19
  // need to spread out the jobs, forgot why
20
20
  await writeYamlfile(`__pipeline.yml`, { ...jobs, ...mainPipeline });
21
21
  } else {
22
22
  const { jobs, ...mainPipeline } = await createMainPipeline(
23
23
  pipelineType,
24
- config,
24
+ config
25
25
  );
26
26
  // need to spread out the jobs, forgot why
27
27
  await writeYamlfile(`.gitlab-ci.yml`, { ...jobs, ...mainPipeline });
@@ -16,7 +16,7 @@ export function getPipelineStages(config: Config) {
16
16
  baseStage,
17
17
  ...allEnvs.map((e) => `${baseStage} ${e}`),
18
18
  ],
19
- [],
19
+ []
20
20
  );
21
21
  return stages;
22
22
  }
@@ -22,12 +22,12 @@ export type AllGitlabJobs = {
22
22
  export const GITLAB_ENVIRONMENT_URL_VARIABLE = "CL_GITLAB_ENVIRONMENT_URL";
23
23
  const removeUndefined = (obj: GitlabJobDef): GitlabJobDef =>
24
24
  Object.fromEntries(
25
- Object.entries(obj).filter(([, value]) => value !== undefined),
25
+ Object.entries(obj).filter(([, value]) => value !== undefined)
26
26
  ) as GitlabJobDef;
27
27
  const getFullJobName = (
28
28
  name: string,
29
29
  componentName: string,
30
- env?: string | null,
30
+ env?: string | null
31
31
  ) => {
32
32
  if (env) {
33
33
  return `${componentName} ${name} | ${env} `;
@@ -39,14 +39,14 @@ const getFullReferencedJobName = (
39
39
  referencedJobName: string,
40
40
  componentName: string,
41
41
  env: string,
42
- allJobs: AllCatladderJobs,
42
+ allJobs: AllCatladderJobs
43
43
  ) => {
44
44
  const referencedJob = allJobs[componentName]?.[env]?.find(
45
- (j) => j.name === referencedJobName,
45
+ (j) => j.name === referencedJobName
46
46
  );
47
47
  if (!referencedJob) {
48
48
  throw new Error(
49
- `unknown job referenced: '${referencedJobName}' from '${env}:${componentName}'`,
49
+ `unknown job referenced: '${referencedJobName}' from '${env}:${componentName}'`
50
50
  );
51
51
  }
52
52
  const envToSet = referencedJob.envMode !== "none" ? env : null;
@@ -75,7 +75,7 @@ export const makeGitlabJob = (
75
75
  ...job
76
76
  }: CatladderJobWithContext<string>,
77
77
  allJobs: AllCatladderJobs,
78
- baseRules?: GitlabRule[],
78
+ baseRules?: GitlabRule[]
79
79
  ): [fullName: string, job: GitlabJobDef] => {
80
80
  const stage = envMode === "stagePerEnv" ? `${job.stage} ${env}` : job.stage;
81
81
 
@@ -107,11 +107,11 @@ export const makeGitlabJob = (
107
107
  n.job,
108
108
  n.componentName ?? componentName,
109
109
  env,
110
- allJobs,
110
+ allJobs
111
111
  ),
112
112
  artifacts: n.artifacts,
113
113
  }
114
- : getFullReferencedJobName(n, componentName, env, allJobs),
114
+ : getFullReferencedJobName(n, componentName, env, allJobs)
115
115
  ) // sort in a predictable manner for snapshot tests
116
116
  .sort((a, b) => getJobName(a).localeCompare(getJobName(b)));
117
117
 
@@ -122,7 +122,7 @@ export const makeGitlabJob = (
122
122
  const fullJobName = getFullJobName(
123
123
  name,
124
124
  componentName,
125
- envMode !== "none" ? env : undefined,
125
+ envMode !== "none" ? env : undefined
126
126
  );
127
127
 
128
128
  // backwards compatibility, some may still use KUBERNETES_CPU_REQUEST, KUBERNETES_MEMORY_REQUEST, etc. in variables.
@@ -137,29 +137,29 @@ export const makeGitlabJob = (
137
137
 
138
138
  const varsInjectScripts = collapseableSection(
139
139
  "injectvars",
140
- "Injecting variables",
140
+ "Injecting variables"
141
141
  )([
142
142
  ...getInjectVarsScript(
143
143
  // remove legacy variables
144
144
  Object.fromEntries(
145
145
  Object.entries(variables ?? {}).filter(
146
- ([key]) => !PIPELINE_RUNNER_VARIABLES.includes(key),
147
- ),
148
- ),
146
+ ([key]) => !PIPELINE_RUNNER_VARIABLES.includes(key)
147
+ )
148
+ )
149
149
  ),
150
150
  ]);
151
151
 
152
152
  const legacyRunnerVariables = Object.fromEntries(
153
153
  Object.entries(variables ?? {}).filter(([key]) =>
154
- PIPELINE_RUNNER_VARIABLES.includes(key),
155
- ),
154
+ PIPELINE_RUNNER_VARIABLES.includes(key)
155
+ )
156
156
  );
157
157
 
158
158
  if (Object.keys(legacyRunnerVariables).length > 0) {
159
159
  console.warn(
160
160
  `Legacy variables detected in ${fullJobName}: ${Object.keys(
161
- legacyRunnerVariables,
162
- ).join(", ")}. Please move them to the runnerVariables key.`,
161
+ legacyRunnerVariables
162
+ ).join(", ")}. Please move them to the runnerVariables key.`
163
163
  );
164
164
  }
165
165
  const rules = [
@@ -170,8 +170,8 @@ export const makeGitlabJob = (
170
170
  ...rule,
171
171
  }))
172
172
  : when
173
- ? [{ when }]
174
- : []),
173
+ ? [{ when }]
174
+ : []),
175
175
  ];
176
176
  const modified = addGitlabEnvironment(
177
177
  context,
@@ -194,7 +194,7 @@ export const makeGitlabJob = (
194
194
  },
195
195
  componentName,
196
196
  env,
197
- allJobs,
197
+ allJobs
198
198
  );
199
199
 
200
200
  const gitlabJob: GitlabJobDef = removeUndefined(modified);
@@ -208,7 +208,7 @@ const addGitlabEnvironment = (
208
208
  job: GitlabJobDef,
209
209
  componentName: string,
210
210
  env: string, // TODO: we could actually pull this from contxt
211
- allJobs: AllCatladderJobs,
211
+ allJobs: AllCatladderJobs
212
212
  ): GitlabJobDef => {
213
213
  if (!environment) {
214
214
  return job;
@@ -240,7 +240,7 @@ const addGitlabEnvironment = (
240
240
  on_stop,
241
241
  componentName,
242
242
  env,
243
- allJobs,
243
+ allJobs
244
244
  ),
245
245
  }
246
246
  : {}),
@@ -258,7 +258,7 @@ const addGitlabEnvironment = (
258
258
 
259
259
  export const createGitlabJobs = async (
260
260
  allJobs: AllCatladderJobs,
261
- baseRules?: GitlabRule[],
261
+ baseRules?: GitlabRule[]
262
262
  ): Promise<AllGitlabJobs> => {
263
263
  return Object.keys(allJobs).flatMap((componentName) => {
264
264
  const componentJobs = allJobs[componentName];
@@ -271,7 +271,7 @@ export const createGitlabJobs = async (
271
271
  env,
272
272
  job,
273
273
  allJobs,
274
- baseRules,
274
+ baseRules
275
275
  );
276
276
  return {
277
277
  name: fullJobName,
@@ -23,10 +23,10 @@ export function getPipelineTriggerForGitlabChildPipeline() {
23
23
  isMergeRequest || isHotfixBranch
24
24
  ? "mr"
25
25
  : isDefaultBranch
26
- ? "mainBranch"
27
- : isTaggedRelease
28
- ? "taggedRelease"
29
- : null;
26
+ ? "mainBranch"
27
+ : isTaggedRelease
28
+ ? "taggedRelease"
29
+ : null;
30
30
 
31
31
  if (!trigger) {
32
32
  throw new Error(
@@ -38,8 +38,8 @@ export function getPipelineTriggerForGitlabChildPipeline() {
38
38
  isTaggedRelease,
39
39
  },
40
40
  null,
41
- 2,
42
- ),
41
+ 2
42
+ )
43
43
  );
44
44
  }
45
45
  return trigger;
@@ -10,7 +10,7 @@ import {
10
10
 
11
11
  export const getPackageManagerInfo = async (
12
12
  config: Config,
13
- componentName: string,
13
+ componentName: string
14
14
  ): Promise<PackageManagerInfo> => {
15
15
  // currently only supports yarn
16
16
  const version = await getYarnVersion();
@@ -20,7 +20,7 @@ export const getPackageManagerInfo = async (
20
20
  const component = config.components[componentName];
21
21
  const workspaces = await getWorkspaces(isClassic);
22
22
  const currentWorkspace = workspaces.find((w) =>
23
- pathEqual(component.dir, w.location),
23
+ pathEqual(component.dir, w.location)
24
24
  );
25
25
  const componentIsInWorkspace = Boolean(currentWorkspace);
26
26
  const workspaceRoot = "."; // currently we assume the root folder, later on we might support nested workspaces
@@ -14,7 +14,7 @@ export const getYarnVersion = memoizee(
14
14
  async () => {
15
15
  return await execOrFail("yarn --version", "");
16
16
  },
17
- { promise: true },
17
+ { promise: true }
18
18
  );
19
19
  // export for mocking
20
20
  export const getWorkspaces = memoizee(
@@ -23,23 +23,23 @@ export const getWorkspaces = memoizee(
23
23
  ? Object.values(
24
24
  JSON.parse(
25
25
  JSON.parse(await execOrFail("yarn workspaces --json info", "{}"))
26
- ?.data ?? "{}",
27
- ),
26
+ ?.data ?? "{}"
27
+ )
28
28
  )
29
29
  : JSON.parse(
30
30
  `[${(await execOrFail("yarn workspaces list --json --verbose", ""))
31
31
  .trim()
32
32
  .split("\n")
33
- .join(",")}]`,
33
+ .join(",")}]`
34
34
  );
35
35
  },
36
- { promise: true },
36
+ { promise: true }
37
37
  );
38
38
 
39
39
  // recursivly get all workspace dependencies
40
40
  export const getWorkspaceDependencies = (
41
41
  ws: YarnWorkspace,
42
- allWorkspaces: YarnWorkspace[],
42
+ allWorkspaces: YarnWorkspace[]
43
43
  ): string[] => {
44
44
  return ws
45
45
  ? ([...ws.workspaceDependencies, ...ws.mismatchedWorkspaceDependencies]
@@ -47,7 +47,7 @@ export const getWorkspaceDependencies = (
47
47
  // we have to do this recursivly
48
48
 
49
49
  const otherWorkspace = allWorkspaces.find(
50
- (w) => w.location === location,
50
+ (w) => w.location === location
51
51
  );
52
52
 
53
53
  if (otherWorkspace) {
@@ -11,7 +11,7 @@ export const ALL_PIPELINE_TRIGGERS = [
11
11
  "mr",
12
12
  "taggedRelease",
13
13
  ] as const;
14
- export type PipelineTrigger = (typeof ALL_PIPELINE_TRIGGERS)[number];
14
+ export type PipelineTrigger = typeof ALL_PIPELINE_TRIGGERS[number];
15
15
 
16
16
  /**
17
17
  * all env types with their trigger.
@@ -43,7 +43,7 @@ export const ENV_TYPES = {
43
43
  export const getEnvTypesByTrigger = (trigger: PipelineTrigger) =>
44
44
  Object.entries(ENV_TYPES)
45
45
  .filter(([, e]) =>
46
- (e.triggers as readonly PipelineTrigger[]).includes(trigger),
46
+ (e.triggers as readonly PipelineTrigger[]).includes(trigger)
47
47
  )
48
48
  .map(([e]) => e as EnvType);
49
49
 
@@ -15,7 +15,7 @@ export type UnspecifiedEnvVars = Record<
15
15
  >;
16
16
 
17
17
  export type EnvironmentEnvVars<
18
- V extends UnspecifiedEnvVars = UnspecifiedEnvVars,
18
+ V extends UnspecifiedEnvVars = UnspecifiedEnvVars
19
19
  > = {
20
20
  envVars: V & UnspecifiedEnvVars;
21
21
  secretEnvVarKeys: SecretEnvVar[];
@@ -7,7 +7,7 @@ import type { PipelineType } from "./pipeline";
7
7
 
8
8
  export type EnvironmentContext<
9
9
  B extends BuildConfigType,
10
- D extends DeployConfigType,
10
+ D extends DeployConfigType
11
11
  > = {
12
12
  envConfigRaw: EnvConfigWithComponent;
13
13
  buildConfigRaw: false | BuildConfigGeneric<B>;
package/src/types/jobs.ts CHANGED
@@ -21,7 +21,7 @@ export const BASE_STAGES = [
21
21
  "rollback",
22
22
  "stop",
23
23
  ] as const;
24
- export type BaseStage = (typeof BASE_STAGES)[number];
24
+ export type BaseStage = typeof BASE_STAGES[number];
25
25
 
26
26
  export type CatladderJobNeed =
27
27
  | string
@@ -1,7 +1,7 @@
1
1
  export type PartialDeep<T> = T extends any[]
2
2
  ? T
3
3
  : T extends Record<string, any>
4
- ? {
5
- [P in keyof T]?: PartialDeep<T[P]>;
6
- }
7
- : T;
4
+ ? {
5
+ [P in keyof T]?: PartialDeep<T[P]>;
6
+ }
7
+ : T;
@@ -11,7 +11,7 @@ export const repeatOnFailure = (
11
11
  command: string,
12
12
  options: {
13
13
  pauseInSeconds: number;
14
- },
14
+ }
15
15
  ): string => {
16
16
  return `
17
17
  until ${command}
@@ -1,7 +1,7 @@
1
1
  import { isNil, mergeWith } from "lodash";
2
2
 
3
3
  export function notNil<TValue>(
4
- value: TValue | null | undefined,
4
+ value: TValue | null | undefined
5
5
  ): value is TValue {
6
6
  return value !== null && value !== undefined;
7
7
  }
@@ -14,6 +14,6 @@ export const mergeWithMergingArrays = <A, B>(obj1: A, obj2: B): A & B => {
14
14
  return mergeWith({}, obj1, obj2, (prop1, prop2) =>
15
15
  Array.isArray(prop1) && Array.isArray(prop2)
16
16
  ? [...prop1, ...prop2]
17
- : undefined,
17
+ : undefined
18
18
  );
19
19
  };
@@ -21,7 +21,7 @@ export const writeGeneratedFile = async (
21
21
  commentChar,
22
22
  }: {
23
23
  commentChar: string;
24
- },
24
+ }
25
25
  ) => {
26
26
  await writeFile(
27
27
  path,
@@ -29,7 +29,7 @@ export const writeGeneratedFile = async (
29
29
  [getAutoGeneratedHeader(commentChar), content].join("\n"),
30
30
  {
31
31
  encoding: "utf-8",
32
- },
32
+ }
33
33
  );
34
34
  };
35
35