middleware.ts ×1
Frontier kind: Code frontier
unlabeled · c_2cbd38952ef0
80 tests · 2085 LOC · 18 files · introduces 0 tests · 1 LOC · 1 file
Introduces — evidence that enters the hierarchy at this concept
Code
1 range 1 lines · 1 files
Tests
0 tests
Contains — complete concept membership
Neighbourhood graph
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Focus concept
Ancestors (broader)
Descendants (narrower)
Introduced files
Introduced tests
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
JavaScript is disabled; use the native relationship evidence on this page to explore the same evidence.
Native relationship evidence
Every exact file and test below is linked only from the concept that introduces it.
middleware.ts ×1 — Focused concept
Introduced files:
command.mjs|title=Command global parsing hints coerce should not be applied multiple times for nested commands|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests positional allows a coerce method to be provided|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.mjs|title=Command global parsing hints coerce should not add aliases to argv if strip-aliased config is true|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true resolves async middleware, before applying validation|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true applies aliases before middleware is called, for global middleware|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true runs before validation|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() returns camelcase args for a command|occurrence=1, yargs.mjs|title=yargs dsl tests .coerce() supports positional and variadic args for a command|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async calls the command handler when all middleware promises resolve|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints coerce defaults to applying coerce rules globally|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
command.mjs|title=Command global parsing hints validation applies custom checks globally by default|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async check failure allows error to be caught before calling command and middleware|occurrence=1 — Ancestor (broader)
Introduced tests:
command.mjs|title=Command global parsing hints validation allows each builder to specify own middleware|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async check failure allows error to be caught before calling command|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
middleware.mjs|title=middleware async check success allows async check to be used with command and middleware|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true applies aliases before middleware is called, when middleware is added in builder|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true does not cause an unexpected error when async middleware and strict are both used|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async it allows middleware rejection to be caught|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async fails when the promise returned by the middleware rejects|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests usage for default command default only should contain the expected output for showHelp, when exception occurs|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() supports a global option within command|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applyBeforeValidation=true runs before validation, when middleware is added in builder|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async check success allows async check to be used with command|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async coerce allows two commands to register different coerce methods|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async calls an async middleware only once for nested subcommands|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.ts ×2 — Ancestor (broader)
Introduced files:
command.mjs|title=Command global parsing hints coerce should bubble errors thrown by coerce function inside commands|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async it awaits middleware before awaiting handler, when applyBeforeValidation is "false"|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware applies aliases before middleware is called|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.ts ×3 — Ancestor (broader)
Introduced files:
middleware.mjs|title=middleware doesn't modify globalMiddleware array when executing middleware|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware should be able to register middleware regardless of when middleware is called|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware runs all middleware before reaching the handler|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware passes yargs object to middleware|occurrence=1, middleware.mjs|title=middleware allows middleware to be added in builder|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware runs the middleware before reaching the handler|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests command runs all middleware before reaching the handler|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async $0 applies middleware before performing validation, with explicit $0|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.ts ×1 — Ancestor (broader)
Introduced files:
middleware.mjs|title=middleware applyBeforeValidation=true still throws error when async middleware is used|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests check callback has access to options|occurrence=1, validation.mjs|title=validation tests check does not fail if error is not thrown in check callback, and true is returned|occurrence=1 — Ancestor (broader)
Introduced tests:
validation.mjs|title=validation tests check fails if error is thrown in check callback|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() allows an error from positional arg to be handled by fail() handler|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests should display a failed message when check condition fails|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests should display missing arguments when check fails with a thrown exception|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware synchronous $0 applies global middleware when default command is provided, with explicit $0|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests when exitProcess is false when check fails with a thrown exception should display missing arguments once|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async coerce allows error to be caught|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.ts ×1 — Ancestor (broader)
Introduced files:
middleware.mjs|title=middleware synchronous $0 applies middleware before performing validation, with implicit $0|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async $0 applies middleware before performing validation, with implied $0|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async coerce applies coerce before validation|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() argv does not include stripped dashes|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() shows coerced option in help|occurrence=1 — Ancestor (broader)
Introduced tests:
command.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests .coerce() argv does not include stripped aliases|occurrence=1, yargs.mjs|title=yargs dsl tests .coerce() argv does not include disabled camel-case-expansion|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() coerce still works when key used for coerce is not explicitly present in argv|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() argv includes coerced aliases|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() is supported by .option()|occurrence=1, yargs.mjs|title=yargs dsl tests .coerce() argv includes coerced camelCase|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware should run even if no command is matched|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
middleware.mjs|title=middleware async check failure allows failed check to be caught|occurrence=1 — Ancestor (broader)
Introduced tests:
usage.mjs|title=usage tests when exitProcess is false fail() is called with the original error message as the first parameter|occurrence=1, usage.mjs|title=usage tests when exitProcess is false fail() when check() throws error fail() is called with the original error object as the second parameter|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
usage.mjs|title=usage tests should return valid values when check passes|occurrence=1, usage.mjs|title=usage tests should return a valid result when check condition passes|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() supports string and function args (as option key and coerce function)|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async check applies aliases prior to calling check|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() supports an option alias|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async check success returns promise if check is async|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async coerce coerce is applied to argument and aliases|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs.mjs|title=yargs dsl tests .coerce() allows an error to be handled by fail() handler|occurrence=1 — Ancestor (broader)
Introduced tests:
output|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async check success returns promise if check and middleware is async|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.ts ×1 — Ancestor (broader)
Introduced files:
yargs.mjs|title=yargs dsl tests parseAsync returns promise when parse is asynchronous|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware async $0 applies global middleware when no commands are provided, with implied $0|occurrence=1 — Ancestor (broader)
Introduced tests:
middleware.mjs|title=middleware synchronous $0 applies global middleware when no commands are provided|occurrence=1 — Ancestor (broader)
Introduced tests:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
usage.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×2 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×3 — Ancestor (broader)
Introduced files:
middleware.ts ×1 — Ancestor (broader)
Introduced files:
middleware.ts ×3 — Ancestor (broader)
Introduced files:
middleware.ts ×1 — Ancestor (broader)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
middleware.ts ×3 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×3 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×2 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×5 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×2 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×9 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×2 — Descendant (narrower)
Introduced files:
command.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×1 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×35 — Descendant (narrower)
Introduced files:
yargs-factory.ts ×124 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.mjs|title=Argsert allows for any type if * is provided|occurrence=1, argsert.mjs|title=Argsert should ignore trailing undefined values|occurrence=1 — Descendant (narrower)
Introduced tests:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.ts ×2 — Descendant (narrower)
Introduced files:
argsert.ts ×3 — Descendant (narrower)
Introduced files:
parse-command.ts ×1 — Descendant (narrower)
Introduced files:
parse-command.ts ×1 — Descendant (narrower)
Introduced files:
parse-command.ts ×3 — Descendant (narrower)
Introduced files:
process-argv.ts ×1 — Descendant (narrower)
Introduced files:
process-argv.ts ×3 — Descendant (narrower)
Introduced files:
argsert.ts ×1 — Descendant (narrower)
Introduced files:
apply-extends.ts ×4 — Descendant (narrower)
Introduced files:
Introduced tests:
argsert.ts ×4 — Descendant (narrower)
Introduced files:
obj-filter.ts ×2 — Descendant (narrower)
Introduced files:
argsert.ts ×3 — Descendant (narrower)
Introduced files:
common-types.ts ×4 — Descendant (narrower)
Introduced files:
process-argv.ts ×5 — Descendant (narrower)
Introduced files:
Introduced tests:
is-promise.ts ×2 — Descendant (narrower)
Introduced files:
Introduced tests:
parse-command.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests:
parse-command.ts ×2 — Descendant (narrower)
Introduced files:
yerror.ts ×2 — Descendant (narrower)
Introduced files:
is-promise.ts ×1 — Descendant (narrower)
Introduced files:
Introduced tests
Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Introduced code
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 1 introduced LOC across 1 ranges.
Expand a file to inspect source; the > gutter marks introduced lines.
lib/middleware.ts 1 introduced LOC · 1 range
Open complete file
91
return middlewares . reduce < Arguments | Promise < Arguments >>(
92
( acc , middleware ) => {
93
>
if ( middleware . applyBeforeValidation !== beforeValidation ) {
middleware.ts
94
return acc ;
95
}