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" } rspc = { version = "0.1.4" }
specta = { version = "=2.0.0-rc.7" } 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" } 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" } rspc = { git = "https://github.com/spacedriveapp/rspc.git", rev = "f3347e2e8bfe3f37bfacc437ca329fe71cdcb048" }
# `cursor_position` method # `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" } tao = { git = "https://github.com/spacedriveapp/tao", rev = "7880adbc090402c44fbcf006669458fa82623403" }
# Add `Control::open_stream_with_addrs` # Add `Control::open_stream_with_addrs`

View file

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

View file

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

View file

@ -32,16 +32,8 @@ uuid = { workspace = true, features = ["serde"] }
thiserror.workspace = true thiserror.workspace = true
opener = { version = "0.6.1", features = ["reveal"] } opener = { version = "0.6.1", features = ["reveal"] }
tauri = { version = "=1.5.3", features = [ tauri = { version = "2.0.0-beta", features = [
"macos-private-api", "macos-private-api",
"path-all",
"protocol-all",
"os-all",
"shell-all",
"dialog-all",
"linux-protocol-headers",
"updater",
"window-all",
"native-tls-vendored", "native-tls-vendored",
"tracing", "tracing",
] } ] }
@ -50,7 +42,7 @@ tauri-plugin-window-state = "0.1.1"
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]
sd-desktop-linux = { path = "../crates/linux" } 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] [target.'cfg(target_os = "macos")'.dependencies]
sd-desktop-macos = { path = "../crates/macos" } sd-desktop-macos = { path = "../crates/macos" }
@ -60,7 +52,7 @@ sd-desktop-windows = { path = "../crates/windows" }
webview2-com = "0.19.1" webview2-com = "0.19.1"
[build-dependencies] [build-dependencies]
tauri-build = "1.5.0" tauri-build = "2.0.0-beta"
[features] [features]
default = ["ai-models", "custom-protocol"] 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": { "bundle": {
"productName": "Spacedrive" "active": true,
}, "targets": [
"build": { "deb",
"distDir": "../dist", "msi",
"devPath": "http://localhost:8001", "dmg",
"beforeDevCommand": "pnpm dev", "updater"
"beforeBuildCommand": "pnpm turbo run build --filter=@sd/desktop..." ],
}, "windows": {
"tauri": { "certificateThumbprint": null,
"macOSPrivateApi": true, "webviewInstallMode": {
"bundle": { "type": "embedBootstrapper",
"active": true, "silent": true
"targets": ["deb", "msi", "dmg", "updater"], },
"identifier": "com.spacedrive.desktop", "digestAlgorithm": "sha256",
"icon": [ "timestampUrl": "",
"icons/32x32.png", "wix": {
"icons/128x128.png", "dialogImagePath": "icons/WindowsDialogImage.bmp",
"icons/128x128@2x.png", "bannerPath": "icons/WindowsBanner.bmp"
"icons/icon.icns", }
"icons/icon.ico" },
], "icon": [
"resources": {}, "icons/32x32.png",
"externalBin": [], "icons/128x128.png",
"copyright": "Spacedrive Technology Inc.", "icons/128x128@2x.png",
"shortDescription": "File explorer from the future.", "icons/icon.icns",
"longDescription": "Cross-platform universal file explorer, powered by an open-source virtual distributed filesystem.", "icons/icon.ico"
"deb": { ],
"files": { "resources": {},
"/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx" "externalBin": [],
}, "copyright": "Spacedrive Technology Inc.",
"depends": ["libc6"] "shortDescription": "File explorer from the future.",
}, "longDescription": "Cross-platform universal file explorer, powered by an open-source virtual distributed filesystem.",
"macOS": { "macOS": {
"minimumSystemVersion": "10.15", "minimumSystemVersion": "10.15",
"exceptionDomain": null, "exceptionDomain": null,
"entitlements": null, "entitlements": null,
"frameworks": ["../../.deps/Spacedrive.framework"] "frameworks": [
}, "../../.deps/Spacedrive.framework"
"windows": { ]
"certificateThumbprint": null, },
"webviewInstallMode": { "type": "embedBootstrapper", "silent": true }, "linux": {
"digestAlgorithm": "sha256", "deb": {
"timestampUrl": "", "files": {
"wix": { "/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx"
"dialogImagePath": "icons/WindowsDialogImage.bmp", },
"bannerPath": "icons/WindowsBanner.bmp" "depends": [
} "libc6"
} ]
}, }
"updater": { }
"active": true, },
"dialog": false, "build": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK", "beforeBuildCommand": "pnpm turbo run build --filter=@sd/desktop...",
"endpoints": [ "frontendDist": "../dist",
"https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}" "beforeDevCommand": "pnpm dev",
] "devUrl": "http://localhost:8001"
}, },
"allowlist": { "productName": "Spacedrive",
"all": false, "identifier": "com.spacedrive.desktop",
"window": { "plugins": {
"all": true "updater": {
}, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK",
"path": { "endpoints": [
"all": true "https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}"
}, ]
"shell": { }
"all": true },
}, "app": {
"protocol": { "macOSPrivateApi": true,
"all": true, "security": {
"assetScope": ["*"] "assetProtocol": {
}, "scope": [
"os": { "*"
"all": true ]
}, },
"dialog": { "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"
"all": true, },
"open": true, "windows": [
"save": true {
} "title": "Spacedrive",
}, "hiddenTitle": true,
"windows": [ "width": 1400,
{ "height": 750,
"title": "Spacedrive", "minWidth": 768,
"hiddenTitle": true, "minHeight": 500,
"width": 1400, "resizable": true,
"height": 750, "fullscreen": false,
"minWidth": 768, "alwaysOnTop": false,
"minHeight": 500, "focus": false,
"resizable": true, "visible": false,
"fullscreen": false, "fileDropEnabled": true,
"alwaysOnTop": false, "decorations": true,
"focus": false, "transparent": true,
"visible": false, "center": true
"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'"
}
}
}

View file

@ -1,8 +1,8 @@
/** tauri-specta globals **/ /** 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 * 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. // 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 { 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 { 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. // @ts-expect-error: Doesn't have a types package.
import ConsistentHash from 'consistent-hash'; import ConsistentHash from 'consistent-hash';
import { OperatingSystem, Platform } from '@sd/interface'; import { OperatingSystem, Platform } from '@sd/interface';

File diff suppressed because it is too large Load diff