Have to update `tauri-specta` now for the beta version we're using.

[WARNING] I have not a working build yet
This commit is contained in:
Arnab Chakraborty 2024-03-29 11:35:06 -04:00
parent 5b40cefe37
commit bc72b7ed87
9 changed files with 1811 additions and 353 deletions

View file

@ -43,7 +43,7 @@ tracing-appender = "0.2.3"
rspc = { version = "0.1.4" }
specta = { version = "=2.0.0-rc.7" }
tauri-specta = { version = "=2.0.0-rc.4" }
tauri-specta = { git = "https://github.com/oscartbeaumont/tauri-specta.git", branch = "tauri2-alpha18" }
swift-rs = { version = "1.0.6" }
@ -92,7 +92,7 @@ if-watch = { git = "https://github.com/oscartbeaumont/if-watch.git", rev = "a92c
rspc = { git = "https://github.com/spacedriveapp/rspc.git", rev = "f3347e2e8bfe3f37bfacc437ca329fe71cdcb048" }
# `cursor_position` method
tauri = { git = "https://github.com/spacedriveapp/tauri.git", rev = "8409af71a83d631ff9d1cd876c441a57511a1cbd" }
tauri = { git = "https://github.com/spacedriveapp/tauri.git", branch = "v2.0.0-beta-13" }
tao = { git = "https://github.com/spacedriveapp/tao", rev = "7880adbc090402c44fbcf006669458fa82623403" }
# Add `Control::open_stream_with_addrs`

View file

@ -11,5 +11,5 @@ libc = "0.2"
[target.'cfg(target_os = "linux")'.dependencies]
# WARNING: gtk should follow the same version used by tauri
# https://github.com/tauri-apps/tauri/blob/441eb4f4a5f9af206752c2e287975eb8d5ccfd01/core/tauri/Cargo.toml#L95
gtk = { version = "0.15", features = [ "v3_20" ] }
# https://github.com/tauri-apps/tauri/blob/7898b601d14ed62053dd24011fabadf31ec1af45/core/tauri/Cargo.toml#L82
gtk = { version = "0.18", features = [ "v3_24" ] }

View file

@ -6,7 +6,6 @@
"vite": "vite",
"dev": "vite dev",
"build": "vite build",
"tauri": "pnpm --filter @sd/scripts -- tauri",
"dmg": "open ../../target/release/bundle/dmg/",
"typecheck": "tsc -b",
"lint": "eslint src --cache"
@ -20,7 +19,7 @@
"@sd/ui": "workspace:*",
"@t3-oss/env-core": "^0.7.1",
"@tanstack/react-query": "^4.36.1",
"@tauri-apps/api": "1.5.1",
"@tauri-apps/api": "2.0.0-beta.6",
"consistent-hash": "^1.2.2",
"immer": "^10.0.3",
"react": "^18.2.0",
@ -31,7 +30,7 @@
"devDependencies": {
"@sd/config": "workspace:*",
"@sentry/vite-plugin": "^2.16.0",
"@tauri-apps/cli": "^1.5.11",
"@tauri-apps/cli": "2.0.0-beta.11",
"@types/react": "^18.2.67",
"@types/react-dom": "^18.2.22",
"sass": "^1.72.0",

View file

@ -32,16 +32,8 @@ uuid = { workspace = true, features = ["serde"] }
thiserror.workspace = true
opener = { version = "0.6.1", features = ["reveal"] }
tauri = { version = "=1.5.3", features = [
tauri = { version = "2.0.0-beta", features = [
"macos-private-api",
"path-all",
"protocol-all",
"os-all",
"shell-all",
"dialog-all",
"linux-protocol-headers",
"updater",
"window-all",
"native-tls-vendored",
"tracing",
] }
@ -50,7 +42,7 @@ tauri-plugin-window-state = "0.1.1"
[target.'cfg(target_os = "linux")'.dependencies]
sd-desktop-linux = { path = "../crates/linux" }
webkit2gtk = { version = "0.18.2", features = ["v2_2"] }
webkit2gtk = { version = "2.0.1", features = [ "v2_38" ] }
[target.'cfg(target_os = "macos")'.dependencies]
sd-desktop-macos = { path = "../crates/macos" }
@ -60,7 +52,7 @@ sd-desktop-windows = { path = "../crates/windows" }
webview2-com = "0.19.1"
[build-dependencies]
tauri-build = "1.5.0"
tauri-build = "2.0.0-beta"
[features]
default = ["ai-models", "custom-protocol"]

View file

@ -0,0 +1,17 @@
{
"identifier": "migrated",
"description": "permissions that were migrated from v1",
"local": true,
"windows": [
"main"
],
"permissions": [
"path:default",
"event:default",
"window:default",
"app:default",
"resources:default",
"menu:default",
"tray:default"
]
}

View file

@ -1,107 +1,100 @@
{
"package": {
"productName": "Spacedrive"
},
"build": {
"distDir": "../dist",
"devPath": "http://localhost:8001",
"beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm turbo run build --filter=@sd/desktop..."
},
"tauri": {
"macOSPrivateApi": true,
"bundle": {
"active": true,
"targets": ["deb", "msi", "dmg", "updater"],
"identifier": "com.spacedrive.desktop",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"resources": {},
"externalBin": [],
"copyright": "Spacedrive Technology Inc.",
"shortDescription": "File explorer from the future.",
"longDescription": "Cross-platform universal file explorer, powered by an open-source virtual distributed filesystem.",
"deb": {
"files": {
"/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx"
},
"depends": ["libc6"]
},
"macOS": {
"minimumSystemVersion": "10.15",
"exceptionDomain": null,
"entitlements": null,
"frameworks": ["../../.deps/Spacedrive.framework"]
},
"windows": {
"certificateThumbprint": null,
"webviewInstallMode": { "type": "embedBootstrapper", "silent": true },
"digestAlgorithm": "sha256",
"timestampUrl": "",
"wix": {
"dialogImagePath": "icons/WindowsDialogImage.bmp",
"bannerPath": "icons/WindowsBanner.bmp"
}
}
},
"updater": {
"active": true,
"dialog": false,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK",
"endpoints": [
"https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}"
]
},
"allowlist": {
"all": false,
"window": {
"all": true
},
"path": {
"all": true
},
"shell": {
"all": true
},
"protocol": {
"all": true,
"assetScope": ["*"]
},
"os": {
"all": true
},
"dialog": {
"all": true,
"open": true,
"save": true
}
},
"windows": [
{
"title": "Spacedrive",
"hiddenTitle": true,
"width": 1400,
"height": 750,
"minWidth": 768,
"minHeight": 500,
"resizable": true,
"fullscreen": false,
"alwaysOnTop": false,
"focus": false,
"visible": false,
"fileDropEnabled": true,
"decorations": true,
"transparent": true,
"center": true
}
],
"security": {
"csp": "default-src spacedrive: webkit-pdfjs-viewer: asset: https://asset.localhost blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
}
}
}
"bundle": {
"active": true,
"targets": [
"deb",
"msi",
"dmg",
"updater"
],
"windows": {
"certificateThumbprint": null,
"webviewInstallMode": {
"type": "embedBootstrapper",
"silent": true
},
"digestAlgorithm": "sha256",
"timestampUrl": "",
"wix": {
"dialogImagePath": "icons/WindowsDialogImage.bmp",
"bannerPath": "icons/WindowsBanner.bmp"
}
},
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"resources": {},
"externalBin": [],
"copyright": "Spacedrive Technology Inc.",
"shortDescription": "File explorer from the future.",
"longDescription": "Cross-platform universal file explorer, powered by an open-source virtual distributed filesystem.",
"macOS": {
"minimumSystemVersion": "10.15",
"exceptionDomain": null,
"entitlements": null,
"frameworks": [
"../../.deps/Spacedrive.framework"
]
},
"linux": {
"deb": {
"files": {
"/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx"
},
"depends": [
"libc6"
]
}
}
},
"build": {
"beforeBuildCommand": "pnpm turbo run build --filter=@sd/desktop...",
"frontendDist": "../dist",
"beforeDevCommand": "pnpm dev",
"devUrl": "http://localhost:8001"
},
"productName": "Spacedrive",
"identifier": "com.spacedrive.desktop",
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK",
"endpoints": [
"https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}"
]
}
},
"app": {
"macOSPrivateApi": true,
"security": {
"assetProtocol": {
"scope": [
"*"
]
},
"csp": "default-src spacedrive: webkit-pdfjs-viewer: asset: https://asset.localhost blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'; connect-src ipc: http://ipc.localhost"
},
"windows": [
{
"title": "Spacedrive",
"hiddenTitle": true,
"width": 1400,
"height": 750,
"minWidth": 768,
"minHeight": 500,
"resizable": true,
"fullscreen": false,
"alwaysOnTop": false,
"focus": false,
"visible": false,
"fileDropEnabled": true,
"decorations": true,
"transparent": true,
"center": true
}
]
}
}

View file

@ -1,8 +1,8 @@
/** tauri-specta globals **/
import { invoke as TAURI_INVOKE } from '@tauri-apps/api';
import { invoke as TAURI_INVOKE } from '@tauri-apps/api/core';
import * as TAURI_API_EVENT from '@tauri-apps/api/event';
import { type WebviewWindowHandle as __WebviewWindowHandle__ } from '@tauri-apps/api/window';
import { type WebviewWindow as __WebviewWindowHandle__ } from '@tauri-apps/api/webviewWindow';
// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually.

View file

@ -1,7 +1,7 @@
import { dialog, invoke, os, shell } from '@tauri-apps/api';
import { confirm } from '@tauri-apps/api/dialog';
import { confirm } from '@tauri-apps/plugin-dialog';
import { homeDir } from '@tauri-apps/api/path';
import { open } from '@tauri-apps/api/shell';
import { open } from '@tauri-apps/plugin-shell';
// @ts-expect-error: Doesn't have a types package.
import ConsistentHash from 'consistent-hash';
import { OperatingSystem, Platform } from '@sd/interface';

File diff suppressed because it is too large Load diff