Commit Graph

489 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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 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
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
Lucas Fernandes Nogueira
88619e8914
feat: promote v2 to RC (#10434)
* feat: promote v2 to RC

* update changelog
2024-08-02 10:28:06 -03:00
Lucas Fernandes Nogueira
a5bfbaa62b
feat: add iOS frameworks config option, closes #9962 (#10393)
* feat: add iOS frameworks config option, closes #9962

* fix template

* typo
2024-08-02 07:35:03 -03:00
chip
b32295de18
prevent unnecessary rebuilds when working in the cargo workspace (#10442)
* 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
2024-08-02 07:30:02 -03:00
chip
eaec5fe9c1
Limit pub exposure in 2.x (#10158)
* 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
2024-07-31 10:54:43 -03:00
chip
426d14bb41
check the main frame's origin in isolation.js (#10423)
* check the main frame's origin in isolation.js

* add changefile

* correct changefile tag

* use strict origin checking
2024-07-30 16:32:32 -03:00
martin frances
87029310b8
Minor: 'cargo doc' reports links need to be wrapped in angle brackets. (#10320) 2024-07-30 07:54:08 -03:00
Lucas Fernandes Nogueira
758d28c8a2
refactor: core plugin permissions are now prefixed core:, closes #10359 (#10390)
* refactor: core plugin permissions are now prefixed core:, closes #10359

* code review

* expand reserved plugin names

* fix

* add core:default permission set

* fix permission usage

---------

Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com>
2024-07-30 07:52:43 -03:00
Vladimir Stoilov
7aeac39e7f
feat(core): make setting of gtk app id optional (#10397)
* feat(core): make setting of gtk app id optional

* Fix change file

* Update .changes/linux-option-gtk-app-id.md

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

* [skip ci] Update linux-option-gtk-app-id.md

* Update app.rs

* Update app.rs

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-07-29 15:26:13 +02:00
Ernest M. van der Linden
498f405ca8
fix(core): Conf parsing error always displays tauri.conf.json file name even when using toml or json5 (#10404)
* 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>
2024-07-29 14:54:21 +02:00
Lucas Fernandes Nogueira
efdce038bb
fix(core): apply clippy suggestions (#10394)
* fix(core): apply clippy suggestions

* more fixes
2024-07-29 10:53:53 +02:00
Fabian-Lars
7acac58d23
docs(core): Fix syntax in tauri.conf.json example (#10299) 2024-07-17 04:27:20 +03:00
github-actions[bot]
6d965e9fbf
apply version updates (#10179)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-07-12 16:37:38 -03:00
Amr Bashir
4c239729c3
fix(core): fix raw invoke body for isolation pattern (#10167)
* 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>
2024-07-12 09:52:53 -03:00
Hamir Mahal
1a88fc1a9b
style: simplify string formatting (#10259)
* style: simplfiy string formatting

* fix: file formatting in `core/`
2024-07-12 13:33:14 +03:00
Tony
11aa7743e7
enhance!(nsis): use !ifmacrodef for installer hooks (#10177) 2024-07-03 05:48:22 +03:00
github-actions[bot]
ff79161b0d
apply version updates (#10166)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-07-01 23:30:21 -03:00
Lucas Nogueira
f5b121be6e
Revert "apply version updates (#9926)"
This reverts commit 1cc9aa4b66.
2024-07-01 23:14:57 -03:00
github-actions[bot]
1cc9aa4b66
apply version updates (#9926)
Co-authored-by: FabianLars <FabianLars@users.noreply.github.com>
2024-07-01 22:40:01 -03:00
Tony
911242f092
feat!(core): add bundle createUpdaterArtifacts configuration (#9883)
* 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>
2024-07-01 08:34:58 -03:00
Simon Richard
167b51a8de
feat: improve deserialization errors by using serde-untagged on enums (#9952)
* Use serde-untagged instead of derive trait for capabilities structs

* Update core/tauri-utils/Cargo.toml

* improve errors for other untagged enums

* clippy

* add tests, fix deserialization

* use schemars attribute instead

---------

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-06-26 17:54:49 -03:00
Tony
878198777e
feat(schema): make acl permissions schema unique (#9999)
* Make acl permissions schema unique

* Add change file

* use a hashset

* fix cli

* Revert "use a hashset"

This reverts commit 778d316f34.

* Revert "fix cli"

This reverts commit cfc0e39182.

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-06-26 17:13:55 -03:00
Tony
f21029b1bc
feat!(nsis): add an option to customize start menu folder (#9994) 2024-06-26 09:17:02 +03:00
Tillmann
bb50315c50
refactor: Improve Automated Permission Documentation Generation (#10113)
* generate permission table with html

* cargo fmt

* clippy fix

* clippy fix

---------

Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
2024-06-26 07:59:47 +03:00
Tillmann
b2ff840e83
Feat: Improved Security Docstrings and Schema Newline Handling (#10028)
* Refactor Code Docs

* updated schemas

* cargo fmt whitespace fix

* downgrade cargo-platform to 0.1.7

---------

Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
2024-06-13 18:31:12 +03:00
Tony
5b769948a8
feat(core): add include_image macro (#9959) 2024-06-06 06:03:11 +03:00
Tony
3ab170917e
feat(nsis): add an option to disable compression (#9932) 2024-06-05 19:07:49 +03:00
thewh1teagle
656a649744
feat(cli): add macos hardened runtime signing config option (#9318)
* feat(cli): add macos signing config option

* rename option to hardened_runtime

* chore(cli): use default true in hardened runtime config

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-06-05 18:04:08 +02:00
Amr Bashir
fafc238f72
feat: add bundle > homepage option (#9977)
* feat: add `bundle > homepage` option

If unspecified, it will fallback to `homepage` define in Cargo.toml

closes #9949

* Update settings.rs
2024-06-05 19:01:48 +03:00
Simon Hyll
5e8aa6f946
fix: workaround for broken example (#9906)
`schemars` improperly parses the docstring, causing a missing newline before the codeblock closing tics.
2024-05-30 00:16:29 +09:00
Tillmann
4942d809ab
feat: Auto Generation of ACL Schema File for Documentation (#9903)
* 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>
2024-05-29 09:32:58 -03:00
github-actions[bot]
594e3e2939
Apply Version Updates From Current Changes (#9869)
* apply version updates

* fix bundler version

* update lockfile

---------

Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-05-29 00:10:20 -03:00
Amr Bashir
265c23886e
refactor(cli&bundler): avoid renaming main executable and preserve cargo name (#9375)
* refactor(cli&bundler): avoid renaming main executable and reserve cargo name

closes #8109
closes #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>
2024-05-28 13:50:41 -03:00
Amr Bashir
e8f6eb59a5
refactor(core)!: include all args in Env.args_os, closes #9430 (#9552)
* 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>
2024-05-28 13:49:44 -03:00
Amr Bashir
5462e5cadc
feat(nsis): support installer hooks (#9731)
* feat(nsis): support installer hooks

closes #9668

* update change files

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-05-25 10:23:08 -03:00
Mariotaku
fd2d7cf8b3
feat(android): aware of version info from tauri config (#9856)
* feat(android): versionName and versionCode support

* formatted code and updated schema

* fix config, cleanup generation

* update docs

* mention default version for android

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-05-24 10:56:21 -03:00