upgrade to tauri v2

This commit is contained in:
Ren Amamiya
2023-07-29 08:13:53 +07:00
parent a17efcf4d3
commit a1a5544789
5 changed files with 316 additions and 883 deletions

View File

@@ -26,7 +26,7 @@
"@tanstack/react-query": "^4.32.0", "@tanstack/react-query": "^4.32.0",
"@tanstack/react-query-devtools": "^4.32.0", "@tanstack/react-query-devtools": "^4.32.0",
"@tanstack/react-virtual": "3.0.0-beta.54", "@tanstack/react-virtual": "3.0.0-beta.54",
"@tauri-apps/api": "^1.4.0", "@tauri-apps/api": "2.0.0-alpha.5",
"@tiptap/extension-image": "^2.0.4", "@tiptap/extension-image": "^2.0.4",
"@tiptap/extension-mention": "^2.0.4", "@tiptap/extension-mention": "^2.0.4",
"@tiptap/extension-placeholder": "^2.0.4", "@tiptap/extension-placeholder": "^2.0.4",
@@ -65,7 +65,7 @@
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@tauri-apps/cli": "^1.4.0", "@tauri-apps/cli": "2.0.0-alpha.10",
"@trivago/prettier-plugin-sort-imports": "^4.2.0", "@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/html-to-text": "^9.0.1", "@types/html-to-text": "^9.0.1",
"@types/node": "^18.17.1", "@types/node": "^18.17.1",

77
pnpm-lock.yaml generated
View File

@@ -29,8 +29,8 @@ dependencies:
specifier: 3.0.0-beta.54 specifier: 3.0.0-beta.54
version: 3.0.0-beta.54(react@18.2.0) version: 3.0.0-beta.54(react@18.2.0)
'@tauri-apps/api': '@tauri-apps/api':
specifier: ^1.4.0 specifier: 2.0.0-alpha.5
version: 1.4.0 version: 2.0.0-alpha.5
'@tiptap/extension-image': '@tiptap/extension-image':
specifier: ^2.0.4 specifier: ^2.0.4
version: 2.0.4(@tiptap/core@2.0.4) version: 2.0.4(@tiptap/core@2.0.4)
@@ -142,8 +142,8 @@ devDependencies:
specifier: ^0.5.9 specifier: ^0.5.9
version: 0.5.9(tailwindcss@3.3.3) version: 0.5.9(tailwindcss@3.3.3)
'@tauri-apps/cli': '@tauri-apps/cli':
specifier: ^1.4.0 specifier: 2.0.0-alpha.10
version: 1.4.0 version: 2.0.0-alpha.10
'@trivago/prettier-plugin-sort-imports': '@trivago/prettier-plugin-sort-imports':
specifier: ^4.2.0 specifier: ^4.2.0
version: 4.2.0(prettier@2.8.8) version: 4.2.0(prettier@2.8.8)
@@ -1945,8 +1945,13 @@ packages:
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
dev: false dev: false
/@tauri-apps/cli-darwin-arm64@1.4.0: /@tauri-apps/api@2.0.0-alpha.5:
resolution: {integrity: sha512-nA/ml0SfUt6/CYLVbHmT500Y+ijqsuv5+s9EBnVXYSLVg9kbPUZJJHluEYK+xKuOj6xzyuT/+rZFMRapmJD3jQ==} resolution: {integrity: sha512-OqysC4c819itGxic50RoDMrmd+ofX+MMNkXKeRS0BV2rkKqrnuV17o3TrQXFI1xs/kXRmmPC+3Y42P9Y5uNvRg==}
engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'}
dev: false
/@tauri-apps/cli-darwin-arm64@2.0.0-alpha.10:
resolution: {integrity: sha512-z6DoKRUm1Yygu2Tpatu7Fej0eZejZQcsDKsHWc3b5yoIsrodxvKbko2SvYczUx4ecXWplJBTIfTZNo6ciIRRmw==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
@@ -1954,8 +1959,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-darwin-x64@1.4.0: /@tauri-apps/cli-darwin-x64@2.0.0-alpha.10:
resolution: {integrity: sha512-ov/F6Zr+dg9B0PtRu65stFo2G0ow2TUlneqYYrkj+vA3n+moWDHfVty0raDjMLQbQt3rv3uayFMXGPMgble9OA==} resolution: {integrity: sha512-xqPUC5uI6zo5+1IXSwZLj1uyRWCeZgQgpyaExGDOYBjcC8HUc2NRdFGsGVtGhFWE+HftppD9p8elJLQM90B02w==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
@@ -1963,8 +1968,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-linux-arm-gnueabihf@1.4.0: /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-alpha.10:
resolution: {integrity: sha512-zwjbiMncycXDV7doovymyKD7sCg53ouAmfgpUqEBOTY3vgBi9TwijyPhJOqoG5vUVWhouNBC08akGmE4dja15g==} resolution: {integrity: sha512-UpjG9qpF/7fkfrBoM6N+Lo08HRAKR9k7LENAFU+zd81JestxOCs0hxuX2/lGkVydtOuSXfVvMn1W5YpGKkgp3A==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
@@ -1972,8 +1977,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-linux-arm64-gnu@1.4.0: /@tauri-apps/cli-linux-arm64-gnu@2.0.0-alpha.10:
resolution: {integrity: sha512-5MCBcziqXC72mMXnkZU68mutXIR6zavDxopArE2gQtK841IlE06bIgtLi0kUUhlFJk2nhPRgiDgdLbrPlyt7fw==} resolution: {integrity: sha512-Pc8seZINcbHDgOC0ThZ5EPUqOYbL94wEUecKkiaKn7gCl3/ZyIlRte5gizBeLwmnG4fkSLZc0UMvRilu4hGK3g==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
@@ -1981,8 +1986,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-linux-arm64-musl@1.4.0: /@tauri-apps/cli-linux-arm64-musl@2.0.0-alpha.10:
resolution: {integrity: sha512-7J3pRB6n6uNYgIfCeKt2Oz8J7oSaz2s8GGFRRH2HPxuTHrBNCinzVYm68UhVpJrL3bnGkU0ziVZLsW/iaOGfUg==} resolution: {integrity: sha512-ZlaBbJq5yXP6VmNOrUGgSDnM1JcDsYf7XfVOm/kLVVrZ3iEzYA18v4SZH2kR18bU7h5+YVCPwwnfD+B8ROGidA==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
@@ -1990,8 +1995,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-linux-x64-gnu@1.4.0: /@tauri-apps/cli-linux-x64-gnu@2.0.0-alpha.10:
resolution: {integrity: sha512-Zh5gfAJxOv5AVWxcwuueaQ2vIAhlg0d6nZui6nMyfIJ8dbf3aZQ5ZzP38sYow5h/fbvgL+3GSQxZRBIa3c2E1w==} resolution: {integrity: sha512-7fo0u56URSFZwJpwPMeNiYypbgYcT8i5KPMe1CQgWW19sJLHBMK1Kd0L8SeAZDlCPpY2coNifAdEm3C7Ca7xMQ==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
@@ -1999,8 +2004,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-linux-x64-musl@1.4.0: /@tauri-apps/cli-linux-x64-musl@2.0.0-alpha.10:
resolution: {integrity: sha512-OLAYoICU3FaYiTdBsI+lQTKnDHeMmFMXIApN0M+xGiOkoIOQcV9CConMPjgmJQ867+NHRNgUGlvBEAh9CiJodQ==} resolution: {integrity: sha512-9lY7YJmsm7SndlIxKzj/faX/bYX1q0dib88kpxT2xW4qNt9RihTI6PST1PDce5DmEoheLU9Xp9ere8SfoHgE2A==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
@@ -2008,8 +2013,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-win32-arm64-msvc@1.4.0: /@tauri-apps/cli-win32-arm64-msvc@2.0.0-alpha.10:
resolution: {integrity: sha512-gZ05GENFbI6CB5MlOUsLlU0kZ9UtHn9riYtSXKT6MYs8HSPRffPHaHSL0WxsJweWh9nR5Hgh/TUU8uW3sYCzCg==} resolution: {integrity: sha512-tJOHIy13vjYRkfw7++aRDQEb5CVzVQKDiJ35Zg4I8YcaPExgj6LKCpDo8N8AD4RXy4SnYKzqYTt8K9xcyIonzA==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
@@ -2017,8 +2022,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-win32-ia32-msvc@1.4.0: /@tauri-apps/cli-win32-ia32-msvc@2.0.0-alpha.10:
resolution: {integrity: sha512-JsetT/lTx/Zq98eo8T5CiRyF1nKeX04RO8JlJrI3ZOYsZpp/A5RJvMd/szQ17iOzwiHdge+tx7k2jHysR6oBlQ==} resolution: {integrity: sha512-DN4TlOU8e6cRRVXAnldHhfDDr0ER000fojJ/Vb33fgGvaXury3jBtNyKQuoscvg6T8fLUBc72O6+4tDnXlIBwQ==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
@@ -2026,8 +2031,8 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli-win32-x64-msvc@1.4.0: /@tauri-apps/cli-win32-x64-msvc@2.0.0-alpha.10:
resolution: {integrity: sha512-z8Olcnwp5aYhzqUAarFjqF+oELCjuYWnB2HAJHlfsYNfDCAORY5kct3Fklz8PSsubC3U2EugWn8n42DwnThurg==} resolution: {integrity: sha512-H5Y+L7H24n9EVB/Dw5HHGo+wQZHTLVgWrkOwsxqssDhTPiM5CbEuyjEf/B1y8uqp4YoIlw5t7Db+GBg12KejAA==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
@@ -2035,21 +2040,21 @@ packages:
dev: true dev: true
optional: true optional: true
/@tauri-apps/cli@1.4.0: /@tauri-apps/cli@2.0.0-alpha.10:
resolution: {integrity: sha512-VXYr2i2iVFl98etQSQsqLzXgX96bnWiNZd1YADgatqwy/qecbd6Kl5ZAPB5R4ynsgE8A1gU7Fbzh7dCEQYFfmA==} resolution: {integrity: sha512-8SkTAxg5J06f7BWgJjNt1NEBPRsffmj4X+PckHX3ZguZd8xqpGtACufUg0zVqaFZPmd+9OCvoEJSP5veO4utDQ==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
hasBin: true hasBin: true
optionalDependencies: optionalDependencies:
'@tauri-apps/cli-darwin-arm64': 1.4.0 '@tauri-apps/cli-darwin-arm64': 2.0.0-alpha.10
'@tauri-apps/cli-darwin-x64': 1.4.0 '@tauri-apps/cli-darwin-x64': 2.0.0-alpha.10
'@tauri-apps/cli-linux-arm-gnueabihf': 1.4.0 '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-alpha.10
'@tauri-apps/cli-linux-arm64-gnu': 1.4.0 '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-alpha.10
'@tauri-apps/cli-linux-arm64-musl': 1.4.0 '@tauri-apps/cli-linux-arm64-musl': 2.0.0-alpha.10
'@tauri-apps/cli-linux-x64-gnu': 1.4.0 '@tauri-apps/cli-linux-x64-gnu': 2.0.0-alpha.10
'@tauri-apps/cli-linux-x64-musl': 1.4.0 '@tauri-apps/cli-linux-x64-musl': 2.0.0-alpha.10
'@tauri-apps/cli-win32-arm64-msvc': 1.4.0 '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-alpha.10
'@tauri-apps/cli-win32-ia32-msvc': 1.4.0 '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-alpha.10
'@tauri-apps/cli-win32-x64-msvc': 1.4.0 '@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.10
dev: true dev: true
/@tiptap/core@2.0.4(@tiptap/pm@2.0.4): /@tiptap/core@2.0.4(@tiptap/pm@2.0.4):

856
src-tauri/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,36 +11,16 @@ rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies] [build-dependencies]
tauri-build = { version = "1.2", features = [] } tauri-build = { version = "2.0.0-alpha.6", features = [] }
[dependencies] [dependencies]
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.2", features = [ tauri = { version = "2.0.0-alpha.10" }
"fs-remove-file", tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
"fs-write-file", tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
"window-create", tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
"path-all", tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
"fs-read-dir",
"fs-read-file",
"clipboard-read-text",
"clipboard-write-text",
"dialog-open",
"http-all",
"http-multipart",
"notification-all",
"os-all",
"process-relaunch",
"shell-open",
"system-tray",
"updater",
"window-close",
"window-start-dragging",
] }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
sqlx-cli = { version = "0.7.0", default-features = false, features = [ sqlx-cli = { version = "0.7.0", default-features = false, features = [
"sqlite", "sqlite",
] } ] }
@@ -49,7 +29,7 @@ rand = "0.8.5"
[dependencies.tauri-plugin-sql] [dependencies.tauri-plugin-sql]
git = "https://github.com/tauri-apps/plugins-workspace" git = "https://github.com/tauri-apps/plugins-workspace"
branch = "v1" branch = "v2"
features = ["sqlite"] features = ["sqlite"]
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]

View File

@@ -1,148 +1,84 @@
{ {
"build": { "build": {
"beforeDevCommand": "pnpm dev", "beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm build", "beforeBuildCommand": "pnpm build",
"devPath": "http://localhost:3000", "devPath": "http://localhost:3000",
"distDir": "../dist", "distDir": "../dist",
"withGlobalTauri": true "withGlobalTauri": true
}, },
"package": { "package": {
"productName": "Lume", "productName": "Lume",
"version": "1.1.1" "version": "1.1.1"
}, },
"tauri": { "tauri": {
"allowlist": { "bundle": {
"all": false, "active": true,
"app": { "category": "SocialNetworking",
"all": false "copyright": "",
}, "appimage": {
"os": { "bundleMediaFramework": true
"all": true },
}, "deb": {
"http": { "depends": []
"all": true, },
"request": true, "externalBin": [],
"scope": ["http://**", "https://**"] "icon": [
}, "icons/32x32.png",
"fs": { "icons/128x128.png",
"all": false, "icons/128x128@2x.png",
"readFile": true, "icons/icon.icns",
"readDir": true, "icons/icon.ico"
"writeFile": true, ],
"removeFile": true, "identifier": "com.lume.nu",
"scope": [ "longDescription": "",
"$APPDATA/*", "macOS": {
"$DATA/*", "entitlements": null,
"$LOCALDATA/*", "exceptionDomain": "",
"$DESKTOP/*", "frameworks": [],
"$DOCUMENT/*", "providerShortName": null,
"$DOWNLOAD/*", "signingIdentity": null
"$HOME/*", },
"$PICTURE/*", "resources": [],
"$PUBLIC/*", "shortDescription": "",
"$VIDEO/*" "targets": "all",
] "windows": {
}, "certificateThumbprint": null,
"path": { "digestAlgorithm": "sha256",
"all": true "timestampUrl": ""
}, },
"shell": { "updater": {
"all": false, "active": true,
"open": true "endpoints": [
}, "https://lus.reya3772.workers.dev/v1/{{target}}/{{arch}}/{{current_version}}",
"clipboard": { "https://lus.reya3772.workers.dev/{{target}}/{{current_version}}"
"all": false, ],
"writeText": true, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU4RjAzODFBREQ4MkM3RTEKUldUaHg0TGRHamp3NkI5bnhoOEVjanlHWFNzQ2Q3NDhubFFLUmJpSHJ1L2FqNnB3alF1Y2R3U3gK",
"readText": true "windows": {
}, "installMode": "passive"
"dialog": { }
"all": false, },
"open": true },
}, "security": {
"notification": { "csp": "upgrade-insecure-requests"
"all": true },
}, "systemTray": {
"window": { "iconPath": "icons/icon.png",
"startDragging": true, "iconAsTemplate": true
"close": true, },
"create": true "windows": [
}, {
"process": { "title": "Lume",
"all": false, "theme": "Dark",
"exit": false, "titleBarStyle": "Overlay",
"relaunch": true, "hiddenTitle": true,
"relaunchDangerousAllowSymlinkMacos": false "transparent": false,
} "fullscreen": false,
}, "resizable": true,
"bundle": { "width": 1080,
"active": true, "height": 800,
"category": "SocialNetworking", "minWidth": 1080,
"copyright": "", "minHeight": 720
"appimage": { }
"bundleMediaFramework": true ]
}, }
"deb": {
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "com.lume.nu",
"longDescription": "",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": ""
}
},
"security": {
"csp": "upgrade-insecure-requests"
},
"updater": {
"active": true,
"dialog": true,
"endpoints": [
"https://lus.reya3772.workers.dev/v1/{{target}}/{{arch}}/{{current_version}}",
"https://lus.reya3772.workers.dev/{{target}}/{{current_version}}"
],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU4RjAzODFBREQ4MkM3RTEKUldUaHg0TGRHamp3NkI5bnhoOEVjanlHWFNzQ2Q3NDhubFFLUmJpSHJ1L2FqNnB3alF1Y2R3U3gK",
"windows": {
"installMode": "passive"
}
},
"systemTray": {
"iconPath": "icons/icon.png",
"iconAsTemplate": true
},
"windows": [
{
"title": "Lume",
"theme": "Dark",
"titleBarStyle": "Overlay",
"hiddenTitle": true,
"transparent": false,
"fullscreen": false,
"resizable": true,
"width": 1080,
"height": 800,
"minWidth": 1080,
"minHeight": 720
}
]
}
} }