Skip to content

Commit 16a2fdc

Browse files
committed
chore(theseus): Update to Tauri v2 stable
1 parent d90cc09 commit 16a2fdc

File tree

9 files changed

+2702
-3199
lines changed

9 files changed

+2702
-3199
lines changed

Cargo.lock

Lines changed: 1034 additions & 668 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/app-frontend/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"@modrinth/ui": "workspace:*",
1616
"@modrinth/utils": "workspace:*",
1717
"@sentry/vue": "^8.27.0",
18-
"@tauri-apps/api": "^2.0.0-rc.3",
19-
"@tauri-apps/plugin-dialog": "^2.0.0-rc.0",
20-
"@tauri-apps/plugin-os": "^2.0.0-rc.0",
21-
"@tauri-apps/plugin-shell": "^2.0.0-rc.0",
22-
"@tauri-apps/plugin-updater": "^2.0.0-rc.0",
23-
"@tauri-apps/plugin-window-state": "^2.0.0-rc.0",
18+
"@tauri-apps/api": "^2.0.3",
19+
"@tauri-apps/plugin-dialog": "^2.0.1",
20+
"@tauri-apps/plugin-os": "^2.0.0",
21+
"@tauri-apps/plugin-shell": "^2.0.1",
22+
"@tauri-apps/plugin-updater": "^2.0.0",
23+
"@tauri-apps/plugin-window-state": "^2.0.0",
2424
"@vintl/vintl": "^4.4.1",
2525
"dayjs": "^1.11.10",
2626
"floating-vue": "^5.2.2",

apps/app/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ edition = "2021"
88
build = "build.rs"
99

1010
[build-dependencies]
11-
tauri-build = { version = "2.0.0-rc", features = ["codegen"] }
11+
tauri-build = { version = "2.0.3", features = ["codegen"] }
1212

1313
[dependencies]
1414
theseus = { path = "../../packages/app-lib", features = ["tauri"] }
1515

1616
serde_json = "1.0"
1717
serde = { version = "1.0", features = ["derive"] }
1818

19-
tauri = { version = "2.0.0-rc", features = ["devtools", "macos-private-api", "protocol-asset", "unstable"] }
20-
tauri-plugin-window-state = "2.0.0-rc"
21-
tauri-plugin-deep-link = "2.0.0-rc"
22-
tauri-plugin-os = "2.0.0-rc"
23-
tauri-plugin-shell = "2.0.0-rc"
24-
tauri-plugin-dialog = "2.0.0-rc"
25-
tauri-plugin-updater = { version = "2.0.0-rc" }
26-
tauri-plugin-single-instance = { version = "2.0.0-rc" }
19+
tauri = { version = "2.1.1", features = ["devtools", "macos-private-api", "protocol-asset", "unstable"] }
20+
tauri-plugin-window-state = "2.0.2"
21+
tauri-plugin-deep-link = "2.0.1"
22+
tauri-plugin-os = "2.0.1"
23+
tauri-plugin-shell = "2.0.2"
24+
tauri-plugin-dialog = "2.0.3"
25+
tauri-plugin-updater = { version = "2.0.2" }
26+
tauri-plugin-single-instance = { version = "2.0.1" }
2727

2828
tokio = { version = "1", features = ["full"] }
2929
thiserror = "1.0"
@@ -59,7 +59,7 @@ objc = "0.2.7"
5959
rand = "0.8.5"
6060

6161
[target.'cfg(target_os = "linux")'.dependencies]
62-
tauri-plugin-updater = { version = "2.0.0-rc", optional = true, features = ["native-tls-vendored", "zip"], default-features = false }
62+
tauri-plugin-updater = { version = "2.0.2", optional = true, features = ["native-tls-vendored", "zip"], default-features = false }
6363

6464
[features]
6565
# by default Tauri runs in production mode

apps/app/gen/schemas/acl-manifests.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/app/gen/schemas/desktop-schema.json

Lines changed: 113 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
],
3838
"definitions": {
3939
"Capability": {
40-
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```",
40+
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, ], \"platforms\": [\"macOS\",\"windows\"] } ```",
4141
"type": "object",
4242
"required": [
4343
"identifier",
@@ -84,7 +84,7 @@
8484
}
8585
},
8686
"permissions": {
87-
"description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ```",
87+
"description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`. For commands directly implemented in the application itself only `${permission-name}` is required.\n\n## Example\n\n```json [ \"core:default\", \"shell:allow-open\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] } ] ```",
8888
"type": "array",
8989
"items": {
9090
"$ref": "#/definitions/PermissionEntry"
@@ -202,72 +202,122 @@
202202
"properties": {
203203
"allow": {
204204
"items": {
205-
"title": "Entry",
206-
"description": "A command allowed to be executed by the webview API.",
207-
"type": "object",
208-
"required": [
209-
"args",
210-
"cmd",
211-
"name",
212-
"sidecar"
213-
],
214-
"properties": {
215-
"args": {
216-
"description": "The allowed arguments for the command execution.",
217-
"allOf": [
218-
{
219-
"$ref": "#/definitions/ShellAllowedArgs"
205+
"title": "ShellScopeEntry",
206+
"description": "Shell scope entry.",
207+
"anyOf": [
208+
{
209+
"type": "object",
210+
"required": [
211+
"cmd",
212+
"name"
213+
],
214+
"properties": {
215+
"args": {
216+
"description": "The allowed arguments for the command execution.",
217+
"allOf": [
218+
{
219+
"$ref": "#/definitions/ShellScopeEntryAllowedArgs"
220+
}
221+
]
222+
},
223+
"cmd": {
224+
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
225+
"type": "string"
226+
},
227+
"name": {
228+
"description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
229+
"type": "string"
220230
}
221-
]
231+
},
232+
"additionalProperties": false
222233
},
223-
"cmd": {
224-
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
225-
"type": "string"
226-
},
227-
"name": {
228-
"description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
229-
"type": "string"
230-
},
231-
"sidecar": {
232-
"description": "If this command is a sidecar command.",
233-
"type": "boolean"
234+
{
235+
"type": "object",
236+
"required": [
237+
"name",
238+
"sidecar"
239+
],
240+
"properties": {
241+
"args": {
242+
"description": "The allowed arguments for the command execution.",
243+
"allOf": [
244+
{
245+
"$ref": "#/definitions/ShellScopeEntryAllowedArgs"
246+
}
247+
]
248+
},
249+
"name": {
250+
"description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
251+
"type": "string"
252+
},
253+
"sidecar": {
254+
"description": "If this command is a sidecar command.",
255+
"type": "boolean"
256+
}
257+
},
258+
"additionalProperties": false
234259
}
235-
}
260+
]
236261
}
237262
},
238263
"deny": {
239264
"items": {
240-
"title": "Entry",
241-
"description": "A command allowed to be executed by the webview API.",
242-
"type": "object",
243-
"required": [
244-
"args",
245-
"cmd",
246-
"name",
247-
"sidecar"
248-
],
249-
"properties": {
250-
"args": {
251-
"description": "The allowed arguments for the command execution.",
252-
"allOf": [
253-
{
254-
"$ref": "#/definitions/ShellAllowedArgs"
265+
"title": "ShellScopeEntry",
266+
"description": "Shell scope entry.",
267+
"anyOf": [
268+
{
269+
"type": "object",
270+
"required": [
271+
"cmd",
272+
"name"
273+
],
274+
"properties": {
275+
"args": {
276+
"description": "The allowed arguments for the command execution.",
277+
"allOf": [
278+
{
279+
"$ref": "#/definitions/ShellScopeEntryAllowedArgs"
280+
}
281+
]
282+
},
283+
"cmd": {
284+
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
285+
"type": "string"
286+
},
287+
"name": {
288+
"description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
289+
"type": "string"
255290
}
256-
]
291+
},
292+
"additionalProperties": false
257293
},
258-
"cmd": {
259-
"description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
260-
"type": "string"
261-
},
262-
"name": {
263-
"description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
264-
"type": "string"
265-
},
266-
"sidecar": {
267-
"description": "If this command is a sidecar command.",
268-
"type": "boolean"
294+
{
295+
"type": "object",
296+
"required": [
297+
"name",
298+
"sidecar"
299+
],
300+
"properties": {
301+
"args": {
302+
"description": "The allowed arguments for the command execution.",
303+
"allOf": [
304+
{
305+
"$ref": "#/definitions/ShellScopeEntryAllowedArgs"
306+
}
307+
]
308+
},
309+
"name": {
310+
"description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
311+
"type": "string"
312+
},
313+
"sidecar": {
314+
"description": "If this command is a sidecar command.",
315+
"type": "boolean"
316+
}
317+
},
318+
"additionalProperties": false
269319
}
270-
}
320+
]
271321
}
272322
}
273323
}
@@ -3266,7 +3316,7 @@
32663316
}
32673317
]
32683318
},
3269-
"ShellAllowedArg": {
3319+
"ShellScopeEntryAllowedArg": {
32703320
"description": "A command argument allowed to be executed by the webview API.",
32713321
"anyOf": [
32723322
{
@@ -3294,18 +3344,18 @@
32943344
}
32953345
]
32963346
},
3297-
"ShellAllowedArgs": {
3298-
"description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.",
3347+
"ShellScopeEntryAllowedArgs": {
3348+
"description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.",
32993349
"anyOf": [
33003350
{
33013351
"description": "Use a simple boolean to allow all or disable all arguments to this command configuration.",
33023352
"type": "boolean"
33033353
},
33043354
{
3305-
"description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.",
3355+
"description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.",
33063356
"type": "array",
33073357
"items": {
3308-
"$ref": "#/definitions/ShellAllowedArg"
3358+
"$ref": "#/definitions/ShellScopeEntryAllowedArg"
33093359
}
33103360
}
33113361
]

0 commit comments

Comments
 (0)