We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue: Middleware assigned to the shell is executing after middleware assigned to specific commands.
How To Reproduce:
let status = [] const cmd = new Command({ name: 'run', async handler(meta) { return meta.input } }) cmd.use(async function(meta, next) { status.push('2') next() }) const sh = new Shell({ name: 'test', use: [ (meta, next) => { status.push('1') next() } ], commands: [cmd] }) sh.exec(['run', 'other'])
Expected Behavior: The value of status should be 1,2, but is actually 2,1.
status
1,2
2,1
Middleware should be executed according to the hierarchy of the command, i.e.:
graph LR sh[1. shell middleware] c[2. command middleware] s[3. subcommand middleware] sh-->c c-->s
It currently runs in the opposite order.
The text was updated successfully, but these errors were encountered:
3e4a034
coreybutler
No branches or pull requests
Issue:
Middleware assigned to the shell is executing after middleware assigned to specific commands.
How To Reproduce:
Expected Behavior:
The value of
status
should be1,2
, but is actually2,1
.Middleware should be executed according to the hierarchy of the command, i.e.:
It currently runs in the opposite order.
The text was updated successfully, but these errors were encountered: