mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
fix: global API script should reuse window.__TAURI__ types (#3602)
currently each script inlines what it needs from @tauri-apps/api, so type checks like `image instanceof Image` all fail
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
---
|
||||
"autostart": patch
|
||||
"autostart-js": patch
|
||||
"barcode-scanner": patch
|
||||
"barcode-scanner-js": patch
|
||||
"biometric": patch
|
||||
"biometric-js": patch
|
||||
"cli": patch
|
||||
"cli-js": patch
|
||||
"clipboard-manager": patch
|
||||
"clipboard-manager-js": patch
|
||||
"deep-link": patch
|
||||
"deep-link-js": patch
|
||||
"dialog": patch
|
||||
"dialog-js": patch
|
||||
"fs": patch
|
||||
"fs-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
"global-shortcut": patch
|
||||
"global-shortcut-js": patch
|
||||
"haptics": patch
|
||||
"haptics-js": patch
|
||||
"http": patch
|
||||
"http-js": patch
|
||||
"log": patch
|
||||
"log-js": patch
|
||||
"nfc": patch
|
||||
"nfc-js": patch
|
||||
"notification": patch
|
||||
"notification-js": patch
|
||||
"opener": patch
|
||||
"opener-js": patch
|
||||
"os": patch
|
||||
"os-js": patch
|
||||
"positioner": patch
|
||||
"positioner-js": patch
|
||||
"process": patch
|
||||
"process-js": patch
|
||||
"shell": patch
|
||||
"shell-js": patch
|
||||
"sql": patch
|
||||
"sql-js": patch
|
||||
"store": patch
|
||||
"store-js": patch
|
||||
"stronghold": patch
|
||||
"stronghold-js": patch
|
||||
"updater": patch
|
||||
"updater-js": patch
|
||||
"upload": patch
|
||||
"upload-js": patch
|
||||
"websocket": patch
|
||||
"websocket-js": patch
|
||||
"window-state": patch
|
||||
"window-state-js": patch
|
||||
---
|
||||
|
||||
The plugin's global API script (used with `app.withGlobalTauri`) now resolves the core API from `window.__TAURI__` instead of bundling its own copy of `@tauri-apps/api`. Values created with the core API are now accepted by plugin APIs in global mode (e.g. an `Image` from `window.__TAURI__.image` passed to `clipboardManager.writeImage`, which previously failed the `instanceof` check against the plugin's private copy), and the script is considerably smaller.
|
||||
Reference in New Issue
Block a user