@optique/core 1.2.11 → 1.2.12

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.
@@ -252,7 +252,7 @@ function* getSuggestionsWithDependency(valueParser, prefix, dependencyRegistry,
252
252
  * @internal
253
253
  */
254
254
  function* suggestOptionSync(optionNames$1, valueParser, hidden, description, context, prefix) {
255
- if (hidden) return;
255
+ if (hidden || context.optionsTerminated) return;
256
256
  const equalsIndex = prefix.indexOf("=");
257
257
  if (equalsIndex >= 0) {
258
258
  const optionPart = prefix.slice(0, equalsIndex);
@@ -337,7 +337,7 @@ async function* getSuggestionsWithDependencyAsync(valueParser, prefix, dependenc
337
337
  * @internal
338
338
  */
339
339
  async function* suggestOptionAsync(optionNames$1, valueParser, hidden, description, context, prefix) {
340
- if (hidden) return;
340
+ if (hidden || context.optionsTerminated) return;
341
341
  const equalsIndex = prefix.indexOf("=");
342
342
  if (equalsIndex >= 0) {
343
343
  const optionPart = prefix.slice(0, equalsIndex);
@@ -916,8 +916,8 @@ function flag(...args) {
916
916
  error: require_message.message`${require_message.optionNames(optionNames$1)}: ${state.error}`
917
917
  };
918
918
  },
919
- suggest(_context, prefix) {
920
- if (require_usage.isSuggestionHidden(options.hidden)) return [];
919
+ suggest(context, prefix) {
920
+ if (require_usage.isSuggestionHidden(options.hidden) || context.optionsTerminated) return [];
921
921
  const suggestions = [];
922
922
  if (prefix.startsWith("--") || prefix.startsWith("-") || prefix.startsWith("/") || prefix.startsWith("+")) {
923
923
  for (const optionName$1 of optionNames$1) if (optionName$1.startsWith(prefix)) {
@@ -252,7 +252,7 @@ function* getSuggestionsWithDependency(valueParser, prefix, dependencyRegistry,
252
252
  * @internal
253
253
  */
254
254
  function* suggestOptionSync(optionNames$1, valueParser, hidden, description, context, prefix) {
255
- if (hidden) return;
255
+ if (hidden || context.optionsTerminated) return;
256
256
  const equalsIndex = prefix.indexOf("=");
257
257
  if (equalsIndex >= 0) {
258
258
  const optionPart = prefix.slice(0, equalsIndex);
@@ -337,7 +337,7 @@ async function* getSuggestionsWithDependencyAsync(valueParser, prefix, dependenc
337
337
  * @internal
338
338
  */
339
339
  async function* suggestOptionAsync(optionNames$1, valueParser, hidden, description, context, prefix) {
340
- if (hidden) return;
340
+ if (hidden || context.optionsTerminated) return;
341
341
  const equalsIndex = prefix.indexOf("=");
342
342
  if (equalsIndex >= 0) {
343
343
  const optionPart = prefix.slice(0, equalsIndex);
@@ -916,8 +916,8 @@ function flag(...args) {
916
916
  error: message`${optionNames(optionNames$1)}: ${state.error}`
917
917
  };
918
918
  },
919
- suggest(_context, prefix) {
920
- if (isSuggestionHidden(options.hidden)) return [];
919
+ suggest(context, prefix) {
920
+ if (isSuggestionHidden(options.hidden) || context.optionsTerminated) return [];
921
921
  const suggestions = [];
922
922
  if (prefix.startsWith("--") || prefix.startsWith("-") || prefix.startsWith("/") || prefix.startsWith("+")) {
923
923
  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.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",
@@ -221,7 +221,7 @@
221
221
  },
222
222
  "sideEffects": false,
223
223
  "devDependencies": {
224
- "@optique/env": "1.2.11",
224
+ "@optique/env": "1.2.12",
225
225
  "@types/node": "^24.0.0",
226
226
  "fast-check": "^4.7.0",
227
227
  "tsdown": "^0.13.0",