feat: expose app exit via JS process API#14767
feat: expose app exit via JS process API#14767seekskyworld wants to merge 2 commits intotauri-apps:devfrom
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.
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.
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.
Let's move this to app (packages/api/src/app.ts)
Issue: #14714
Summary:
Motivation:
Validation: