Merge remote-tracking branch 'origin/v2' into feat/window/incognito

pull/418/head
Lucas Nogueira 2 years ago
commit 35c384cd9d
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -0,0 +1,11 @@
---
"os": minor
"os-js": minor
---
The os plugin is recieving a few changes to improve consistency and add new features:
- Renamed `Kind` enum to `OsType` and `kind()` function to `os_type()`.
- Added `family()`,`exe_extension()`, and `hostname()` functions and their equivalents for JS.
- Removed `tempdir()` function and its equivalent on JS, use `std::env::temp_dir` instead of `temp_dir` from `tauri::path::PathResolver::temp_dir` and `path.tempDir` on JS.
- Modified `platform()` implementation to return `windows` instead of `win32` and `macos` instead of `darwin` to align with Rust's `std::env::consts::OS`

@ -0,0 +1,5 @@
---
"window-state": "patch"
---
Correctly set decoration state if no saved state xists

@ -0,0 +1,5 @@
---
"window-state-js": "patch"
---
Correctly propagate the promise inside `saveWindowState`, `restoreState` and `restoreStateCurrent` so callers can choose to `await` them.

106
Cargo.lock generated

@ -376,7 +376,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -398,7 +398,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -415,7 +415,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -1196,7 +1196,7 @@ dependencies = [
"proc-macro2",
"quote",
"scratch",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -1213,14 +1213,14 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
name = "darling"
version = "0.14.4"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944"
dependencies = [
"darling_core",
"darling_macro",
@ -1228,27 +1228,27 @@ dependencies = [
[[package]]
name = "darling_core"
version = "0.14.4"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn 1.0.109",
"syn 2.0.18",
]
[[package]]
name = "darling_macro"
version = "0.14.4"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a"
dependencies = [
"darling_core",
"quote",
"syn 1.0.109",
"syn 2.0.18",
]
[[package]]
@ -1449,7 +1449,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -1693,7 +1693,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -1854,6 +1854,16 @@ dependencies = [
"winapi",
]
[[package]]
name = "gethostname"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
dependencies = [
"libc",
"windows-targets 0.48.0",
]
[[package]]
name = "getrandom"
version = "0.1.16"
@ -3351,7 +3361,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -3824,9 +3834,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]]
name = "proc-macro2"
version = "1.0.56"
version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406"
dependencies = [
"unicode-ident",
]
@ -3857,9 +3867,9 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.26"
version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
dependencies = [
"proc-macro2",
]
@ -4351,7 +4361,7 @@ checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -4373,7 +4383,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -4399,11 +4409,11 @@ dependencies = [
[[package]]
name = "serde_with"
version = "2.3.2"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "331bb8c3bf9b92457ab7abecf07078c13f7d270ba490103e84e8b014490cd0b0"
checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513"
dependencies = [
"base64 0.13.1",
"base64 0.21.0",
"chrono",
"hex",
"indexmap",
@ -4415,14 +4425,14 @@ dependencies = [
[[package]]
name = "serde_with_macros"
version = "2.3.2"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "859011bddcc11f289f07f467cc1fe01c7a941daa4d8f6c40d4d1c92eb6d9319c"
checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070"
dependencies = [
"darling",
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.18",
]
[[package]]
@ -4892,9 +4902,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.13"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec"
checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
dependencies = [
"proc-macro2",
"quote",
@ -4997,9 +5007,9 @@ dependencies = [
[[package]]
name = "tauri"
version = "2.0.0-alpha.9"
version = "2.0.0-alpha.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "695b6c1cdf861002bc2ea17a53cf0669e62da5def6ffcbff02fa00c7515d40b4"
checksum = "2e18377a75e314aa1d476896af881ed63f57a78ca84889fe63e69067f0de158d"
dependencies = [
"anyhow",
"bytes 1.4.0",
@ -5048,9 +5058,9 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.0-alpha.5"
version = "2.0.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34a5b16abedfa53fdb6ad4c68c41612e097dbfac1c18390fe6e4ded18d9ec28d"
checksum = "a52990870fd043f1d3bd6719ae713ef2e0c50431334d7249f6ae8509d1b8c326"
dependencies = [
"anyhow",
"cargo_toml",
@ -5069,9 +5079,9 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "2.0.0-alpha.5"
version = "2.0.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62f03863ab7ecf1fea3a748c4a9ace7b0a6a2051b4ce10ae954ec546957fb529"
checksum = "5c1f1611ab0896f2693163ba4e8f3e39c02a1b70cdca4314286b5e365a5e08c6"
dependencies = [
"base64 0.21.0",
"brotli",
@ -5095,9 +5105,9 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "2.0.0-alpha.5"
version = "2.0.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74f9a2623fed6b5bc04f2e1344c88df6415617bd223599c60a4171630b63fb74"
checksum = "22752425c6dd6f3a058f376db7371f1d5bac250e340d40ba6c97ecf7182eef29"
dependencies = [
"heck 0.4.1",
"proc-macro2",
@ -5283,6 +5293,7 @@ dependencies = [
name = "tauri-plugin-os"
version = "2.0.0-alpha.0"
dependencies = [
"gethostname 0.4.3",
"log",
"os_info",
"serde",
@ -5480,9 +5491,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "0.13.0-alpha.5"
version = "0.13.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de05147581dd8cfdac638455029eb06c57fa64eb17eb03d5d7f229c571941cd9"
checksum = "d7ce19f1309299bbc38ee9236307fad4943bd8fb09dd3fea5e9dd93c1d0898d6"
dependencies = [
"gtk",
"http",
@ -5501,9 +5512,9 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "0.13.0-alpha.5"
version = "0.13.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7784048ef49a57ff32d55bf4ce89ec72fc97e3d4fdc68785d164b23965170e49"
checksum = "1231be42085f3a8b150e615601f8a070bd16bf579771a5dafe2931970a05b518"
dependencies = [
"cocoa",
"gtk",
@ -5522,13 +5533,14 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.0.0-alpha.5"
version = "2.0.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58eca5e3b6714c6bd87052182ebb7d5392d551f478f994878f136f49d4e6d640"
checksum = "2e2812e0cdfffb892c654555b2f1b8c84a035b4c56eb1646cb3eb5a9d8164d8e"
dependencies = [
"aes-gcm 0.10.1",
"brotli",
"ctor",
"dunce",
"getrandom 0.2.9",
"glob",
"heck 0.4.1",
@ -5628,7 +5640,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]
@ -6886,7 +6898,7 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507"
dependencies = [
"gethostname",
"gethostname 0.2.3",
"nix 0.24.3",
"winapi",
"winapi-wsapoll",
@ -7003,7 +7015,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.13",
"syn 2.0.18",
]
[[package]]

@ -5,8 +5,8 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = "2.0.0-alpha.9"
tauri-build = "2.0.0-alpha.5"
tauri = "2.0.0-alpha.10"
tauri-build = "2.0.0-alpha.6"
serde_json = "1"
thiserror = "1"

@ -2,7 +2,10 @@
<html lang="en" theme="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
<title>Svelte + Vite App</title>
</head>

@ -9,8 +9,7 @@
"serve": "vite preview"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4",
"@zerodevx/svelte-json-view": "0.2.1",
"@tauri-apps/api": "2.0.0-alpha.5",
"@tauri-apps/plugin-app": "2.0.0-alpha.0",
"@tauri-apps/plugin-cli": "2.0.0-alpha.0",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.0",
@ -23,16 +22,18 @@
"@tauri-apps/plugin-process": "2.0.0-alpha.0",
"@tauri-apps/plugin-shell": "2.0.0-alpha.0",
"@tauri-apps/plugin-updater": "2.0.0-alpha.0",
"@tauri-apps/plugin-window": "2.0.0-alpha.0"
"@tauri-apps/plugin-window": "2.0.0-alpha.0",
"@zerodevx/svelte-json-view": "1.0.5"
},
"devDependencies": {
"@iconify-json/codicon": "^1.1.10",
"@iconify-json/ph": "^1.1.1",
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"@tauri-apps/cli": "2.0.0-alpha.9",
"internal-ip": "^7.0.0",
"svelte": "^3.49.0",
"unocss": "^0.39.3",
"vite": "^3.0.9"
"@iconify-json/codicon": "^1.1.26",
"@iconify-json/ph": "^1.1.5",
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"@tauri-apps/cli": "2.0.0-alpha.10",
"@unocss/extractor-svelte": "^0.53.1",
"internal-ip": "^8.0.0",
"svelte": "^3.59.1",
"unocss": "^0.53.1",
"vite": "^4.3.9"
}
}

@ -354,7 +354,7 @@
<!-- Sidebar toggle, only visible on small screens -->
<div
id="sidebarToggle"
class="z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8
class="z-2000 sidebar-toggle display-none lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
>
{#if isSideBarOpen}

@ -39,3 +39,19 @@ code.code-block {
transform: translateX(var(--translate-x));
}
}
.sidebar-toggle {
margin-top: 0.5rem;
margin-left: 0.5rem;
}
body {
overflow: hidden;
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#sidebar,
#console {
padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}

@ -2,13 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import {
defineConfig,
presetIcons,
presetUno,
extractorSvelte,
presetWebFonts,
} from "unocss";
import { defineConfig, presetIcons, presetUno, presetWebFonts } from "unocss";
import extractorSvelte from "@unocss/extractor-svelte";
export default defineConfig({
theme: {

@ -10,22 +10,22 @@
"format-check": "prettier --check ."
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-typescript": "^11.1.0",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.1",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"covector": "^0.9.0",
"eslint": "^8.38.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard-with-typescript": "^35.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-security": "^1.7.1",
"prettier": "^2.8.7",
"rollup": "^3.20.4",
"typescript": "^5.0.4"
"prettier": "^2.8.8",
"rollup": "^3.25.1",
"typescript": "^5.1.3"
},
"engines": {
"pnpm": ">=7.33.0"

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -28,6 +28,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_LOG__=function(e){"use strict";var n=Object.defineProperty,t=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},r=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},a=(e,n,t)=>(r(e,n,"read from private field"),t?t.call(e):n.get(e)),i=(e,n,t,a)=>(r(e,n,"write to private field"),a?a.call(e,t):n.set(e,t),t);function o(e,n=!1){let t=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${t}`;return Object.defineProperty(window,r,{value:t=>(n&&Reflect.deleteProperty(window,r),e?.(t)),writable:!1,configurable:!0}),t}t({},{Channel:()=>c,PluginListener:()=>s,addPluginListener:()=>u,convertFileSrc:()=>_,invoke:()=>d,transformCallback:()=>o});var l,c=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,l,(()=>{})),this.id=o((e=>{a(this,l).call(this,e)}))}set onmessage(e){i(this,l,e)}get onmessage(){return a(this,l)}toJSON(){return`__CHANNEL__:${this.id}`}};l=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return d(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,n,t){let r=new c;return r.onmessage=t,d(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function d(e,n={}){return new Promise(((t,r)=>{let a=o((e=>{t(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=o((e=>{r(e),Reflect.deleteProperty(window,`_${a}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:a,error:i,...n})}))}function _(e,n="asset"){let t=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${t}`:`${n}://localhost/${t}`}async function w(e,n){await d("plugin:event|unlisten",{event:e,eventId:n})}async function f(e,n,t){return d("plugin:event|listen",{event:e,windowLabel:n,handler:o(t)}).then((n=>async()=>w(e,n)))}t({},{TauriEvent:()=>h,emit:()=>I,listen:()=>E,once:()=>y});var v,g,h=((v=h||{}).WINDOW_RESIZED="tauri://resize",v.WINDOW_MOVED="tauri://move",v.WINDOW_CLOSE_REQUESTED="tauri://close-requested",v.WINDOW_CREATED="tauri://window-created",v.WINDOW_DESTROYED="tauri://destroyed",v.WINDOW_FOCUS="tauri://focus",v.WINDOW_BLUR="tauri://blur",v.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",v.WINDOW_THEME_CHANGED="tauri://theme-changed",v.WINDOW_FILE_DROP="tauri://file-drop",v.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",v.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",v.MENU="tauri://menu",v);async function E(e,n){return f(e,null,n)}async function y(e,n){return async function(e,n,t){return f(e,n,(n=>{t(n),w(e,n.id).catch((()=>{}))}))}(e,null,n)}async function I(e,n){return async function(e,n,t){await d("plugin:event|emit",{event:e,windowLabel:n,payload:t})}(e,void 0,n)}async function p(e,n,t){var r,a;const i=null===(r=(new Error).stack)||void 0===r?void 0:r.split("\n").map((e=>e.split("@"))),o=null==i?void 0:i.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:l,line:c,keyValues:s}=null!=t?t:{};let u=null===(a=null==o?void 0:o[0])||void 0===a?void 0:a.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await window.__TAURI_INVOKE__("plugin:log|log",{level:e,message:n,location:u,file:l,line:c,keyValues:s})}return function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(g||(g={})),e.attachConsole=async function(){return await E("log://log",(e=>{const n=e.payload,t=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case g.Trace:console.log(t);break;case g.Debug:console.debug(t);break;case g.Info:console.info(t);break;case g.Warn:console.warn(t);break;case g.Error:console.error(t);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await p(g.Debug,e,n)},e.error=async function(e,n){await p(g.Error,e,n)},e.info=async function(e,n){await p(g.Info,e,n)},e.trace=async function(e,n){await p(g.Trace,e,n)},e.warn=async function(e,n){await p(g.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_LOG__})}
if("__TAURI__"in window){var __TAURI_LOG__=function(e){"use strict";var n=Object.defineProperty,t=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},r=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},a=(e,n,t)=>(r(e,n,"read from private field"),t?t.call(e):n.get(e)),i=(e,n,t,a)=>(r(e,n,"write to private field"),a?a.call(e,t):n.set(e,t),t);function o(e,n=!1){let t=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${t}`;return Object.defineProperty(window,r,{value:t=>(n&&Reflect.deleteProperty(window,r),e?.(t)),writable:!1,configurable:!0}),t}t({},{Channel:()=>c,PluginListener:()=>s,addPluginListener:()=>u,convertFileSrc:()=>d,invoke:()=>_,transformCallback:()=>o});var l,c=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,l,(()=>{})),this.id=o((e=>{a(this,l).call(this,e)}))}set onmessage(e){i(this,l,e)}get onmessage(){return a(this,l)}toJSON(){return`__CHANNEL__:${this.id}`}};l=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,n,t){let r=new c;return r.onmessage=t,_(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function _(e,n={}){return new Promise(((t,r)=>{let a=o((e=>{t(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=o((e=>{r(e),Reflect.deleteProperty(window,`_${a}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:a,error:i,...n})}))}function d(e,n="asset"){let t=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${t}`:`${n}://localhost/${t}`}t({},{TauriEvent:()=>f,emit:()=>E,listen:()=>v,once:()=>h});var w,f=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(f||{});async function g(e,n){await _("plugin:event|unlisten",{event:e,eventId:n})}async function v(e,n,t){return _("plugin:event|listen",{event:e,windowLabel:t?.target,handler:o(n)}).then((n=>async()=>g(e,n)))}async function h(e,n,t){return v(e,(t=>{n(t),g(e,t.id).catch((()=>{}))}),t)}async function E(e,n,t){await _("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}async function I(e,n,t){var r,a;const i=null===(r=(new Error).stack)||void 0===r?void 0:r.split("\n").map((e=>e.split("@"))),o=null==i?void 0:i.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:l,line:c,keyValues:s}=null!=t?t:{};let u=null===(a=null==o?void 0:o[0])||void 0===a?void 0:a.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await window.__TAURI_INVOKE__("plugin:log|log",{level:e,message:n,location:u,file:l,line:c,keyValues:s})}return function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(w||(w={})),e.attachConsole=async function(){return await v("log://log",(e=>{const n=e.payload,t=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case w.Trace:console.log(t);break;case w.Debug:console.debug(t);break;case w.Info:console.info(t);break;case w.Warn:console.warn(t);break;case w.Error:console.error(t);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await I(w.Debug,e,n)},e.error=async function(e,n){await I(w.Error,e,n)},e.info=async function(e,n){await I(w.Info,e,n)},e.trace=async function(e,n){await I(w.Trace,e,n)},e.warn=async function(e,n){await I(w.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_LOG__})}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -14,3 +14,4 @@ log = { workspace = true }
thiserror = { workspace = true }
os_info = "3"
sys-locale = "0.3"
gethostname = "0.4"

@ -16,7 +16,7 @@ declare global {
type Platform =
| "linux"
| "darwin"
| "macos"
| "ios"
| "freebsd"
| "dragonfly"
@ -24,9 +24,9 @@ type Platform =
| "openbsd"
| "solaris"
| "android"
| "win32";
| "windows";
type OsType = "Linux" | "Darwin" | "Windows_NT";
type OsType = "linux" | "windows" | "macss" | "ios" | "android";
type Arch =
| "x86"
@ -55,8 +55,9 @@ function isWindows(): boolean {
const EOL = isWindows() ? "\r\n" : "\n";
/**
* Returns a string identifying the operating system platform.
* The value is set at compile time. Possible values are `'linux'`, `'darwin'`, `'ios'`, `'freebsd'`, `'dragonfly'`, `'netbsd'`, `'openbsd'`, `'solaris'`, `'android'`, `'win32'`
* Returns a string describing the specific operating system in use.
* The value is set at compile time. Possible values are `'linux'`, `'macos'`, `'ios'`, `'freebsd'`, `'dragonfly'`, `'netbsd'`, `'openbsd'`, `'solaris'`, `'android'`, `'windows'`
*
* @example
* ```typescript
* import { platform } from '@tauri-apps/plugin-os';
@ -71,7 +72,7 @@ async function platform(): Promise<Platform> {
}
/**
* Returns a string identifying the kernel version.
* Returns the current operating system version.
* @example
* ```typescript
* import { version } from '@tauri-apps/plugin-os';
@ -84,47 +85,49 @@ async function version(): Promise<string> {
return window.__TAURI_INVOKE__("plugin:os|version");
}
type Family = "unix" | "windows";
/**
* Returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
* Returns the current operating system family. Possible values are `'unix'`, `'windows'`.
* @example
* ```typescript
* import { type } from '@tauri-apps/plugin-os';
* const osType = await type();
* import { family } from '@tauri-apps/plugin-os';
* const family = await family();
* ```
*
* @since 2.0.0
*/
async function type(): Promise<OsType> {
return window.__TAURI_INVOKE__("plugin:os|kind");
async function family(): Promise<Family> {
return window.__TAURI_INVOKE__("plugin:os|family");
}
/**
* Returns the operating system CPU architecture for which the tauri app was compiled.
* Possible values are `'x86'`, `'x86_64'`, `'arm'`, `'aarch64'`, `'mips'`, `'mips64'`, `'powerpc'`, `'powerpc64'`, `'riscv64'`, `'s390x'`, `'sparc64'`.
* Returns the current operating system type. Returns `'linux'` on Linux, `'macos'` on macOS, `'windows'` on Windows, `'ios'` on iOS and `'android'` on Android.
* @example
* ```typescript
* import { arch } from '@tauri-apps/plugin-os';
* const archName = await arch();
* import { type } from '@tauri-apps/plugin-os';
* const osType = await type();
* ```
*
* @since 2.0.0
*/
async function arch(): Promise<Arch> {
return window.__TAURI_INVOKE__("plugin:os|arch");
async function type(): Promise<OsType> {
return window.__TAURI_INVOKE__("plugin:os|os_type");
}
/**
* Returns the operating system's default directory for temporary files as a string.
* Returns the current operating system architecture.
* Possible values are `'x86'`, `'x86_64'`, `'arm'`, `'aarch64'`, `'mips'`, `'mips64'`, `'powerpc'`, `'powerpc64'`, `'riscv64'`, `'s390x'`, `'sparc64'`.
* @example
* ```typescript
* import { tempdir } from '@tauri-apps/plugin-os';
* const tempdirPath = await tempdir();
* import { arch } from '@tauri-apps/plugin-os';
* const archName = await arch();
* ```
*
* @since 2.0.0
*/
async function tempdir(): Promise<string> {
return window.__TAURI_INVOKE__("plugin:os|tempdir");
async function arch(): Promise<Arch> {
return window.__TAURI_INVOKE__("plugin:os|arch");
}
/**
@ -144,5 +147,41 @@ async function locale(): Promise<string | null> {
return window.__TAURI_INVOKE__("plugin:os|locale");
}
export { EOL, platform, version, type, arch, tempdir, locale };
export type { Platform, OsType, Arch };
/**
* Returns the file extension, if any, used for executable binaries on this platform. Possible values are `'exe'` and `''` (empty string).
* @example
* ```typescript
* import { exeExtension } from '@tauri-apps/plugin-os';
* const exeExt = await exeExtension();
* ```
*
* @since 2.0.0
*/
async function exeExtension(): Promise<string | null> {
return window.__TAURI_INVOKE__("plugin:os|exe_extension");
}
/**
* Returns the host name of the operating system.
* @example
* ```typescript
* import { hostname } from '@tauri-apps/api/os';
* const hostname = await hostname();
* ```
*/
async function hostname(): Promise<string | null> {
return window.__TAURI_INVOKE__("plugin:os|hostname");
}
export {
EOL,
platform,
family,
version,
type,
arch,
locale,
exeExtension,
hostname,
};
export type { Platform, OsType, Arch, Family };

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_OS__=function(n){"use strict";const _=navigator.appVersion.includes("Win")?"\r\n":"\n";return n.EOL=_,n.arch=async function(){return window.__TAURI_INVOKE__("plugin:os|arch")},n.locale=async function(){return window.__TAURI_INVOKE__("plugin:os|locale")},n.platform=async function(){return window.__TAURI_INVOKE__("plugin:os|platform")},n.tempdir=async function(){return window.__TAURI_INVOKE__("plugin:os|tempdir")},n.type=async function(){return window.__TAURI_INVOKE__("plugin:os|kind")},n.version=async function(){return window.__TAURI_INVOKE__("plugin:os|version")},n}({});Object.defineProperty(window.__TAURI__,"os",{value:__TAURI_OS__})}
if("__TAURI__"in window){var __TAURI_OS__=function(n){"use strict";const _=navigator.appVersion.includes("Win")?"\r\n":"\n";return n.EOL=_,n.arch=async function(){return window.__TAURI_INVOKE__("plugin:os|arch")},n.exeExtension=async function(){return window.__TAURI_INVOKE__("plugin:os|exe_extension")},n.family=async function(){return window.__TAURI_INVOKE__("plugin:os|family")},n.hostname=async function(){return window.__TAURI_INVOKE__("plugin:os|hostname")},n.locale=async function(){return window.__TAURI_INVOKE__("plugin:os|locale")},n.platform=async function(){return window.__TAURI_INVOKE__("plugin:os|platform")},n.type=async function(){return window.__TAURI_INVOKE__("plugin:os|os_type")},n.version=async function(){return window.__TAURI_INVOKE__("plugin:os|version")},n}({});Object.defineProperty(window.__TAURI__,"os",{value:__TAURI_OS__})}

@ -2,8 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::path::PathBuf;
#[tauri::command]
pub fn platform() -> &'static str {
crate::platform()
@ -15,8 +13,13 @@ pub fn version() -> String {
}
#[tauri::command]
pub fn kind() -> String {
crate::kind().to_string()
pub fn os_type() -> String {
crate::type_().to_string()
}
#[tauri::command]
pub fn family() -> &'static str {
crate::family()
}
#[tauri::command]
@ -25,11 +28,16 @@ pub fn arch() -> &'static str {
}
#[tauri::command]
pub fn tempdir() -> PathBuf {
crate::tempdir()
pub fn exe_extension() -> &'static str {
crate::exe_extension()
}
#[tauri::command]
pub fn locale() -> Option<String> {
crate::locale()
}
#[tauri::command]
pub fn hostname() -> String {
crate::hostname()
}

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::{fmt::Display, path::PathBuf};
use std::fmt::Display;
pub use os_info::Version;
use tauri::{
@ -15,74 +15,93 @@ mod error;
pub use error::Error;
pub enum Kind {
pub enum OsType {
Linux,
Windows,
Darwin,
Macos,
IOS,
Android,
}
impl Display for Kind {
impl Display for OsType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Linux => write!(f, "Linux"),
Self::Windows => write!(f, "Linux_NT"),
Self::Darwin => write!(f, "Darwin"),
Self::IOS => write!(f, "iOS"),
Self::Android => write!(f, "Android"),
Self::Linux => write!(f, "linux"),
Self::Windows => write!(f, "windows"),
Self::Macos => write!(f, "macos"),
Self::IOS => write!(f, "ios"),
Self::Android => write!(f, "android"),
}
}
}
/// Returns a string describing the specific operating system in use, see [std::env::consts::OS].
pub fn platform() -> &'static str {
match std::env::consts::OS {
"windows" => "win32",
"macos" => "darwin",
_ => std::env::consts::OS,
}
std::env::consts::OS
}
/// Returns the current operating system version.
pub fn version() -> Version {
os_info::get().version().clone()
}
pub fn kind() -> Kind {
#[cfg(target_os = "linux")]
return Kind::Linux;
/// Returns the current operating system type.
pub fn type_() -> OsType {
#[cfg(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]
return OsType::Linux;
#[cfg(target_os = "windows")]
return Kind::Windows;
return OsType::Windows;
#[cfg(target_os = "macos")]
return Kind::Darwin;
return OsType::Macos;
#[cfg(target_os = "ios")]
return Kind::IOS;
return OsType::IOS;
#[cfg(target_os = "android")]
return Kind::Android;
return OsType::Android;
}
/// Returns the current operating system family, see [std::env::consts::FAMILY].
pub fn family() -> &'static str {
std::env::consts::FAMILY
}
/// Returns the current operating system architecture, see [std::env::consts::ARCH].
pub fn arch() -> &'static str {
std::env::consts::ARCH
}
pub fn tempdir() -> PathBuf {
std::env::temp_dir()
/// Returns the file extension, if any, used for executable binaries on this platform. Example value is `exe`, see [std::env::consts::EXE_EXTENSION].
pub fn exe_extension() -> &'static str {
std::env::consts::EXE_EXTENSION
}
/// Returns the locale with the `BCP-47` language tag. If the locale couldnt be obtained, `None` is returned instead.
/// Returns the current operating system locale with the `BCP-47` language tag. If the locale couldnt be obtained, `None` is returned instead.
pub fn locale() -> Option<String> {
sys_locale::get_locale()
}
/// Returns the current operating system hostname.
pub fn hostname() -> String {
gethostname::gethostname().to_string_lossy().to_string()
}
pub fn init<R: Runtime>() -> TauriPlugin<R> {
Builder::new("os")
.js_init_script(include_str!("api-iife.js").to_string())
.invoke_handler(tauri::generate_handler![
commands::platform,
commands::version,
commands::kind,
commands::os_type,
commands::family,
commands::arch,
commands::tempdir,
commands::locale
commands::exe_extension,
commands::locale,
commands::hostname
])
.build()
}

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -9,6 +9,6 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@tauri-apps/cli": "^2.0.0-alpha.9"
"@tauri-apps/cli": "2.0.0-alpha.10"
}
}

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_STORE__=function(e){"use strict";var t=Object.defineProperty,n=(e,n)=>{for(var a in n)t(e,a,{get:n[a],enumerable:!0})},a=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},r=(e,t,n)=>(a(e,t,"read from private field"),n?n.call(e):t.get(e)),i=(e,t,n,r)=>(a(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function s(e,t=!1){let n=window.crypto.getRandomValues(new Uint32Array(1))[0],a=`_${n}`;return Object.defineProperty(window,a,{value:n=>(t&&Reflect.deleteProperty(window,a),e?.(n)),writable:!1,configurable:!0}),n}n({},{Channel:()=>o,PluginListener:()=>l,addPluginListener:()=>u,convertFileSrc:()=>h,invoke:()=>c,transformCallback:()=>s});var _,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,_,(()=>{})),this.id=s((e=>{r(this,_).call(this,e)}))}set onmessage(e){i(this,_,e)}get onmessage(){return r(this,_)}toJSON(){return`__CHANNEL__:${this.id}`}};_=new WeakMap;var l=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,n){let a=new o;return a.onmessage=n,c(`plugin:${e}|register_listener`,{event:t,handler:a}).then((()=>new l(e,t,a.id)))}async function c(e,t={}){return new Promise(((n,a)=>{let r=s((e=>{n(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=s((e=>{a(e),Reflect.deleteProperty(window,`_${r}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:r,error:i,...t})}))}function h(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function d(e,t){await c("plugin:event|unlisten",{event:e,eventId:t})}async function p(e,t,n){return c("plugin:event|listen",{event:e,windowLabel:t,handler:s(n)}).then((t=>async()=>d(e,t)))}n({},{TauriEvent:()=>y,emit:()=>E,listen:()=>I,once:()=>g});var w,y=((w=y||{}).WINDOW_RESIZED="tauri://resize",w.WINDOW_MOVED="tauri://move",w.WINDOW_CLOSE_REQUESTED="tauri://close-requested",w.WINDOW_CREATED="tauri://window-created",w.WINDOW_DESTROYED="tauri://destroyed",w.WINDOW_FOCUS="tauri://focus",w.WINDOW_BLUR="tauri://blur",w.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",w.WINDOW_THEME_CHANGED="tauri://theme-changed",w.WINDOW_FILE_DROP="tauri://file-drop",w.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",w.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",w.MENU="tauri://menu",w);async function I(e,t){return p(e,null,t)}async function g(e,t){return async function(e,t,n){return p(e,t,(t=>{n(t),d(e,t.id).catch((()=>{}))}))}(e,null,t)}async function E(e,t){return async function(e,t,n){await c("plugin:event|emit",{event:e,windowLabel:t,payload:n})}(e,void 0,t)}return e.Store=class{constructor(e){this.path=e}async set(e,t){return await window.__TAURI_INVOKE__("plugin:store|set",{path:this.path,key:e,value:t})}async get(e){return await window.__TAURI_INVOKE__("plugin:store|get",{path:this.path,key:e})}async has(e){return await window.__TAURI_INVOKE__("plugin:store|has",{path:this.path,key:e})}async delete(e){return await window.__TAURI_INVOKE__("plugin:store|delete",{path:this.path,key:e})}async clear(){return await window.__TAURI_INVOKE__("plugin:store|clear",{path:this.path})}async reset(){return await window.__TAURI_INVOKE__("plugin:store|reset",{path:this.path})}async keys(){return await window.__TAURI_INVOKE__("plugin:store|keys",{path:this.path})}async values(){return await window.__TAURI_INVOKE__("plugin:store|values",{path:this.path})}async entries(){return await window.__TAURI_INVOKE__("plugin:store|entries",{path:this.path})}async length(){return await window.__TAURI_INVOKE__("plugin:store|length",{path:this.path})}async load(){return await window.__TAURI_INVOKE__("plugin:store|load",{path:this.path})}async save(){return await window.__TAURI_INVOKE__("plugin:store|save",{path:this.path})}async onKeyChange(e,t){return await I("store://change",(n=>{n.payload.path===this.path&&n.payload.key===e&&t(n.payload.value)}))}async onChange(e){return await I("store://change",(t=>{t.payload.path===this.path&&e(t.payload.key,t.payload.value)}))}},e}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_STORE__})}
if("__TAURI__"in window){var __TAURI_STORE__=function(e){"use strict";var t=Object.defineProperty,a=(e,a)=>{for(var n in a)t(e,n,{get:a[n],enumerable:!0})},n=(e,t,a)=>{if(!t.has(e))throw TypeError("Cannot "+a)},r=(e,t,a)=>(n(e,t,"read from private field"),a?a.call(e):t.get(e)),i=(e,t,a,r)=>(n(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a);function s(e,t=!1){let a=window.crypto.getRandomValues(new Uint32Array(1))[0],n=`_${a}`;return Object.defineProperty(window,n,{value:a=>(t&&Reflect.deleteProperty(window,n),e?.(a)),writable:!1,configurable:!0}),a}a({},{Channel:()=>o,PluginListener:()=>l,addPluginListener:()=>u,convertFileSrc:()=>c,invoke:()=>h,transformCallback:()=>s});var _,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,a)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,a)})(this,_,(()=>{})),this.id=s((e=>{r(this,_).call(this,e)}))}set onmessage(e){i(this,_,e)}get onmessage(){return r(this,_)}toJSON(){return`__CHANNEL__:${this.id}`}};_=new WeakMap;var l=class{constructor(e,t,a){this.plugin=e,this.event=t,this.channelId=a}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,a){let n=new o;return n.onmessage=a,h(`plugin:${e}|register_listener`,{event:t,handler:n}).then((()=>new l(e,t,n.id)))}async function h(e,t={}){return new Promise(((a,n)=>{let r=s((e=>{a(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=s((e=>{n(e),Reflect.deleteProperty(window,`_${r}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:r,error:i,...t})}))}function c(e,t="asset"){let a=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${a}`:`${t}://localhost/${a}`}a({},{TauriEvent:()=>d,emit:()=>y,listen:()=>w,once:()=>I});var d=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(d||{});async function p(e,t){await h("plugin:event|unlisten",{event:e,eventId:t})}async function w(e,t,a){return h("plugin:event|listen",{event:e,windowLabel:a?.target,handler:s(t)}).then((t=>async()=>p(e,t)))}async function I(e,t,a){return w(e,(a=>{t(a),p(e,a.id).catch((()=>{}))}),a)}async function y(e,t,a){await h("plugin:event|emit",{event:e,windowLabel:a?.target,payload:t})}return e.Store=class{constructor(e){this.path=e}async set(e,t){return await window.__TAURI_INVOKE__("plugin:store|set",{path:this.path,key:e,value:t})}async get(e){return await window.__TAURI_INVOKE__("plugin:store|get",{path:this.path,key:e})}async has(e){return await window.__TAURI_INVOKE__("plugin:store|has",{path:this.path,key:e})}async delete(e){return await window.__TAURI_INVOKE__("plugin:store|delete",{path:this.path,key:e})}async clear(){return await window.__TAURI_INVOKE__("plugin:store|clear",{path:this.path})}async reset(){return await window.__TAURI_INVOKE__("plugin:store|reset",{path:this.path})}async keys(){return await window.__TAURI_INVOKE__("plugin:store|keys",{path:this.path})}async values(){return await window.__TAURI_INVOKE__("plugin:store|values",{path:this.path})}async entries(){return await window.__TAURI_INVOKE__("plugin:store|entries",{path:this.path})}async length(){return await window.__TAURI_INVOKE__("plugin:store|length",{path:this.path})}async load(){return await window.__TAURI_INVOKE__("plugin:store|load",{path:this.path})}async save(){return await window.__TAURI_INVOKE__("plugin:store|save",{path:this.path})}async onKeyChange(e,t){return await w("store://change",(a=>{a.payload.path===this.path&&a.payload.key===e&&t(a.payload.value)}))}async onChange(e){return await w("store://change",(t=>{t.payload.path===this.path&&e(t.payload.key,t.payload.value)}))}},e}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_STORE__})}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -63,5 +63,4 @@ async function download(
});
}
export default upload;
export { download, upload };

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_UPLOAD__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e)),o=(e,n,r,o)=>(t(e,n,"write to private field"),o?o.call(e,r):n.set(e,r),r);function a(e,n=!1){let t=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${t}`;return Object.defineProperty(window,r,{value:t=>(n&&Reflect.deleteProperty(window,r),e?.(t)),writable:!1,configurable:!0}),t}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>l,PluginListener:()=>s,addPluginListener:()=>d,convertFileSrc:()=>u,invoke:()=>c,transformCallback:()=>a});var i,l=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,i,(()=>{})),this.id=a((e=>{r(this,i).call(this,e)}))}set onmessage(e){o(this,i,e)}get onmessage(){return r(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function d(e,n,t){let r=new l;return r.onmessage=t,c(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function c(e,n={}){return new Promise(((t,r)=>{let o=a((e=>{t(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=a((e=>{r(e),Reflect.deleteProperty(window,`_${o}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:o,error:i,...n})}))}function u(e,n="asset"){let t=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${t}`:`${n}://localhost/${t}`}async function _(e,n,t,r){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const a=o[0],i=new l;null!=t&&(i.onmessage=t),await c("plugin:upload|upload",{id:a,url:e,filePath:n,headers:null!=r?r:{},onProgress:i})}return e.default=_,e.download=async function(e,n,t,r){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const a=o[0],i=new l;null!=t&&(i.onmessage=t),await c("plugin:upload|download",{id:a,url:e,filePath:n,headers:null!=r?r:{},onProgress:i})},e.upload=_,Object.defineProperty(e,"__esModule",{value:!0}),e}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_UPLOAD__})}
if("__TAURI__"in window){var __TAURI_UPLOAD__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e)),o=(e,n,r,o)=>(t(e,n,"write to private field"),o?o.call(e,r):n.set(e,r),r);function a(e,n=!1){let t=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${t}`;return Object.defineProperty(window,r,{value:t=>(n&&Reflect.deleteProperty(window,r),e?.(t)),writable:!1,configurable:!0}),t}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>l,addPluginListener:()=>d,convertFileSrc:()=>u,invoke:()=>c,transformCallback:()=>a});var i,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,i,(()=>{})),this.id=a((e=>{r(this,i).call(this,e)}))}set onmessage(e){o(this,i,e)}get onmessage(){return r(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var l=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function d(e,n,t){let r=new s;return r.onmessage=t,c(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new l(e,n,r.id)))}async function c(e,n={}){return new Promise(((t,r)=>{let o=a((e=>{t(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=a((e=>{r(e),Reflect.deleteProperty(window,`_${o}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:o,error:i,...n})}))}function u(e,n="asset"){let t=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${t}`:`${n}://localhost/${t}`}return e.download=async function(e,n,t,r){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const a=o[0],i=new s;null!=t&&(i.onmessage=t),await c("plugin:upload|download",{id:a,url:e,filePath:n,headers:null!=r?r:{},onProgress:i})},e.upload=async function(e,n,t,r){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const a=o[0],i=new s;null!=t&&(i.onmessage=t),await c("plugin:upload|upload",{id:a,url:e,filePath:n,headers:null!=r?r:{},onProgress:i})},e}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_UPLOAD__})}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -13,12 +13,12 @@
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.15.5",
"@tauri-apps/cli": "2.0.0-alpha.9",
"@tauri-apps/cli": "2.0.0-alpha.10",
"svelte": "^3.58.0",
"svelte-check": "^3.2.0",
"tslib": "^2.5.0",
"typescript": "^5.0.4",
"vite": "^4.2.1"
"vite": "^4.3.9"
},
"dependencies": {
"@tauri-apps/plugin-websocket": "link:../../"

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -34,15 +34,17 @@ export enum StateFlags {
/**
* Save the state of all open windows to disk.
*/
async function saveWindowState(flags: StateFlags) {
window.__TAURI_INVOKE__("plugin:window-state|save_window_state", { flags });
async function saveWindowState(flags: StateFlags): Promise<void> {
return window.__TAURI_INVOKE__("plugin:window-state|save_window_state", {
flags,
});
}
/**
* Restore the state for the specified window from disk.
*/
async function restoreState(label: string, flags: StateFlags) {
window.__TAURI_INVOKE__("plugin:window-state|restore_state", {
async function restoreState(label: string, flags: StateFlags): Promise<void> {
return window.__TAURI_INVOKE__("plugin:window-state|restore_state", {
label,
flags,
});
@ -51,8 +53,8 @@ async function restoreState(label: string, flags: StateFlags) {
/**
* Restore the state for the current window from disk.
*/
async function restoreStateCurrent(flags: StateFlags) {
restoreState(window.__TAURI_METADATA__.__currentWindow.label, flags);
async function restoreStateCurrent(flags: StateFlags): Promise<void> {
return restoreState(window.__TAURI_METADATA__.__currentWindow.label, flags);
}
export { restoreState, restoreStateCurrent, saveWindowState };

@ -28,6 +28,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_WINDOWSTATE__=function(_){"use strict";var t;async function e(_,t){window.__TAURI_INVOKE__("plugin:window-state|restore_state",{label:_,flags:t})}return _.StateFlags=void 0,(t=_.StateFlags||(_.StateFlags={}))[t.SIZE=1]="SIZE",t[t.POSITION=2]="POSITION",t[t.MAXIMIZED=4]="MAXIMIZED",t[t.VISIBLE=8]="VISIBLE",t[t.DECORATIONS=16]="DECORATIONS",t[t.FULLSCREEN=32]="FULLSCREEN",t[t.ALL=63]="ALL",_.restoreState=e,_.restoreStateCurrent=async function(_){e(window.__TAURI_METADATA__.__currentWindow.label,_)},_.saveWindowState=async function(_){window.__TAURI_INVOKE__("plugin:window-state|save_window_state",{flags:_})},_}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_WINDOWSTATE__})}
if("__TAURI__"in window){var __TAURI_WINDOWSTATE__=function(t){"use strict";var _;async function e(t,_){return window.__TAURI_INVOKE__("plugin:window-state|restore_state",{label:t,flags:_})}return t.StateFlags=void 0,(_=t.StateFlags||(t.StateFlags={}))[_.SIZE=1]="SIZE",_[_.POSITION=2]="POSITION",_[_.MAXIMIZED=4]="MAXIMIZED",_[_.VISIBLE=8]="VISIBLE",_[_.DECORATIONS=16]="DECORATIONS",_[_.FULLSCREEN=32]="FULLSCREEN",_[_.ALL=63]="ALL",t.restoreState=e,t.restoreStateCurrent=async function(t){return e(window.__TAURI_METADATA__.__currentWindow.label,t)},t.saveWindowState=async function(t){return window.__TAURI_INVOKE__("plugin:window-state|save_window_state",{flags:t})},t}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_WINDOWSTATE__})}

@ -55,7 +55,7 @@ impl Default for StateFlags {
}
}
#[derive(Debug, Default, Deserialize, Serialize, PartialEq)]
#[derive(Debug, Deserialize, Serialize, PartialEq)]
struct WindowState {
width: f64,
height: f64,
@ -67,6 +67,21 @@ struct WindowState {
fullscreen: bool,
}
impl Default for WindowState {
fn default() -> Self {
Self {
width: Default::default(),
height: Default::default(),
x: Default::default(),
y: Default::default(),
maximized: Default::default(),
visible: true,
decorated: true,
fullscreen: Default::default(),
}
}
}
struct WindowStateCache(Arc<Mutex<HashMap<String, WindowState>>>);
pub trait AppHandleExt {
/// Saves all open windows state to disk
@ -177,7 +192,7 @@ impl<R: Runtime> WindowExt for Window<R> {
}
if flags.contains(StateFlags::DECORATIONS) {
metadata.visible = self.is_visible()?;
metadata.decorated = self.is_decorated()?;
}
if flags.contains(StateFlags::FULLSCREEN) {

@ -1 +0,0 @@
../../shared/tsconfig.json

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

@ -1,107 +0,0 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
declare global {
interface Window {
__TAURI_INVOKE__: <T>(cmd: string, args?: unknown) => Promise<T>;
__TAURI__: {
transformCallback: <T>(cb: (payload: T) => void) => number;
};
}
}
export interface Event<T> {
/** Event name */
event: string;
/** The label of the window that emitted this event. */
windowLabel: string;
/** Event identifier used to unlisten */
id: number;
/** Event payload */
payload: T;
}
export type EventCallback<T> = (event: Event<T>) => void;
export type UnlistenFn = () => void;
/**
* Unregister the event listener associated with the given name and id.
*
* @ignore
* @param event The event name
* @param eventId Event identifier
* @returns
*/
async function _unlisten(event: string, eventId: number): Promise<void> {
await window.__TAURI_INVOKE__("plugin:event|unlisten", {
event,
eventId,
});
}
/**
* Emits an event to the backend.
*
* @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`.
* @param [windowLabel] The label of the window to which the event is sent, if null/undefined the event will be sent to all windows
* @param [payload] Event payload
* @returns
*/
async function emit(
event: string,
windowLabel?: string,
payload?: unknown
): Promise<void> {
await window.__TAURI_INVOKE__("plugin:event|emit", {
event,
windowLabel,
payload,
});
}
/**
* Listen to an event from the backend.
*
* @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`.
* @param handler Event handler callback.
* @return A promise resolving to a function to unlisten to the event.
*/
async function listen<T>(
event: string,
windowLabel: string | null,
handler: EventCallback<T>
): Promise<UnlistenFn> {
return window
.__TAURI_INVOKE__<number>("plugin:event|listen", {
event,
windowLabel,
handler: window.__TAURI__.transformCallback(handler),
})
.then((eventId) => {
return async () => _unlisten(event, eventId);
});
}
/**
* Listen to an one-off event from the backend.
*
* @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`.
* @param handler Event handler callback.
* @returns A promise resolving to a function to unlisten to the event.
*/
async function once<T>(
event: string,
windowLabel: string | null,
handler: EventCallback<T>
): Promise<UnlistenFn> {
return listen<T>(event, windowLabel, (eventData) => {
handler(eventData);
_unlisten(event, eventData.id).catch(() => {
// do nothing
});
});
}
export { emit, listen, once };

@ -22,9 +22,7 @@ import type {
EventCallback,
UnlistenFn,
} from "@tauri-apps/api/event";
import { TauriEvent } from "@tauri-apps/api/event";
// TODO: use from @tauri-apps/api v2
import { emit, listen, once } from "./event";
import { TauriEvent, emit, listen, once } from "@tauri-apps/api/event";
declare global {
interface Window {
@ -320,7 +318,7 @@ class WebviewWindowHandle {
listeners.splice(listeners.indexOf(handler), 1);
});
}
return listen(event, this.label, handler);
return listen(event, handler, { target: this.label });
}
/**
@ -352,7 +350,7 @@ class WebviewWindowHandle {
listeners.splice(listeners.indexOf(handler), 1);
});
}
return once(event, this.label, handler);
return once(event, handler, { target: this.label });
}
/**
@ -374,7 +372,7 @@ class WebviewWindowHandle {
}
return Promise.resolve();
}
return emit(event, this.label, payload);
return emit(event, payload, { target: this.label });
}
/** @ignore */

@ -27,6 +27,6 @@
"tslib": "^2.5.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -27,6 +27,6 @@
"tslib": "^2.4.1"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.4"
"@tauri-apps/api": "2.0.0-alpha.5"
}
}

@ -1 +1,4 @@
../tsconfig.json
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}

Loading…
Cancel
Save