mirror of
https://github.com/tauri-apps/tauri-plugin-process.git
synced 2026-01-31 00:55:17 +01:00
refactor: only inject API IIFE script when withGlobalTauri is true (#1071)
* refactor: only inject API IIFE script when withGlobalTauri is true * fmt * update tauri Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/8347963398 Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
This commit is contained in:
committed by
tauri-bot
parent
f0e03f1c76
commit
3809cee4d6
4
build.rs
4
build.rs
@@ -5,5 +5,7 @@
|
||||
const COMMANDS: &[&str] = &["exit", "restart"];
|
||||
|
||||
fn main() {
|
||||
tauri_plugin::Builder::new(COMMANDS).build();
|
||||
tauri_plugin::Builder::new(COMMANDS)
|
||||
.global_api_script_path("./api-iife.js")
|
||||
.build();
|
||||
}
|
||||
|
||||
2
node_modules/@tauri-apps/api
generated
vendored
2
node_modules/@tauri-apps/api
generated
vendored
@@ -1 +1 @@
|
||||
../../../../node_modules/.pnpm/@tauri-apps+api@2.0.0-beta.4/node_modules/@tauri-apps/api
|
||||
../../../../node_modules/.pnpm/@tauri-apps+api@2.0.0-beta.6/node_modules/@tauri-apps/api
|
||||
@@ -23,6 +23,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-beta.4"
|
||||
"@tauri-apps/api": "2.0.0-beta.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,14 +139,10 @@
|
||||
},
|
||||
"platforms": {
|
||||
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
|
||||
"default": [
|
||||
"linux",
|
||||
"macOS",
|
||||
"windows",
|
||||
"android",
|
||||
"iOS"
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Target"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ mod commands;
|
||||
|
||||
pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
Builder::new("process")
|
||||
.js_init_script(include_str!("api-iife.js").to_string())
|
||||
.invoke_handler(tauri::generate_handler![commands::exit, commands::restart])
|
||||
.build()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user