Files
release-action/lib/ArtifactGlobber.js
Nick Cipollo 4b71ee3b25
Some checks failed
PR Checks / check_pr (push) Has been cancelled
Prepare release 1.7.3
2020-10-02 10:44:05 -04:00

17 lines
623 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Globber_1 = require("./Globber");
const Artifact_1 = require("./Artifact");
class FileArtifactGlobber {
constructor(globber = new Globber_1.FileGlobber()) {
this.globber = globber;
}
globArtifactString(artifact, contentType) {
return artifact.split(',')
.map((path) => this.globber.glob(path))
.reduce((accumulated, current) => accumulated.concat(current))
.map((path) => new Artifact_1.Artifact(path, contentType));
}
}
exports.FileArtifactGlobber = FileArtifactGlobber;