Merge pull request #5 from TerribleDev/fixes

Add Fixes
This commit is contained in:
Tommy Parnell
2022-07-23 17:19:39 -04:00
committed by GitHub
4 changed files with 28 additions and 3 deletions

View File

@@ -3,10 +3,10 @@
import { Command } from 'commander' import { Command } from 'commander'
import { spinnerError, stopSpinner } from './spinner'; import { spinnerError, stopSpinner } from './spinner';
import { widgets } from './widgets'; import { widgets } from './widgets';
const program = new Command('Our New CLI'); const program = new Command();
program.description('Our New CLI');
program.option('-v, --verbose', 'verbose logging'); program.option('-v, --verbose', 'verbose logging');
program.version('0.0.1'); program.version('0.0.1');
program.addHelpCommand()
program.addCommand(widgets); program.addCommand(widgets);
async function main() { async function main() {

22
package-lock.json generated
View File

@@ -16,6 +16,9 @@
}, },
"bin": { "bin": {
"terribledev": "dist/index.js" "terribledev": "dist/index.js"
},
"devDependencies": {
"typescript": "^4.7.4"
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
@@ -659,6 +662,19 @@
"url": "https://github.com/chalk/strip-ansi?sponsor=1" "url": "https://github.com/chalk/strip-ansi?sponsor=1"
} }
}, },
"node_modules/typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/util-deprecate": { "node_modules/util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -994,6 +1010,12 @@
"ansi-regex": "^6.0.1" "ansi-regex": "^6.0.1"
} }
}, },
"typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"dev": true
},
"util-deprecate": { "util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",

View File

@@ -18,5 +18,8 @@
}, },
"bin": { "bin": {
"terribledev": "./dist/index.js" "terribledev": "./dist/index.js"
},
"devDependencies": {
"typescript": "^4.7.4"
} }
} }

View File

@@ -12,7 +12,7 @@ widgets.command("list").action(async () => {
}) })
widgets.command("get") widgets.command("get")
.argument("widget id <id>", "the id of the widget") .argument("<id>", "the id of the widget")
.option("-f, --format <format>", "the format of the widget") .option("-f, --format <format>", "the format of the widget")
.action(async (id, options) => { .action(async (id, options) => {
updateSpinnerText("Getting widget " + id); updateSpinnerText("Getting widget " + id);