@optique/core 1.0.0-dev.488 → 1.0.0-dev.489

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/facade.d.cts CHANGED
@@ -32,6 +32,7 @@ interface CommandSubConfig {
32
32
  * - `true`: Hidden from usage, documentation, and suggestions.
33
33
  * - `"usage"`: Hidden from usage lines only.
34
34
  * - `"doc"`: Hidden from documentation only.
35
+ * - `"help"`: Hidden from usage and documentation only.
35
36
  */
36
37
  readonly hidden?: HiddenVisibility;
37
38
  }
@@ -55,6 +56,7 @@ interface OptionSubConfig {
55
56
  * - `true`: Hidden from usage, documentation, and suggestions.
56
57
  * - `"usage"`: Hidden from usage lines only.
57
58
  * - `"doc"`: Hidden from documentation only.
59
+ * - `"help"`: Hidden from usage and documentation only.
58
60
  */
59
61
  readonly hidden?: HiddenVisibility;
60
62
  }
package/dist/facade.d.ts CHANGED
@@ -32,6 +32,7 @@ interface CommandSubConfig {
32
32
  * - `true`: Hidden from usage, documentation, and suggestions.
33
33
  * - `"usage"`: Hidden from usage lines only.
34
34
  * - `"doc"`: Hidden from documentation only.
35
+ * - `"help"`: Hidden from usage and documentation only.
35
36
  */
36
37
  readonly hidden?: HiddenVisibility;
37
38
  }
@@ -55,6 +56,7 @@ interface OptionSubConfig {
55
56
  * - `true`: Hidden from usage, documentation, and suggestions.
56
57
  * - `"usage"`: Hidden from usage lines only.
57
58
  * - `"doc"`: Hidden from documentation only.
59
+ * - `"help"`: Hidden from usage and documentation only.
58
60
  */
59
61
  readonly hidden?: HiddenVisibility;
60
62
  }
@@ -52,6 +52,7 @@ interface OptionOptions {
52
52
  * - `true`: hide from usage, docs, and suggestions
53
53
  * - `"usage"`: hide from usage only
54
54
  * - `"doc"`: hide from docs only
55
+ * - `"help"`: hide from usage and docs, keep suggestions
55
56
  *
56
57
  * @since 0.9.0
57
58
  */
@@ -166,6 +167,7 @@ interface FlagOptions {
166
167
  * - `true`: hide from usage, docs, and suggestions
167
168
  * - `"usage"`: hide from usage only
168
169
  * - `"doc"`: hide from docs only
170
+ * - `"help"`: hide from usage and docs, keep suggestions
169
171
  *
170
172
  * @since 0.9.0
171
173
  */
@@ -255,6 +257,7 @@ interface ArgumentOptions {
255
257
  * - `true`: hide from usage, docs, and suggestions
256
258
  * - `"usage"`: hide from usage only
257
259
  * - `"doc"`: hide from docs only
260
+ * - `"help"`: hide from usage and docs, keep suggestions
258
261
  *
259
262
  * @since 0.9.0
260
263
  */
@@ -329,6 +332,7 @@ interface CommandOptions {
329
332
  * - `true`: hide from usage, docs, and suggestions
330
333
  * - `"usage"`: hide from usage only
331
334
  * - `"doc"`: hide from docs only
335
+ * - `"help"`: hide from usage and docs, keep suggestions
332
336
  *
333
337
  * @since 0.9.0
334
338
  */
@@ -416,6 +420,7 @@ interface PassThroughOptions {
416
420
  * - `true`: hide from usage, docs, and suggestions
417
421
  * - `"usage"`: hide from usage only
418
422
  * - `"doc"`: hide from docs only
423
+ * - `"help"`: hide from usage and docs, keep suggestions
419
424
  *
420
425
  * @since 0.9.0
421
426
  */
@@ -52,6 +52,7 @@ interface OptionOptions {
52
52
  * - `true`: hide from usage, docs, and suggestions
53
53
  * - `"usage"`: hide from usage only
54
54
  * - `"doc"`: hide from docs only
55
+ * - `"help"`: hide from usage and docs, keep suggestions
55
56
  *
56
57
  * @since 0.9.0
57
58
  */
@@ -166,6 +167,7 @@ interface FlagOptions {
166
167
  * - `true`: hide from usage, docs, and suggestions
167
168
  * - `"usage"`: hide from usage only
168
169
  * - `"doc"`: hide from docs only
170
+ * - `"help"`: hide from usage and docs, keep suggestions
169
171
  *
170
172
  * @since 0.9.0
171
173
  */
@@ -255,6 +257,7 @@ interface ArgumentOptions {
255
257
  * - `true`: hide from usage, docs, and suggestions
256
258
  * - `"usage"`: hide from usage only
257
259
  * - `"doc"`: hide from docs only
260
+ * - `"help"`: hide from usage and docs, keep suggestions
258
261
  *
259
262
  * @since 0.9.0
260
263
  */
@@ -329,6 +332,7 @@ interface CommandOptions {
329
332
  * - `true`: hide from usage, docs, and suggestions
330
333
  * - `"usage"`: hide from usage only
331
334
  * - `"doc"`: hide from docs only
335
+ * - `"help"`: hide from usage and docs, keep suggestions
332
336
  *
333
337
  * @since 0.9.0
334
338
  */
@@ -416,6 +420,7 @@ interface PassThroughOptions {
416
420
  * - `true`: hide from usage, docs, and suggestions
417
421
  * - `"usage"`: hide from usage only
418
422
  * - `"doc"`: hide from docs only
423
+ * - `"help"`: hide from usage and docs, keep suggestions
419
424
  *
420
425
  * @since 0.9.0
421
426
  */
package/dist/usage.cjs CHANGED
@@ -4,13 +4,13 @@
4
4
  * Returns whether the term should be hidden from usage output.
5
5
  */
6
6
  function isUsageHidden(hidden) {
7
- return hidden === true || hidden === "usage";
7
+ return hidden === true || hidden === "usage" || hidden === "help";
8
8
  }
9
9
  /**
10
10
  * Returns whether the term should be hidden from documentation output.
11
11
  */
12
12
  function isDocHidden(hidden) {
13
- return hidden === true || hidden === "doc";
13
+ return hidden === true || hidden === "doc" || hidden === "help";
14
14
  }
15
15
  /**
16
16
  * Returns whether the term should be hidden from suggestion/error candidates.
@@ -25,7 +25,11 @@ function mergeHidden(a, b) {
25
25
  if (a == null) return b;
26
26
  if (b == null) return a;
27
27
  if (a === true || b === true) return true;
28
- if (a !== b) return true;
28
+ if (a === false) return b;
29
+ if (b === false) return a;
30
+ if (a === b) return a;
31
+ if (a === "help" || b === "help") return "help";
32
+ if ((a === "usage" || a === "doc") && (b === "usage" || b === "doc")) return "help";
29
33
  return a;
30
34
  }
31
35
  /**
package/dist/usage.d.cts CHANGED
@@ -18,8 +18,9 @@ type OptionName = `--${string}` | `-${string}` | `/${string}` | `+${string}`;
18
18
  * - `true`: hidden from usage, documentation, and suggestions
19
19
  * - `"usage"`: hidden from usage only
20
20
  * - `"doc"`: hidden from documentation only
21
+ * - `"help"`: hidden from usage and documentation, but shown in suggestions
21
22
  */
22
- type HiddenVisibility = boolean | "usage" | "doc";
23
+ type HiddenVisibility = boolean | "usage" | "doc" | "help";
23
24
  /**
24
25
  * Returns whether the term should be hidden from usage output.
25
26
  */
package/dist/usage.d.ts CHANGED
@@ -18,8 +18,9 @@ type OptionName = `--${string}` | `-${string}` | `/${string}` | `+${string}`;
18
18
  * - `true`: hidden from usage, documentation, and suggestions
19
19
  * - `"usage"`: hidden from usage only
20
20
  * - `"doc"`: hidden from documentation only
21
+ * - `"help"`: hidden from usage and documentation, but shown in suggestions
21
22
  */
22
- type HiddenVisibility = boolean | "usage" | "doc";
23
+ type HiddenVisibility = boolean | "usage" | "doc" | "help";
23
24
  /**
24
25
  * Returns whether the term should be hidden from usage output.
25
26
  */
package/dist/usage.js CHANGED
@@ -3,13 +3,13 @@
3
3
  * Returns whether the term should be hidden from usage output.
4
4
  */
5
5
  function isUsageHidden(hidden) {
6
- return hidden === true || hidden === "usage";
6
+ return hidden === true || hidden === "usage" || hidden === "help";
7
7
  }
8
8
  /**
9
9
  * Returns whether the term should be hidden from documentation output.
10
10
  */
11
11
  function isDocHidden(hidden) {
12
- return hidden === true || hidden === "doc";
12
+ return hidden === true || hidden === "doc" || hidden === "help";
13
13
  }
14
14
  /**
15
15
  * Returns whether the term should be hidden from suggestion/error candidates.
@@ -24,7 +24,11 @@ function mergeHidden(a, b) {
24
24
  if (a == null) return b;
25
25
  if (b == null) return a;
26
26
  if (a === true || b === true) return true;
27
- if (a !== b) return true;
27
+ if (a === false) return b;
28
+ if (b === false) return a;
29
+ if (a === b) return a;
30
+ if (a === "help" || b === "help") return "help";
31
+ if ((a === "usage" || a === "doc") && (b === "usage" || b === "doc")) return "help";
28
32
  return a;
29
33
  }
30
34
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.488+690cf201",
3
+ "version": "1.0.0-dev.489+709d13c5",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",