* 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>
* 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
* 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>
* 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>
* hash codegen image cache output
* remove left over dbg! statement
* prevent info.plist from workspace rebuilds
* prevent schema generation from workspace rebuilds
* use new `Cached` struct in `CachedIcon`
* fmt
* use full import for cached plist
* use `to_vec()` for raw icons
* hide `Invoke` from documentation
* make `Asset` non-exhaustive
* make `InvokeRequest` non-exhaustive
* mark `tauri_utils::platform::Target` non-exhaustive
* mark the runtime crates as unstable API
* Revert "mark the runtime crates as unstable API" [skip ci]
This reverts commit b8377222e3.
* mark the runtime crates as unstable API
* Revert "mark the runtime crates as unstable API" [skip ci]
This reverts commit 9284897644.
* mark the runtime crates as unstable API
* mark tauri_utils::TitleBarStyle as `#[non_exhaustive]`
* mark `InvokeRequest` as non_exhaustive unless `unstable` feature
* mark config and acl items as unstable
* Conf parsing error displays `tauri.conf.json` when using toml or json5
Conf parsing error always displays `tauri.conf.json` as path, even when using `Tauri.toml` or `tauri.conf.json5`
Example Error Message when using Tauri.toml:
Error unable to parse toml Tauri config file at
/Users/bla/repo/bla/bla/src-tauri/tauri.conf.json because
invalid TOML value, did you mean to use a quoted string? at line 41
column 7
* merge changefile pr into main pr
* Update and rename fix-conf-parsing-error-filepath to fix-conf-parsing-error-filepath.md
---------
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
* fix(core): fix raw invoke body for isolation pattern
The `isolation` pattern requests are made using JSON but the payload could be raw bytes, so we send the original `Content-Type` from frontend and make sure to deserialize the payload using that one instead of `Content-Type` from request headers
* clippy
* disable plist embed in generate_context in tests
* change file
* docs [skip ci]
* move unused_variables [skip ci]
* last commit regression [skip ci]
* fix test
* add example, do not text encode raw request
* check type instead of contenttype
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* Add updater field
* Don't sign updaters when updater field is false
* Clippy
* Add updater to bundle migration
* Format
* Add updater config to api example
* No warning if update is not enabled
* Build
* Add change file
* We don't generate updater for dmg package
* Warning only for v1 compatible
* clean up
* More clean up
* little bit more
* Apply suggestions from code review
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
* Revert license header change
* Remove option around pubkey and msi args
* More migration tests
* Refactor private_key getter
* Only generate signature for updater for v1 compat
* Format
* Use map_err instead of anyhow context
* Don't generate updater for api example
* Fix misaligned comment
* Rename `updater` to `createUpdaterArtifacts`
* Revert changes in helloworld example
* Add warning for v1 compatible
* Update .changes/separate-updater-field.md
Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
* update error messages [skip ci]
---------
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
* Add auto generated acl schema files for docs
* update CI
---------
Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
* refactor(cli&bundler): avoid renaming main executable and reserve cargo name
closes#8109closes#8349
* fix bundler
* fix test
* Discard changes to core/tauri-build/Cargo.toml
* revert Cargo.toml changes
* Discard changes to Cargo.lock
* Discard changes to tooling/cli/Cargo.lock
* lock file
* use product name for installers
* only warn for sign on windows
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
* refactor(core)!: include all args in `Env.args_os`, closes#9430
* skip first arg on restart fn
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>