-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
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
feat(shell-api, cli-repl): pass print type as part of the onPrint callback; do not limit the output of printjson MONGOSH-955 #1356
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ export interface EvaluationListener extends Partial<ConfigProvider<ShellUserConf | |
/** | ||
* Called when print() or printjson() is run from the shell. | ||
*/ | ||
onPrint?: (value: ShellResult[]) => Promise<void> | void; | ||
onPrint?: (value: ShellResult[], type: 'print' | 'printjson') => Promise<void> | void; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need/want to update browser-repl as well? I’m not sure what that would even look like. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure that we would want to, yeah, doesn't look like this would make sense in browser-repl context to me too |
||
|
||
/** | ||
* Called when e.g. passwordPrompt() is called from the shell. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old
printjson
also ignores everything except first argument, I am not sure whether we want to replicate this behavior or not