feat: update to tauri beta, add permissions (#862)

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
This commit is contained in:
Tillmann
2024-02-04 03:14:41 +09:00
committed by GitHub
parent 506ce4835b
commit d198c01486
387 changed files with 21883 additions and 943 deletions
+11 -7
View File
@@ -6,11 +6,15 @@ authors = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
exclude = [ "/examples" ]
links = "tauri-plugin-websocket"
exclude = ["/examples"]
[package.metadata.docs.rs]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
[dependencies]
serde = { workspace = true }
@@ -20,10 +24,10 @@ log = { workspace = true }
thiserror = { workspace = true }
rand = "0.8"
futures-util = "0.3"
tokio = { version = "1", features = [ "net", "sync" ] }
tokio = { version = "1", features = ["net", "sync"] }
tokio-tungstenite = { version = "0.20" }
[features]
native-tls = [ "tokio-tungstenite/native-tls" ]
native-tls-vendored = [ "tokio-tungstenite/native-tls-vendored" ]
rustls-tls-webpki-roots = [ "tokio-tungstenite/rustls-tls-webpki-roots" ]
native-tls = ["tokio-tungstenite/native-tls"]
native-tls-vendored = ["tokio-tungstenite/native-tls-vendored"]
rustls-tls-webpki-roots = ["tokio-tungstenite/rustls-tls-webpki-roots"]
+9
View File
@@ -0,0 +1,9 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
const COMMANDS: &[&str] = &["connect", "send"];
fn main() {
tauri_plugin::Builder::new(COMMANDS).build();
}
@@ -13,11 +13,11 @@
"devDependencies": {
"@sveltejs/adapter-auto": "2.1.1",
"@sveltejs/kit": "1.27.7",
"@tauri-apps/cli": "2.0.0-alpha.20",
"@tauri-apps/cli": "2.0.0-beta.0",
"svelte": "4.2.8",
"svelte-check": "3.6.2",
"typescript": "5.3.2",
"vite": "5.0.6"
"vite": "5.0.12"
},
"dependencies": {
"@tauri-apps/plugin-websocket": "link:..\\.."
@@ -3,5 +3,7 @@
/target/
WixTools
/capabilities/schemas
# These are backup files generated by rustfmt
**/*.rs.bk
+1 -1
View File
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.13"
"@tauri-apps/api": "2.0.0-beta.0"
}
}
@@ -0,0 +1 @@
schemas/
+1
View File
@@ -0,0 +1 @@
schemas/
@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-connect"
description = "Enables the connect command without any pre-configured scope."
commands.allow = ["connect"]
[[permission]]
identifier = "deny-connect"
description = "Denies the connect command without any pre-configured scope."
commands.deny = ["connect"]
@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-send"
description = "Enables the send command without any pre-configured scope."
commands.allow = ["send"]
[[permission]]
identifier = "deny-send"
description = "Denies the send command without any pre-configured scope."
commands.deny = ["send"]
@@ -0,0 +1,22 @@
# Permissions
## allow-connect
Enables the connect command without any pre-configured scope.
## deny-connect
Denies the connect command without any pre-configured scope.
## allow-send
Enables the send command without any pre-configured scope.
## deny-send
Denies the send command without any pre-configured scope.
## default
Allows connecting and sending data to a WebSocket server
@@ -0,0 +1,4 @@
"$schema" = "schemas/schema.json"
[default]
description = "Allows connecting and sending data to a WebSocket server"
permissions = ["allow-connect", "allow-send"]