-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: expose app exit via JS process API #14767
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
base: dev
Are you sure you want to change the base?
Conversation
|
anyway, i'm not opposed to an exit js command but it should be part of the |
|
cc @whoever-in-the-working-group-cares anyone against having app.exit in js? Then the process plugin can be just for "other" processes than the current one (or both i guess) |
Package Changes Through 4379062There are 8 changes which include tauri-utils with patch, tauri-build with patch, tauri-cli with patch, @tauri-apps/cli with patch, tauri-runtime-wry with patch, tauri with minor, @tauri-apps/api with minor, tauri-runtime with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Legend-Master
left a comment
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.
cc @whoever-in-the-working-group-cares anyone against having app.exit in js? Then the process plugin can be just for "other" processes than the current one (or both i guess)
Moving exit to core (app) makes a lot of sense to me at least
| * @since 2.10.0 | ||
| */ | ||
| async function exit(exitCode?: number): Promise<void> { | ||
| const payload = exitCode === undefined ? {} : { exitCode } |
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.
I think we could put the default value in the js side? (e.g. { exitCode: exitCode ?? 0 })
| * | ||
| * @since 2.10.0 | ||
| */ | ||
| async function exit(exitCode?: number): Promise<void> { |
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.
Let's move this to app (packages/api/src/app.ts)
Issue: #14714
Summary:
Motivation:
Validation: