@tauri-apps/plugin-process
Advanced tools
@@ -26,3 +26,3 @@ 'use strict'; | ||
| async function exit(code = 0) { | ||
| return core.invoke("plugin:process|exit", { code }); | ||
| await core.invoke("plugin:process|exit", { code }); | ||
| } | ||
@@ -42,3 +42,3 @@ /** | ||
| async function relaunch() { | ||
| return core.invoke("plugin:process|restart"); | ||
| await core.invoke("plugin:process|restart"); | ||
| } | ||
@@ -45,0 +45,0 @@ |
+2
-2
@@ -24,3 +24,3 @@ import { invoke } from '@tauri-apps/api/core'; | ||
| async function exit(code = 0) { | ||
| return invoke("plugin:process|exit", { code }); | ||
| await invoke("plugin:process|exit", { code }); | ||
| } | ||
@@ -40,5 +40,5 @@ /** | ||
| async function relaunch() { | ||
| return invoke("plugin:process|restart"); | ||
| await invoke("plugin:process|restart"); | ||
| } | ||
| export { exit, relaunch }; |
+2
-2
| { | ||
| "name": "@tauri-apps/plugin-process", | ||
| "version": "2.0.0-beta.2", | ||
| "version": "2.0.0-beta.3", | ||
| "license": "MIT or APACHE-2.0", | ||
@@ -23,3 +23,3 @@ "authors": [ | ||
| "dependencies": { | ||
| "@tauri-apps/api": "2.0.0-beta.4" | ||
| "@tauri-apps/api": "2.0.0-beta.11" | ||
| }, | ||
@@ -26,0 +26,0 @@ "scripts": { |
| 'use strict'; | ||
| var core = require('@tauri-apps/api/core'); | ||
| // Copyright 2019-2023 Tauri Programme within The Commons Conservancy | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // SPDX-License-Identifier: MIT | ||
| /** | ||
| * Perform operations on the current process. | ||
| * @module | ||
| */ | ||
| /** | ||
| * Exits immediately with the given `exitCode`. | ||
| * @example | ||
| * ```typescript | ||
| * import { exit } from '@tauri-apps/plugin-process'; | ||
| * await exit(1); | ||
| * ``` | ||
| * | ||
| * @param code The exit code to use. | ||
| * @returns A promise indicating the success or failure of the operation. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| async function exit(code = 0) { | ||
| return core.invoke("plugin:process|exit", { code }); | ||
| } | ||
| /** | ||
| * Exits the current instance of the app then relaunches it. | ||
| * @example | ||
| * ```typescript | ||
| * import { relaunch } from '@tauri-apps/plugin-process'; | ||
| * await relaunch(); | ||
| * ``` | ||
| * | ||
| * @returns A promise indicating the success or failure of the operation. | ||
| * | ||
| * @since 2.0.0 | ||
| */ | ||
| async function relaunch() { | ||
| return core.invoke("plugin:process|restart"); | ||
| } | ||
| exports.exit = exit; | ||
| exports.relaunch = relaunch; |
7220
-12.89%6
-14.29%110
-27.63%+ Added
- Removed