@catladder/cli 1.153.1 → 1.154.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.
- package/dist/bundles/catenv/index.js +3 -3
- package/dist/bundles/cli/index.js +6 -6
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js +1 -25
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js.map +1 -1
- package/dist/cli/src/gcloud/serviceAccounts.js +3 -3
- package/dist/cli/src/gcloud/serviceAccounts.js.map +1 -1
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.d.ts +3 -0
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +81 -0
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -0
- package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +3 -3
- package/dist/pipeline/src/build/base/createAppBuildJob.js +14 -13
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/base/index.d.ts +6 -2
- package/dist/pipeline/src/build/base/index.js +23 -5
- package/dist/pipeline/src/build/base/index.js.map +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js +3 -2
- package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
- package/dist/pipeline/src/build/custom/buildJob.js +2 -12
- package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/docker.js +6 -6
- package/dist/pipeline/src/build/docker.js.map +1 -1
- package/dist/pipeline/src/build/index.d.ts +14 -5
- package/dist/pipeline/src/build/index.js +23 -3
- package/dist/pipeline/src/build/index.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.d.ts +7 -2
- package/dist/pipeline/src/build/node/buildJob.js +44 -42
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.d.ts +2 -2
- package/dist/pipeline/src/build/node/cache.js +17 -9
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/index.d.ts +2 -2
- package/dist/pipeline/src/build/node/index.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.js +2 -8
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.d.ts +3 -2
- package/dist/pipeline/src/build/node/testJob.js +10 -3
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.js +1 -1
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.d.ts +1 -1
- package/dist/pipeline/src/build/rails/build.js +7 -2
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/test.d.ts +1 -1
- package/dist/pipeline/src/build/rails/test.js +5 -0
- package/dist/pipeline/src/build/rails/test.js.map +1 -1
- package/dist/pipeline/src/build/sbom.js +7 -2
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +49 -5
- package/dist/pipeline/src/build/types.js +9 -1
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/pipeline/src/context/createAllComponentsContext.d.ts +8 -0
- package/dist/pipeline/src/context/createAllComponentsContext.js +68 -0
- package/dist/pipeline/src/context/createAllComponentsContext.js.map +1 -0
- package/dist/pipeline/src/context/createComponentContext.d.ts +0 -4
- package/dist/pipeline/src/context/createComponentContext.js +81 -19
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/createWorkspaceContext.d.ts +9 -0
- package/dist/pipeline/src/context/createWorkspaceContext.js +86 -0
- package/dist/pipeline/src/context/createWorkspaceContext.js.map +1 -0
- package/dist/pipeline/src/context/getBuildInfoVariables.d.ts +1 -1
- package/dist/pipeline/src/context/getBuildInfoVariables.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentContext.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.js +10 -4
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/context/getLabels.js +2 -2
- package/dist/pipeline/src/context/getLabels.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.d.ts +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +29 -6
- package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +2 -2
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.d.ts +4 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.d.ts +2 -2
- package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
- package/dist/pipeline/src/deploy/custom/index.d.ts +2 -2
- package/dist/pipeline/src/deploy/custom/index.js.map +1 -1
- package/dist/pipeline/src/deploy/dockerTag/index.d.ts +2 -2
- package/dist/pipeline/src/deploy/dockerTag/index.js.map +1 -1
- package/dist/pipeline/src/deploy/index.d.ts +7 -7
- package/dist/pipeline/src/deploy/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.d.ts +3 -1
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +1 -1
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.d.ts +2 -2
- package/dist/pipeline/src/deploy/kubernetes/index.js.map +1 -1
- package/dist/pipeline/src/deploy/sbom.d.ts +1 -1
- package/dist/pipeline/src/deploy/sbom.js +6 -3
- package/dist/pipeline/src/deploy/sbom.js.map +1 -1
- package/dist/pipeline/src/pipeline/createAllJobs.d.ts +12 -10
- package/dist/pipeline/src/pipeline/createAllJobs.js +84 -44
- package/dist/pipeline/src/pipeline/createAllJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/createChildPipeline.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +3 -4
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +3 -0
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +10 -0
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js.map +1 -0
- package/dist/pipeline/src/pipeline/createMainPipeline.js +18 -8
- package/dist/pipeline/src/pipeline/createMainPipeline.js.map +1 -1
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.d.ts +3 -3
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +158 -51
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/packageManager.d.ts +2 -1
- package/dist/pipeline/src/pipeline/packageManager.js +36 -15
- package/dist/pipeline/src/pipeline/packageManager.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +2 -1
- package/dist/pipeline/src/types/context.d.ts +77 -12
- package/dist/pipeline/src/types/context.js +9 -0
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/pipeline/src/types/environmentContext.d.ts +5 -6
- package/dist/pipeline/src/types/jobs.d.ts +5 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.ts +2 -2
- package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +2 -10
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +1 -1
- package/src/apps/cli/commands/project/setup/setupContext.ts +2 -4
- package/src/apps/cli/commands/project/setup/setupKubernetes.ts +2 -2
- package/src/apps/cli/commands/project/utils/ensureNamespace.ts +1 -11
- package/src/gcloud/serviceAccounts.ts +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createSbomBuildJob = exports.SBOM_FILE = exports.SBOM_BUILD_JOB_NAME = void 0;
|
|
4
|
+
var _1 = require(".");
|
|
4
5
|
var utils_1 = require("../utils");
|
|
5
6
|
exports.SBOM_BUILD_JOB_NAME = "🧾 sbom";
|
|
6
7
|
exports.SBOM_FILE = "__sbom.json";
|
|
@@ -13,10 +14,14 @@ var createSbomBuildJob = function (context) {
|
|
|
13
14
|
? "."
|
|
14
15
|
: context.build.dir),
|
|
15
16
|
];
|
|
16
|
-
var image = buildConfig
|
|
17
|
+
var image = (0, _1.isStandaloneBuildConfig)(buildConfig) &&
|
|
18
|
+
buildConfig.type === "custom" &&
|
|
19
|
+
buildConfig.sbom !== false
|
|
17
20
|
? (_b = (_a = buildConfig.sbom) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage
|
|
18
21
|
: defaultImage;
|
|
19
|
-
var script = buildConfig
|
|
22
|
+
var script = (0, _1.isStandaloneBuildConfig)(buildConfig) &&
|
|
23
|
+
buildConfig.type === "custom" &&
|
|
24
|
+
buildConfig.sbom !== false
|
|
20
25
|
? (_d = (0, utils_1.ensureArray)((_c = buildConfig.sbom) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : defaultScript
|
|
21
26
|
: defaultScript;
|
|
22
27
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sbom.js","sourceRoot":"","sources":["../../../../../pipeline/src/build/sbom.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sbom.js","sourceRoot":"","sources":["../../../../../pipeline/src/build/sbom.ts"],"names":[],"mappings":";;;AAAA,sBAA4C;AAG5C,kCAAuC;AAE1B,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAChC,QAAA,SAAS,GAAG,aAAa,CAAC;AAEhC,IAAM,kBAAkB,GAAG,UAAC,OAAyB;;IAC1D,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAEzC,IAAM,YAAY,GAAG,sBAAsB,CAAC;IAC5C,IAAM,aAAa,GAAG;QACpB,yDAAiD,iBAAS,gBACxD,OAAO,CAAC,kBAAkB,CAAC,sBAAsB;YAC/C,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CACrB;KACH,CAAC;IAEF,IAAM,KAAK,GACT,IAAA,0BAAuB,EAAC,WAAW,CAAC;QACpC,WAAW,CAAC,IAAI,KAAK,QAAQ;QAC7B,WAAW,CAAC,IAAI,KAAK,KAAK;QACxB,CAAC,CAAC,MAAA,MAAA,WAAW,CAAC,IAAI,0CAAE,QAAQ,mCAAI,YAAY;QAC5C,CAAC,CAAC,YAAY,CAAC;IAEnB,IAAM,MAAM,GACV,IAAA,0BAAuB,EAAC,WAAW,CAAC;QACpC,WAAW,CAAC,IAAI,KAAK,QAAQ;QAC7B,WAAW,CAAC,IAAI,KAAK,KAAK;QACxB,CAAC,CAAC,MAAA,IAAA,mBAAW,EAAC,MAAA,WAAW,CAAC,IAAI,0CAAE,OAAO,CAAC,mCAAI,aAAa;QACzD,CAAC,CAAC,aAAa,CAAC;IAEpB,OAAO;QACL,IAAI,EAAE,2BAAmB;QACzB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,SAAS;QAChB,KAAK,OAAA;QACL,MAAM,QAAA;QACN,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE;YACT,KAAK,EAAE,CAAC,iBAAS,CAAC;SACnB;KACF,CAAC;AACJ,CAAC,CAAC;AAvCW,QAAA,kBAAkB,sBAuC7B"}
|
|
@@ -111,6 +111,7 @@ export type BuildConfigMeteor = BuildConfigNodeBase & {
|
|
|
111
111
|
installScripts?: boolean;
|
|
112
112
|
docker?: Omit<BuildConfigDockerBuiltInMeteor, "type"> | BuildConfigDocker;
|
|
113
113
|
};
|
|
114
|
+
export type BuildConfigNodeLike = BuildConfigNode | BuildConfigNodeStatic | BuildConfigStorybook | BuildConfigMeteor;
|
|
114
115
|
type BuildConfigDockerWithAdditions = {
|
|
115
116
|
/**
|
|
116
117
|
* Custom Dockerfile lines integrated in the generated Dockerfile before the standard build steps.
|
|
@@ -217,22 +218,65 @@ export type BuildConfigStorybook = BuildConfigNodeBase & {
|
|
|
217
218
|
type: "storybook";
|
|
218
219
|
startCommand?: never;
|
|
219
220
|
};
|
|
220
|
-
export type
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
export type BuildConfigFromWorkspace = {
|
|
222
|
+
from: string;
|
|
223
|
+
docker?: BuildConfigDocker;
|
|
224
|
+
startCommand?: string;
|
|
225
|
+
/**
|
|
226
|
+
* additional paths for artifacts,
|
|
227
|
+
* by default "dist" and ".next" are allways included
|
|
228
|
+
*/
|
|
229
|
+
artifactsPaths?: string[];
|
|
230
|
+
};
|
|
231
|
+
export type BuildConfigStandalone = BuildConfigNode | BuildConfigNodeStatic | BuildConfigStorybook | BuildConfigMeteor | BuildConfigCustom | BuildConfigRails;
|
|
232
|
+
export type BuildConfig = BuildConfigFromWorkspace | BuildConfigStandalone;
|
|
233
|
+
export type BuildConfigStandaloneType = BuildConfigStandalone["type"];
|
|
234
|
+
export type BuildConfigGeneric<T extends BuildConfigStandaloneType> = Extract<BuildConfig, {
|
|
223
235
|
type: T;
|
|
224
236
|
}>;
|
|
237
|
+
export declare const isStandaloneBuildConfig: (t: BuildConfig | false) => t is BuildConfigStandalone;
|
|
225
238
|
export declare const isOfBuildType: <T extends ("custom" | "node" | "node-static" | "meteor" | "rails" | "storybook")[]>(t: BuildConfig, ...types: T) => t is Extract<BuildConfigNode, {
|
|
226
239
|
type: T[number];
|
|
227
240
|
}> | Extract<BuildConfigNodeStatic, {
|
|
228
241
|
type: T[number];
|
|
229
242
|
}> | Extract<BuildConfigMeteor, {
|
|
230
243
|
type: T[number];
|
|
244
|
+
}> | Extract<BuildConfigStorybook, {
|
|
245
|
+
type: T[number];
|
|
231
246
|
}> | Extract<BuildConfigCustom, {
|
|
232
247
|
type: T[number];
|
|
233
248
|
}> | Extract<BuildConfigRails, {
|
|
234
249
|
type: T[number];
|
|
235
|
-
}> | Extract<BuildConfigStorybook, {
|
|
236
|
-
type: T[number];
|
|
237
250
|
}>;
|
|
251
|
+
export type WorkspaceBuildConfigBase = {
|
|
252
|
+
dir?: string;
|
|
253
|
+
/**
|
|
254
|
+
* customize lint, set false to disable
|
|
255
|
+
*/
|
|
256
|
+
lint?: false | TestJobCustom;
|
|
257
|
+
/**
|
|
258
|
+
* customize test, set false to disable
|
|
259
|
+
*/
|
|
260
|
+
test?: false | TestJobCustom;
|
|
261
|
+
/**
|
|
262
|
+
* customize audit, set false to disable
|
|
263
|
+
*/
|
|
264
|
+
audit?: false | TestJobCustom;
|
|
265
|
+
/**
|
|
266
|
+
* additional vars only for the runner.
|
|
267
|
+
* Also if you use services: that require env vars, you need to set them here.
|
|
268
|
+
*
|
|
269
|
+
*/
|
|
270
|
+
runnerVariables?: Record<string, string>;
|
|
271
|
+
/**
|
|
272
|
+
* additional CI/CD artifacts reports,
|
|
273
|
+
* use to display information in merge requests, pipeline views and security dashboards.
|
|
274
|
+
*/
|
|
275
|
+
artifactsReports?: BuildConfigArtifactsReports;
|
|
276
|
+
};
|
|
277
|
+
export type WorkspaceBuildConfigNode = {
|
|
278
|
+
type: "node";
|
|
279
|
+
buildCommand?: string | string[];
|
|
280
|
+
} & WorkspaceBuildConfigBase;
|
|
281
|
+
export type WorkspaceBuildConfig = WorkspaceBuildConfigNode;
|
|
238
282
|
export {};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isOfBuildType = void 0;
|
|
3
|
+
exports.isOfBuildType = exports.isStandaloneBuildConfig = void 0;
|
|
4
|
+
var isStandaloneBuildConfig = function (t) {
|
|
5
|
+
if (!t)
|
|
6
|
+
return false;
|
|
7
|
+
return !("from" in t);
|
|
8
|
+
};
|
|
9
|
+
exports.isStandaloneBuildConfig = isStandaloneBuildConfig;
|
|
4
10
|
var isOfBuildType = function (t) {
|
|
5
11
|
var types = [];
|
|
6
12
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
7
13
|
types[_i - 1] = arguments[_i];
|
|
8
14
|
}
|
|
15
|
+
if (!(0, exports.isStandaloneBuildConfig)(t))
|
|
16
|
+
return false;
|
|
9
17
|
return types.includes(t.type);
|
|
10
18
|
};
|
|
11
19
|
exports.isOfBuildType = isOfBuildType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../pipeline/src/build/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../pipeline/src/build/types.ts"],"names":[],"mappings":";;;AAySO,IAAM,uBAAuB,GAAG,UACrC,CAAsB;IAEtB,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;AACxB,CAAC,CAAC;AALW,QAAA,uBAAuB,2BAKlC;AAEK,IAAM,aAAa,GAAG,UAC3B,CAAc;IACd,eAAW;SAAX,UAAW,EAAX,qBAAW,EAAX,IAAW;QAAX,8BAAW;;IAEX,IAAI,CAAC,IAAA,+BAAuB,EAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentContext, PipelineType } from "../types";
|
|
2
|
+
import type { Config, PipelineTrigger } from "../types/config";
|
|
3
|
+
export type CreateAllComponentsContextProps = {
|
|
4
|
+
config: Config;
|
|
5
|
+
trigger: PipelineTrigger;
|
|
6
|
+
pipelineType: PipelineType;
|
|
7
|
+
};
|
|
8
|
+
export declare const createAllComponentsContext: ({ config, trigger, pipelineType, }: CreateAllComponentsContextProps) => Promise<Array<ComponentContext>>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
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;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.createAllComponentsContext = void 0;
|
|
40
|
+
var configruedEnvs_1 = require("../config/configruedEnvs");
|
|
41
|
+
var createComponentContext_1 = require("./createComponentContext");
|
|
42
|
+
var createAllComponentsContext = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
43
|
+
var config = _b.config, trigger = _b.trigger, pipelineType = _b.pipelineType;
|
|
44
|
+
return __generator(this, function (_c) {
|
|
45
|
+
switch (_c.label) {
|
|
46
|
+
case 0: return [4 /*yield*/, Promise.all(Object.keys(config.components).flatMap(function (componentName) {
|
|
47
|
+
var envs = (0, configruedEnvs_1.getAllEnvsByTrigger)(config, componentName, trigger);
|
|
48
|
+
return envs.map(function (env) { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0: return [4 /*yield*/, (0, createComponentContext_1.createComponentContext)({
|
|
52
|
+
config: config,
|
|
53
|
+
componentName: componentName,
|
|
54
|
+
env: env,
|
|
55
|
+
trigger: trigger,
|
|
56
|
+
pipelineType: pipelineType,
|
|
57
|
+
})];
|
|
58
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); });
|
|
62
|
+
}))];
|
|
63
|
+
case 1: return [2 /*return*/, _c.sent()];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}); };
|
|
67
|
+
exports.createAllComponentsContext = createAllComponentsContext;
|
|
68
|
+
//# sourceMappingURL=createAllComponentsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAllComponentsContext.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/createAllComponentsContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA+D;AAG/D,mEAAkE;AAQ3D,IAAM,0BAA0B,GAAG,iEAAO,EAIf;QAHhC,MAAM,YAAA,EACN,OAAO,aAAA,EACP,YAAY,kBAAA;;;oBAEL,qBAAM,OAAO,CAAC,GAAG,CACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,aAAa;oBACnD,IAAM,IAAI,GAAG,IAAA,oCAAmB,EAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;oBACjE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAO,GAAG;;;wCACjB,qBAAM,IAAA,+CAAsB,EAAC;wCAClC,MAAM,QAAA;wCACN,aAAa,eAAA;wCACb,GAAG,KAAA;wCACH,OAAO,SAAA;wCACP,YAAY,cAAA;qCACb,CAAC,EAAA;wCANF,sBAAO,SAML,EAAC;;;yBACJ,CAAC,CAAC;gBACL,CAAC,CAAC,CACH,EAAA;oBAbD,sBAAO,SAaN,EAAC;;;KACH,CAAC;AAnBW,QAAA,0BAA0B,8BAmBrC"}
|
|
@@ -9,7 +9,3 @@ export type CreateComponentContextContext = {
|
|
|
9
9
|
trigger?: PipelineTrigger;
|
|
10
10
|
};
|
|
11
11
|
export declare const createComponentContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated use createComponentContext instead
|
|
14
|
-
*/
|
|
15
|
-
export declare const createContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
|
@@ -46,56 +46,122 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
+
if (!m) return o;
|
|
52
|
+
var i = m.call(o), r, ar = [], e;
|
|
53
|
+
try {
|
|
54
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
+
}
|
|
56
|
+
catch (error) { e = { error: error }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e) throw e.error; }
|
|
62
|
+
}
|
|
63
|
+
return ar;
|
|
64
|
+
};
|
|
65
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
66
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
67
|
+
if (ar || !(i in from)) {
|
|
68
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
69
|
+
ar[i] = from[i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
73
|
+
};
|
|
49
74
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.
|
|
75
|
+
exports.createComponentContext = void 0;
|
|
51
76
|
var lodash_1 = require("lodash");
|
|
52
77
|
var build_1 = require("../build");
|
|
53
78
|
var deploy_1 = require("../deploy");
|
|
79
|
+
var packageManager_1 = require("../pipeline/packageManager");
|
|
54
80
|
var utils_1 = require("../utils");
|
|
55
81
|
var getEnvironment_1 = require("./getEnvironment");
|
|
56
82
|
var getEnvironmentContext_1 = require("./getEnvironmentContext");
|
|
57
|
-
var packageManager_1 = require("../pipeline/packageManager");
|
|
58
83
|
var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var packageManagerInfo, envContext, componentConfigWithoutDefaults, defaults, componentConfig, environment, deploy, build, customJobs, dir, context, resolvedCustomJobs;
|
|
60
|
-
|
|
61
|
-
|
|
84
|
+
var packageManagerInfo, envContext, componentConfigWithoutDefaults, resolvedBuildType, defaults, componentConfig, environment, deploy, build, customJobs, dir, getComponentDirs, _getBuildContext, buildContext, context, resolvedCustomJobs;
|
|
85
|
+
var _a;
|
|
86
|
+
return __generator(this, function (_b) {
|
|
87
|
+
switch (_b.label) {
|
|
62
88
|
case 0:
|
|
63
89
|
if (!/^[a-z0-9-]+$/.test(ctx.componentName)) {
|
|
64
90
|
throw new Error("componentName may only contain lower case letters, numbers and -");
|
|
65
91
|
}
|
|
66
92
|
return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfoForComponent)(ctx.config, ctx.componentName)];
|
|
67
93
|
case 1:
|
|
68
|
-
packageManagerInfo =
|
|
94
|
+
packageManagerInfo = _b.sent();
|
|
69
95
|
envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
70
96
|
componentConfigWithoutDefaults = envContext.envConfigRaw;
|
|
97
|
+
resolvedBuildType = (0, build_1.isStandaloneBuildConfig)(componentConfigWithoutDefaults.build)
|
|
98
|
+
? componentConfigWithoutDefaults.build.type
|
|
99
|
+
: (_a = ctx.config.builds) === null || _a === void 0 ? void 0 : _a[componentConfigWithoutDefaults.build.from].type;
|
|
100
|
+
if (!resolvedBuildType) {
|
|
101
|
+
throw new Error("build type not found, is the build config correct?");
|
|
102
|
+
}
|
|
71
103
|
defaults = componentConfigWithoutDefaults.deploy
|
|
72
104
|
? {
|
|
73
|
-
build: build_1.BUILD_TYPES[
|
|
105
|
+
build: build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
|
|
74
106
|
deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
|
|
75
107
|
}
|
|
76
108
|
: {
|
|
77
|
-
build:
|
|
109
|
+
build: build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
|
|
78
110
|
deploy: {},
|
|
79
111
|
};
|
|
80
112
|
componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
81
113
|
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
82
114
|
case 2:
|
|
83
|
-
environment =
|
|
115
|
+
environment = _b.sent();
|
|
84
116
|
deploy = componentConfig.deploy, build = componentConfig.build, customJobs = componentConfig.customJobs, dir = componentConfig.dir;
|
|
117
|
+
getComponentDirs = function (mode) {
|
|
118
|
+
var _a;
|
|
119
|
+
return __spreadArray([
|
|
120
|
+
dir
|
|
121
|
+
], __read((mode === "all"
|
|
122
|
+
? (_a = packageManagerInfo.currentWorkspaceDependencies) !== null && _a !== void 0 ? _a : []
|
|
123
|
+
: [])), false);
|
|
124
|
+
};
|
|
125
|
+
_getBuildContext = function () {
|
|
126
|
+
var _a;
|
|
127
|
+
if ((0, build_1.isStandaloneBuildConfig)(build)) {
|
|
128
|
+
return {
|
|
129
|
+
dir: dir,
|
|
130
|
+
getComponentDirs: getComponentDirs,
|
|
131
|
+
config: build,
|
|
132
|
+
buildType: build.type,
|
|
133
|
+
type: "standalone",
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
// must be shared build
|
|
137
|
+
var referencedBuild = (_a = ctx.config.builds) === null || _a === void 0 ? void 0 : _a[build.from];
|
|
138
|
+
if (!referencedBuild) {
|
|
139
|
+
throw new Error("build.from not found in config");
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
dir: dir,
|
|
143
|
+
getComponentDirs: getComponentDirs,
|
|
144
|
+
config: build,
|
|
145
|
+
workspaceBuildConfig: referencedBuild,
|
|
146
|
+
workspaceName: build.from,
|
|
147
|
+
buildType: referencedBuild.type,
|
|
148
|
+
type: "fromWorkspace",
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
buildContext = _getBuildContext();
|
|
85
152
|
context = {
|
|
153
|
+
type: "component",
|
|
154
|
+
name: ctx.componentName,
|
|
155
|
+
componentName: ctx.componentName,
|
|
156
|
+
env: ctx.env,
|
|
86
157
|
fullConfig: ctx.config,
|
|
87
158
|
componentConfig: componentConfig,
|
|
88
|
-
|
|
89
|
-
build: {
|
|
90
|
-
dir: dir,
|
|
91
|
-
config: build,
|
|
92
|
-
},
|
|
159
|
+
build: buildContext,
|
|
93
160
|
deploy: deploy
|
|
94
161
|
? {
|
|
95
162
|
config: deploy,
|
|
96
163
|
}
|
|
97
164
|
: null,
|
|
98
|
-
componentName: ctx.componentName,
|
|
99
165
|
environment: environment,
|
|
100
166
|
packageManagerInfo: packageManagerInfo,
|
|
101
167
|
pipelineType: ctx.pipelineType,
|
|
@@ -109,8 +175,4 @@ var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, v
|
|
|
109
175
|
});
|
|
110
176
|
}); };
|
|
111
177
|
exports.createComponentContext = createComponentContext;
|
|
112
|
-
/**
|
|
113
|
-
* @deprecated use createComponentContext instead
|
|
114
|
-
*/
|
|
115
|
-
exports.createContext = exports.createComponentContext;
|
|
116
178
|
//# sourceMappingURL=createComponentContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponentContext.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/createComponentContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createComponentContext.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/createComponentContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAoC;AACpC,kCAAgE;AAEhE,oCAAyC;AAEzC,6DAA+E;AAS/E,kCAAkD;AAClD,mDAAkD;AAClD,iEAAgE;AAUzD,IAAM,sBAAsB,GAAG,UACpC,GAAkC;;;;;;gBAElC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;oBAC5C,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;gBACJ,CAAC;gBAE0B,qBAAM,IAAA,kDAAiC,EAChE,GAAG,CAAC,MAAM,EACV,GAAG,CAAC,aAAa,CAClB,EAAA;;gBAHK,kBAAkB,GAAG,SAG1B;gBAEK,UAAU,GAAG,IAAA,6CAAqB,EAAC,GAAG,CAAC,CAAC;gBAExC,8BAA8B,GAAG,UAAU,CAAC,YAAY,CAAC;gBAEzD,iBAAiB,GAAG,IAAA,+BAAuB,E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C,CAAC,UAAU,CAAC,OAAO,CAAC;oBACrB,CAAC,CAAC,UAAU,CAAC;gBACf,4CACK,OAAO,KACV,UAAU,EAAE,kBAAkB,KAC9B;;;KACH,CAAC;AA5GW,QAAA,sBAAsB,0BA4GjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Config, type PipelineTrigger, type PipelineType, type WorkspaceContext } from "..";
|
|
2
|
+
export declare function createWorkspaceContext({ env, components, workspaceName, config, pipelineType, trigger, }: {
|
|
3
|
+
env: string;
|
|
4
|
+
components: WorkspaceContext["components"];
|
|
5
|
+
workspaceName: string;
|
|
6
|
+
config: Config;
|
|
7
|
+
pipelineType: PipelineType;
|
|
8
|
+
trigger: PipelineTrigger;
|
|
9
|
+
}): Promise<WorkspaceContext>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
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;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.createWorkspaceContext = void 0;
|
|
40
|
+
var __1 = require("..");
|
|
41
|
+
var packageManager_1 = require("../pipeline/packageManager");
|
|
42
|
+
var utils_1 = require("../utils");
|
|
43
|
+
var lodash_1 = require("lodash");
|
|
44
|
+
function createWorkspaceContext(_a) {
|
|
45
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
46
|
+
var workspaceConfigRaw, defaults, workspaceConfig;
|
|
47
|
+
var _c;
|
|
48
|
+
var _d, _e;
|
|
49
|
+
var env = _b.env, components = _b.components, workspaceName = _b.workspaceName, config = _b.config, pipelineType = _b.pipelineType, trigger = _b.trigger;
|
|
50
|
+
return __generator(this, function (_f) {
|
|
51
|
+
switch (_f.label) {
|
|
52
|
+
case 0:
|
|
53
|
+
workspaceConfigRaw = (_d = config.builds) === null || _d === void 0 ? void 0 : _d[workspaceName];
|
|
54
|
+
if (!workspaceConfigRaw) {
|
|
55
|
+
throw new Error("Workspace ".concat(workspaceName, " not found in config"));
|
|
56
|
+
}
|
|
57
|
+
defaults = __1.WORKSPACE_BUILD_TYPES[workspaceConfigRaw.type].defaults();
|
|
58
|
+
workspaceConfig = (0, utils_1.mergeWithMergingArrays)(defaults, workspaceConfigRaw);
|
|
59
|
+
_c = {
|
|
60
|
+
name: workspaceName,
|
|
61
|
+
pipelineType: pipelineType,
|
|
62
|
+
trigger: trigger,
|
|
63
|
+
type: "workspace",
|
|
64
|
+
workspaceConfig: workspaceConfig,
|
|
65
|
+
env: env,
|
|
66
|
+
components: components,
|
|
67
|
+
fullConfig: config
|
|
68
|
+
};
|
|
69
|
+
return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfoBase)()];
|
|
70
|
+
case 1: return [2 /*return*/, (_c.packageManagerInfo = _f.sent(),
|
|
71
|
+
_c.build = {
|
|
72
|
+
type: "workspace",
|
|
73
|
+
dir: (_e = workspaceConfig.dir) !== null && _e !== void 0 ? _e : ".",
|
|
74
|
+
getComponentDirs: function (mode) {
|
|
75
|
+
return (0, lodash_1.uniq)(components.flatMap(function (c) { return c.build.getComponentDirs(mode); }));
|
|
76
|
+
},
|
|
77
|
+
buildType: workspaceConfig.type,
|
|
78
|
+
config: workspaceConfig,
|
|
79
|
+
},
|
|
80
|
+
_c)];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
exports.createWorkspaceContext = createWorkspaceContext;
|
|
86
|
+
//# sourceMappingURL=createWorkspaceContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWorkspaceContext.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/createWorkspaceContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAMY;AACZ,6DAAuE;AACvE,kCAAkD;AAClD,iCAA8B;AAE9B,SAAsB,sBAAsB;wDAAC,EAc5C;;;;YAbC,GAAG,SAAA,EACH,UAAU,gBAAA,EACV,aAAa,mBAAA,EACb,MAAM,YAAA,EACN,YAAY,kBAAA,EACZ,OAAO,aAAA;;;;oBASD,kBAAkB,GAAG,MAAA,MAAM,CAAC,MAAM,0CAAG,aAAa,CAAC,CAAC;oBAC1D,IAAI,CAAC,kBAAkB,EAAE,CAAC;wBACxB,MAAM,IAAI,KAAK,CAAC,oBAAa,aAAa,yBAAsB,CAAC,CAAC;oBACpE,CAAC;oBAEK,QAAQ,GAAG,yBAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;oBAErE,eAAe,GAAG,IAAA,8BAAsB,EAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;;wBAE3E,IAAI,EAAE,aAAa;wBACnB,YAAY,cAAA;wBACZ,OAAO,SAAA;wBACP,IAAI,EAAE,WAAW;wBAEjB,eAAe,iBAAA;wBAEf,GAAG,KAAA;wBACH,UAAU,YAAA;wBACV,UAAU,EAAE,MAAM;;oBACE,qBAAM,IAAA,0CAAyB,GAAE,EAAA;wBAXvD,uBAWE,qBAAkB,GAAE,SAAiC;wBACrD,QAAK,GAAE;4BACL,IAAI,EAAE,WAAW;4BACjB,GAAG,EAAE,MAAA,eAAe,CAAC,GAAG,mCAAI,GAAG;4BAC/B,gBAAgB,EAAE,UAAC,IAAI;gCACrB,OAAA,IAAA,aAAI,EAAC,UAAU,CAAC,OAAO,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAA9B,CAA8B,CAAC,CAAC;4BAA/D,CAA+D;4BACjE,SAAS,EAAE,eAAe,CAAC,IAAI;4BAC/B,MAAM,EAAE,eAAe;yBACxB;6BACD;;;;CACH;AA5CD,wDA4CC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BashExpression } from "../bash/BashExpression";
|
|
2
2
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
3
|
-
export declare const getBuildInfoVariables: (ctx: EnvironmentContext
|
|
3
|
+
export declare const getBuildInfoVariables: (ctx: EnvironmentContext) => {
|
|
4
4
|
BUILD_INFO_BUILD_ID: string | BashExpression;
|
|
5
5
|
BUILD_INFO_BUILD_TIME: string | BashExpression;
|
|
6
6
|
BUILD_INFO_CURRENT_VERSION: string | BashExpression;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBuildInfoVariables.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getBuildInfoVariables.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAExD,uFAAyF;
|
|
1
|
+
{"version":3,"file":"getBuildInfoVariables.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getBuildInfoVariables.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAExD,uFAAyF;AAIzF,IAAM,UAAU,GAAkC;IAChD,OAAO,EAAE,oBAAoB;IAC7B,MAAM,EAAE,IAAI,+BAAc,CAAC,oBAAoB,CAAC;CACjD,CAAC;AAEF,IAAM,QAAQ,GAAkC;IAC9C,OAAO,EAAE,IAAI,+BAAc,CACzB,0DAA0D,CAC3D;CACF,CAAC;AACF,IAAM,eAAe,GAAkC;IACrD,OAAO,EAAE,IAAI,+BAAc;IACzB,yDAAyD;IACzD,kLAA0K,CAC3K;CACF,CAAC;AAEK,IAAM,qBAAqB,GAAG,UAAC,GAAuB;IACnD,IAAA,YAAY,GAAK,GAAG,aAAR,CAAS;IAE7B,OAAO;QACL,mBAAmB,EAAE,IAAA,gEAAgC,EACnD,QAAQ,EACR,YAAY,CACb;QACD,qBAAqB,EAAE,IAAA,gEAAgC,EACrD,UAAU,EACV,YAAY,CACb;QACD,0BAA0B,EAAE,IAAA,gEAAgC,EAC1D,eAAe,EACf,YAAY,CACb;KACF,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,qBAAqB,yBAiBhC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
3
|
-
export declare const getEnvironmentContext: ({ env, componentName, config, pipelineType, }: CreateComponentContextContext) => EnvironmentContext
|
|
3
|
+
export declare const getEnvironmentContext: ({ env, componentName, config, pipelineType, }: CreateComponentContextContext) => EnvironmentContext;
|
|
@@ -6,7 +6,7 @@ export type SecretEnvVar = {
|
|
|
6
6
|
key: string;
|
|
7
7
|
hidden?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const getBasePredefinedVariables: (ctx: EnvironmentContext
|
|
9
|
+
declare const getBasePredefinedVariables: (ctx: EnvironmentContext) => {
|
|
10
10
|
BUILD_INFO_BUILD_ID?: string | import("../bash/BashExpression").BashExpression;
|
|
11
11
|
BUILD_INFO_BUILD_TIME?: string | import("../bash/BashExpression").BashExpression;
|
|
12
12
|
BUILD_INFO_CURRENT_VERSION?: string | import("../bash/BashExpression").BashExpression;
|
|
@@ -76,6 +76,7 @@ exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvir
|
|
|
76
76
|
var lodash_1 = require("lodash");
|
|
77
77
|
var deploy_1 = require("../deploy");
|
|
78
78
|
var BashExpression_1 = require("../bash/BashExpression");
|
|
79
|
+
var types_1 = require("../build/types");
|
|
79
80
|
var getBuildInfoVariables_1 = require("./getBuildInfoVariables");
|
|
80
81
|
var getEnvironmentContext_1 = require("./getEnvironmentContext");
|
|
81
82
|
var resolveReferences_1 = require("./resolveReferences");
|
|
@@ -106,7 +107,8 @@ var getEnvironmentVariables = function (ctx_1) {
|
|
|
106
107
|
port = (_c = devLocalConfig.port) !== null && _c !== void 0 ? _c : 3000;
|
|
107
108
|
host = "localhost:" + port.toString();
|
|
108
109
|
url = "http://" + host;
|
|
109
|
-
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), { ENV_SHORT: "local", ROOT_URL: url }), (
|
|
110
|
+
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), { ENV_SHORT: "local", ROOT_URL: url }), ((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
111
|
+
buildConfigRaw.type === "rails"
|
|
110
112
|
? {}
|
|
111
113
|
: { HOST: host })), { HOST_INTERNAL: host, ROOT_URL_INTERNAL: "http://" + host, PORT: port.toString() });
|
|
112
114
|
}
|
|
@@ -117,7 +119,8 @@ var getEnvironmentVariables = function (ctx_1) {
|
|
|
117
119
|
HOST_INTERNAL = (_d = additionalEnvVars.HOST_INTERNAL) !== null && _d !== void 0 ? _d : "unknown-host.example.com";
|
|
118
120
|
host = (_e = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _e !== void 0 ? _e : HOST_INTERNAL;
|
|
119
121
|
url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
|
|
120
|
-
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), (
|
|
122
|
+
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), ((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
123
|
+
buildConfigRaw.type === "rails"
|
|
121
124
|
? {}
|
|
122
125
|
: { HOST: host })), { ROOT_URL: url, HOST_INTERNAL: HOST_INTERNAL,
|
|
123
126
|
/**@deprecated */
|
|
@@ -151,7 +154,10 @@ var getEnvironmentVariables = function (ctx_1) {
|
|
|
151
154
|
secretEnvVarKeys: secretEnvVarKeys
|
|
152
155
|
};
|
|
153
156
|
_b = {};
|
|
154
|
-
return [4 /*yield*/, (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, (buildConfigRaw &&
|
|
157
|
+
return [4 /*yield*/, (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, (buildConfigRaw &&
|
|
158
|
+
(0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
159
|
+
buildConfigRaw.jobVars) ||
|
|
160
|
+
null)];
|
|
155
161
|
case 2:
|
|
156
162
|
_b.build = _m.sent();
|
|
157
163
|
return [4 /*yield*/, (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, (deployConfigRaw && deployConfigRaw.jobVars) || null)];
|
|
@@ -169,6 +175,6 @@ var sanitizeForEnVar = function (s) { return s.replace(/-/g, "_"); };
|
|
|
169
175
|
var getSecretVarName = function (env, componentName, key) { return "CL_".concat(sanitizeForEnVar(env), "_").concat(sanitizeForEnVar(componentName), "_").concat(key); }; // remove dash from component name
|
|
170
176
|
exports.getSecretVarName = getSecretVarName;
|
|
171
177
|
var addIndexVar = function (vars) { return (__assign(__assign({}, vars), { _ALL_ENV_VAR_KEYS: JSON.stringify(Object.keys(vars)) })); };
|
|
172
|
-
var getSecretVarNameForContext = function (context, key) { return (0, exports.getSecretVarName)(context.env, context.
|
|
178
|
+
var getSecretVarNameForContext = function (context, key) { return (0, exports.getSecretVarName)(context.env, context.name, key); };
|
|
173
179
|
exports.getSecretVarNameForContext = getSecretVarNameForContext;
|
|
174
180
|
//# sourceMappingURL=getEnvironmentVariables.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEnvironmentVariables.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getEnvironmentVariables.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAC/B,oCAAyC;AASzC,
|
|
1
|
+
{"version":3,"file":"getEnvironmentVariables.js","source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Ac;4BACb,IAAA,+BAAuB,EAAC,cAAc,CAAC;4BACvC,cAAc,CAAC,OAAO,CAAC;4BACvB,IAAI,CACP,EAAA;;oBAPD,QAAK,GAAE,SAON;oBACO,qBAAM,IAAA,2CAAoB,EAChC,GAAG,EACH,aAAa,EACb,CAAC,eAAe,IAAI,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,CACrD,EAAA;wBAhBL,uBAGE,cAAW,IAST,SAAM,GAAE,SAIP;2BACF;wBAED,OAAI,OAAA;wBACJ,MAAG,MAAA;6BACH;;;;CACH,CAAC;AAvIW,QAAA,uBAAuB,2BAuIlC;AAEF,IAAM,gBAAgB,GAAG,UAAC,CAAS,IAAK,OAAA,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAApB,CAAoB,CAAC;AAEtD,IAAM,gBAAgB,GAAG,UAC9B,GAAW,EACX,aAAqB,EACrB,GAAW,IACR,OAAA,aAAM,gBAAgB,CAAC,GAAG,CAAC,cAAI,gBAAgB,CAAC,aAAa,CAAC,cAAI,GAAG,CAAE,EAAvE,CAAuE,CAAC,CAAC,kCAAkC;AAJnG,QAAA,gBAAgB,oBAIgD;AAE7E,IAAM,WAAW,GAAG,UAClB,IAAO,IAC+B,OAAA,uBACnC,IAAI,KACP,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IACpD,EAHsC,CAGtC,CAAC;AAEI,IAAM,0BAA0B,GAAG,UACxC,OAAyB,EACzB,GAAW,IACR,OAAA,IAAA,wBAAgB,EAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAhD,CAAgD,CAAC;AAHzC,QAAA,0BAA0B,8BAGe"}
|
|
@@ -24,8 +24,8 @@ var sanitize = function (value) {
|
|
|
24
24
|
return (0, slugify_1.default)(value).toLowerCase();
|
|
25
25
|
};
|
|
26
26
|
var getLabels = function (context) {
|
|
27
|
-
var _a, _b
|
|
28
|
-
var labels = __assign({ "customer-name": sanitize(context.fullConfig.customerName), "component-name": sanitize(context.
|
|
27
|
+
var _a, _b;
|
|
28
|
+
var labels = __assign({ "customer-name": sanitize(context.fullConfig.customerName), "component-name": sanitize(context.name), "app-name": sanitize(context.fullConfig.appName), "env-type": sanitize(context.environment.envType), "env-name": sanitize(context.env), "build-type": sanitize(context.build.buildType) }, ((_b = (_a = context.fullConfig.meta) === null || _a === void 0 ? void 0 : _a.labels) !== null && _b !== void 0 ? _b : {}));
|
|
29
29
|
return labels;
|
|
30
30
|
};
|
|
31
31
|
exports.getLabels = getLabels;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLabels.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getLabels.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAA8B;AAG9B,IAAM,QAAQ,GAAG,UAAC,KAAc;IAC9B,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,gLAAgL;IAChL,4BAA4B;IAC5B,OAAO,IAAA,iBAAO,EAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACtC,CAAC,CAAC;AACK,IAAM,SAAS,GAAG,UAAC,OAAyB;;IACjD,IAAM,MAAM,cACV,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,EAC1D,gBAAgB,EAAE,QAAQ,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"getLabels.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getLabels.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAA8B;AAG9B,IAAM,QAAQ,GAAG,UAAC,KAAc;IAC9B,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,gLAAgL;IAChL,4BAA4B;IAC5B,OAAO,IAAA,iBAAO,EAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACtC,CAAC,CAAC;A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