UNPKG

@catladder/cli

Version:

Panter cli tool for cloud CI/CD and DevOps

30 lines 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createArtifactsConfig = void 0; const path_1 = require("path"); const createArtifactsConfig = (rootPath, artifactsReports, artifacts) => { var _a, _b, _c, _d; return artifactsReports || artifacts ? { artifacts: { paths: [], ...artifacts, reports: { ...artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports, junit: [ artifactsReports === null || artifactsReports === void 0 ? void 0 : artifactsReports.junit, Array.isArray((_a = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _a === void 0 ? void 0 : _a.junit) && ((_b = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _b === void 0 ? void 0 : _b.junit), typeof ((_c = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _c === void 0 ? void 0 : _c.junit) === "string" && [ (_d = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _d === void 0 ? void 0 : _d.junit, ], ] .filter(Array.isArray) .reduce((acc, curr) => [...acc, ...curr.map((p) => (0, path_1.join)(rootPath, p))], []), }, }, } : undefined; }; exports.createArtifactsConfig = createArtifactsConfig; //# sourceMappingURL=createArtifactsConfig.js.map