@newos/cli
Version:
Command-line interface for the NewOS
26 lines • 1.24 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const freeze_1 = __importDefault(require("../scripts/freeze"));
const ConfigManager_1 = __importDefault(require("../models/config/ConfigManager"));
const telemetry_1 = __importDefault(require("../telemetry"));
const name = 'freeze';
const signature = name;
const description = 'freeze current release version of your published project';
const register = program => program
.command(signature, undefined, { noHelp: true })
.usage('--network <network> [options]')
.description(description)
.withNetworkOptions()
.action(action);
async function action(options) {
const { network, txParams } = await ConfigManager_1.default.initNetworkConfiguration(options);
await telemetry_1.default.report('freeze', { network, txParams }, options.interactive);
await freeze_1.default({ network, txParams });
if (!options.dontExitProcess && process.env.NODE_ENV !== 'test')
process.exit(0);
}
exports.default = { name, signature, description, register, action };
//# sourceMappingURL=freeze.js.map