@optique/core 1.1.0-dev.2087 → 1.1.0-dev.2146

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 (74) hide show
  1. package/dist/annotation-state.cjs +26 -26
  2. package/dist/annotation-state.d.cts +133 -1
  3. package/dist/annotation-state.d.ts +133 -1
  4. package/dist/annotations.cjs +2 -2
  5. package/dist/constructs.cjs +873 -73
  6. package/dist/constructs.d.cts +72 -1
  7. package/dist/constructs.d.ts +72 -1
  8. package/dist/constructs.js +808 -9
  9. package/dist/dependency-metadata.cjs +12 -12
  10. package/dist/dependency-metadata.d.cts +34 -3
  11. package/dist/dependency-metadata.d.ts +34 -3
  12. package/dist/dependency-runtime.cjs +37 -13
  13. package/dist/dependency-runtime.d.cts +197 -2
  14. package/dist/dependency-runtime.d.ts +197 -2
  15. package/dist/dependency-runtime.js +22 -1
  16. package/dist/dependency.cjs +7 -7
  17. package/dist/displaywidth.d.cts +12 -0
  18. package/dist/displaywidth.d.ts +12 -0
  19. package/dist/doc.cjs +3 -0
  20. package/dist/doc.js +3 -0
  21. package/dist/execution-context.d.cts +23 -0
  22. package/dist/execution-context.d.ts +23 -0
  23. package/dist/extension.cjs +14 -14
  24. package/dist/facade.cjs +49 -37
  25. package/dist/facade.js +34 -22
  26. package/dist/index.cjs +23 -21
  27. package/dist/index.d.cts +3 -3
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +4 -4
  30. package/dist/input-trace.d.cts +2 -1
  31. package/dist/input-trace.d.ts +2 -1
  32. package/dist/internal/annotations.cjs +3 -0
  33. package/dist/internal/annotations.d.cts +47 -5
  34. package/dist/internal/annotations.d.ts +47 -5
  35. package/dist/internal/annotations.js +1 -1
  36. package/dist/internal/command-alias.cjs +16 -0
  37. package/dist/internal/command-alias.js +14 -0
  38. package/dist/internal/dependency.cjs +131 -0
  39. package/dist/internal/dependency.d.cts +311 -2
  40. package/dist/internal/dependency.d.ts +311 -2
  41. package/dist/internal/dependency.js +119 -1
  42. package/dist/internal/parser.cjs +108 -23
  43. package/dist/internal/parser.d.cts +58 -3
  44. package/dist/internal/parser.d.ts +58 -3
  45. package/dist/internal/parser.js +101 -16
  46. package/dist/modifiers.cjs +74 -44
  47. package/dist/modifiers.js +34 -4
  48. package/dist/parser.cjs +11 -11
  49. package/dist/phase2-seed.cjs +2 -2
  50. package/dist/phase2-seed.d.cts +50 -0
  51. package/dist/phase2-seed.d.ts +50 -0
  52. package/dist/primitives.cjs +104 -33
  53. package/dist/primitives.d.cts +10 -0
  54. package/dist/primitives.d.ts +10 -0
  55. package/dist/primitives.js +84 -13
  56. package/dist/suggestion.cjs +72 -2
  57. package/dist/suggestion.d.cts +188 -0
  58. package/dist/suggestion.d.ts +188 -0
  59. package/dist/suggestion.js +71 -3
  60. package/dist/usage-internals.cjs +14 -6
  61. package/dist/usage-internals.js +14 -6
  62. package/dist/usage.cjs +33 -8
  63. package/dist/usage.d.cts +31 -0
  64. package/dist/usage.d.ts +31 -0
  65. package/dist/usage.js +33 -8
  66. package/dist/validate.cjs +1 -0
  67. package/dist/validate.d.cts +99 -0
  68. package/dist/validate.d.ts +99 -0
  69. package/dist/validate.js +1 -1
  70. package/dist/valueparser.cjs +333 -79
  71. package/dist/valueparser.d.cts +197 -1
  72. package/dist/valueparser.d.ts +197 -1
  73. package/dist/valueparser.js +334 -81
  74. package/package.json +19 -4
@@ -49,7 +49,14 @@ interface DependencyResolution {
49
49
  * @internal
50
50
  * @since 1.0.0
51
51
  */
52
-
52
+ interface SourceDefaultFailure {
53
+ /** The source that failed. */
54
+ readonly sourceId: symbol;
55
+ /** The path of the node. */
56
+ readonly path: readonly PropertyKey[];
57
+ /** The failed result or error message. */
58
+ readonly error: ValueParserResult<unknown>;
59
+ }
53
60
  /**
54
61
  * A key for caching replayed parse results.
55
62
  *
@@ -145,5 +152,193 @@ interface DependencyRuntimeContext {
145
152
  * @internal
146
153
  * @since 1.0.0
147
154
  */
155
+ declare function createDependencyRuntimeContext(registry?: DependencyRegistryLike): DependencyRuntimeContext;
156
+ /**
157
+ * Creates a stable fingerprint from dependency values.
158
+ *
159
+ * @param values The dependency values to fingerprint.
160
+ * @returns A string fingerprint.
161
+ * @internal
162
+ * @since 1.0.0
163
+ */
164
+ declare function createDependencyFingerprint(values: readonly unknown[]): string;
165
+ declare function createReplayKey(path: readonly PropertyKey[], rawInput: string, dependencyValues: readonly unknown[], replayParse?: Function): ReplayKey;
166
+ /**
167
+ * Collects explicit source values from parser states and registers them
168
+ * in the runtime context.
169
+ *
170
+ * @param nodes The runtime nodes to inspect.
171
+ * @param runtime The dependency runtime context.
172
+ * @throws Propagates synchronous errors thrown by `extractSourceValue()`.
173
+ * @throws {TypeError} If `extractSourceValue()` returns a promise-like result.
174
+ * Use {@link collectExplicitSourceValuesAsync} when async source
175
+ * extraction is expected.
176
+ * @internal
177
+ * @since 1.0.0
178
+ */
179
+ declare function collectExplicitSourceValues(nodes: readonly RuntimeNode[], runtime: DependencyRuntimeContext): void;
180
+ /**
181
+ * Async version of {@link collectExplicitSourceValues}.
182
+ * Awaits async `extractSourceValue` results instead of rejecting
183
+ * promise-like values as the synchronous variant does.
184
+ *
185
+ * @param nodes The runtime nodes to inspect.
186
+ * @param runtime The dependency runtime context.
187
+ * @throws Propagates errors thrown or rejected by `extractSourceValue()`.
188
+ * @internal
189
+ * @since 1.0.0
190
+ */
191
+ declare function collectExplicitSourceValuesAsync(nodes: readonly RuntimeNode[], runtime: DependencyRuntimeContext): Promise<void>;
192
+ /**
193
+ * Fills missing source defaults for source parsers whose state is
194
+ * unpopulated.
195
+ *
196
+ * Returns an array of failures for sources whose default evaluation
197
+ * failed (either threw or returned `{ success: false }`). The caller
198
+ * should propagate these so that dependent parsers see the real error
199
+ * instead of silently treating the source as absent.
200
+ *
201
+ * @param nodes The runtime nodes to inspect.
202
+ * @param runtime The dependency runtime context.
203
+ * @returns Failures from default evaluation (empty if all succeeded).
204
+ * @throws {TypeError} If `getMissingSourceValue()` returns a promise-like
205
+ * result. Use {@link fillMissingSourceDefaultsAsync} when async
206
+ * default extraction is expected.
207
+ * @internal
208
+ * @since 1.0.0
209
+ */
210
+ declare function fillMissingSourceDefaults(nodes: readonly RuntimeNode[], runtime: DependencyRuntimeContext): readonly SourceDefaultFailure[];
211
+ /**
212
+ * Async version of {@link fillMissingSourceDefaults}.
213
+ * Awaits async `getMissingSourceValue` results.
214
+ *
215
+ * @param nodes The runtime nodes to inspect.
216
+ * @param runtime The dependency runtime context.
217
+ * @returns Failures from default evaluation (empty if all succeeded).
218
+ * @internal
219
+ * @since 1.0.0
220
+ */
221
+ declare function fillMissingSourceDefaultsAsync(nodes: readonly RuntimeNode[], runtime: DependencyRuntimeContext): Promise<readonly SourceDefaultFailure[]>;
222
+ /**
223
+ * Replays a derived parser with resolved dependency values (sync).
224
+ *
225
+ * Returns `undefined` if dependencies cannot be resolved.
226
+ *
227
+ * @param node The runtime node with derived metadata.
228
+ * @param rawInput The raw input to replay.
229
+ * @param runtime The dependency runtime context.
230
+ * @returns The replay result, or `undefined`.
231
+ * @throws {TypeError} If `replayParse()` returns a promise-like result.
232
+ * Use {@link replayDerivedParserAsync} for async replay.
233
+ * @internal
234
+ * @since 1.0.0
235
+ */
236
+ declare function replayDerivedParser(node: RuntimeNode, rawInput: string, runtime: DependencyRuntimeContext): ValueParserResult<unknown> | undefined;
237
+ /**
238
+ * Replays a derived parser with resolved dependency values (async).
239
+ *
240
+ * Returns `undefined` if dependencies cannot be resolved.
241
+ *
242
+ * @param node The runtime node with derived metadata.
243
+ * @param rawInput The raw input to replay.
244
+ * @param runtime The dependency runtime context.
245
+ * @returns The replay result, or `undefined`.
246
+ * @internal
247
+ * @since 1.0.0
248
+ */
249
+ declare function replayDerivedParserAsync(node: RuntimeNode, rawInput: string, runtime: DependencyRuntimeContext): Promise<ValueParserResult<unknown> | undefined>;
250
+ /**
251
+ * Extracts `rawInput` from a parser state that may contain a
252
+ * {@link DeferredParseState}. During the transition period, primitives
253
+ * still produce `DeferredParseState` with `rawInput`.
254
+ *
255
+ * Handles direct `DeferredParseState` and array-wrapped
256
+ * `[DeferredParseState]` (from optional/withDefault wrappers).
257
+ *
258
+ * @param state The parser state to inspect.
259
+ * @returns The raw input string, or `undefined` if the state does not
260
+ * contain a `DeferredParseState`.
261
+ * @internal
262
+ * @since 1.0.0
263
+ */
264
+ declare function extractRawInputFromState(state: unknown): string | undefined;
265
+ /**
266
+ * Recursively collects dependency source values from {@link DependencySourceState}
267
+ * objects found in the state tree and registers them in the runtime.
268
+ *
269
+ * This must run BEFORE deferred resolution so that all source values
270
+ * are available when replaying derived parsers.
271
+ *
272
+ * @param state The state tree to traverse.
273
+ * @param runtime The dependency runtime context to populate.
274
+ * @param visited Cycle guard for recursive traversal.
275
+ * @param excludedFields Optional property keys to skip at the current level.
276
+ * This exclusion set is not propagated recursively.
277
+ */
278
+ declare function collectSourcesFromState(state: unknown, runtime: DependencyRuntimeContext, visited?: WeakSet<object>, excludedFields?: ReadonlySet<PropertyKey>): void;
279
+ /**
280
+ * Recursively resolves all {@link DeferredParseState} objects in a state
281
+ * tree using the dependency runtime (sync).
282
+ *
283
+ * Performs a two-pass traversal:
284
+ * 1. Collect all {@link DependencySourceState} values into the runtime.
285
+ * 2. Resolve all {@link DeferredParseState} using the populated runtime.
286
+ *
287
+ * This replaces the old `resolveDeferredParseStates` with runtime-based
288
+ * resolution. Only traverses plain objects and arrays; class instances
289
+ * and primitives are returned as-is.
290
+ *
291
+ * @param state The state tree to resolve.
292
+ * @param runtime The dependency runtime context.
293
+ * @returns The resolved state tree.
294
+ * @throws {TypeError} If a deferred parser returns a promise-like result from
295
+ * `parseWithDependency()`. Use {@link resolveStateWithRuntimeAsync}
296
+ * for async resolution.
297
+ * @internal
298
+ * @since 1.0.0
299
+ */
300
+ declare function resolveStateWithRuntime(state: unknown, runtime: DependencyRuntimeContext): unknown;
301
+ /**
302
+ * Async version of {@link resolveStateWithRuntime}.
303
+ *
304
+ * @param state The state tree to resolve.
305
+ * @param runtime The dependency runtime context.
306
+ * @returns The resolved state tree.
307
+ * @internal
308
+ * @since 1.0.0
309
+ */
310
+ declare function resolveStateWithRuntimeAsync(state: unknown, runtime: DependencyRuntimeContext): Promise<unknown>;
311
+ /**
312
+ * Builds {@link RuntimeNode}s from field→parser pairs and a state record.
313
+ *
314
+ * Used by `object()` and `merge()` constructs.
315
+ *
316
+ * @param pairs Field→parser pairs.
317
+ * @param state The state record keyed by field name.
318
+ * @param parentPath Optional parent path prefix.
319
+ * @returns An array of runtime nodes.
320
+ * @internal
321
+ * @since 1.0.0
322
+ */
323
+ declare function buildRuntimeNodesFromPairs(pairs: ReadonlyArray<readonly [PropertyKey, {
324
+ readonly dependencyMetadata?: ParserDependencyMetadata;
325
+ readonly initialState?: unknown;
326
+ }]>, state: Record<PropertyKey, unknown>, parentPath?: readonly PropertyKey[]): readonly RuntimeNode[];
327
+ /**
328
+ * Builds {@link RuntimeNode}s from a parser array and a state array.
329
+ *
330
+ * Used by `tuple()` and `concat()` constructs.
331
+ *
332
+ * @param parsers The child parsers.
333
+ * @param stateArray The state array (one element per parser).
334
+ * @param parentPath Optional parent path prefix.
335
+ * @returns An array of runtime nodes.
336
+ * @internal
337
+ * @since 1.0.0
338
+ */
339
+ declare function buildRuntimeNodesFromArray(parsers: ReadonlyArray<{
340
+ readonly dependencyMetadata?: ParserDependencyMetadata;
341
+ readonly initialState?: unknown;
342
+ }>, stateArray: readonly unknown[], parentPath?: readonly PropertyKey[]): readonly RuntimeNode[];
148
343
  //#endregion
149
- export { DependencyRuntimeContext, RuntimeNode };
344
+ export { DependencyRequest, DependencyResolution, DependencyRuntimeContext, DependencyValueOrigin, ReplayKey, RuntimeNode, SourceDefaultFailure, buildRuntimeNodesFromArray, buildRuntimeNodesFromPairs, collectExplicitSourceValues, collectExplicitSourceValuesAsync, collectSourcesFromState, createDependencyFingerprint, createDependencyRuntimeContext, createReplayKey, extractRawInputFromState, fillMissingSourceDefaults, fillMissingSourceDefaultsAsync, replayDerivedParser, replayDerivedParserAsync, resolveStateWithRuntime, resolveStateWithRuntimeAsync };
@@ -457,6 +457,27 @@ async function replayDerivedParserAsync(node, rawInput, runtime) {
457
457
  return result;
458
458
  }
459
459
  /**
460
+ * Extracts `rawInput` from a parser state that may contain a
461
+ * {@link DeferredParseState}. During the transition period, primitives
462
+ * still produce `DeferredParseState` with `rawInput`.
463
+ *
464
+ * Handles direct `DeferredParseState` and array-wrapped
465
+ * `[DeferredParseState]` (from optional/withDefault wrappers).
466
+ *
467
+ * @param state The parser state to inspect.
468
+ * @returns The raw input string, or `undefined` if the state does not
469
+ * contain a `DeferredParseState`.
470
+ * @internal
471
+ * @since 1.0.0
472
+ */
473
+ function extractRawInputFromState(state) {
474
+ if (state == null) return void 0;
475
+ if (typeof state !== "object") return void 0;
476
+ if (isDeferredParseState(state)) return state.rawInput;
477
+ if (Array.isArray(state) && state.length === 1 && isDeferredParseState(state[0])) return state[0].rawInput;
478
+ return void 0;
479
+ }
480
+ /**
460
481
  * Checks if a value is a plain object (not a class instance) for the
461
482
  * purpose of recursive state traversal.
462
483
  */
@@ -696,4 +717,4 @@ function buildRuntimeNodesFromArray(parsers, stateArray, parentPath) {
696
717
  }
697
718
 
698
719
  //#endregion
699
- export { buildRuntimeNodesFromArray, buildRuntimeNodesFromPairs, collectExplicitSourceValues, collectExplicitSourceValuesAsync, collectSourcesFromState, createDependencyRuntimeContext, fillMissingSourceDefaults, fillMissingSourceDefaultsAsync, replayDerivedParser, replayDerivedParserAsync, resolveStateWithRuntime, resolveStateWithRuntimeAsync };
720
+ export { buildRuntimeNodesFromArray, buildRuntimeNodesFromPairs, collectExplicitSourceValues, collectExplicitSourceValuesAsync, collectSourcesFromState, createDependencyFingerprint, createDependencyRuntimeContext, createReplayKey, extractRawInputFromState, fillMissingSourceDefaults, fillMissingSourceDefaultsAsync, replayDerivedParser, replayDerivedParserAsync, resolveStateWithRuntime, resolveStateWithRuntimeAsync };
@@ -1,8 +1,8 @@
1
- const require_dependency = require('./internal/dependency.cjs');
1
+ const require_internal_dependency = require('./internal/dependency.cjs');
2
2
 
3
- exports.dependency = require_dependency.dependency;
4
- exports.deriveFrom = require_dependency.deriveFrom;
5
- exports.deriveFromAsync = require_dependency.deriveFromAsync;
6
- exports.deriveFromSync = require_dependency.deriveFromSync;
7
- exports.isDependencySource = require_dependency.isDependencySource;
8
- exports.isDerivedValueParser = require_dependency.isDerivedValueParser;
3
+ exports.dependency = require_internal_dependency.dependency;
4
+ exports.deriveFrom = require_internal_dependency.deriveFrom;
5
+ exports.deriveFromAsync = require_internal_dependency.deriveFromAsync;
6
+ exports.deriveFromSync = require_internal_dependency.deriveFromSync;
7
+ exports.isDependencySource = require_internal_dependency.isDependencySource;
8
+ exports.isDerivedValueParser = require_internal_dependency.isDerivedValueParser;
@@ -0,0 +1,12 @@
1
+ //#region src/displaywidth.d.ts
2
+ /**
3
+ * Computes the terminal display width of a string, accounting for
4
+ * East Asian wide characters, combining marks, emoji, and ANSI escapes.
5
+ *
6
+ * @param text The string to measure.
7
+ * @returns The number of terminal columns the string occupies.
8
+ * @internal
9
+ */
10
+ declare function getDisplayWidth(text: string): number;
11
+ //#endregion
12
+ export { getDisplayWidth };
@@ -0,0 +1,12 @@
1
+ //#region src/displaywidth.d.ts
2
+ /**
3
+ * Computes the terminal display width of a string, accounting for
4
+ * East Asian wide characters, combining marks, emoji, and ANSI escapes.
5
+ *
6
+ * @param text The string to measure.
7
+ * @returns The number of terminal columns the string occupies.
8
+ * @internal
9
+ */
10
+ declare function getDisplayWidth(text: string): number;
11
+ //#endregion
12
+ export { getDisplayWidth };
package/dist/doc.cjs CHANGED
@@ -497,6 +497,9 @@ function maxVisibleAtomicWidth(usage) {
497
497
  max = Math.max(max, maxVisibleAtomicWidth(branch));
498
498
  }
499
499
  break;
500
+ case "sequence":
501
+ max = Math.max(max, maxVisibleAtomicWidth(term.terms));
502
+ break;
500
503
  case "literal":
501
504
  if (term.value !== "") max = Math.max(max, require_displaywidth.getDisplayWidth(term.value));
502
505
  break;
package/dist/doc.js CHANGED
@@ -497,6 +497,9 @@ function maxVisibleAtomicWidth(usage) {
497
497
  max = Math.max(max, maxVisibleAtomicWidth(branch));
498
498
  }
499
499
  break;
500
+ case "sequence":
501
+ max = Math.max(max, maxVisibleAtomicWidth(term.terms));
502
+ break;
500
503
  case "literal":
501
504
  if (term.value !== "") max = Math.max(max, getDisplayWidth(term.value));
502
505
  break;
@@ -0,0 +1,23 @@
1
+ import { Usage } from "./usage.cjs";
2
+ import { ExecutionContext, ParserContext } from "./internal/parser.cjs";
3
+
4
+ //#region src/execution-context.d.ts
5
+
6
+ /**
7
+ * Appends a child parser segment to the current execution path.
8
+ * @internal
9
+ */
10
+ declare function withChildExecPath(exec: ExecutionContext | undefined, segment: PropertyKey): ExecutionContext | undefined;
11
+ /**
12
+ * Merges child-owned execution fields back into the parent execution context.
13
+ * @internal
14
+ */
15
+ declare function mergeChildExec(parent: ExecutionContext | undefined, child: ExecutionContext | undefined): ExecutionContext | undefined;
16
+ /**
17
+ * Creates a child parser context while keeping flat and nested execution data
18
+ * aligned.
19
+ * @internal
20
+ */
21
+ declare function withChildContext<TParentState, TChildState>(context: ParserContext<TParentState>, segment: PropertyKey, state: TChildState, usage?: Usage): ParserContext<TChildState>;
22
+ //#endregion
23
+ export { mergeChildExec, withChildContext, withChildExecPath };
@@ -0,0 +1,23 @@
1
+ import { Usage } from "./usage.js";
2
+ import { ExecutionContext, ParserContext } from "./internal/parser.js";
3
+
4
+ //#region src/execution-context.d.ts
5
+
6
+ /**
7
+ * Appends a child parser segment to the current execution path.
8
+ * @internal
9
+ */
10
+ declare function withChildExecPath(exec: ExecutionContext | undefined, segment: PropertyKey): ExecutionContext | undefined;
11
+ /**
12
+ * Merges child-owned execution fields back into the parent execution context.
13
+ * @internal
14
+ */
15
+ declare function mergeChildExec(parent: ExecutionContext | undefined, child: ExecutionContext | undefined): ExecutionContext | undefined;
16
+ /**
17
+ * Creates a child parser context while keeping flat and nested execution data
18
+ * aligned.
19
+ * @internal
20
+ */
21
+ declare function withChildContext<TParentState, TChildState>(context: ParserContext<TParentState>, segment: PropertyKey, state: TChildState, usage?: Usage): ParserContext<TChildState>;
22
+ //#endregion
23
+ export { mergeChildExec, withChildContext, withChildExecPath };
@@ -1,6 +1,6 @@
1
- const require_annotations = require('./internal/annotations.cjs');
1
+ const require_internal_annotations = require('./internal/annotations.cjs');
2
2
  const require_mode_dispatch = require('./internal/mode-dispatch.cjs');
3
- const require_parser = require('./internal/parser.cjs');
3
+ const require_internal_parser = require('./internal/parser.cjs');
4
4
  const require_annotation_state = require('./annotation-state.cjs');
5
5
 
6
6
  //#region src/extension.ts
@@ -14,13 +14,13 @@ const emptyTraits = Object.freeze({});
14
14
  * @since 1.0.0
15
15
  */
16
16
  function defineTraits(parser, traits) {
17
- if (traits.inheritsAnnotations === true) require_parser.defineInheritedAnnotationParser(parser);
18
- if (traits.completesFromSource === true) Object.defineProperty(parser, require_parser.unmatchedNonCliDependencySourceStateMarker, {
17
+ if (traits.inheritsAnnotations === true) require_internal_parser.defineInheritedAnnotationParser(parser);
18
+ if (traits.completesFromSource === true) Object.defineProperty(parser, require_internal_parser.unmatchedNonCliDependencySourceStateMarker, {
19
19
  value: true,
20
20
  configurable: true,
21
21
  enumerable: true
22
22
  });
23
- if (traits.requiresSourceBinding === true) Object.defineProperty(parser, require_parser.annotationWrapperRequiresSourceBindingKey, {
23
+ if (traits.requiresSourceBinding === true) Object.defineProperty(parser, require_internal_parser.annotationWrapperRequiresSourceBindingKey, {
24
24
  value: true,
25
25
  configurable: true,
26
26
  enumerable: false
@@ -35,9 +35,9 @@ function defineTraits(parser, traits) {
35
35
  */
36
36
  function getTraits(parser) {
37
37
  const traits = {
38
- ...Reflect.get(parser, require_parser.inheritParentAnnotationsKey) === true ? { inheritsAnnotations: true } : {},
39
- ...Reflect.get(parser, require_parser.unmatchedNonCliDependencySourceStateMarker) === true ? { completesFromSource: true } : {},
40
- ...Reflect.get(parser, require_parser.annotationWrapperRequiresSourceBindingKey) === true ? { requiresSourceBinding: true } : {}
38
+ ...Reflect.get(parser, require_internal_parser.inheritParentAnnotationsKey) === true ? { inheritsAnnotations: true } : {},
39
+ ...Reflect.get(parser, require_internal_parser.unmatchedNonCliDependencySourceStateMarker) === true ? { completesFromSource: true } : {},
40
+ ...Reflect.get(parser, require_internal_parser.annotationWrapperRequiresSourceBindingKey) === true ? { requiresSourceBinding: true } : {}
41
41
  };
42
42
  return Object.keys(traits).length > 0 ? traits : emptyTraits;
43
43
  }
@@ -55,7 +55,7 @@ function getTraits(parser) {
55
55
  * @since 1.0.0
56
56
  */
57
57
  function delegateSuggestNodes(innerParser, outerParser, state, path, innerState, position = "append") {
58
- return require_parser.getDelegatingSuggestRuntimeNodes(innerParser, outerParser, state, path, innerState, position);
58
+ return require_internal_parser.getDelegatingSuggestRuntimeNodes(innerParser, outerParser, state, path, innerState, position);
59
59
  }
60
60
  /**
61
61
  * Maps the source capability of a parser's dependency metadata while
@@ -69,7 +69,7 @@ function delegateSuggestNodes(innerParser, outerParser, state, path, innerState,
69
69
  * @since 1.0.0
70
70
  */
71
71
  function mapSourceMetadata(parser, mapSource) {
72
- return require_parser.composeWrappedSourceMetadata(parser.dependencyMetadata, mapSource);
72
+ return require_internal_parser.composeWrappedSourceMetadata(parser.dependencyMetadata, mapSource);
73
73
  }
74
74
 
75
75
  //#endregion
@@ -77,11 +77,11 @@ exports.defineTraits = defineTraits;
77
77
  exports.delegateSuggestNodes = delegateSuggestNodes;
78
78
  exports.dispatchByMode = require_mode_dispatch.dispatchByMode;
79
79
  exports.getTraits = getTraits;
80
- exports.inheritAnnotations = require_annotations.inheritAnnotations;
81
- exports.injectAnnotations = require_annotations.injectAnnotations;
82
- exports.isInjectedAnnotationState = require_annotations.isInjectedAnnotationState;
80
+ exports.inheritAnnotations = require_internal_annotations.inheritAnnotations;
81
+ exports.injectAnnotations = require_internal_annotations.injectAnnotations;
82
+ exports.isInjectedAnnotationState = require_internal_annotations.isInjectedAnnotationState;
83
83
  exports.mapModeValue = require_mode_dispatch.mapModeValue;
84
84
  exports.mapSourceMetadata = mapSourceMetadata;
85
- exports.unwrapInjectedAnnotationState = require_annotations.unwrapInjectedAnnotationState;
85
+ exports.unwrapInjectedAnnotationState = require_internal_annotations.unwrapInjectedAnnotationState;
86
86
  exports.withAnnotationView = require_annotation_state.withAnnotationView;
87
87
  exports.wrapForMode = require_mode_dispatch.wrapForMode;