@catladder/pipeline 1.146.1 → 1.146.2

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 (122) hide show
  1. package/dist/build/base/createAppBuildJob.d.ts +2 -2
  2. package/dist/build/base/createAppBuildJob.js +1 -1
  3. package/dist/build/base/index.d.ts +2 -2
  4. package/dist/build/base/writeBuildInfo.d.ts +2 -2
  5. package/dist/build/base/writeDotEnv.d.ts +2 -2
  6. package/dist/build/custom/buildJob.d.ts +2 -2
  7. package/dist/build/custom/index.d.ts +2 -2
  8. package/dist/build/custom/testJob.d.ts +2 -2
  9. package/dist/build/docker.d.ts +9 -9
  10. package/dist/build/index.d.ts +2 -2
  11. package/dist/build/node/buildJob.d.ts +2 -2
  12. package/dist/build/node/buildJob.js +6 -6
  13. package/dist/build/node/cache.d.ts +5 -5
  14. package/dist/build/node/cache.js +4 -4
  15. package/dist/build/node/index.d.ts +4 -4
  16. package/dist/build/node/meteor.d.ts +2 -2
  17. package/dist/build/node/meteor.js +2 -2
  18. package/dist/build/node/testJob.d.ts +2 -2
  19. package/dist/build/node/testJob.js +6 -6
  20. package/dist/build/node/yarn.d.ts +4 -4
  21. package/dist/build/node/yarn.js +1 -1
  22. package/dist/build/rails/build.d.ts +2 -2
  23. package/dist/build/rails/index.d.ts +2 -2
  24. package/dist/build/rails/test.d.ts +2 -2
  25. package/dist/build/sbom.d.ts +2 -2
  26. package/dist/build/sbom.js +1 -1
  27. package/dist/bundles/catladder-gitlab/index.js +1 -1
  28. package/dist/constants.js +1 -1
  29. package/dist/context/getEnvironment.d.ts +2 -2
  30. package/dist/context/getEnvironmentContext.d.ts +2 -2
  31. package/dist/context/getEnvironmentVariables.d.ts +4 -4
  32. package/dist/context/getLabels.d.ts +2 -2
  33. package/dist/context/index.d.ts +7 -3
  34. package/dist/context/index.js +12 -3
  35. package/dist/deploy/base/deploy.d.ts +2 -2
  36. package/dist/deploy/base/index.d.ts +2 -2
  37. package/dist/deploy/base/rollback.d.ts +2 -2
  38. package/dist/deploy/base/stop.d.ts +2 -2
  39. package/dist/deploy/cloudRun/artifactsRegistry.d.ts +7 -7
  40. package/dist/deploy/cloudRun/cleanup.d.ts +2 -2
  41. package/dist/deploy/cloudRun/cloudRunRevisions.d.ts +2 -2
  42. package/dist/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +6 -6
  43. package/dist/deploy/cloudRun/createJobs/cloudRunServices.d.ts +3 -3
  44. package/dist/deploy/cloudRun/createJobs/common.d.ts +4 -4
  45. package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +2 -2
  46. package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +2 -2
  47. package/dist/deploy/cloudRun/createJobs/index.d.ts +2 -2
  48. package/dist/deploy/cloudRun/utils/database.d.ts +3 -3
  49. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -2
  50. package/dist/deploy/cloudRun/utils/getServiceName.d.ts +2 -2
  51. package/dist/deploy/custom/deployJob.d.ts +2 -2
  52. package/dist/deploy/custom/deployJob.js +1 -1
  53. package/dist/deploy/dockerTag/deployJob.d.ts +2 -2
  54. package/dist/deploy/index.d.ts +2 -2
  55. package/dist/deploy/kubernetes/cloudSql/index.d.ts +3 -3
  56. package/dist/deploy/kubernetes/deployJob.d.ts +2 -2
  57. package/dist/deploy/kubernetes/kubeEnv.d.ts +2 -2
  58. package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
  59. package/dist/deploy/kubernetes/mongodb.d.ts +2 -2
  60. package/dist/deploy/sbom.d.ts +4 -4
  61. package/dist/deploy/utils.d.ts +2 -2
  62. package/dist/pipeline/createJobsForComponent.d.ts +2 -2
  63. package/dist/pipeline/createJobsForComponent.js +1 -1
  64. package/dist/tsconfig.tsbuildinfo +1 -1
  65. package/dist/types/config.d.ts +2 -2
  66. package/dist/types/context.d.ts +16 -2
  67. package/package.json +1 -1
  68. package/src/build/base/createAppBuildJob.ts +3 -3
  69. package/src/build/base/index.ts +2 -2
  70. package/src/build/base/writeBuildInfo.ts +2 -2
  71. package/src/build/base/writeDotEnv.ts +2 -2
  72. package/src/build/custom/__tests__/testJob.test.ts +5 -5
  73. package/src/build/custom/buildJob.ts +4 -2
  74. package/src/build/custom/index.ts +2 -2
  75. package/src/build/custom/testJob.ts +4 -2
  76. package/src/build/docker.ts +9 -9
  77. package/src/build/index.ts +2 -2
  78. package/src/build/node/buildJob.ts +13 -9
  79. package/src/build/node/cache.ts +9 -9
  80. package/src/build/node/index.ts +6 -4
  81. package/src/build/node/meteor.ts +10 -5
  82. package/src/build/node/testJob.ts +11 -8
  83. package/src/build/node/yarn.ts +6 -8
  84. package/src/build/rails/build.ts +4 -2
  85. package/src/build/rails/index.ts +2 -2
  86. package/src/build/rails/test.ts +4 -2
  87. package/src/build/sbom.ts +4 -4
  88. package/src/context/getEnvironment.ts +2 -2
  89. package/src/context/getEnvironmentContext.ts +2 -2
  90. package/src/context/getEnvironmentVariables.ts +7 -4
  91. package/src/context/getLabels.ts +2 -2
  92. package/src/context/index.ts +15 -5
  93. package/src/deploy/base/deploy.ts +2 -2
  94. package/src/deploy/base/index.ts +2 -2
  95. package/src/deploy/base/rollback.ts +2 -2
  96. package/src/deploy/base/stop.ts +2 -2
  97. package/src/deploy/cloudRun/artifactsRegistry.ts +12 -7
  98. package/src/deploy/cloudRun/cleanup.ts +2 -2
  99. package/src/deploy/cloudRun/cloudRunRevisions.ts +3 -3
  100. package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +10 -10
  101. package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +3 -3
  102. package/src/deploy/cloudRun/createJobs/common.ts +4 -4
  103. package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +5 -2
  104. package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +2 -2
  105. package/src/deploy/cloudRun/createJobs/index.ts +2 -2
  106. package/src/deploy/cloudRun/utils/database.ts +3 -3
  107. package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +4 -2
  108. package/src/deploy/cloudRun/utils/getServiceName.ts +2 -2
  109. package/src/deploy/custom/deployJob.ts +7 -3
  110. package/src/deploy/dockerTag/deployJob.ts +4 -2
  111. package/src/deploy/index.ts +2 -2
  112. package/src/deploy/kubernetes/cloudSql/index.ts +3 -3
  113. package/src/deploy/kubernetes/deployJob.ts +2 -2
  114. package/src/deploy/kubernetes/kubeEnv.ts +2 -2
  115. package/src/deploy/kubernetes/kubeValues.ts +3 -3
  116. package/src/deploy/kubernetes/mongodb.ts +8 -8
  117. package/src/deploy/sbom.ts +8 -4
  118. package/src/deploy/utils.ts +2 -2
  119. package/src/pipeline/createJobsForComponent.ts +11 -7
  120. package/src/pipeline/gitlab/createGitlabJobs.ts +2 -2
  121. package/src/types/config.ts +2 -2
  122. package/src/types/context.ts +18 -2
package/dist/constants.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
7
- exports.PIPELINE_IMAGE_TAG = "v1-146-1-f351fad0" || "latest";
7
+ exports.PIPELINE_IMAGE_TAG = "v1-146-2-0f533fec" || "latest";
8
8
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
@@ -1,3 +1,3 @@
1
- import type { CreateContextContext } from "..";
1
+ import type { CreateComponentContextContext } from "..";
2
2
  import type { Environment } from "../types/context";
3
- export declare const getEnvironment: (ctx: CreateContextContext) => Promise<Environment>;
3
+ export declare const getEnvironment: (ctx: CreateComponentContextContext) => Promise<Environment>;
@@ -1,8 +1,8 @@
1
- import type { CreateContextContext } from "..";
1
+ import type { CreateComponentContextContext } from "..";
2
2
  import type { EnvironmentContext } from "../types/environmentContext";
3
3
  export declare const getEnvironmentContext: ({
4
4
  env,
5
5
  componentName,
6
6
  config,
7
7
  pipelineType
8
- }: CreateContextContext) => EnvironmentContext<any, any>;
8
+ }: CreateComponentContextContext) => EnvironmentContext<any, any>;
@@ -1,5 +1,5 @@
1
- import type { Context, EnvironmentEnvVarPart as EnvironmentVariables } from "../types";
2
- import type { CreateContextContext } from "..";
1
+ import type { ComponentContext, EnvironmentEnvVarPart as EnvironmentVariables } from "../types";
2
+ import type { CreateComponentContextContext } from "..";
3
3
  import type { StringOrBashExpression } from "../bash/BashExpression";
4
4
  import type { EnvironmentContext } from "../types/environmentContext";
5
5
  export type SecretEnvVar = {
@@ -24,7 +24,7 @@ export type PredefinedVariables = BasePredefinedVariables & {
24
24
  HOST_INTERNAL: StringOrBashExpression;
25
25
  ROOT_URL_INTERNAL: StringOrBashExpression;
26
26
  };
27
- export declare const getEnvironmentVariables: (ctx: CreateContextContext, alreadyVisited?: Record<string, Record<string, boolean>>) => Promise<EnvironmentVariables>;
27
+ export declare const getEnvironmentVariables: (ctx: CreateComponentContextContext, alreadyVisited?: Record<string, Record<string, boolean>>) => Promise<EnvironmentVariables>;
28
28
  export declare const getSecretVarName: (env: string, componentName: string, key: string) => string;
29
- export declare const getSecretVarNameForContext: (context: Context, key: string) => string;
29
+ export declare const getSecretVarNameForContext: (context: ComponentContext, key: string) => string;
30
30
  export {};
@@ -1,5 +1,5 @@
1
- import type { Context } from "../types";
2
- export declare const getLabels: (context: Context) => {
1
+ import type { ComponentContext } from "../types";
2
+ export declare const getLabels: (context: ComponentContext) => {
3
3
  "customer-name": string | undefined;
4
4
  "component-name": string | undefined;
5
5
  "app-name": string | undefined;
@@ -1,9 +1,9 @@
1
1
  import type { PipelineType } from "../types";
2
2
  import type { Config, PipelineTrigger } from "../types/config";
3
- import type { Context, PackageManagerInfo } from "../types/context";
3
+ import type { ComponentContext, PackageManagerInfo } from "../types/context";
4
4
  export * from "./getEnvironment";
5
5
  export * from "./getEnvironmentVariables";
6
- export type CreateContextContext = {
6
+ export type CreateComponentContextContext = {
7
7
  config: Config;
8
8
  componentName: string;
9
9
  env: string;
@@ -11,4 +11,8 @@ export type CreateContextContext = {
11
11
  trigger?: PipelineTrigger;
12
12
  packageManagerInfo?: PackageManagerInfo;
13
13
  };
14
- export declare const createContext: (ctx: CreateContextContext) => Promise<Context>;
14
+ export declare const createComponentContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
15
+ /**
16
+ * @deprecated use createComponentContext instead
17
+ */
18
+ export declare const createContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
@@ -137,7 +137,7 @@ var __generator = this && this.__generator || function (thisArg, body) {
137
137
  Object.defineProperty(exports, "__esModule", {
138
138
  value: true
139
139
  });
140
- exports.createContext = void 0;
140
+ exports.createContext = exports.createComponentContext = void 0;
141
141
  var build_1 = require("../build");
142
142
  var deploy_1 = require("../deploy");
143
143
  var utils_1 = require("../utils");
@@ -145,7 +145,7 @@ var getEnvironment_1 = require("./getEnvironment");
145
145
  var getEnvironmentContext_1 = require("./getEnvironmentContext");
146
146
  __exportStar(require("./getEnvironment"), exports);
147
147
  __exportStar(require("./getEnvironmentVariables"), exports);
148
- var createContext = function (ctx) {
148
+ var createComponentContext = function (ctx) {
149
149
  return __awaiter(void 0, void 0, void 0, function () {
150
150
  var envContext, componentConfigWithoutDefaults, defaults, componentConfig;
151
151
  var _a;
@@ -168,6 +168,11 @@ var createContext = function (ctx) {
168
168
  _a = {
169
169
  fullConfig: ctx.config,
170
170
  componentConfig: componentConfig,
171
+ buildContext: {
172
+ dir: componentConfig.dir,
173
+ packageManagerInfo: ctx.packageManagerInfo,
174
+ config: componentConfig.build
175
+ },
171
176
  componentName: ctx.componentName
172
177
  };
173
178
  return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
@@ -177,4 +182,8 @@ var createContext = function (ctx) {
177
182
  });
178
183
  });
179
184
  };
180
- exports.createContext = createContext;
185
+ exports.createComponentContext = createComponentContext;
186
+ /**
187
+ * @deprecated use createComponentContext instead
188
+ */
189
+ exports.createContext = exports.createComponentContext;
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  export declare const DEPLOY_JOB_NAME = "\uD83D\uDE80 Deploy";
4
4
  export type DeployJobDefinition = Pick<CatladderJob, "script" | "variables" | "image" | "cache" | "artifacts" | "services" | "runnerVariables">;
5
- export declare const createDeployJob: (context: Context, jobDefinition: DeployJobDefinition) => CatladderJob;
5
+ export declare const createDeployJob: (context: ComponentContext, jobDefinition: DeployJobDefinition) => CatladderJob;
@@ -1,9 +1,9 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  import { type DeployJobDefinition } from "./deploy";
4
4
  import { type RollbackJobDefinition } from "./rollback";
5
5
  import { type StopJobDefinition } from "./stop";
6
- export declare const createDeployementJobs: (context: Context, definitions: {
6
+ export declare const createDeployementJobs: (context: ComponentContext, definitions: {
7
7
  deploy: DeployJobDefinition;
8
8
  stop?: StopJobDefinition;
9
9
  rollback?: RollbackJobDefinition;
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  export declare const ROLLBACK_JOB_NAME = "\u21A9\uFE0F Rollback \u26A0\uFE0F";
4
4
  export type RollbackJobDefinition = Pick<CatladderJob, "script" | "variables" | "runnerVariables" | "image">;
5
- export declare const createRollbackJob: (context: Context, jobDefinition: RollbackJobDefinition) => CatladderJob;
5
+ export declare const createRollbackJob: (context: ComponentContext, jobDefinition: RollbackJobDefinition) => CatladderJob;
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  export declare const STOP_JOB_NAME = "\uD83D\uDED1 Stop \u26A0\uFE0F";
4
4
  export type StopJobDefinition = Pick<CatladderJob, "script" | "variables" | "image" | "runnerVariables">;
5
- export declare const createStopJob: (context: Context, jobDefinition: StopJobDefinition) => CatladderJob;
5
+ export declare const createStopJob: (context: ComponentContext, jobDefinition: StopJobDefinition) => CatladderJob;
@@ -1,18 +1,18 @@
1
1
  import type { StringOrBashExpression } from "../../bash/BashExpression";
2
- import type { Context } from "../../types/context";
2
+ import type { ComponentContext } from "../../types/context";
3
3
  export declare const getArtifactsRegistryHost: ({
4
4
  componentConfig: {
5
5
  deploy
6
6
  }
7
- }: Context) => string;
8
- export declare const getArtifactsRegistryDockerUrl: (context: Context) => string;
7
+ }: ComponentContext) => string;
8
+ export declare const getArtifactsRegistryDockerUrl: (context: ComponentContext) => string;
9
9
  /**
10
10
  *
11
11
  * lecacyReviewImageName is only temporary. In old versions the images had no reviewslug in review apps, which makes cleanup harder. We delete all those images now, but need the path
12
12
  */
13
- export declare const getArtifactsRegistryImageName: (context: Context, lecacyReviewImageName?: boolean) => StringOrBashExpression;
14
- export declare const getArtifactsRegistryBuildCacheImage: (context: Context) => string;
15
- export declare const getArtifactsRegistryImage: (context: Context) => string;
13
+ export declare const getArtifactsRegistryImageName: (context: ComponentContext, lecacyReviewImageName?: boolean) => StringOrBashExpression;
14
+ export declare const getArtifactsRegistryBuildCacheImage: (context: ComponentContext) => string;
15
+ export declare const getArtifactsRegistryImage: (context: ComponentContext) => string;
16
16
  /**
17
17
  * commands to delete unused images.
18
18
  *
@@ -20,4 +20,4 @@ export declare const getArtifactsRegistryImage: (context: Context) => string;
20
20
  * @param keep how many of the newest images to keep
21
21
  * @returns
22
22
  */
23
- export declare const getDeleteUnusedImagesCommands: (context: Context, keep?: number) => string[];
23
+ export declare const getDeleteUnusedImagesCommands: (context: ComponentContext, keep?: number) => string[];
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../types/context";
2
- export declare const getRemoveOldRevisionsAndImagesCommand: (context: Context, when: "postDeploy" | "onStop") => string[];
1
+ import type { ComponentContext } from "../../types/context";
2
+ export declare const getRemoveOldRevisionsAndImagesCommand: (context: ComponentContext, when: "postDeploy" | "onStop") => string[];
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../types/context";
2
- export declare const getDeleteUnusedRevisionsCommands: (context: Context, keep: number) => string[];
1
+ import type { ComponentContext } from "../../types/context";
2
+ export declare const getDeleteUnusedRevisionsCommands: (context: ComponentContext, keep: number) => string[];
@@ -1,7 +1,7 @@
1
- import type { Context } from "../../../types/context";
1
+ import type { ComponentContext } from "../../../types/context";
2
2
  import type { DeployConfigCloudRunJob } from "../../types/googleCloudRun";
3
- export declare const getDeleteSchedulesScripts: (context: Context) => string[];
4
- export declare const getDeleteJobsScripts: (context: Context) => string[];
5
- export declare const getJobRunScripts: (context: Context, when: DeployConfigCloudRunJob["when"]) => string[];
6
- export declare const getJobCreateScripts: (context: Context) => string[];
7
- export declare const getCreateScheduleScripts: (context: Context) => string[];
3
+ export declare const getDeleteSchedulesScripts: (context: ComponentContext) => string[];
4
+ export declare const getDeleteJobsScripts: (context: ComponentContext) => string[];
5
+ export declare const getJobRunScripts: (context: ComponentContext, when: DeployConfigCloudRunJob["when"]) => string[];
6
+ export declare const getJobCreateScripts: (context: ComponentContext) => string[];
7
+ export declare const getCreateScheduleScripts: (context: ComponentContext) => string[];
@@ -1,4 +1,4 @@
1
- import type { Context } from "../../../types/context";
1
+ import type { ComponentContext } from "../../../types/context";
2
2
  import type { DeployConfigCloudRunService } from "../../types/googleCloudRun";
3
- export declare const getServiceDeployScript: (context: Context, service: DeployConfigCloudRunService | true | undefined, nameSuffix?: string) => string;
4
- export declare const getServiceDeleteScript: (context: Context, serviceSuffix?: string) => string[];
3
+ export declare const getServiceDeployScript: (context: ComponentContext, service: DeployConfigCloudRunService | true | undefined, nameSuffix?: string) => string;
4
+ export declare const getServiceDeleteScript: (context: ComponentContext, serviceSuffix?: string) => string[];
@@ -1,16 +1,16 @@
1
- import type { Context } from "../../../types/context";
1
+ import type { ComponentContext } from "../../../types/context";
2
2
  import type { DeployConfigCloudRun } from "../../types/googleCloudRun";
3
3
  export declare const gcloudCmd: (version?: "beta") => string;
4
4
  export declare const gcloudRunCmd: (version?: "beta") => string;
5
5
  export declare const gcloudSchedulerCmd: (version?: "beta") => string;
6
6
  export declare const setGoogleProjectNumberScript: (deployConfig: DeployConfigCloudRun) => string[];
7
7
  export declare const makeLabelString: (obj: Record<string, unknown>) => string;
8
- export declare const getCloudRunDeployConfig: (context: Context) => DeployConfigCloudRun;
9
- export declare function getCommonCloudRunArgs(context: Context): {
8
+ export declare const getCloudRunDeployConfig: (context: ComponentContext) => DeployConfigCloudRun;
9
+ export declare function getCommonCloudRunArgs(context: ComponentContext): {
10
10
  project: string;
11
11
  region: import("../../types").Gcloudregion;
12
12
  };
13
- export declare function getCommonDeployArgs(context: Context): {
13
+ export declare function getCommonDeployArgs(context: ComponentContext): {
14
14
  "set-cloudsql-instances": string | undefined;
15
15
  project: string;
16
16
  region: import("../../types").Gcloudregion;
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../../types/context";
2
- export declare function getCloudRunDeployScripts(context: Context): string[];
1
+ import type { ComponentContext } from "../../../types/context";
2
+ export declare function getCloudRunDeployScripts(context: ComponentContext): string[];
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../../types/context";
2
- export declare function getCloudRunStopScripts(context: Context): string[];
1
+ import type { ComponentContext } from "../../../types/context";
2
+ export declare function getCloudRunStopScripts(context: ComponentContext): string[];
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../../types/context";
1
+ import type { ComponentContext } from "../../../types/context";
2
2
  import type { CatladderJob } from "../../../types/jobs";
3
- export declare const createGoogleCloudRunDeployJobs: (context: Context) => CatladderJob[];
3
+ export declare const createGoogleCloudRunDeployJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,6 +1,6 @@
1
- import type { Context } from "../../../types";
1
+ import type { ComponentContext } from "../../../types";
2
2
  import type { DeployConfigCloudRun, DeployConfigCloudRunCloudSql } from "../../types";
3
- export declare const getDatabaseDeleteScript: (context: Context, deployConfig: DeployConfigCloudRun) => string[];
4
- export declare const getDatabaseCreateScript: (context: Context, deployConfig: DeployConfigCloudRun) => string[];
3
+ export declare const getDatabaseDeleteScript: (context: ComponentContext, deployConfig: DeployConfigCloudRun) => string[];
4
+ export declare const getDatabaseCreateScript: (context: ComponentContext, deployConfig: DeployConfigCloudRun) => string[];
5
5
  export declare const DATABASE_JDBC_URL = "jdbc:postgresql:///$DB_NAME?cloudSqlInstance=$CLOUD_SQL_INSTANCE_CONNECTION_NAME&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=$DB_USER&password=$DB_PASSWORD";
6
6
  export declare const getDatabaseConnectionString: (config: DeployConfigCloudRunCloudSql) => string;
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../../types";
2
- export declare const gcloudServiceAccountLoginCommands: (context: Context) => string[];
1
+ import type { ComponentContext } from "../../../types";
2
+ export declare const gcloudServiceAccountLoginCommands: (context: ComponentContext) => string[];
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../../types/context";
2
- export declare const getServiceName: (context: Context) => string | import("../../../bash/BashExpression").BashExpression;
1
+ import type { ComponentContext } from "../../../types/context";
2
+ export declare const getServiceName: (context: ComponentContext) => string | import("../../../bash/BashExpression").BashExpression;
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createCustomDeployJobs: (context: Context) => CatladderJob[];
3
+ export declare const createCustomDeployJobs: (context: ComponentContext) => CatladderJob[];
@@ -51,7 +51,7 @@ var createCustomDeployJobs = function (context) {
51
51
  throw new Error("deploy config is not custom");
52
52
  }
53
53
  // FIXME: custom deploy currently assumes yarn-based project
54
- var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
54
+ var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext, {
55
55
  noCustomPostInstall: true
56
56
  });
57
57
  return (0, base_1.createDeployementJobs)(context, {
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createDockerTagDeployJobs: (context: Context) => CatladderJob[];
3
+ export declare const createDockerTagDeployJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,6 +1,6 @@
1
1
  import type { SecretEnvVar } from "..";
2
2
  import type { BashExpression } from "../bash/BashExpression";
3
- import type { Context } from "../types/context";
3
+ import type { ComponentContext } from "../types/context";
4
4
  import type { EnvironmentContext } from "../types/environmentContext";
5
5
  import type { CatladderJob } from "../types/jobs";
6
6
  import type { PartialDeep } from "../types/utils";
@@ -10,7 +10,7 @@ export * from "./kubernetes";
10
10
  export * from "./types";
11
11
  export * from "./utils";
12
12
  export type DeployTypeDefinition<T extends DeployConfigType> = {
13
- jobs: (context: Context) => CatladderJob[];
13
+ jobs: (context: ComponentContext) => CatladderJob[];
14
14
  defaults: (envContext: EnvironmentContext<any, T>) => PartialDeep<DeployConfigGeneric<T>>;
15
15
  additionalSecretKeys: (envContext: EnvironmentContext<any, T>) => SecretEnvVar[];
16
16
  getAdditionalEnvVars: (envContext: EnvironmentContext<any, T>) => Record<string, string | BashExpression | undefined | null>;
@@ -1,6 +1,6 @@
1
1
  import type { StringOrBashExpression } from "../../../bash/BashExpression";
2
- import type { Context } from "../../../types";
3
- export declare const hasKubernetesCloudSQL: (context: Context) => boolean | undefined;
2
+ import type { ComponentContext } from "../../../types";
3
+ export declare const hasKubernetesCloudSQL: (context: ComponentContext) => boolean | undefined;
4
4
  type CloudSqlValues = {
5
5
  enabled: boolean;
6
6
  proxyCredentials: string;
@@ -8,7 +8,7 @@ type CloudSqlValues = {
8
8
  fullDbName: StringOrBashExpression;
9
9
  dbUser: string;
10
10
  };
11
- export declare const createKubernetesCloudsqlBaseValues: (context: Context) => {
11
+ export declare const createKubernetesCloudsqlBaseValues: (context: ComponentContext) => {
12
12
  cloudsql: CloudSqlValues;
13
13
  };
14
14
  export {};
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createKubernetesDeployJobs: (context: Context) => CatladderJob[];
3
+ export declare const createKubernetesDeployJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,10 +1,10 @@
1
1
  import type { StringOrBashExpression } from "../../bash/BashExpression";
2
- import type { Context } from "../../types";
2
+ import type { ComponentContext } from "../../types";
3
3
  /**
4
4
  * separate by secrets and public.
5
5
  * we evalulate the actual values later, but want to store the secrets in kubernetes secrets
6
6
  */
7
- export declare const createKubeEnv: (context: Context) => {
7
+ export declare const createKubeEnv: (context: ComponentContext) => {
8
8
  secret: Record<string, StringOrBashExpression>;
9
9
  public: Record<string, StringOrBashExpression>;
10
10
  };
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../types/context";
2
- export declare const createKubeValues: (context: Context) => never[] | ({
1
+ import type { ComponentContext } from "../../types/context";
2
+ export declare const createKubeValues: (context: ComponentContext) => never[] | ({
3
3
  env: {
4
4
  secret: Record<string, import("../../bash/BashExpression").StringOrBashExpression>;
5
5
  public: Record<string, import("../../bash/BashExpression").StringOrBashExpression>;
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../types/context";
2
- export declare const createMongodbBaseConfig: (context: Context) => {
1
+ import type { ComponentContext } from "../../types/context";
2
+ export declare const createMongodbBaseConfig: (context: ComponentContext) => {
3
3
  mongodb: {
4
4
  enabled: boolean;
5
5
  auth: {
@@ -1,4 +1,4 @@
1
- import type { Context } from "../types/context";
2
- export declare const sbomDeactivated: (context: Context) => boolean;
3
- export declare const getDependencyTrackUploadScript: (context: Context) => string[];
4
- export declare const getDependencyTrackDeleteScript: (context: Context) => string[];
1
+ import type { ComponentContext } from "../types/context";
2
+ export declare const sbomDeactivated: (context: ComponentContext) => boolean;
3
+ export declare const getDependencyTrackUploadScript: (context: ComponentContext) => string[];
4
+ export declare const getDependencyTrackDeleteScript: (context: ComponentContext) => string[];
@@ -1,5 +1,5 @@
1
- import type { Config, Context } from "../types";
1
+ import type { Config, ComponentContext } from "../types";
2
2
  import type { DeployConfigKubernetesCluster } from "./types";
3
3
  export declare const getFullKubernetesClusterName: (cluster: DeployConfigKubernetesCluster) => string | undefined;
4
4
  export declare const getKubernetesNamespace: (config: Pick<Config, "customerName" | "appName">, env: string) => string;
5
- export declare const contextIsStoppable: (context: Context) => boolean;
5
+ export declare const contextIsStoppable: (context: ComponentContext) => boolean;
@@ -1,3 +1,3 @@
1
- import type { CreateContextContext } from "../context";
1
+ import type { CreateComponentContextContext } from "../context";
2
2
  import type { CatladderJobWithContext } from "../types/context";
3
- export declare const createJobsForComponent: (contextContext: Omit<CreateContextContext, "packageManagerInfo">) => Promise<Array<CatladderJobWithContext>>;
3
+ export declare const createJobsForComponent: (contextContext: Omit<CreateComponentContextContext, "packageManagerInfo">) => Promise<Array<CatladderJobWithContext>>;
@@ -205,7 +205,7 @@ var createJobsForComponent = function (contextContext) {
205
205
  return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfo)(contextContext.config, contextContext.componentName)];
206
206
  case 1:
207
207
  packageManagerInfo = _a.sent();
208
- return [4 /*yield*/, (0, context_1.createContext)(__assign(__assign({}, contextContext), {
208
+ return [4 /*yield*/, (0, context_1.createComponentContext)(__assign(__assign({}, contextContext), {
209
209
  packageManagerInfo: packageManagerInfo
210
210
  }))];
211
211
  case 2: