Socket
Socket
Sign inDemoInstall

@artus-cli/plugin-help

Package Overview
Dependencies
1
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

23

dist/lifecycle.js

@@ -17,14 +17,15 @@ "use strict";

const { binName: bin } = this.program;
const { fuzzyMatched, matched, args, raw } = ctx;
if (!fuzzyMatched || !args.help) {
if (!matched) {
// can not match any command
console.error(`\n Command not found: '${bin} ${raw.join(' ')}', try '${(fuzzyMatched === null || fuzzyMatched === void 0 ? void 0 : fuzzyMatched.cmds.join(' ')) || bin} --help' for more information.\n`);
process.exit(1);
}
return next();
if (ctx.fuzzyMatched && ctx.args.help) {
// redirect to help command
const utils = ctx.container.get(artus_cli_1.Utils);
return utils.redirect(['help', ctx.fuzzyMatched.uid]);
}
// redirect to help command
const utils = ctx.container.get(artus_cli_1.Utils);
await utils.redirect(['help', fuzzyMatched.uid]);
try {
await next();
}
catch (e) {
// can not match any command
console.error(`\n ${e.message}, try '${ctx.fuzzyMatched.cmds.join(' ') || bin} --help' for more information.\n`);
process.exit(1);
}
});

@@ -31,0 +32,0 @@ }

{
"name": "@artus-cli/plugin-help",
"version": "0.0.1",
"version": "0.0.2",
"description": "show help information for @artus-cli",

@@ -5,0 +5,0 @@ "homepage": "",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc