@disposabl/cli 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +9 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // auth.ts
4
4
  import { lock } from "proper-lockfile";
5
5
  // package.json
6
- var version = "2.1.0";
6
+ var version = "2.1.1";
7
7
  var package_default = {
8
8
  name: "@disposabl/cli",
9
9
  version,
@@ -544,6 +544,9 @@ function createProgram(serviceOrigin, centralAnalytics = false, dependencies = {
544
544
  });
545
545
  };
546
546
  const program = new Command().name(Object.keys(package_default.bin)[0]).version(package_default.version);
547
+ program.addHelpText("after", `
548
+ API commands are loaded from the configured service. Use <command> --help for their options.
549
+ `);
547
550
  if (centralAnalytics)
548
551
  program.addHelpText("after", `
549
552
  Disposabl collects limited CLI usage when configured. Set DO_NOT_TRACK=1 to opt out.
@@ -734,7 +737,7 @@ function needsContract(program, argv, origin) {
734
737
  const args = argv.slice(2);
735
738
  const { operands } = program.parseOptions(args);
736
739
  const command = operands[0] === "help" ? operands[1] : operands[0];
737
- return Boolean(origin) && !args.some((arg) => arg === "--version" || arg === "-V") && command !== "login" && command !== "logout";
740
+ return Boolean(origin) && command !== undefined && !args.some((arg) => arg === "--version" || arg === "-V") && command !== "login" && command !== "logout";
738
741
  }
739
742
 
740
743
  // commands.ts
@@ -1042,7 +1045,10 @@ Waiting for connections. Press Ctrl+C to keep your files and finish later.`);
1042
1045
  }
1043
1046
  }
1044
1047
  }
1045
- await program.parseAsync(argv);
1048
+ if (argv.length <= 2)
1049
+ program.outputHelp();
1050
+ else
1051
+ await program.parseAsync(argv);
1046
1052
  }
1047
1053
  const command = ["--version", "-V"].includes(argv[2] ?? "") ? "version" : ["--help", "-h"].includes(argv[2] ?? "") ? "help" : argv[2] ?? "help";
1048
1054
  const central = serviceOrigin === SERVICE_ORIGIN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@disposabl/cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "description": "Command-line access to your Disposabl app",
6
6
  "license": "MIT",