@catladder/pipeline 1.153.0 → 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/build/artifacts/createBuildJobArtifact.d.ts +3 -0
- package/dist/build/artifacts/createBuildJobArtifact.js +97 -0
- package/dist/build/base/createAppBuildJob.d.ts +3 -3
- package/dist/build/base/createAppBuildJob.js +9 -15
- package/dist/build/base/index.d.ts +6 -2
- package/dist/build/base/index.js +14 -5
- package/dist/build/base/writeDotEnv.js +2 -1
- package/dist/build/custom/__tests__/testJob.test.js +1 -1
- package/dist/build/custom/buildJob.js +3 -10
- package/dist/build/docker.js +3 -3
- package/dist/build/index.d.ts +13 -6
- package/dist/build/index.js +29 -7
- package/dist/build/node/buildJob.d.ts +7 -2
- package/dist/build/node/buildJob.js +40 -33
- package/dist/build/node/cache.d.ts +2 -2
- package/dist/build/node/cache.js +8 -4
- package/dist/build/node/index.d.ts +2 -2
- package/dist/build/node/meteor.js +3 -6
- package/dist/build/node/testJob.d.ts +3 -2
- package/dist/build/node/testJob.js +9 -4
- package/dist/build/node/yarn.js +1 -1
- package/dist/build/rails/build.d.ts +1 -1
- package/dist/build/rails/build.js +7 -2
- package/dist/build/rails/test.d.ts +1 -1
- package/dist/build/rails/test.js +5 -0
- package/dist/build/sbom.js +3 -2
- package/dist/build/types.d.ts +48 -4
- package/dist/build/types.js +7 -1
- package/dist/bundles/catladder-gitlab/index.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/context/createAllComponentsContext.d.ts +12 -0
- package/dist/context/createAllComponentsContext.js +159 -0
- package/dist/context/createComponentContext.d.ts +1 -5
- package/dist/context/createComponentContext.js +82 -20
- package/dist/context/createWorkspaceContext.d.ts +16 -0
- package/dist/context/createWorkspaceContext.js +173 -0
- package/dist/context/getBuildInfoVariables.d.ts +1 -1
- package/dist/context/getEnvironmentContext.d.ts +1 -1
- package/dist/context/getEnvironmentVariables.d.ts +2 -2
- package/dist/context/getEnvironmentVariables.js +5 -4
- package/dist/context/getLabels.js +5 -5
- package/dist/deploy/base/deploy.d.ts +1 -1
- package/dist/deploy/base/deploy.js +18 -5
- package/dist/deploy/cloudRun/artifactsRegistry.js +2 -2
- package/dist/deploy/cloudRun/createJobs/common.d.ts +4 -4
- package/dist/deploy/cloudRun/index.d.ts +2 -2
- package/dist/deploy/custom/index.d.ts +2 -2
- package/dist/deploy/dockerTag/index.d.ts +2 -2
- package/dist/deploy/index.d.ts +7 -7
- package/dist/deploy/kubernetes/additionalSecretKeys.d.ts +3 -1
- package/dist/deploy/kubernetes/cloudSql/index.js +1 -1
- package/dist/deploy/kubernetes/deployJob.js +2 -2
- package/dist/deploy/kubernetes/index.d.ts +2 -2
- package/dist/deploy/sbom.d.ts +1 -1
- package/dist/deploy/sbom.js +4 -3
- package/dist/deploy/types/index.d.ts +3 -3
- package/dist/pipeline/createAllJobs.d.ts +12 -10
- package/dist/pipeline/createAllJobs.js +94 -51
- package/dist/pipeline/createJobsForComponent.js +2 -3
- package/dist/pipeline/createJobsForWorkspace.d.ts +3 -0
- package/dist/pipeline/createJobsForWorkspace.js +12 -0
- package/dist/pipeline/createMainPipeline.js +26 -6
- package/dist/pipeline/gitlab/createGitlabJobs.d.ts +3 -16
- package/dist/pipeline/gitlab/createGitlabJobs.js +191 -73
- package/dist/pipeline/packageManager.d.ts +3 -2
- package/dist/pipeline/packageManager.js +43 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +5 -4
- package/dist/types/context.d.ts +80 -12
- package/dist/types/context.js +10 -1
- package/dist/types/environmentContext.d.ts +5 -6
- package/dist/types/jobs.d.ts +5 -0
- package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-meteor-with-worker.ts.snap +8 -0
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-no-service.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-non-public.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-post-stop-job.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-service-gen2.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-service-increase-timout.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-service-with-volumes.ts.snap +8 -8
- package/examples/__snapshots__/cloud-run-storybook.ts.snap +4 -8
- package/examples/__snapshots__/cloud-run-with-ngnix.ts.snap +4 -8
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +16 -16
- package/examples/__snapshots__/cloud-run-with-sql.ts.snap +589 -1097
- package/examples/__snapshots__/cloud-run-with-worker.ts.snap +8 -8
- package/examples/__snapshots__/custom-build-job-with-tests.ts.snap +4 -0
- package/examples/__snapshots__/custom-build-job.ts.snap +4 -0
- package/examples/__snapshots__/custom-deploy.ts.snap +8 -8
- package/examples/__snapshots__/custom-envs.ts.snap +18 -12
- package/examples/__snapshots__/custom-sbom-java.ts.snap +4 -0
- package/examples/__snapshots__/kubernetes-application-customization.ts.snap +8 -8
- package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.ts.snap +8 -8
- package/examples/__snapshots__/kubernetes-with-cloud-sql.ts.snap +8 -8
- package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +16 -16
- package/examples/__snapshots__/kubernetes-with-mongodb.ts.snap +8 -8
- package/examples/__snapshots__/local-dot-env.ts.snap +8 -8
- package/examples/__snapshots__/meteor-kubernetes.ts.snap +8 -0
- package/examples/__snapshots__/multiline-var.ts.snap +16 -16
- package/examples/__snapshots__/native-app.ts.snap +24 -16
- package/examples/__snapshots__/node-build-with-custom-image.ts.snap +8 -8
- package/examples/__snapshots__/node-build-with-docker-additions.ts.snap +8 -8
- package/examples/__snapshots__/wait-for-other-deploy.ts.snap +16 -16
- package/examples/cloud-run-with-sql.ts +9 -2
- package/package.json +1 -1
- package/src/build/artifacts/createBuildJobArtifact.ts +61 -0
- package/src/build/base/createAppBuildJob.ts +26 -22
- package/src/build/base/index.ts +31 -4
- package/src/build/base/writeDotEnv.ts +6 -2
- package/src/build/custom/__tests__/testJob.test.ts +4 -4
- package/src/build/custom/buildJob.ts +2 -13
- package/src/build/docker.ts +6 -8
- package/src/build/index.ts +39 -7
- package/src/build/node/buildJob.ts +68 -56
- package/src/build/node/cache.ts +17 -8
- package/src/build/node/index.ts +4 -2
- package/src/build/node/meteor.ts +3 -9
- package/src/build/node/testJob.ts +21 -7
- package/src/build/node/yarn.ts +2 -2
- package/src/build/rails/build.ts +14 -4
- package/src/build/rails/test.ts +9 -1
- package/src/build/sbom.ts +7 -2
- package/src/build/types.ts +68 -4
- package/src/context/createAllComponentsContext.ts +31 -0
- package/src/context/createComponentContext.ts +59 -20
- package/src/context/createWorkspaceContext.ts +56 -0
- package/src/context/getBuildInfoVariables.ts +2 -1
- package/src/context/getEnvironmentContext.ts +2 -2
- package/src/context/getEnvironmentVariables.ts +12 -7
- package/src/context/getLabels.ts +3 -3
- package/src/deploy/base/deploy.ts +33 -7
- package/src/deploy/cloudRun/artifactsRegistry.ts +3 -4
- package/src/deploy/cloudRun/createJobs/common.ts +4 -4
- package/src/deploy/cloudRun/index.ts +68 -67
- package/src/deploy/custom/index.ts +2 -2
- package/src/deploy/dockerTag/index.ts +8 -7
- package/src/deploy/index.ts +11 -9
- package/src/deploy/kubernetes/additionalSecretKeys.ts +3 -1
- package/src/deploy/kubernetes/cloudSql/index.ts +1 -1
- package/src/deploy/kubernetes/deployJob.ts +2 -2
- package/src/deploy/kubernetes/index.ts +42 -41
- package/src/deploy/sbom.ts +9 -4
- package/src/pipeline/createAllJobs.ts +56 -55
- package/src/pipeline/createChildPipeline.ts +1 -0
- package/src/pipeline/createJobsForComponent.ts +5 -4
- package/src/pipeline/createJobsForWorkspace.ts +12 -0
- package/src/pipeline/createMainPipeline.ts +38 -23
- package/src/pipeline/gitlab/createGitlabJobs.ts +283 -119
- package/src/pipeline/packageManager.ts +25 -9
- package/src/types/config.ts +4 -1
- package/src/types/context.ts +108 -12
- package/src/types/environmentContext.ts +6 -7
- package/src/types/jobs.ts +3 -1
|
@@ -46,11 +46,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
46
46
|
});
|
|
47
47
|
exports.createNodeTestJobs = void 0;
|
|
48
48
|
var runner_1 = require("../../runner");
|
|
49
|
+
var context_1 = require("../../types/context");
|
|
49
50
|
var utils_1 = require("../../utils");
|
|
51
|
+
var createArtifactsConfig_1 = require("../base/createArtifactsConfig");
|
|
50
52
|
var cache_1 = require("./cache");
|
|
51
53
|
var constants_1 = require("./constants");
|
|
52
54
|
var yarn_1 = require("./yarn");
|
|
53
|
-
var createArtifactsConfig_1 = require("../base/createArtifactsConfig");
|
|
54
55
|
var createNodeTestJobs = function (context) {
|
|
55
56
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
56
57
|
// don't run tests after release
|
|
@@ -58,17 +59,21 @@ var createNodeTestJobs = function (context) {
|
|
|
58
59
|
if (context.trigger === "taggedRelease") {
|
|
59
60
|
return [];
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
+
// if its not a standalone build, we don't need to run tests
|
|
63
|
+
if (context.type === "component" && !(0, context_1.componentContextIsStandaloneBuild)(context)) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
62
66
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
63
67
|
var base = {
|
|
64
|
-
variables: __assign(
|
|
68
|
+
variables: __assign({
|
|
65
69
|
APP_PATH: context.build.dir
|
|
66
|
-
}, context.environment.jobOnlyVars.build.envVars), (_a =
|
|
70
|
+
}, context.type === "component" ? __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}) : {}),
|
|
67
71
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
68
72
|
stage: "test",
|
|
69
73
|
needs: [],
|
|
70
74
|
envMode: "none"
|
|
71
75
|
};
|
|
76
|
+
var buildConfig = context.build.config;
|
|
72
77
|
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
73
78
|
var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
|
|
74
79
|
name: "🛡 audit"
|
package/dist/build/node/yarn.js
CHANGED
|
@@ -53,7 +53,7 @@ var ensureNodeVersion = function (context) {
|
|
|
53
53
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
54
54
|
var getYarnInstall = function (context, options) {
|
|
55
55
|
var _a;
|
|
56
|
-
var postInstall = "postInstall" in context.build.config ? context.build.config.postInstall : null;
|
|
56
|
+
var postInstall = context.type !== "workspace" && "postInstall" in context.build.config ? context.build.config.postInstall : null;
|
|
57
57
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read(postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall) ? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : []) : []), false);
|
|
58
58
|
};
|
|
59
59
|
exports.getYarnInstall = getYarnInstall;
|
|
@@ -45,6 +45,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
45
45
|
value: true
|
|
46
46
|
});
|
|
47
47
|
exports.createRailsBuildJobs = void 0;
|
|
48
|
+
var __1 = require("../..");
|
|
48
49
|
var base_1 = require("../base");
|
|
49
50
|
var docker_1 = require("../docker");
|
|
50
51
|
var types_1 = require("../types");
|
|
@@ -55,8 +56,12 @@ var createRailsBuildJobs = function (context) {
|
|
|
55
56
|
// should not happen
|
|
56
57
|
throw new Error("build type is not rails");
|
|
57
58
|
}
|
|
59
|
+
// if its not a standalone build, we don't need to run tests
|
|
60
|
+
if (!(0, __1.componentContextIsStandaloneBuild)(context)) {
|
|
61
|
+
throw new Error("workspace builds are not supported for rails apps");
|
|
62
|
+
}
|
|
58
63
|
if ((0, docker_1.hasDockerfile)(context)) {
|
|
59
|
-
return (0, base_1.
|
|
64
|
+
return (0, base_1.createComponentBuildJobs)(context, {
|
|
60
65
|
appBuild: undefined,
|
|
61
66
|
dockerBuild: {
|
|
62
67
|
script: (0, docker_1.getDockerBuildDefaultScript)(context),
|
|
@@ -71,7 +76,7 @@ var createRailsBuildJobs = function (context) {
|
|
|
71
76
|
v = _b[1];
|
|
72
77
|
return "--env '".concat(k).concat(v ? "=".concat(v) : "", "'");
|
|
73
78
|
}).join(" ");
|
|
74
|
-
return (0, base_1.
|
|
79
|
+
return (0, base_1.createComponentBuildJobs)(context, {
|
|
75
80
|
appBuild: undefined,
|
|
76
81
|
dockerBuild: {
|
|
77
82
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.build.config.extraVars),
|
package/dist/build/rails/test.js
CHANGED
|
@@ -45,6 +45,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
45
45
|
value: true
|
|
46
46
|
});
|
|
47
47
|
exports.createRailsTestJobs = void 0;
|
|
48
|
+
var __1 = require("../..");
|
|
48
49
|
var utils_1 = require("../../utils");
|
|
49
50
|
var createRailsTestJobs = function (context) {
|
|
50
51
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
@@ -53,6 +54,10 @@ var createRailsTestJobs = function (context) {
|
|
|
53
54
|
if (context.trigger === "taggedRelease") {
|
|
54
55
|
return [];
|
|
55
56
|
}
|
|
57
|
+
// if its not a standalone build, we don't need to run tests
|
|
58
|
+
if (!(0, __1.componentContextIsStandaloneBuild)(context)) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
56
61
|
var buildConfig = context.build.config;
|
|
57
62
|
var base = {
|
|
58
63
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
package/dist/build/sbom.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createSbomBuildJob = exports.SBOM_FILE = exports.SBOM_BUILD_JOB_NAME = void 0;
|
|
7
|
+
var _1 = require(".");
|
|
7
8
|
var utils_1 = require("../utils");
|
|
8
9
|
exports.SBOM_BUILD_JOB_NAME = "🧾 sbom";
|
|
9
10
|
exports.SBOM_FILE = "__sbom.json";
|
|
@@ -12,8 +13,8 @@ var createSbomBuildJob = function (context) {
|
|
|
12
13
|
var buildConfig = context.build.config;
|
|
13
14
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
14
15
|
var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace ? "." : context.build.dir)];
|
|
15
|
-
var image = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_b = (_a = buildConfig.sbom) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage : defaultImage;
|
|
16
|
-
var script = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_d = (0, utils_1.ensureArray)((_c = buildConfig.sbom) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : defaultScript : defaultScript;
|
|
16
|
+
var image = (0, _1.isStandaloneBuildConfig)(buildConfig) && buildConfig.type === "custom" && buildConfig.sbom !== false ? (_b = (_a = buildConfig.sbom) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage : defaultImage;
|
|
17
|
+
var script = (0, _1.isStandaloneBuildConfig)(buildConfig) && buildConfig.type === "custom" && buildConfig.sbom !== false ? (_d = (0, utils_1.ensureArray)((_c = buildConfig.sbom) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : defaultScript : defaultScript;
|
|
17
18
|
return {
|
|
18
19
|
name: exports.SBOM_BUILD_JOB_NAME,
|
|
19
20
|
stage: "build",
|
package/dist/build/types.d.ts
CHANGED
|
@@ -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,12 +218,24 @@ 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
|
}>;
|
|
225
|
-
export declare const
|
|
237
|
+
export declare const isStandaloneBuildConfig: (t: BuildConfig | false) => t is BuildConfigStandalone;
|
|
238
|
+
export declare const isOfBuildType: <T extends ("custom" | "rails" | "node" | "meteor" | "node-static" | "storybook")[]>(t: BuildConfig, ...types: T) => t is Extract<BuildConfigNode, {
|
|
226
239
|
type: T[number];
|
|
227
240
|
}> | Extract<BuildConfigNodeStatic, {
|
|
228
241
|
type: T[number];
|
|
@@ -235,4 +248,35 @@ export declare const isOfBuildType: <T extends ("node" | "node-static" | "storyb
|
|
|
235
248
|
}> | Extract<BuildConfigRails, {
|
|
236
249
|
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 {};
|
package/dist/build/types.js
CHANGED
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isOfBuildType = void 0;
|
|
6
|
+
exports.isOfBuildType = exports.isStandaloneBuildConfig = void 0;
|
|
7
|
+
var isStandaloneBuildConfig = function (t) {
|
|
8
|
+
if (!t) return false;
|
|
9
|
+
return !("from" in t);
|
|
10
|
+
};
|
|
11
|
+
exports.isStandaloneBuildConfig = isStandaloneBuildConfig;
|
|
7
12
|
var isOfBuildType = function (t) {
|
|
8
13
|
var types = [];
|
|
9
14
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
10
15
|
types[_i - 1] = arguments[_i];
|
|
11
16
|
}
|
|
17
|
+
if (!(0, exports.isStandaloneBuildConfig)(t)) return false;
|
|
12
18
|
return types.includes(t.type);
|
|
13
19
|
};
|
|
14
20
|
exports.isOfBuildType = isOfBuildType;
|