@disposabl/cli 2.1.0 → 2.1.2

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +9 -3
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Disposabl
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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.2";
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.2",
4
4
  "type": "module",
5
5
  "description": "Command-line access to your Disposabl app",
6
6
  "license": "MIT",