UNPKG

esoui-publish

Version:

A simple node utility that will publish addons to [ESOUI](https://www.esoui.com/community.php).

28 lines 1.82 kB
#!/usr/bin/env node "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var index_1 = require("./index"); var yargs_1 = __importDefault(require("yargs")); var argv = yargs_1.default.options({ token: { type: 'string', description: "Recommend setting `ESOUI_TOKEN` environment variable to avoid exposing token via logs. Otherwise this parameter is required." }, id: { type: 'number', demandOption: true, description: "ID of the addon to update" }, version: { type: 'string', description: "Version of the new version" }, description: { type: 'string', description: "Name of the file that contains the addon description. (aka what is shown on the main page of your addon)" }, changelog: { type: 'string', description: "Name of the file that contains the changelog" }, compatibility: { type: 'string', description: "Game version your addon supports. (i.e. `5.2.5`)" }, updatefile: { type: 'string', description: "Name of the file that contains the zip package to upload to esoui" }, testDeploy: { type: 'boolean', description: "Set to true to validate upload parameters without updating the actual add on" } }).argv; var token = argv.token || process.env.ESOUI_TOKEN; if (token) { index_1.EsouiPublish.publish(token, argv.id, argv.version, argv.description, argv.changelog, argv.compatibility, argv.updatefile, argv.testDeploy) .then(function (response) { return console.log(JSON.stringify(response, null, 2)); }) .catch(console.error); } else { throw new Error('No token found. Either provide via `--token=<you\'re token>` or set the ESOUI_TOKEN environment variable'); } //# sourceMappingURL=bin.js.map