@optique/core 1.0.13-dev.2743 → 1.0.14-dev.2753

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.
@@ -241,7 +241,7 @@ function* getSuggestionsWithDependency(valueParser, prefix, dependencyRegistry,
241
241
  * @internal
242
242
  */
243
243
  function* suggestOptionSync(optionNames$1, valueParser, hidden, description, context, prefix) {
244
- if (hidden) return;
244
+ if (hidden || context.optionsTerminated) return;
245
245
  const equalsIndex = prefix.indexOf("=");
246
246
  if (equalsIndex >= 0) {
247
247
  const optionPart = prefix.slice(0, equalsIndex);
@@ -326,7 +326,7 @@ async function* getSuggestionsWithDependencyAsync(valueParser, prefix, dependenc
326
326
  * @internal
327
327
  */
328
328
  async function* suggestOptionAsync(optionNames$1, valueParser, hidden, description, context, prefix) {
329
- if (hidden) return;
329
+ if (hidden || context.optionsTerminated) return;
330
330
  const equalsIndex = prefix.indexOf("=");
331
331
  if (equalsIndex >= 0) {
332
332
  const optionPart = prefix.slice(0, equalsIndex);
@@ -898,8 +898,8 @@ function flag(...args) {
898
898
  error: require_message.message`${require_message.optionNames(optionNames$1)}: ${state.error}`
899
899
  };
900
900
  },
901
- suggest(_context, prefix) {
902
- if (require_usage.isSuggestionHidden(options.hidden)) return [];
901
+ suggest(context, prefix) {
902
+ if (require_usage.isSuggestionHidden(options.hidden) || context.optionsTerminated) return [];
903
903
  const suggestions = [];
904
904
  if (prefix.startsWith("--") || prefix.startsWith("-") || prefix.startsWith("/")) {
905
905
  for (const optionName$1 of optionNames$1) if (optionName$1.startsWith(prefix)) {
@@ -241,7 +241,7 @@ function* getSuggestionsWithDependency(valueParser, prefix, dependencyRegistry,
241
241
  * @internal
242
242
  */
243
243
  function* suggestOptionSync(optionNames$1, valueParser, hidden, description, context, prefix) {
244
- if (hidden) return;
244
+ if (hidden || context.optionsTerminated) return;
245
245
  const equalsIndex = prefix.indexOf("=");
246
246
  if (equalsIndex >= 0) {
247
247
  const optionPart = prefix.slice(0, equalsIndex);
@@ -326,7 +326,7 @@ async function* getSuggestionsWithDependencyAsync(valueParser, prefix, dependenc
326
326
  * @internal
327
327
  */
328
328
  async function* suggestOptionAsync(optionNames$1, valueParser, hidden, description, context, prefix) {
329
- if (hidden) return;
329
+ if (hidden || context.optionsTerminated) return;
330
330
  const equalsIndex = prefix.indexOf("=");
331
331
  if (equalsIndex >= 0) {
332
332
  const optionPart = prefix.slice(0, equalsIndex);
@@ -898,8 +898,8 @@ function flag(...args) {
898
898
  error: message`${optionNames(optionNames$1)}: ${state.error}`
899
899
  };
900
900
  },
901
- suggest(_context, prefix) {
902
- if (isSuggestionHidden(options.hidden)) return [];
901
+ suggest(context, prefix) {
902
+ if (isSuggestionHidden(options.hidden) || context.optionsTerminated) return [];
903
903
  const suggestions = [];
904
904
  if (prefix.startsWith("--") || prefix.startsWith("-") || prefix.startsWith("/")) {
905
905
  for (const optionName$1 of optionNames$1) if (optionName$1.startsWith(prefix)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.13-dev.2743",
3
+ "version": "1.0.14-dev.2753",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",