Compare commits

...

83 Commits

Author SHA1 Message Date
Lucas Nogueira
dcc62e6fc4 fix(macos-sign): add kv feature to the log crate 2024-08-17 00:58:34 -03:00
Lucas Nogueira
167a0feb31 fix(ci): missing id-token write permission for provenance 2024-08-17 00:38:09 -03:00
Lucas Nogueira
1142289670 fix(tauri-runtime-wry): docs.rs build 2024-08-17 00:16:07 -03:00
Lucas Nogueira
85c2d6302e fix(ci): set NPM_CONFIG_PROVENANCE to true 2024-08-17 00:15:00 -03:00
Lucas Nogueira
07a5f505d9 fix(ci): run pnpm publish with --no-git-checks 2024-08-17 00:12:24 -03:00
Lucas Nogueira
30667714c0 fix(ci): wrong prepublish scripts for @tauri-apps/api 2024-08-16 23:54:55 -03:00
github-actions[bot]
3522fbd78e Apply Version Updates From Current Changes (#10561)
* apply version updates

* fix versions

---------

Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-16 23:39:49 -03:00
Lucas Nogueira
dd5b081eeb fix(ci): install pnpm on integration tests 2024-08-16 23:13:35 -03:00
Amr Bashir
01f6aa3405 build: migrate repo to use pnpm as the package manager (#10607)
* build: migrate repo to use `pnpm` as the pacakge manager

* corepack enable

* update lock file

* format files

* format .github

* fix audit js

* wrap in quotes

* --frozen-lockfile

* simplify packageManager field

* lockfile

* remove cache from audit workflow
2024-08-16 23:04:08 -03:00
Amr Bashir
9e891933d8 fix(utils): fix resources map becomes directory (#10293)
* fix(utils): fix resources map becomes directory

closes #10187

Fixes the behavior of mapped resources generating extra directory, for example:
`"../resources/user.json": "resources/user.json"` generates this resource `resources/user.json/user.json`
where it should generate `resources/user.json`

This PR includes a refactor of the Iterator implementation which splits it into more scoped functions and relis on recursing instead of a loop which makes the code a lot more readable and easier to maintain.

* clippy

* cover more cases

* clippy

* fix glob into directory, not resolving target correctly

* return error when resource origin path doesn't exist

* fix resources example build

* Update .changes/resources-map-becoming-dirs.md

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-16 23:03:14 -03:00
Lucas Fernandes Nogueira
8deb1966ac feat(bundler): infer signing identity from certificate to import (#10652) 2024-08-16 20:30:49 -03:00
Lucas Fernandes Nogueira
d39c392b7c chore(deps): update tao and wry to latest (#10655) 2024-08-16 20:30:34 -03:00
Amr Bashir
6d7ac65676 chore: use 0.1.0 as version in templates (#10644)
closes #10474
2024-08-16 20:19:04 -03:00
Lucas Fernandes Nogueira
1b0c447fcb fix(macos-sign): missing stdout/stderr in Node.js context (#10654) 2024-08-16 20:16:00 -03:00
Lucas Fernandes Nogueira
10fb027b75 fix(cli): migrate v1 plugin dependencies, prevent dup, closes #10650 (#10656) 2024-08-16 19:58:20 -03:00
Lucas Fernandes Nogueira
255d64e3dc fix(cli): actually check if there are multiple android devices connected (#10642) 2024-08-16 04:12:34 +03:00
Lucas Fernandes Nogueira
d0510f52eb refactor(core): serialize response once, closes #5641 (#10641)
* refactor(core): serialize response once closes #5641

This change impacts both the custom protocol and the postMessage based IPC implementations. Basically it changes the whole IPC mechanism to work on raw JSON strings so we do not need to serialize a serde_json::Value after serializing to it from a user-provided type.

i benchmarked this with a 150MB file response (returning Vec<u8> instead of tauri::ipc::Response since the latter does not serialize at all) and it went from 29s to 23s (custom protocol) and from 54s to 48s (post message) on macOS.

* fix mobile & lint

* clippy
2024-08-15 16:15:11 -03:00
renovate[bot]
d1ee3f4b55 chore(deps) Update Tauri CLI (dev) (#10610)
* chore(deps) Update Tauri CLI

* html5ever 0.28

* update windows-sys

* cast

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-15 15:39:21 -03:00
Lucas Fernandes Nogueira
f712f31d1d fix(cli): add notarize error (#10639)
* fix: add notarize error

* add change file
2024-08-15 14:12:03 -03:00
renovate[bot]
8902dd8137 chore(deps) Update Tauri API Definitions (#10614)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-15 11:14:36 -03:00
renovate[bot]
b5c948f68e chore(deps) Update Tauri Codegen (#10613)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-15 10:52:11 -03:00
renovate[bot]
360330136f chore(deps) Update dependency @types/eslint to v9 (#10620)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-15 10:51:46 -03:00
renovate[bot]
659c7d2f5d chore(deps) Update Rust crate syn to v2.0.74 (#10609)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-15 10:50:39 -03:00
Lucas Fernandes Nogueira
9089d97637 fix(cli): properly resolve merge config on mobile build closes #9970 (#10605)
just applying the change from #10600 to xcode to fix the linked issue :)
2024-08-15 10:50:19 -03:00
Lucas Fernandes Nogueira
b6dca99fff refactor(api)!: change window label getters to be async ref #5380 (#10630) 2024-08-15 09:12:40 -03:00
Lucas Fernandes Nogueira
b160f9359d fix(cli): only validate iOS lib on debug builds (#10638) 2024-08-15 09:12:21 -03:00
Broken_Deer
521d1d5cdb fix(bundler): armv7 appimage bundler uses invalid download links [closes #6579] (#10619)
* Update appimage.rs

* Update appimage.rs

* Create change-pr-10619.md

* Update change-pr-10619.md

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-08-14 17:39:36 +02:00
Lucas Fernandes Nogueira
9f75d06228 fix(cli): adb port forward error handling, add logs, closes #9509 (#10604) 2024-08-13 22:07:02 -03:00
Amr Bashir
39bf0a1635 refactor: rename TAURI_SIGNTOOL_PATH -> TAURI_WINDOWS_SIGNTOOL_PATH (#10595)
immediately after merging #10588 I noticed that the variable name might be a bit ambigious and could cause confusion on other pl atforms other than Windows
2024-08-13 21:48:12 -03:00
Amr Bashir
78e22bedca feat(cli): support AndroidTV by default (#10602)
closes #10534
2024-08-13 21:47:41 -03:00
Lucas Fernandes Nogueira
f4cd68f040 fix(cli): builtin dev server should also be forwarded for Android (#10600) 2024-08-13 21:11:01 -03:00
Lucas Fernandes Nogueira
f35bcda289 feat(cli): handle known target specific plugins on permission add #10596 (#10598)
Closes #10596
2024-08-13 14:01:10 -03:00
Lucas Fernandes Nogueira
712f1049fa fix(cli): ios dev and ios build support for bun (#10569) 2024-08-13 09:00:41 -03:00
Lucas Fernandes Nogueira
41c7a6646b fix(cli): properly exit with code 0 on panic when running with bun (#10572) 2024-08-13 08:53:04 -03:00
anatawa12
f8d658ea1b feat: TAURI_SIGNTOOL_PATH environment variable for specifying the path to signtool.exe. (#10588) 2024-08-13 14:49:28 +03:00
Lucas Fernandes Nogueira
fedf93eb7e refactor(core): return 200 on any IPC call, closes #10286 (#10585)
* refactor(core): return 200 on any IPC call, closes #10286

By default the webview prints a `Failed to load resource: the server responded with a status of 400 (Bad Request) ipc://localhost` error message when a command returns an error, which is confusing to users.

This changes the IPC to return status 200 on any call, with a header to indicate whether the result was ok or not. This removes the console error, which would only log the actual error result if it isn't caught by the user.

* add change file

* apply code review changes
2024-08-13 08:39:20 -03:00
Lucas Fernandes Nogueira
b1d9ffa1ab fix(core): IPC fallback hanging when sending responses, closes #10327 (#10582)
The IPC fallback system kicks in when the custom protocol implementation cannot be used (e.g. CORS issues).
The fallback uses the postMessage mechanism, which by default uses channels to send large responses. If the custom protocol implementation cannot be used, we should not use channels, but eval the response directly.
2024-08-13 07:38:49 -03:00
Lucas Fernandes Nogueira
794cf8234f chore(cli): change default export method to debugging (#10571) 2024-08-13 04:04:16 +03:00
Lucas Fernandes Nogueira
9fe846615b fix(core): plugin permissions documentation heading (#10547)
Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com>
2024-08-13 03:58:44 +03:00
renovate[bot]
20be073bc4 chore(deps) Update Tauri CLI (dev) (#10308)
* chore(deps) Update Tauri CLI

* fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-12 12:52:16 -03:00
renovate[bot]
f228d3d3d4 chore(deps) Update Tauri Bundler (dev) (#10512)
* chore(deps) Update Tauri Bundler

* fix build

* fix linux

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-12 12:39:33 -03:00
Lucas Fernandes Nogueira
3bec7b1595 feat(cli): add support to Svelte and Vue.js code on v1 migration (#10544)
* feat(cli): add support to Svelte and Vue.js code on v1 migration

* clippy
2024-08-12 13:45:42 +09:00
Lucas Fernandes Nogueira
3998570fd3 fix(cli): manifest v1 migration (#10540)
update features that got removed/renamed, and also migrate any core crate on any dependency table
2024-08-12 12:23:39 +09:00
Lucas Fernandes Nogueira
3beba92b5b fix(cli): incorrect JS generated by frontend migration closes #10500 (#10542)
* fix(cli): incorrect JS generated by frontend migration closes #10500
2024-08-12 12:10:27 +09:00
Lucas Fernandes Nogueira
f3837d5b98 fix(cli): broken v1 updater migration, add TOML support, closes #10508 (#10539)
- make the v1 config migration more resilient by checking null values
- fix "targets: all" incorrectly migrating createUpdaterArtifacts when there's no updater configuration (this is problematic because this targets config is the default)
- migrate Tauri.toml
- add more tests
2024-08-12 11:56:13 +09:00
苏向夜
71d00646a9 feat(cli): detect project NPM package manager on init (#10504)
* feat(cli): improve init behavior to ask once

* chore(cli): bump version

* fix(clippy): fix clippy warning

* feat(cli): add `bun` and fix version bump msg

* refactor(cli): auto detect the package manager

* move function

* update change file

* update change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-11 18:33:26 -03:00
renovate[bot]
416f845784 chore(deps) Update Tauri API Definitions (dev) (#10370)
* chore(deps) Update Tauri API Definitions

* format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-11 09:47:00 -03:00
Sam Kearney
2d47352a07 fix(cli): make app_dir() logic consistent (#10418)
* fix(cli): Make app_dir() consistent by basing it on the explicit invocation directory rather than the current working directory

* resolve app paths before everything else

* fix xcode script

* fix test

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-11 09:44:15 -03:00
Yuri Astrakhan
0afee5ed80 chore: update brotli dependency to v6 (#10436)
* chore: update brotli dependency to v6

brotli v6 plays nice with other versions of the same crate

* add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-11 08:23:31 -03:00
AHQ
bfc49cc7a1 refactor(android): Remove targetSdk from gradle config (#10558)
* refactor: remove targetSdk as it is being removed in DSL 9.0

* note

* fix: typo

* update: changelog

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-08-11 07:06:14 -03:00
anatawa12
4bfe4880fb fix: fails to build universal fat binary if main bin is renamed to another name (#10550)
* fix: fails to build universal fat binary if main bin is renamed to another name

* lint

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-11 06:56:53 -03:00
Maarten
bba1a44191 feat(cli): allow skipping rustfmt project reformatting when adding a plugin (#10457)
* feat(cli): allow skipping rustfmt project reformatting

* Apply suggestions from code review

* fixes, change file

* fix change file

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-08-10 17:09:07 -03:00
renovate[bot]
92cac12a92 chore(deps) Update Rust crate zip to v2 (dev) (#10516)
* chore(deps) Update Rust crate zip to v2

* SimpleFileOptions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-10 16:55:53 -03:00
renovate[bot]
f65990d1d7 chore(deps) Update Rust crate json-patch to v2 (dev) (#10515)
* chore(deps) Update Rust crate json-patch to v2

* update other crates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-10 16:45:24 -03:00
renovate[bot]
e91550bd86 chore(deps) Update Tauri CLI (dev) (major) (#10517)
* chore(deps) Update Tauri CLI

* update cargo-mobile2

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-10 16:39:55 -03:00
Jonas Kruckenberg
88a9fa23e5 docs: Add hyperlink to localhost-free readme item (#10557) 2024-08-10 21:26:12 +02:00
rwv
008b9f7481 chore: generate provenance statements for npm package (#10477)
* chore: generate provenance statements for npm package

See also https://docs.npmjs.com/generating-provenance-statements#example-github-actions-workflow

* also add --provenance for covector publishes

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-10 15:48:04 -03:00
chip
a975cd7976 yarn prettier --write core (#10471) 2024-08-10 15:44:33 -03:00
Norbiros
0bb7b0f352 feat: Add option to generate default permissions for inlined plugins (#10559)
* feat: Add option to allow all commands by default

* option to use a list of permissions, move logic to tauri-build

* fix plugin

* add utils change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-10 15:34:49 -03:00
Tillmann
213c0b1b8e add v2 report (#10554) 2024-08-10 14:52:09 -03:00
github-actions[bot]
ab4e56f5d2 apply version updates (#10532)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-08-08 23:52:47 -03:00
Fabian-Lars
f5dfc02800 fix(core/cli): Add custom default implementation for ios config (#10533)
* fix(cli): Add custom `default` implementation for ios config

* fix change
2024-08-08 19:57:56 -03:00
Fabian-Lars
5f56cb0a8b feat(cli): Upgrade gradle to 8.9 and gradle-android to 8.5.1 (#10507)
* feat(cli): Upgrade gradle to 8.9 and gradle-android to 8.5.1

* Update .changes/android-gradle-8-9.md

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-08-08 08:48:54 -03:00
Fabian-Lars
00e5a6ac74 fix(cli): allow actions: write for version-or-publish to fix cli publishing (#10525) 2024-08-08 07:25:59 -03:00
KV
10e30c5139 fix: 'ndecorated' typo in window shadow description (#10527) 2024-08-08 10:47:52 +08:00
github-actions[bot]
393428e5c8 apply version updates (#10524)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-08-07 14:50:33 -03:00
Lucas Nogueira
9ed8fe8c92 fix(cli): allow write on pull-requests for version-or-publish 2024-08-07 14:32:06 -03:00
Lucas Fernandes Nogueira
8dc81b6cc2 feat(core): add option for custom Xcode project template (XcodeGen) (#10496) 2024-08-07 13:17:01 -03:00
Lucas Fernandes Nogueira
02c00abc63 feat(core): add config for the minimum iOS version (#10495)
* feat(core): add config for the minimum iOS version

* revert api exapmle
2024-08-07 13:16:27 -03:00
renovate[bot]
5be7607b26 chore(deps) Update Tauri Codegen to v1.7.0 (#10513)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-07 13:52:44 +08:00
Catalin Andrei Cacuci
a440a3f9d8 fix(bundler): Correct nsis pre-uninstall hook to post-uninstall (#10498)
* fix(bundler): Correct nsis pre-uninstall hook to post-uninstall

* Create change-pr-10498.md

* Update change-pr-10498.md [skip ci]

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-08-05 19:15:45 +02:00
Fabian-Lars
ab382f4ca9 ci: Use GITHUB_TOKEN for workflow_dispatch via gh cli (#10493) 2024-08-05 10:12:29 -03:00
Lucas Fernandes Nogueira
2e8ab7bac1 fix(cli): v1 migration should add the updater plugin if it is enabled (#10481)
* fix(cli): v1 migration should add the updater plugin if it is enabled

* fix change tag

* move to process_updater

* Update tooling/cli/src/migrate/migrations/v1/config.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-08-05 10:00:33 -03:00
Lucas Fernandes Nogueira
a3cd9779a4 chore(cli): remove android open and ios open commands (#10480)
It is recommended to use `[android|ios] dev --open` or `[android|ios] build --open` instead as it properly sets up the requirements for developing and building apps with Tauri.
2024-08-05 09:57:54 -03:00
chip
e2dc76cfbf set packageManager field in package.json for corepack (#10470) 2024-08-05 09:50:32 -03:00
Lucas Fernandes Nogueira
8e1e15304e feat(cli): check if Rust lib contains required Android and iOS symbols #10094 (#10483)
* feat(cli): check if Rust lib contains required Android symbols #10094

* check for ios aswell
2024-08-05 09:46:28 -03:00
Lucas Fernandes Nogueira
ca68689564 feat(cli): check if project identifier or lib name changed (#10479)
* feat(cli): check if project identifier changed

* implement ios check

* also check lib name

* clippy

* ensure_init from xcode-script

* fill change file [skip ci]
2024-08-05 09:45:18 -03:00
anatawa12
7e810cb2a3 fix: permission file uses ':' in file name (#10485)
* fix: permission file uses ':' in file name

* style: rustfmt
2024-08-05 09:45:00 -03:00
renovate[bot]
725dbb7250 chore(deps) Update Rust crate url to v2.5.2 (#10091)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 13:05:43 +02:00
github-actions[bot]
b9a4410516 apply version updates (#10468)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-08-03 10:22:38 -03:00
Lucas Fernandes Nogueira
fb1933f174 fix(cli): android dev --open failing due to adb not finding device (#10467) 2024-08-03 10:04:26 -03:00
deadmeu
699319d8a7 docs: Update tauri::app::Builder::setup example (#10463)
This resolves a warning emitted by following the example code: warning:
unused `Result` that must be used.
2024-08-03 09:50:27 -03:00
Lucas Fernandes Nogueira
206914fe8d fix(cli): adb reverse failing in Node.js (#10466) 2024-08-03 09:47:50 -03:00
281 changed files with 11419 additions and 7505 deletions

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Include notarization error output in the error message if it fails.

View File

@@ -0,0 +1,5 @@
---
"tauri-build": patch:feat
---
Added `InlinedPlugin::default_permission` to autogenerate the default permission of an inlined plugin.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes running `android dev --open`.

View File

@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:enhance'
'@tauri-apps/cli': 'patch:enhance'
---
Update gradle to 8.9 and the gradle android plugin to 8.5.1 in the android templates (requires latest Android Studio). This should add support for Java 21 but Java 17 keeps being the recommended version.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes `android dev` port forward failing under some conditions, add better logging and error handling.

6
.changes/brotli-6.md Normal file
View File

@@ -0,0 +1,6 @@
---
"tauri-codegen": patch:deps
"tauri-utils": patch:deps
---
Updated brotli to v6.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:changes
"@tauri-apps/cli": patch:changes
---
Change iOS template default export method from deprecated `development` to `debugging`.

View File

@@ -0,0 +1,5 @@
---
"tauri-bundler": patch:bug
---
Correct nsis pre-uninstall hook to post-uninstall

View File

@@ -0,0 +1,5 @@
---
"tauri-bundler": "patch:bug"
---
Fixed an issue that caused the bundler to not be able to download the AppImage tooling when building for ARM 32bit.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Check if the Rust library contains the symbols required at runtime for Android and iOS apps.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": "patch:enhance"
"@tauri-apps/cli": "patch:enhance"
---
Added `--no-fmt` option to the `add` command to skip formatting the code after applying changes.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": "patch:feat"
"@tauri-apps/cli": "patch:feat"
---
Add necessary options to `AndroidManifest.xml` in android template to support AndroidTV.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
CLI commands will now consistently search for the `app_dir` (the directory containing `package.json`) from the current working directory of the command invocation.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Check if identifier or lib name changed when running mobile commands.

View File

@@ -0,0 +1,5 @@
---
"tauri-bundler": patch:feat
---
`TAURI_WINDOWS_SIGNTOOL_PATH` environment variable for specifying the path to signtool.exe.

View File

@@ -81,16 +81,16 @@
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
"prepublish": [
{
"command": "yarn",
"command": "pnpm i --frozen-lockfile",
"dryRunCommand": true
},
{
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "yarn audit",
"command": "pnpm audit",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": true
@@ -108,13 +108,13 @@
"publish": [
"sleep 15s",
{
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "yarn publish --access public --loglevel silly --tag next",
"dryRunCommand": "npm publish --dry-run --access public",
"command": "pnpm publish --access public --loglevel silly --tag next --no-git-checks",
"dryRunCommand": "npm publish --dry-run --access public --no-git-checks",
"pipe": true
},
{
@@ -142,16 +142,16 @@
],
"prepublish": [
{
"command": "yarn",
"command": "pnpm i --frozen-lockfile",
"dryRunCommand": true
},
{
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "yarn audit",
"command": "pnpm audit",
"dryRunCommand": true,
"runFromRoot": true,
"pipe": true
@@ -162,18 +162,18 @@
"pipe": true
},
{
"command": "yarn npm-pack",
"command": "pnpm npm-pack",
"dryRunCommand": true
}
],
"publish": [
{
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "yarn npm-publish",
"command": "pnpm npm-publish",
"dryRunCommand": true,
"pipe": true
},

View File

@@ -0,0 +1,7 @@
---
"tauri": patch:changes
"@tauri-apps/cli": patch:changes
"tauri-cli": patch:changes
---
Remove targetSdk from gradle files

6
.changes/fix-adb.md Normal file
View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes running `adb reverse` in Node.js context.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes `android dev` not working when using the builtin dev server.

View File

@@ -0,0 +1,5 @@
---
"@tauri-apps/cli": patch:bug
---
Exit with code 1 if a panic occurs when running the CLI with `bun`.

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": "patch:bug"
---
Fixed an issue where permission files will be generated with ':' in the file path.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes `[android|ios] build --config <config>` failing to resolve.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes running `ios dev` and `ios build` using `bun`.

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fix IPC fallback (postMessage implementation when custom protocol fails) hanging when sending responses.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes v1 migration of Cargo.toml dependencies and features.

View File

@@ -0,0 +1,5 @@
---
"tauri-macos-sign": patch:bug
---
Fixes output not visible when running on Node.js via NAPI.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes v1 frontend code migration when using plugin default imports.

View File

@@ -0,0 +1,9 @@
---
"@tauri-apps/api": patch:breaking
---
Changed `WebviewWindow.getAll`, `WebviewWindow.getByLabel`, `getAllWebviewWindows`,
`Window.getAll`, `Window.getByLabel`, `getAllWindows`,
`Webview.getAll`, `Webview.getByLabel`, `getAllWebviews`
to be async so their return value are synchronized with the state from the Rust side,
meaning new and destroyed windows are reflected.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Improve the `init` command behavior by detecting the project NPM package manager.

View File

@@ -0,0 +1,7 @@
---
"tauri-bundler": patch:enhance
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Infer macOS codesign identity from the `APPLE_CERTIFICATE` environment variable when provided, meaning the identity no longer needs to be provided when signing on CI using that option. If the imported certificate name does not match a provided signingIdentity configuration, an error is returned.

View File

@@ -0,0 +1,7 @@
---
"tauri-utils": patch:feat
"tauri-cli": patch:feat
"@tauri-apps/cli": patch:feat
---
Added `bundle > ios > template` configuration option for custom Xcode project YML Handlebars template using XcodeGen.

View File

@@ -0,0 +1,7 @@
---
'tauri-utils': 'patch:bug'
'tauri-cli': 'patch:bug'
'@tauri-apps/cli': 'patch:bug'
---
Fixed an issue causing `tauri ios init` to fail if `iOS.minimumSystemVersion` was not configured explicitly.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Migrate v1 plugins to their v2 releases.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Prevent duplicate permissions on v1 migration.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:feat
"@tauri-apps/cli": patch:feat
---
v1 migrate script now migrates Svelte and Vue.js code.

View File

@@ -0,0 +1,7 @@
---
"tauri-utils": patch:feat
"tauri-cli": patch:feat
"@tauri-apps/cli": patch:feat
---
Added `bundle > ios > minimumSystemVersion` configuration option.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Only validate the output iOS library on debug builds.

View File

@@ -0,0 +1,7 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
`permission add` and `add` commands now check if the plugin is known and if it is either desktop or mobile only
we add the permission to a target-specific capability.

View File

@@ -1,18 +1,65 @@
{
"tag": "rc",
"changes": [
".changes/add-notarize-error.md",
".changes/allow-commands-by-default.md",
".changes/android-dev-open-adb-fix.md",
".changes/android-gradle-8-9.md",
".changes/android-port-forward-fixes.md",
".changes/asset-resolver-dev-fallback.md",
".changes/brotli-6.md",
".changes/change-default-export-option-debugging.md",
".changes/change-pr-10435.md",
".changes/change-pr-10498.md",
".changes/change-pr-10619.md",
".changes/check-android-lib-symbols.md",
".changes/cli-add-no-fmt.md",
".changes/cli-android-template-androidtv.md",
".changes/cli-desktop-port-exposure.md",
".changes/cli-make-app-dir-consistent.md",
".changes/cli-mobile-checks.md",
".changes/cli-signtool-path.md",
".changes/core-plugin-namespace.md",
".changes/dev-url-localhost-mobile.md",
".changes/feat-remove-target-sdk.md",
".changes/fix-adb.md",
".changes/fix-cli-dev-server-android.md",
".changes/fix-cli-panic-bun.md",
".changes/fix-colon-in-file-path.md",
".changes/fix-conf-parsing-error-filepath.md",
".changes/fix-config-override.md",
".changes/fix-ios-bun-support.md",
".changes/fix-ipc-fallback.md",
".changes/fix-manifest-migration.md",
".changes/fix-missing-codesign-error-macos.md",
".changes/fix-usage-without-compression.md",
".changes/fix-v1-frontend-migration.md",
".changes/get-window-async.md",
".changes/improve-cli-init.md",
".changes/infer-signing-identity.md",
".changes/ios-custom-project-template.md",
".changes/ios-default-minversion.md",
".changes/ios-frameworks.md",
".changes/isolation-main-frame-origin.md",
".changes/linux-option-gtk-app-id.md",
".changes/migrate-plugins.md",
".changes/migrate-prevent-duplications.md",
".changes/migrate-vue-svelte.md",
".changes/min-ios-version.md",
".changes/only-validate-ios-lib-debug.md",
".changes/permissions-add-target-specific.md",
".changes/plugin-builder-failable.md",
".changes/rc-migration.md",
".changes/remove-unsecure-configs.md"
".changes/refactor-ipc-error.md",
".changes/refactor-ipc-response.md",
".changes/remove-open-command.md",
".changes/remove-unsecure-configs.md",
".changes/resources-map-becoming-dirs.md",
".changes/universal-bin-build-fails.md",
".changes/update-tao-wry.md",
".changes/utils-autogenerated-command-return-list.md",
".changes/utils-fix-plugin-reference.md",
".changes/v1-migrate-updater.md",
".changes/v1-migration-improvement.md"
]
}

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:changes
---
Change how IPC handles errors to simplify what's logged in the console.

View File

@@ -0,0 +1,6 @@
---
"tauri": patch:breaking
---
Added a dedicated type for IPC response body `InvokeResponseBody` for performance reasons.
This is only a breaking change if you are directly using types from `tauri::ipc`.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:changes
"@tauri-apps/cli": patch:changes
---
Removed the `[android|ios] open` command. It is recommended to use `[android|ios] dev --open` or `[android|ios] build --open` instead.

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": "patch:bug"
---
Fix `ResourcePaths` iterator returning an unexpected result for mapped resources, for example `"../resources/user.json": "resources/user.json"` generates this resource `resources/user.json/user.json` where it should generate just `resources/user.json`.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
fails to build universal fat binary if main bin is renamed to another name in `Cargo.toml`

View File

@@ -0,0 +1,7 @@
---
"tauri": patch:deps
"tauri-runtime": patch:deps
"tauri-runtime-wry": patch:deps
---
Update `tao` to 0.29 and `wry` to 0.42.

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": patch:enhance
---
Return autogenerated permissions from `autogenerate_command_permissions`.

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": patch:bug
---
Fix plugin permissions documentation heading for permissions table.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Migration from v1 to v2 now adds the updater plugin when it is active.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Improve migration tooling by supporting TOML configs, handle nulls and properly check for updater migration.

View File

@@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo
### A note on filesystem performance
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `pnpm install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).

View File

@@ -1,4 +1,3 @@
# Contributor Covenant Code of Conduct
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
- Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
@@ -130,4 +129,4 @@ For answers to common questions about this code of conduct, see the FAQ at
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
[translations]: https://www.contributor-covenant.org/translations

View File

@@ -48,7 +48,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [Yarn](https://yarnpkg.com/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.
@@ -78,7 +78,7 @@ $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open
### Developing the JS API
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `yarn build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
## Financial Contribution

View File

@@ -45,7 +45,7 @@ body:
id: info
attributes:
label: Full `tauri info` output
description: "Output of `npm run tauri info` or `cargo tauri info`"
description: 'Output of `npm run tauri info` or `cargo tauri info`'
render: text
validations:
required: true

View File

@@ -1,8 +1,7 @@
---
name: 📚 Docs Report
about: Create a report to help us improve the docs
title: "[docs] "
title: '[docs] '
labels: 'type: documentation'
assignees: ''
---

View File

@@ -22,7 +22,7 @@ body:
attributes:
label: "Describe the solution you'd like"
description: A clear description of what change you would like
placeholder: "I would like to..."
placeholder: 'I would like to...'
validations:
required: true
@@ -31,7 +31,7 @@ body:
attributes:
label: Alternatives considered
description: "Any alternative solutions you've considered"
- type: textarea
id: context
attributes:

View File

@@ -14,7 +14,7 @@ on:
- '**/Cargo.lock'
- '**/Cargo.toml'
- '**/package.json'
- '**/yarn.lock'
- '**/pnpm-lock.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -34,11 +34,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: audit workspace
run: yarn audit
- name: audit @tauri-apps/api
working-directory: tooling/api
run: yarn audit
- name: audit @tauri-apps/cli
working-directory: tooling/cli/node
run: yarn audit
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: pnpm audit

View File

@@ -39,7 +39,6 @@ jobs:
- 'core/tauri-config-schema/schema.json'
- 'core/tauri-acl-schema/*.json'
api:
runs-on: ubuntu-latest
needs: changes
@@ -49,7 +48,7 @@ jobs:
- name: build api
working-directory: tooling/api
run: yarn && yarn build
run: pnpm i --frozen-lockfile && pnpm build
- name: check api
run: ./.scripts/ci/has-diff.sh

View File

@@ -27,4 +27,4 @@ jobs:
uses: jbolda/covector/packages/action@covector-v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: "status"
command: 'status'

View File

@@ -164,11 +164,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
cache: yarn
cache: 'yarn'
cache-dependency-path: tooling/*/yarn.lock
- name: cargo login

View File

@@ -23,6 +23,8 @@ jobs:
with:
fetch-depth: 0
- run: corepack enable
- name: install stable
uses: dtolnay/rust-toolchain@stable
@@ -48,13 +50,18 @@ jobs:
timeout-minutes: 30
run: |
cd ./tooling/cli/node
yarn
yarn build
yarn test
pnpm i --frozen-lockfile
pnpm build
pnpm test
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
permissions:
actions: write # required for workflow_dispatch
contents: write # required to create new releases
pull-requests: write # required to open version update pr
id-token: write # pnpm provenance
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
@@ -66,12 +73,12 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: yarn
cache-dependency-path: tooling/*/yarn.lock
cache: 'pnpm'
- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
@@ -86,6 +93,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
NPM_CONFIG_PROVENANCE: true
with:
command: 'version-or-publish'
token: ${{ secrets.GITHUB_TOKEN }}
@@ -119,7 +127,7 @@ jobs:
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
run: gh workflow run 31554138 -r dev -f releaseId=${{ steps.covector.outputs['-tauri-apps-cli-releaseId'] }}
env:
GH_TOKEN: ${{ secrets.ORG_TAURI_BOT_PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger `tauri-cli` publishing workflow
if: |
@@ -127,4 +135,4 @@ jobs:
contains(steps.covector.outputs.packagesPublished, 'tauri-cli')
run: gh workflow run 31554139 -r dev
env:
GH_TOKEN: ${{ secrets.ORG_TAURI_BOT_PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -66,8 +66,9 @@ jobs:
with:
targets: ${{ matrix.target.name }}
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
@@ -112,9 +113,9 @@ jobs:
- name: Test
run: |
cd tooling/api
yarn && yarn build
pnpm i --frozen-lockfile && pnpm build
cd ../../examples/api
yarn
pnpm i --frozen-lockfile
. .setup-cross.sh
chmod +x cargo-tauri
chmod +x $HOME/.cargo/bin/cross

View File

@@ -16,45 +16,38 @@ concurrency:
cancel-in-progress: true
jobs:
eslint-cli:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: yarn
cache-dependency-path: tooling/cli/node/yarn.lock
- name: install deps via yarn
working-directory: ./tooling/cli/node/
run: yarn
# nothing to lint
#- name: run lint
# working-directory: ./tooling/cli/node/
# run: yarn lint
- name: run format
working-directory: ./tooling/cli/node/
run: yarn format:check
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm format:check
eslint-api:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: yarn
cache-dependency-path: tooling/api/yarn.lock
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm eslint:check
- name: install deps via yarn
working-directory: ./tooling/api/
run: yarn
- name: run ts:check
working-directory: ./tooling/api/
run: yarn ts:check
- name: run lint
working-directory: ./tooling/api/
run: yarn lint
- name: run format
working-directory: ./tooling/api/
run: yarn format:check
typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm ts:check

View File

@@ -30,45 +30,45 @@ jobs:
target: x86_64-apple-darwin
architecture: x64
build: |
yarn build:release --target=x86_64-apple-darwin
pnpm build:release --target=x86_64-apple-darwin
strip -x *.node
- host: windows-latest
build: yarn build:release
build: pnpm build:release
target: x86_64-pc-windows-msvc
architecture: x64
- host: windows-latest
build: yarn build:release --target i686-pc-windows-msvc
build: pnpm build:release --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
architecture: x64
- host: windows-latest
architecture: x64
target: aarch64-pc-windows-msvc
build: yarn build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
build: pnpm build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
- host: ubuntu-20.04
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
cd tooling/cli/node
yarn build:release --target x86_64-unknown-linux-gnu
pnpm build:release --target x86_64-unknown-linux-gnu
strip *.node
- host: ubuntu-20.04
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd tooling/cli/node
yarn build:release
pnpm build:release
strip *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
yarn build:release --features native-tls-vendored --target=aarch64-apple-darwin
pnpm build:release --features native-tls-vendored --target=aarch64-apple-darwin
strip -x *.node
- host: ubuntu-20.04
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
cd tooling/cli/node
yarn build:release --target aarch64-unknown-linux-gnu
pnpm build:release --target aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu-strip *.node
- host: ubuntu-20.04
architecture: x64
@@ -77,7 +77,7 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
build: |
yarn build:release --target=armv7-unknown-linux-gnueabihf
pnpm build:release --target=armv7-unknown-linux-gnueabihf
arm-linux-gnueabihf-strip *.node
- host: ubuntu-20.04
architecture: x64
@@ -86,20 +86,20 @@ jobs:
build: |
cd tooling/cli/node
rustup target add aarch64-unknown-linux-musl
yarn build:release --target aarch64-unknown-linux-musl
pnpm build:release --target aarch64-unknown-linux-musl
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
with:
node-version: 16
check-latest: true
cache: yarn
cache-dependency-path: 'tooling/cli/node/yarn.lock'
cache: 'pnpm'
architecture: ${{ matrix.settings.architecture }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
@@ -116,7 +116,7 @@ jobs:
if: ${{ matrix.settings.setup }}
shell: bash
- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Build in docker
uses: addnab/docker-run-action@v3
@@ -157,7 +157,7 @@ jobs:
# prepare: |
# pkg install -y curl node14 python2
# curl -qL https://www.npmjs.com/install.sh | sh
# npm install -g yarn
# npm install -g pnpm
# curl https://sh.rustup.rs -sSf --output rustup.sh
# sh rustup.sh -y --profile minimal --default-toolchain stable
# export PATH="/usr/local/cargo/bin:$PATH"
@@ -165,8 +165,8 @@ jobs:
# rustc --version
# echo "~~~~ node -v ~~~~"
# node -v
# echo "~~~~ yarn --version ~~~~"
# yarn --version
# echo "~~~~ pnpm --version ~~~~"
# pnpm --version
# run: |
# export PATH="/usr/local/cargo/bin:$PATH"
# pwd
@@ -175,8 +175,8 @@ jobs:
# env
# freebsd-version
# cd ./tooling/cli/node/
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
# yarn build:release
# pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
# pnpm build:release
# strip -x *.node
# rm -rf node_modules
# rm -rf ../target
@@ -205,15 +205,15 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn
cache-dependency-path: 'tooling/cli/node/yarn.lock'
cache: 'pnpm'
- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download artifacts
uses: actions/download-artifact@v3
with:
@@ -223,7 +223,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: yarn test
run: pnpm test
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
needs:
@@ -238,15 +238,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn
cache-dependency-path: 'tooling/cli/node/yarn.lock'
cache: 'pnpm'
- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download artifacts
uses: actions/download-artifact@v3
with:
@@ -260,7 +260,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- name: Test bindings
run: yarn test
run: pnpm test
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
@@ -277,15 +277,15 @@ jobs:
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn
cache-dependency-path: 'tooling/cli/node/yarn.lock'
cache: 'pnpm'
- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download artifacts
uses: actions/download-artifact@v3
with:
@@ -296,13 +296,13 @@ jobs:
shell: bash
- name: Setup and run tests
run: |
yarn tauri --help
pnpm tauri --help
ls -la
#- name: Setup and run tests
# run: |
# rustup install stable
# rustup default stable
# yarn test
# pnpm test
# ls -la
test-linux-arm-bindings:
name: Test bindings on ${{ matrix.image }} - node@${{ matrix.node }}
@@ -327,7 +327,7 @@ jobs:
run: ls -R .
shell: bash
- name: Install dependencies
run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
run: pnpm i --frozen-lockfile --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
- name: Download aarch64-gnu artifacts
uses: actions/download-artifact@v3
with:
@@ -356,7 +356,7 @@ jobs:
fnm install ${{ matrix.node }}
fnm use ${{ matrix.node }}
cd tooling/cli/node
yarn tauri --help
pnpm tauri --help
ls -la
publish:
name: Publish
@@ -369,21 +369,21 @@ jobs:
#- test-linux-arm-bindings
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
cache: yarn
cache-dependency-path: 'tooling/cli/node/yarn.lock'
cache: 'pnpm'
- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
run: pnpm i --frozen-lockfile --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: tooling/cli/node/artifacts
- name: Move artifacts
run: yarn artifacts
run: pnpm artifacts
- name: List packages
run: ls -R ./npm
shell: bash
@@ -395,3 +395,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}
NPM_CONFIG_PROVENANCE: true

View File

@@ -37,9 +37,9 @@ jobs:
- name: Ensure that the tool cache is populated with the cargo-vet binary
run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
# Enable this again to break the workflow once we have a reasonable amount of suggestions to get to a clean base line
# - name: Invoke cargo-vet
# run: cargo vet --locked
# Enable this again to break the workflow once we have a reasonable amount of suggestions to get to a clean base line
# - name: Invoke cargo-vet
# run: cargo vet --locked
- name: Provide audit suggestions
run: cargo vet suggest

View File

@@ -42,20 +42,18 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1
- run: corepack enable
- name: setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: |
tooling/api/yarn.lock
examples/api/yarn.lock
cache: 'pnpm'
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
cache: 'gradle'
- name: Setup NDK
uses: nttld/setup-ndk@v1
@@ -95,11 +93,11 @@ jobs:
- name: build Tauri API
working-directory: ./tooling/api
run: yarn && yarn build
run: pnpm i --frozen-lockfile && pnpm build
- name: install API example dependencies
working-directory: ./examples/api
run: yarn
run: pnpm i --frozen-lockfile
- name: init Android Studio project
working-directory: ./examples/api

View File

@@ -38,12 +38,12 @@ jobs:
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- run: corepack enable
- name: setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: tooling/cli/node/yarn.lock
cache: 'pnpm'
- name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
@@ -61,6 +61,6 @@ jobs:
timeout-minutes: 30
run: |
cd ./tooling/cli/node
yarn
yarn build
yarn test
pnpm i --frozen-lockfile
pnpm build
pnpm test

View File

@@ -32,23 +32,14 @@ jobs:
fail-fast: false
matrix:
platform:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest
}
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- {
target: aarch64-pc-windows-msvc,
os: windows-latest,
args: --no-default-features --features native-tls-vendored
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest
}
- {
target: x86_64-apple-darwin,
os: macos-latest
}
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
steps:
- uses: actions/checkout@v4

1
.husky/.gitignore vendored
View File

@@ -1 +0,0 @@
_

View File

@@ -10,8 +10,8 @@ if [ -z "$(git diff --name-only tooling/api)" ]; then
echo "skipping api - no changes detected"
else
cd tooling/api
yarn format
yarn lint:fix
pnpm format
pnpm eslint:fix
cd ../..
fi
@@ -19,6 +19,6 @@ if [ -z "$(git diff --name-only tooling/cli/node)" ]; then
echo "skipping \`@tauri-apps/cli\` - no changes detected"
else
cd tooling/cli/node
yarn format
pnpm format
cd ../../..
fi

View File

@@ -1,17 +1,36 @@
/.github
/.changes
/.husky
/.vscode
/audits
node_modules
target
dist
/core/tauri/scripts/bundle.global.js
/tooling/cli/templates
/tooling/cli/node
/tooling/cli/schema.json
/core/tauri-config-schema/schema.json
/.vscode
# dependcies and artifacts directories
node_modules/
target/
dist/
# lock files
pnpm-lock.yaml
# autogenerated and minimized js file
core/tauri/scripts/bundle.global.js
# this file is an IIFE, shouldn't be formatted
core/tauri/scripts/process-ipc-message-fn.js
# cli templates should be formatted manually
# it also includes invalid json files that
# prettier can't handle
tooling/cli/templates
# autogenerated files
**/autogenerated/**/*.md
tooling/cli/node/index.js
tooling/cli/node/index.d.ts
CHANGELOG.md
*.wxs
**/reference.md
*schema.json
core/tauri/scripts/process-ipc-message-fn.js
# WiX templates
*.wxs
# examples /gen directory
examples/**/src-tauri/gen

View File

@@ -6,7 +6,7 @@
echo "Building API definitions..."
cd tooling\api
yarn; yarn build
pnpm i; pnpm build
cd ..\..
echo "Installing the Tauri Rust CLI..."
@@ -23,8 +23,8 @@ $result = $host.ui.PromptForChoice("Node.js CLI", "Do you want to install the No
switch ($result) {
0{
cd tooling\cli\node
yarn; yarn build; yarn link
pnpm i; pnpm build; pnpm link
cd ..\..
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
echo "Tauri Node.js CLI installed. use `pnpm link @tauri-apps/cli` and run it with '$ pnpm tauri [COMMAND]'."
}
}

View File

@@ -6,7 +6,7 @@
echo "Building API definitions..."
cd tooling/api
yarn && yarn build
pnpm i && pnpm build
cd ../..
echo "Building the Tauri Rust CLI..."
@@ -20,9 +20,9 @@ select yn in "Yes" "No"; do
case $yn in
Yes )
cd tooling/cli/node
yarn && yarn build && yarn link
pnpm i && pnpm build && pnpm link
cd ../../..
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
echo "Tauri Node.js CLI installed. use `pnpm link @tauri-apps/cli` and run it with '$ pnpm tauri [COMMAND]'."
break;;
No ) break;;
esac

View File

@@ -128,7 +128,7 @@ Because of the many ways to build front-ends, we will stick with a common node.j
The easiest way to do this is to run the following:
```
npx create-tauri-app
npm create tauri-app
```
Which will ask you a bunch of questions about the framework you want to install and then create everything you need in a single folder - some via the placement of template files and some through normal installation procedures of your framework.
@@ -138,6 +138,8 @@ Which will ask you a bunch of questions about the framework you want to install
Once everything is installed, you can run:
```
pnpm tauri dev
-or-
yarn tauri dev
-or-
npm run tauri dev
@@ -157,7 +159,7 @@ If you modify your rust code or anything in the Cargo.toml, the window will clos
If you need to get deeper insight into your current project, or triage requires investigation of installed components, just run:
```
yarn tauri info
pnpm tauri info
```
## What does the Release flow look like?
@@ -169,7 +171,7 @@ Depending upon the operating system that the developer (or CI) is building the a
To kick off this process, just:
```
yarn tauri build
pnpm tauri build
```
After some time, the process will end and you can see the results in the `./src-tauri/target/release` folder.

545
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -35,7 +35,7 @@ The list of Tauri's features includes, but is not limited to:
- Built-in self updater (desktop only)
- System tray icons
- Native notifications
- Localhost free (🔥)
- [Localhost free (🔥)](https://github.com/tauri-apps/tauri/issues/10510)
- GitHub action for streamlined CI
- VS Code extension
@@ -43,13 +43,13 @@ The list of Tauri's features includes, but is not limited to:
Tauri currently supports development and distribution on the following platforms:
| Platform | Versions |
| :----------------- | :-------------------------------------------------------------------------------------------------------------- |
| Windows | 7 and above |
| macOS | 10.15 and above |
| Linux | webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04). |
| iOS/iPadOS (beta) | 9 and above |
| Android (beta) | 7 and above |
| Platform | Versions |
| :---------------- | :-------------------------------------------------------------------------------------------------------------- |
| Windows | 7 and above |
| macOS | 10.15 and above |
| Linux | webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04). |
| iOS/iPadOS (beta) | 9 and above |
| Android (beta) | 7 and above |
## Contributing

Binary file not shown.

View File

@@ -1,5 +1,30 @@
# Changelog
## \[2.0.0-rc.3]
### New Features
- [`0bb7b0f35`](https://www.github.com/tauri-apps/tauri/commit/0bb7b0f352960fb5111a40157c0953d19e76f1fd) ([#10559](https://www.github.com/tauri-apps/tauri/pull/10559) by [@Norbiros](https://www.github.com/tauri-apps/tauri/../../Norbiros)) Added `InlinedPlugin::default_permission` to autogenerate the default permission of an inlined plugin.
### Dependencies
- Upgraded to `tauri-codegen@2.0.0-rc.3`
- Upgraded to `tauri-utils@2.0.0-rc.3`
## \[2.0.0-rc.2]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.2`
- Upgraded to `tauri-codegen@2.0.0-rc.2`
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.1`
- Upgraded to `tauri-codegen@2.0.0-rc.1`
## \[2.0.0-rc.0]
### Dependencies

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-build"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "build time code to pair with https://crates.io/crates/tauri"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
@@ -28,13 +28,13 @@ rustdoc-args = [ "--cfg", "docsrs" ]
[dependencies]
anyhow = "1"
quote = { version = "1", optional = true }
tauri-codegen = { version = "2.0.0-rc.0", path = "../tauri-codegen", optional = true }
tauri-utils = { version = "2.0.0-rc.0", path = "../tauri-utils", features = [ "build", "resources" ] }
tauri-codegen = { version = "2.0.0-rc.3", path = "../tauri-codegen", optional = true }
tauri-utils = { version = "2.0.0-rc.3", path = "../tauri-utils", features = [ "build", "resources" ] }
cargo_toml = "0.17"
serde = "1"
serde_json = "1"
heck = "0.5"
json-patch = "1.2"
json-patch = "2.0"
walkdir = "2"
tauri-winres = "0.1"
semver = "1"

View File

@@ -42,6 +42,19 @@ const ACL_MANIFESTS_FILE_NAME: &str = "acl-manifests.json";
pub struct InlinedPlugin {
commands: &'static [&'static str],
permissions_path_pattern: Option<&'static str>,
default: Option<DefaultPermissionRule>,
}
/// Variants of a generated default permission that can be used on an [`InlinedPlugin`].
#[derive(Debug)]
pub enum DefaultPermissionRule {
/// Allow all commands from [`InlinedPlugin::commands`].
AllowAllCommands,
/// Allow the given list of permissions.
///
/// Note that the list refers to permissions instead of command names,
/// so for example a command called `execute` would need to be allowed as `allow-execute`.
Allow(Vec<String>),
}
impl InlinedPlugin {
@@ -65,6 +78,14 @@ impl InlinedPlugin {
self.permissions_path_pattern.replace(pattern);
self
}
/// Creates a default permission for the plugin using the given rule.
///
/// Alternatively you can pull a permission in the filesystem in the permissions directory, see [`Self::permissions_path_pattern`].
pub fn default_permission(mut self, default: DefaultPermissionRule) -> Self {
self.default.replace(default);
self
}
}
/// Tauri application permission manifest.
@@ -337,12 +358,35 @@ pub fn inline_plugins(
let mut permission_files = if plugin.commands.is_empty() {
Vec::new()
} else {
tauri_utils::acl::build::autogenerate_command_permissions(
let autogenerated = tauri_utils::acl::build::autogenerate_command_permissions(
&plugin_out_dir,
plugin.commands,
"",
false,
);
let default_permissions = plugin.default.map(|default| match default {
DefaultPermissionRule::AllowAllCommands => autogenerated.allowed,
DefaultPermissionRule::Allow(permissions) => permissions,
});
if let Some(default_permissions) = default_permissions {
let default_permission_toml = format!(
r###"# Automatically generated - DO NOT EDIT!
[default]
permissions = [{default_permissions}]
"###,
default_permissions = default_permissions
.iter()
.map(|p| format!("\"{p}\""))
.collect::<Vec<String>>()
.join(",")
);
let default_permission_toml_path = plugin_out_dir.join("default.toml");
write_if_changed(&default_permission_toml, &default_permission_toml_path);
}
tauri_utils::acl::build::define_permissions(
&plugin_out_dir.join("*").to_string_lossy(),
name,
@@ -384,6 +428,12 @@ pub fn inline_plugins(
Ok(acl_manifests)
}
fn write_if_changed(content: &str, path: &Path) {
if content != read_to_string(path).unwrap_or_default() {
std::fs::write(path, content).unwrap_or_else(|_| panic!("unable to autogenerate {path:?}"));
}
}
pub fn app_manifest_permissions(
out_dir: &Path,
manifest: AppManifest,

View File

@@ -373,6 +373,17 @@ impl Attributes {
self
}
/// Adds the given list of plugins to the list of inlined plugins (a plugin that is part of your application).
///
/// See [`InlinedPlugin`] for more information.
pub fn plugins<I>(mut self, plugins: I) -> Self
where
I: IntoIterator<Item = (&'static str, InlinedPlugin)>,
{
self.inlined_plugins.extend(plugins);
self
}
/// Sets the application manifest for the Access Control List.
///
/// See [`AppManifest`] for more information.
@@ -601,6 +612,13 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
}
}
if target_triple.contains("ios") {
println!(
"cargo:rustc-env=IPHONEOS_DEPLOYMENT_TARGET={}",
config.bundle.ios.minimum_system_version
);
}
if target_triple.contains("windows") {
use semver::Version;
use tauri_winres::{VersionInfo, WindowsResource};

View File

@@ -1,5 +1,24 @@
# Changelog
## \[2.0.0-rc.3]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.3`
- [`0afee5ed8`](https://www.github.com/tauri-apps/tauri/commit/0afee5ed80265c95c4581e173c4886677cfed593) ([#10436](https://www.github.com/tauri-apps/tauri/pull/10436) by [@nyurik](https://www.github.com/tauri-apps/tauri/../../nyurik)) Updated brotli to v6.
## \[2.0.0-rc.2]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.2`
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.1`
## \[2.0.0-rc.0]
### Enhancements

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-codegen"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "code generation meant to be consumed inside of `tauri` through `tauri-build` or `tauri-macros`"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
@@ -20,16 +20,16 @@ quote = "1"
syn = "2"
serde = { version = "1", features = [ "derive" ] }
serde_json = "1"
tauri-utils = { version = "2.0.0-rc.0", path = "../tauri-utils", features = [ "build" ] }
tauri-utils = { version = "2.0.0-rc.3", path = "../tauri-utils", features = [ "build" ] }
thiserror = "1"
walkdir = "2"
brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] }
brotli = { version = "6", optional = true, default-features = false, features = [ "std" ] }
regex = { version = "1", optional = true }
uuid = { version = "1", features = [ "v4" ] }
semver = "1"
ico = "0.3"
png = "0.17"
json-patch = "1.2"
json-patch = "2.0"
url = "2"
[target."cfg(target_os = \"macos\")".dependencies]

View File

@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Config",
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n ```json title=\"Example tauri.config.json file\"\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"../dist\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
"description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"../dist\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```",
"type": "object",
"properties": {
"$schema": {
@@ -74,7 +74,9 @@
"minSdkVersion": 24
},
"createUpdaterArtifacts": false,
"iOS": {},
"iOS": {
"minimumSystemVersion": "13.0"
},
"icon": [],
"linux": {
"appimage": {
@@ -425,7 +427,7 @@
]
},
"shadow": {
"description": "Whether or not the window has shadow.\n\n ## Platform-specific\n\n - **Windows:**\n - `false` has no effect on decorated window, shadow are always ON.\n - `true` will make ndecorated window have a 1px white border,\n and on Windows 11, it will have a rounded corners.\n - **Linux:** Unsupported.",
"description": "Whether or not the window has shadow.\n\n ## Platform-specific\n\n - **Windows:**\n - `false` has no effect on decorated window, shadow are always ON.\n - `true` will make undecorated window have a 1px white border,\n and on Windows 11, it will have a rounded corners.\n - **Linux:** Unsupported.",
"default": true,
"type": "boolean"
},
@@ -1712,7 +1714,9 @@
},
"iOS": {
"description": "iOS configuration.",
"default": {},
"default": {
"minimumSystemVersion": "13.0"
},
"allOf": [
{
"$ref": "#/definitions/IosConfig"
@@ -2896,6 +2900,13 @@
"description": "General configuration for the iOS target.",
"type": "object",
"properties": {
"template": {
"description": "A custom [XcodeGen] project.yml template to use.\n\n [XcodeGen]: <https://github.com/yonaskolb/XcodeGen>",
"type": [
"string",
"null"
]
},
"frameworks": {
"description": "A list of strings indicating any iOS frameworks that need to be bundled with the application.\n\n Note that you need to recreate the iOS project for the changes to be applied.",
"type": [
@@ -2912,6 +2923,11 @@
"string",
"null"
]
},
"minimumSystemVersion": {
"description": "A version string indicating the minimum iOS version that the bundled application supports. Defaults to `13.0`.\n\n Maps to the IPHONEOS_DEPLOYMENT_TARGET value.",
"default": "13.0",
"type": "string"
}
},
"additionalProperties": false

View File

@@ -1,5 +1,26 @@
# Changelog
## \[2.0.0-rc.3]
### Dependencies
- Upgraded to `tauri-codegen@2.0.0-rc.3`
- Upgraded to `tauri-utils@2.0.0-rc.3`
## \[2.0.0-rc.2]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.2`
- Upgraded to `tauri-codegen@2.0.0-rc.2`
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.1`
- Upgraded to `tauri-codegen@2.0.0-rc.1`
## \[2.0.0-rc.0]
### Dependencies

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-macros"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "Macros for the tauri crate."
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
@@ -20,8 +20,8 @@ proc-macro2 = { version = "1", features = [ "span-locations" ] }
quote = "1"
syn = { version = "2", features = [ "full" ] }
heck = "0.5"
tauri-codegen = { version = "2.0.0-rc.0", default-features = false, path = "../tauri-codegen" }
tauri-utils = { version = "2.0.0-rc.0", path = "../tauri-utils" }
tauri-codegen = { version = "2.0.0-rc.3", default-features = false, path = "../tauri-codegen" }
tauri-utils = { version = "2.0.0-rc.3", path = "../tauri-utils" }
[features]
custom-protocol = [ ]

View File

@@ -76,6 +76,7 @@ pub fn entry_point(_attributes: TokenStream, item: TokenStream) -> TokenStream {
stop_unwind(#function_name);
}
// be careful when renaming this, the `start_app` symbol is checked by the CLI
#[cfg(not(target_os = "android"))]
#[no_mangle]
#[inline(never)]

View File

@@ -1,5 +1,23 @@
# Changelog
## \[2.0.0-rc.3]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.3`
## \[2.0.0-rc.2]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.2`
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.1`
## \[2.0.0-rc.0]
### Dependencies

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "Build script and runtime Tauri plugin definitions"
authors = { workspace = true }
homepage = { workspace = true }
@@ -30,7 +30,7 @@ runtime = [ ]
[dependencies]
anyhow = { version = "1", optional = true }
serde = { version = "1", optional = true }
tauri-utils = { version = "2.0.0-rc.0", default-features = false, features = [ "build" ], path = "../tauri-utils" }
tauri-utils = { version = "2.0.0-rc.3", default-features = false, features = [ "build" ], path = "../tauri-utils" }
serde_json = { version = "1", optional = true }
glob = { version = "0.3", optional = true }
toml = { version = "0.8", optional = true }

View File

@@ -1,5 +1,27 @@
# Changelog
## \[2.0.0-rc.3]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.3`
- Upgraded to `tauri-runtime@2.0.0-rc.3`
- [`d39c392b7`](https://www.github.com/tauri-apps/tauri/commit/d39c392b7cec746da423211f9c74632abe4b6af5) ([#10655](https://www.github.com/tauri-apps/tauri/pull/10655) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Update `tao` to 0.29 and `wry` to 0.42.
## \[2.0.0-rc.2]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.2`
- Upgraded to `tauri-runtime@2.0.0-rc.2`
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.1`
- Upgraded to `tauri-runtime@2.0.0-rc.1`
## \[2.0.0-rc.0]
### Dependencies

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-runtime-wry"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "Wry bindings to the Tauri runtime"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
@@ -12,11 +12,15 @@ license = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
[package.metadata.docs.rs]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]
[dependencies]
wry = { version = "0.41", default-features = false, features = [ "drag-drop", "protocol", "os-webview" ] }
tao = { version = "0.28.1", default-features = false, features = [ "rwh_06" ] }
tauri-runtime = { version = "2.0.0-rc.0", path = "../tauri-runtime" }
tauri-utils = { version = "2.0.0-rc.0", path = "../tauri-utils" }
wry = { version = "0.42", default-features = false, features = [ "drag-drop", "protocol", "os-webview" ] }
tao = { version = "0.29", default-features = false, features = [ "rwh_06" ] }
tauri-runtime = { version = "2.0.0-rc.3", path = "../tauri-runtime" }
tauri-utils = { version = "2.0.0-rc.3", path = "../tauri-utils" }
raw-window-handle = "0.6"
http = "1.1"
url = "2"
@@ -24,11 +28,11 @@ tracing = { version = "0.1", optional = true }
log = "0.4"
[target."cfg(windows)".dependencies]
webview2-com = "0.31"
webview2-com = "0.33"
softbuffer = { version = "0.4", default-features = false }
[target."cfg(windows)".dependencies.windows]
version = "0.57"
version = "0.58"
features = [ "Win32_Foundation", "Win32_Graphics_Dwm" ]
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
@@ -37,7 +41,7 @@ webkit2gtk = { version = "=2.0", features = [ "v2_38" ] }
percent-encoding = "2.1"
[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies]
cocoa = "0.25"
cocoa = "0.26"
[target."cfg(target_os = \"android\")".dependencies]
jni = "0.21"

View File

@@ -46,8 +46,8 @@ use wry::WebViewBuilderExtWindows;
use tao::{
dpi::{
LogicalPosition as TaoLogicalPosition, LogicalSize as TaoLogicalSize,
LogicalUnit as ToaLogicalUnit, PhysicalPosition as TaoPhysicalPosition,
PhysicalSize as TaoPhysicalSize, Position as TaoPosition, Size as TaoSize,
PhysicalPosition as TaoPhysicalPosition, PhysicalSize as TaoPhysicalSize,
Position as TaoPosition, Size as TaoSize,
},
event::{Event, StartCause, WindowEvent as TaoWindowEvent},
event_loop::{
@@ -793,16 +793,16 @@ impl WindowBuilder for WindowBuilderWrapper {
let mut constraints = WindowSizeConstraints::default();
if let Some(min_width) = config.min_width {
constraints.min_width = Some(ToaLogicalUnit::new(min_width).into());
constraints.min_width = Some(tao::dpi::LogicalUnit::new(min_width).into());
}
if let Some(min_height) = config.min_height {
constraints.min_height = Some(ToaLogicalUnit::new(min_height).into());
constraints.min_height = Some(tao::dpi::LogicalUnit::new(min_height).into());
}
if let Some(max_width) = config.max_width {
constraints.max_width = Some(ToaLogicalUnit::new(max_width).into());
constraints.max_width = Some(tao::dpi::LogicalUnit::new(max_width).into());
}
if let Some(max_height) = config.max_height {
constraints.max_height = Some(ToaLogicalUnit::new(max_height).into());
constraints.max_height = Some(tao::dpi::LogicalUnit::new(max_height).into());
}
window = window.inner_size_constraints(constraints);
@@ -957,13 +957,13 @@ impl WindowBuilder for WindowBuilderWrapper {
#[cfg(windows)]
fn owner(mut self, owner: HWND) -> Self {
self.inner = self.inner.with_owner_window(owner.0);
self.inner = self.inner.with_owner_window(owner.0 as _);
self
}
#[cfg(windows)]
fn parent(mut self, parent: HWND) -> Self {
self.inner = self.inner.with_parent_window(parent.0);
self.inner = self.inner.with_parent_window(parent.0 as _);
self
}
@@ -2805,7 +2805,7 @@ fn handle_user_message<T: UserEvent>(
let mut rect = RECT::default();
let result = unsafe {
DwmGetWindowAttribute(
HWND(window.hwnd()),
HWND(window.hwnd() as _),
DWMWA_EXTENDED_FRAME_BOUNDS,
&mut rect as *mut _ as *mut _,
std::mem::size_of::<RECT>() as u32,
@@ -4289,7 +4289,8 @@ fn calculate_window_center_position(
cbSize: std::mem::size_of::<MONITORINFO>() as u32,
..Default::default()
};
let status = unsafe { GetMonitorInfoW(HMONITOR(target_monitor.hmonitor()), &mut monitor_info) };
let status =
unsafe { GetMonitorInfoW(HMONITOR(target_monitor.hmonitor() as _), &mut monitor_info) };
if status.into() {
let available_width = monitor_info.rcWork.right - monitor_info.rcWork.left;
let available_height = monitor_info.rcWork.bottom - monitor_info.rcWork.top;

View File

@@ -106,10 +106,10 @@ mod windows {
const WINDOW_NAME: PCWSTR = w!("TAURI_DRAG_RESIZE_WINDOW");
pub fn attach_resize_handler(hwnd: isize) {
let parent = HWND(hwnd);
let parent = HWND(hwnd as _);
let child = unsafe { FindWindowExW(parent, HWND::default(), CLASS_NAME, WINDOW_NAME) };
if child != HWND::default() {
// return early if we already attached
if unsafe { FindWindowExW(parent, HWND::default(), CLASS_NAME, WINDOW_NAME) }.is_ok() {
return;
}
@@ -135,7 +135,7 @@ mod windows {
let width = rect.right - rect.left;
let height = rect.bottom - rect.top;
let drag_window = unsafe {
let Ok(drag_window) = (unsafe {
CreateWindowExW(
WINDOW_EX_STYLE::default(),
CLASS_NAME,
@@ -150,6 +150,8 @@ mod windows {
GetModuleHandleW(PCWSTR::null()).unwrap_or_default(),
None,
)
}) else {
return;
};
unsafe {
@@ -227,7 +229,9 @@ mod windows {
) -> LRESULT {
match msg {
WM_NCHITTEST => {
let parent = GetParent(child);
let Ok(parent) = GetParent(child) else {
return DefWindowProcW(child, msg, wparam, lparam);
};
let style = GetWindowLongPtrW(parent, GWL_STYLE);
let style = WINDOW_STYLE(style as u32);
@@ -262,7 +266,9 @@ mod windows {
}
WM_NCLBUTTONDOWN => {
let parent = GetParent(child);
let Ok(parent) = GetParent(child) else {
return DefWindowProcW(child, msg, wparam, lparam);
};
let style = GetWindowLongPtrW(parent, GWL_STYLE);
let style = WINDOW_STYLE(style as u32);
@@ -317,12 +323,12 @@ mod windows {
}
pub fn detach_resize_handler(hwnd: isize) {
let hwnd = HWND(hwnd);
let hwnd = HWND(hwnd as _);
let child = unsafe { FindWindowExW(hwnd, HWND::default(), CLASS_NAME, WINDOW_NAME) };
if child == HWND::default() {
let Ok(child) = (unsafe { FindWindowExW(hwnd, HWND::default(), CLASS_NAME, WINDOW_NAME) })
else {
return;
}
};
let _ = unsafe { DestroyWindow(child) };
}

View File

@@ -1,5 +1,24 @@
# Changelog
## \[2.0.0-rc.3]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.3`
- [`d39c392b7`](https://www.github.com/tauri-apps/tauri/commit/d39c392b7cec746da423211f9c74632abe4b6af5) ([#10655](https://www.github.com/tauri-apps/tauri/pull/10655) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Update `tao` to 0.29 and `wry` to 0.42.
## \[2.0.0-rc.2]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.2`
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `tauri-utils@2.0.0-rc.1`
## \[2.0.0-rc.0]
### Dependencies

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-runtime"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "Runtime for Tauri applications"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
@@ -29,14 +29,14 @@ targets = [
serde = { version = "1.0", features = [ "derive" ] }
serde_json = "1.0"
thiserror = "1.0"
tauri-utils = { version = "2.0.0-rc.0", path = "../tauri-utils" }
tauri-utils = { version = "2.0.0-rc.3", path = "../tauri-utils" }
http = "1.1"
raw-window-handle = "0.6"
url = { version = "2" }
dpi = { version = "0.1", features = [ "serde" ] }
[target."cfg(windows)".dependencies.windows]
version = "0.57"
version = "0.58"
features = [ "Win32_Foundation" ]
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]

View File

@@ -360,7 +360,7 @@ pub trait WindowBuilder: WindowBuilderBase {
///
/// - **Windows:**
/// - `false` has no effect on decorated window, shadows are always ON.
/// - `true` will make ndecorated window have a 1px white border,
/// - `true` will make undecorated window have a 1px white border,
/// and on Windows 11, it will have a rounded corners.
/// - **Linux:** Unsupported.
#[must_use]

View File

@@ -1,5 +1,37 @@
# Changelog
## \[2.0.0-rc.3]
### Enhancements
- [`0bb7b0f35`](https://www.github.com/tauri-apps/tauri/commit/0bb7b0f352960fb5111a40157c0953d19e76f1fd) ([#10559](https://www.github.com/tauri-apps/tauri/pull/10559) by [@Norbiros](https://www.github.com/tauri-apps/tauri/../../Norbiros)) Return autogenerated permissions from `autogenerate_command_permissions`.
### Bug Fixes
- [`9e891933d`](https://www.github.com/tauri-apps/tauri/commit/9e891933d8ac7a67e37770a149d0a5dd385ee625) ([#10293](https://www.github.com/tauri-apps/tauri/pull/10293) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix `ResourcePaths` iterator returning an unexpected result for mapped resources, for example `"../resources/user.json": "resources/user.json"` generates this resource `resources/user.json/user.json` where it should generate just `resources/user.json`.
- [`9fe846615`](https://www.github.com/tauri-apps/tauri/commit/9fe846615b7c4f310f07897ded881c239e3df30a) ([#10547](https://www.github.com/tauri-apps/tauri/pull/10547) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix plugin permissions documentation heading for permissions table.
### Dependencies
- [`0afee5ed8`](https://www.github.com/tauri-apps/tauri/commit/0afee5ed80265c95c4581e173c4886677cfed593) ([#10436](https://www.github.com/tauri-apps/tauri/pull/10436) by [@nyurik](https://www.github.com/tauri-apps/tauri/../../nyurik)) Updated brotli to v6.
## \[2.0.0-rc.2]
### Bug Fixes
- [`f5dfc0280`](https://www.github.com/tauri-apps/tauri/commit/f5dfc02800dbd3bdee671b032454c49ac7102fb4) ([#10533](https://www.github.com/tauri-apps/tauri/pull/10533) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) Fixed an issue causing `tauri ios init` to fail if `iOS.minimumSystemVersion` was not configured explicitly.
## \[2.0.0-rc.1]
### New Features
- [`8dc81b6cc`](https://www.github.com/tauri-apps/tauri/commit/8dc81b6cc2b8235b11f74a971d6aa3a5df5e9f68) ([#10496](https://www.github.com/tauri-apps/tauri/pull/10496) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Added `bundle > ios > template` configuration option for custom Xcode project YML Handlebars template using XcodeGen.
- [`02c00abc6`](https://www.github.com/tauri-apps/tauri/commit/02c00abc63cf86e9bf9179cbb143d5145a9397b6) ([#10495](https://www.github.com/tauri-apps/tauri/pull/10495) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Added `bundle > ios > minimumSystemVersion` configuration option.
### Bug Fixes
- [`7e810cb2a`](https://www.github.com/tauri-apps/tauri/commit/7e810cb2a3fd934017ae973e737864dfa4bdf64e) ([#10485](https://www.github.com/tauri-apps/tauri/pull/10485) by [@anatawa12](https://www.github.com/tauri-apps/tauri/../../anatawa12)) Fixed an issue where permission files will be generated with ':' in the file path.
## \[2.0.0-rc.0]
### New Features

View File

@@ -1,6 +1,6 @@
[package]
name = "tauri-utils"
version = "2.0.0-rc.0"
version = "2.0.0-rc.3"
description = "Utilities for Tauri"
exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
@@ -17,7 +17,7 @@ serde = { version = "1", features = [ "derive" ] }
serde_json = "1"
thiserror = "1"
phf = { version = "0.11", features = [ "macros" ] }
brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] }
brotli = { version = "6", optional = true, default-features = false, features = [ "std" ] }
url = { version = "2", features = [ "serde" ] }
html5ever = "0.26"
kuchiki = { package = "kuchikiki", version = "0.8" }
@@ -31,7 +31,7 @@ serialize-to-javascript = { version = "=0.1.1", optional = true }
ctor = "0.2"
json5 = { version = "0.4", optional = true }
toml = { version = "0.8", features = [ "parse" ] }
json-patch = "1.2"
json-patch = "2.0"
glob = "0.3"
urlpattern = "0.2"
regex = "1"
@@ -47,6 +47,10 @@ serde-untagged = "0.1"
[target."cfg(target_os = \"macos\")".dependencies]
swift-rs = { version = "1.0.6", optional = true, features = [ "build" ] }
[dev-dependencies]
getrandom = { version = "0.2", features = [ "std" ] }
serial_test = "3.1"
[features]
build = [
"proc-macro2",

View File

@@ -71,10 +71,8 @@ pub fn define_permissions<F: Fn(&Path) -> bool>(
.filter(|p| p.parent().unwrap().file_name().unwrap() != PERMISSION_SCHEMAS_FOLDER_NAME)
.collect::<Vec<PathBuf>>();
let permission_files_path = out_dir.join(format!(
"{}-permission-files",
pkg_name.replace("tauri:", "tauri-")
));
let permission_files_path =
out_dir.join(format!("{}-permission-files", pkg_name.replace(':', "-")));
std::fs::write(
&permission_files_path,
serde_json::to_string(&permission_files)?,
@@ -244,7 +242,7 @@ pub fn generate_docs(
) -> Result<(), Error> {
let mut permission_table = "".to_string();
let permission_table_header =
"### Permission Table \n\n<table>\n<tr>\n<th>Identifier</th>\n<th>Description</th>\n</tr>\n"
"## Permission Table \n\n<table>\n<tr>\n<th>Identifier</th>\n<th>Description</th>\n</tr>\n"
.to_string();
let mut default_permission = "## Default Permission\n\n".to_string();
@@ -390,13 +388,21 @@ fn parse_permissions(paths: Vec<PathBuf>) -> Result<Vec<PermissionFile>, Error>
Ok(permissions)
}
/// Permissions that are generated from commands using [`autogenerate_command_permissions`].
pub struct AutogeneratedPermissions {
/// The allow permissions generated from commands.
pub allowed: Vec<String>,
/// The deny permissions generated from commands.
pub denied: Vec<String>,
}
/// Autogenerate permission files for a list of commands.
pub fn autogenerate_command_permissions(
path: &Path,
commands: &[&str],
license_header: &str,
schema_ref: bool,
) {
) -> AutogeneratedPermissions {
if !path.exists() {
create_dir_all(path).expect("unable to create autogenerated commands dir");
}
@@ -420,8 +426,14 @@ pub fn autogenerate_command_permissions(
"".to_string()
};
let mut autogenerated = AutogeneratedPermissions {
allowed: Vec::new(),
denied: Vec::new(),
};
for command in commands {
let slugified_command = command.replace('_', "-");
let toml = format!(
r###"{license_header}# Automatically generated - DO NOT EDIT!
{schema_entry}
@@ -438,9 +450,21 @@ commands.deny = ["{command}"]
);
let out_path = path.join(format!("{command}.toml"));
if toml != read_to_string(&out_path).unwrap_or_default() {
std::fs::write(out_path, toml)
.unwrap_or_else(|_| panic!("unable to autogenerate ${command}.toml"));
}
write_if_changed(&toml, &out_path);
autogenerated
.allowed
.push(format!("allow-{slugified_command}"));
autogenerated
.denied
.push(format!("deny-{slugified_command}"));
}
autogenerated
}
fn write_if_changed(content: &str, path: &Path) {
if content != read_to_string(path).unwrap_or_default() {
std::fs::write(path, content).unwrap_or_else(|_| panic!("unable to autogenerate {path:?}"));
}
}

View File

@@ -536,13 +536,13 @@ fn dmg_application_folder_position() -> Position {
Position { x: 480, y: 170 }
}
fn de_minimum_system_version<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
fn de_macos_minimum_system_version<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
where
D: Deserializer<'de>,
{
let version = Option::<String>::deserialize(deserializer)?;
match version {
Some(v) if v.is_empty() => Ok(minimum_system_version()),
Some(v) if v.is_empty() => Ok(macos_minimum_system_version()),
e => Ok(e),
}
}
@@ -569,8 +569,8 @@ pub struct MacConfig {
///
/// An empty string is considered an invalid value so the default value is used.
#[serde(
deserialize_with = "de_minimum_system_version",
default = "minimum_system_version",
deserialize_with = "de_macos_minimum_system_version",
default = "macos_minimum_system_version",
alias = "minimum-system-version"
)]
pub minimum_system_version: Option<String>,
@@ -601,7 +601,7 @@ impl Default for MacConfig {
Self {
frameworks: None,
files: HashMap::new(),
minimum_system_version: minimum_system_version(),
minimum_system_version: macos_minimum_system_version(),
exception_domain: None,
signing_identity: None,
hardened_runtime: true,
@@ -612,10 +612,14 @@ impl Default for MacConfig {
}
}
fn minimum_system_version() -> Option<String> {
fn macos_minimum_system_version() -> Option<String> {
Some("10.13".into())
}
fn ios_minimum_system_version() -> String {
"13.0".into()
}
/// Configuration for a target language for the WiX build.
///
/// See more: <https://tauri.app/v1/api/config#wixlanguageconfig>
@@ -1361,7 +1365,7 @@ pub struct WindowConfig {
///
/// - **Windows:**
/// - `false` has no effect on decorated window, shadow are always ON.
/// - `true` will make ndecorated window have a 1px white border,
/// - `true` will make undecorated window have a 1px white border,
/// and on Windows 11, it will have a rounded corners.
/// - **Linux:** Unsupported.
#[serde(default = "default_true")]
@@ -1885,10 +1889,14 @@ pub struct TrayIconConfig {
/// General configuration for the iOS target.
#[skip_serializing_none]
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct IosConfig {
/// A custom [XcodeGen] project.yml template to use.
///
/// [XcodeGen]: <https://github.com/yonaskolb/XcodeGen>
pub template: Option<PathBuf>,
/// A list of strings indicating any iOS frameworks that need to be bundled with the application.
///
/// Note that you need to recreate the iOS project for the changes to be applied.
@@ -1897,6 +1905,25 @@ pub struct IosConfig {
/// The `APPLE_DEVELOPMENT_TEAM` environment variable can be set to overwrite it.
#[serde(alias = "development-team")]
pub development_team: Option<String>,
/// A version string indicating the minimum iOS version that the bundled application supports. Defaults to `13.0`.
///
/// Maps to the IPHONEOS_DEPLOYMENT_TARGET value.
#[serde(
alias = "minimum-system-version",
default = "ios_minimum_system_version"
)]
pub minimum_system_version: String,
}
impl Default for IosConfig {
fn default() -> Self {
Self {
template: None,
frameworks: None,
development_team: None,
minimum_system_version: ios_minimum_system_version(),
}
}
}
/// General configuration for the iOS target.
@@ -2143,7 +2170,9 @@ where
/// - [`bundle`](#bundleconfig): The bundle configurations
/// - [`plugins`](#pluginconfig): The plugins configuration
///
/// ```json title="Example tauri.config.json file"
/// Example tauri.config.json file:
///
/// ```json
/// {
/// "productName": "tauri-app",
/// "version": "0.1.0",

View File

@@ -372,6 +372,10 @@ pub enum Error {
#[cfg(feature = "resources")]
#[error("could not walk directory `{0}`, try changing `allow_walk` to true on the `ResourcePaths` constructor.")]
NotAllowedToWalkDir(std::path::PathBuf),
/// Resourece path doesn't exist
#[cfg(feature = "resources")]
#[error("resource path `{0}` doesn't exist")]
ResourcePathNotFound(std::path::PathBuf),
}
/// Reconstructs a path from its components using the platform separator then converts it to String and removes UNC prefixes on Windows if it exists.

Some files were not shown because too many files have changed in this diff Show More