Files
release-action/lib/Artifact.js
Nick Cipollo 18eadf9c9b
Some checks failed
Test / check_pr (push) Has been cancelled
Prepare 1.11.2
2022-11-11 14:17:14 -05:00

20 lines
518 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Artifact = void 0;
const path_1 = require("path");
const fs_1 = require("fs");
class Artifact {
constructor(path, contentType = "raw") {
this.path = path;
this.name = path_1.basename(path);
this.contentType = contentType;
}
get contentLength() {
return fs_1.statSync(this.path).size;
}
readFile() {
return fs_1.readFileSync(this.path);
}
}
exports.Artifact = Artifact;