hypertune
Version:
[Hypertune](https://www.hypertune.com/) is the most flexible platform for feature flags, A/B testing, analytics and app configuration. Built with full end-to-end type-safety, Git-style version control and local, synchronous, in-memory flag evaluation. Opt
47 lines • 2.13 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
require("core-js/stable");
require("regenerator-runtime/runtime");
const cac_1 = __importDefault(require("cac"));
const generate_1 = require("./generate");
const shared_1 = require("../shared");
const loadEnvironmentVariables_1 = __importDefault(require("./loadEnvironmentVariables"));
(0, loadEnvironmentVariables_1.default)();
function main() {
return __awaiter(this, void 0, void 0, function* () {
const cli = (0, cac_1.default)("hypertune");
(0, generate_1.registerGenerateCommand)(cli);
cli.help();
cli.version(shared_1.sdkVersion);
cli.parse(process.argv, { run: false });
try {
if (!cli.matchedCommand && !cli.options.help && !cli.options.version) {
throw new Error(`Failed to match command "${process.argv.slice(2).join(" ")}"`);
}
else {
yield cli.runMatchedCommand();
}
}
catch (error) {
console.error("Error:", error instanceof Error ? error.message : error);
process.exit(1);
}
process.exit(0);
});
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
main();
//# sourceMappingURL=index.js.map