stego-cli 0.3.0 → 0.3.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.
package/dist/stego-cli.js CHANGED
@@ -430,7 +430,7 @@ function parseArgs(argv) {
430
430
  if (token.startsWith("--")) {
431
431
  const key = token.slice(2);
432
432
  const next = rest[i + 1];
433
- if (!next || next.startsWith("-")) {
433
+ if (!next || !canBeOptionValue(next)) {
434
434
  options[key] = true;
435
435
  continue;
436
436
  }
@@ -441,7 +441,7 @@ function parseArgs(argv) {
441
441
  if (token.startsWith("-") && token.length > 1) {
442
442
  const key = token.slice(1);
443
443
  const next = rest[i + 1];
444
- if (!next || next.startsWith("-")) {
444
+ if (!next || !canBeOptionValue(next)) {
445
445
  options[key] = true;
446
446
  continue;
447
447
  }
@@ -456,6 +456,12 @@ function parseArgs(argv) {
456
456
  }
457
457
  return { command, options };
458
458
  }
459
+ function canBeOptionValue(token) {
460
+ if (token === "-") {
461
+ return true;
462
+ }
463
+ return !token.startsWith("-");
464
+ }
459
465
  function resolveWorkspaceContext(rootOption) {
460
466
  if (rootOption) {
461
467
  const explicitRoot = path.resolve(process.cwd(), rootOption);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stego-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "Installable CLI for the Stego writing monorepo workflow.",
6
6
  "license": "Apache-2.0",