auto
Version:
CLI tools to help facilitate semantic versioning based on GitHub PR labels
34 lines • 1.43 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const module_alias_1 = tslib_1.__importDefault(require("module-alias"));
const path_1 = tslib_1.__importDefault(require("path"));
try {
// eslint-disable-next-line
const json = require(path_1.default.join(__dirname, "../../package.json"));
if (json.name.startsWith("@auto-canary")) {
module_alias_1.default.addAliases({
/** We want to rewrite all the imports for canary (ex: npm plugin requiring core) */
"@auto-it": (fromPath, request) => request.startsWith("@auto-it") &&
// but we also want to be able to require official plugins from a canary
!fromPath.endsWith("noop.js") &&
// and don't want to override those plugins's imports
!fromPath.includes("@auto-it")
? "@auto-canary"
: "@auto-it",
});
}
}
catch (error) { }
const chalk_1 = tslib_1.__importDefault(require("chalk"));
const parse_args_1 = tslib_1.__importDefault(require("../parse-args"));
const run_1 = require("../run");
const [command, args] = parse_args_1.default();
if (command && args) {
run_1.runCli(command, args).catch((e) => {
console.error(chalk_1.default.redBright("Error: "), e.message);
process.exit(1);
});
}
//# sourceMappingURL=auto.js.map
;