pr-view
Version:
Preview deployments for your pull requests
38 lines • 1.35 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const deployer_1 = __importDefault(require("../src/deploy/deployer"));
const commenter_1 = __importDefault(require("./util/commenter"));
function configure() {
console.log("Welcome to pr-view! Please follow the README to configure this tool. Configuration via command line " +
"is coming soon :)");
}
exports.configure = configure;
function deploy() {
const deployer = deployer_1.default();
const pullRequestCommenter = commenter_1.default();
if (deployer) {
deployer.deploy().then(() => {
pullRequestCommenter.writePullRequestComment(deployer.getDeploymentUrl());
});
}
else {
console.error("That framework isn't supported for preview deployment yet. Supported: ['next.js']");
process.exit(1);
}
}
exports.deploy = deploy;
function cleanup() {
const deployer = deployer_1.default();
if (deployer) {
deployer.cleanup();
}
else {
console.error("That framework isn't supported for preview deployment yet. Supported: ['next.js']");
process.exit(1);
}
}
exports.cleanup = cleanup;
//# sourceMappingURL=commands.js.map