Commit Graph

793 Commits

Author SHA1 Message Date
Lucas Fernandes Nogueira
0ab2b33064
fix: downgrade MSRV to 1.77.2 to support Windows 7 (#11205)
* fix: downgrade MSRV to 1.77.2 to support Windows 7

* add chang file
2024-10-03 08:07:50 -03:00
Lucas Fernandes Nogueira
c7b9a53525
chore: promote to v2 stable (#11198)
* chore: promote to v2 stable

- deletes all RC change files
- adds a new change file to promote all packages to v2 stable
- manually fix the tauri-driver, tauri-macos-sign, tauri-bundler versions so the next covector bump will move them to 2.0.0
- manually patch the metadata-v2.json file so the next covector update will mark all packages as 2.0.0

* ignore audit vuln without fixes

* bump msrv to 1.78

* run covector version

* fix sync lockfile covector

* #[allow(clippy::manual_inspect)]
2024-10-02 09:42:45 -03:00
Amr Bashir
354be36d4e
refactor(core)!: pass webview label to uri scheme protocol handlers (#11163)
* refactor!(core): pass webview label to uri scheme protocol handlers

close #10691

* Add `UriSchemeContext`

* doctests
2024-09-29 07:41:26 -03:00
Amr Bashir
de7414aab9
feat: add Window::set_enabled and Window::is_enabled (#11154)
* feat: add `Window::set_enabled` and `Window::is_enabled`

closes #6660

* license headers

* fix build

* fix mobile and macos

* fix macos

* again

* unsafe

* fix macos is_enabled

* update example

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-09-27 14:35:01 -03:00
Amr Bashir
d9d2502b41
feat: add Webview::show and Webview::hide (#11140)
closes #11126
2024-09-27 08:30:29 +03:00
Amr Bashir
8d381a71e8
test: add tests for StateManager (#11106)
* test: add tests for StateManager

* clippy

* update lockfile

* fix audit

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-09-24 08:51:54 -03:00
Tillmann
e08c4e6888
Change V1 links to V2 site (#11111)
* Change V1 links to V2 site

* update lockfile

---------

Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
2024-09-24 08:09:00 -03:00
Tony
11db7be6c2
feat(core): add a new function to set theme dynamically (#10210)
closes #5279
2024-09-24 05:18:53 +03:00
Alex
28169ae097
fix(cli): Fix crate type (#11080)
* Fix crate type

Fixes https://github.com/tauri-apps/tauri/issues/9547

* Fix crate type

Fixes https://github.com/tauri-apps/tauri/issues/9547

* Fix crate type

Fixes https://github.com/tauri-apps/tauri/issues/9547

* Fix crate type

Fixes https://github.com/tauri-apps/tauri/issues/9547
2024-09-21 07:57:35 -03:00
Amr Bashir
62b52f60a2
fix(cli/add): use >= for npm and ~ for other package managers (#11064)
* fix(cli/add): use `>=` for npm and `~` for other package managers

closes #10906

* headers

* fix audit

* fix headers
2024-09-19 23:11:40 +03:00
Amr Bashir
a1cce04260
feat: add tauri-schema-worker (#10871) 2024-09-17 00:52:56 +03:00
Lucas Fernandes Nogueira
3ad2427dc0
feat(cli): enhance iOS logs (#10961)
enhance simulator and device run output by only displaying app logs by default, and printing full process logs when pedantic verbosity is requested

ref https://github.com/tauri-apps/cargo-mobile2/pull/388
2024-09-15 07:37:56 -03:00
Amr Bashir
63649d82d2
fix(core/acl): fix core:default schema generation (#10971)
* remove dbg! in resources test

* use methods from `fs` and `env` qualified

* share `ACL_MANIFESTS_FILE_NAME` and `CAPABILITIES_FILE_NAME` consts across crates

* simplifiy `Manifest::new` code for better readability

* move reading global api scripts logic next to the function that defines it

* [tauri-build] move acl logic from lib.rs to acl.rs

* use const value for schema instead of enum value with a single variant

* remove unnecessary info from permissions hover

* move related functions next to each other & improve readability of others

* use methods from `fs` and `env` qualified

* fix warning, unused return in test

* document some functions

* improve generated schema for better scope schema completion, simplify, reorganize and document the logic

previously if you had `fs` and `http` plugins added in a project
and then try to write an extended permission for `fs:allow-app-meta`
```json
{
      "identifier": "fs:allow-app-meta",
      "allow": [ <here> ]
}
```
and even though identifier is from `fs` plugin,
the JSON schema suggests `path` and `url`.
Now it will only suggest  relevant field which is `path`

* resolve permissions from other plugins, generate `core:default` as a normal set instead of special logic

* move `PERMISSION_SCHEMAS_FOLDER_NAME` to acl module

* use gneric trait because of MSRV

* ensure `gen/schemas` dir is created

* clippy
2024-09-13 08:58:26 -03:00
Lucas Fernandes Nogueira
27d0183431
fix(core): clippy warnings, simplify embed_plist usage (#10844)
* fix(core): clippy warnings

* fix test

* chore: simplify example
2024-09-03 01:09:27 +03:00
Fabian-Lars
ecc5362c1c
docs: Add scope handling in file association example (#10864) 2024-09-02 17:11:55 +03:00
Amr Bashir
36eee37220
Restructure the repository (#10796)
* Restructure the repository

* lock file

* fmt

* fix bench

* fix cli template test

* remove accidental file

* fix mv command

* clippy

* upgrade paths-filter github action

* fix cli migration tests

* lockfile

* license headers

* clippy

* scope test-core to tauri crate

* license header

* correct --manifest-path usage

* lockfile

* fix tauri-driver on macOS [skip ci]

* build target ios

* try downgrade env_logger

* downgrade 0.1.7

* try to fix bench

* bench overflow

* revert overflow fix, fix tauri_root_path

* revert env_logger downgrade

* fmt

* raise msrv to 1.71

* fmt

* delete .cargo/config.toml [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-27 18:42:30 -03:00
Lucas Fernandes Nogueira
fd68b7fdea
fix(cli): do not generate .cargo/config file (#10785) 2024-08-26 22:15:08 -03:00
Lucas Nogueira
dc0612b156
fix(examples): streaming file path 2024-08-26 21:48:48 -03:00
Amr Bashir
70306dc79b
ci: check toml formatting with taplo-cli (#10787)
* ci: check toml formatting with taplo-cli

* change name of job

* { workspace = true } -> .workspace = true

* add taplo.toml
2024-08-26 21:46:05 -03:00
Amr Bashir
ad83d41cb5
chore: cleanup and simplify examples (#10743) 2024-08-27 01:25:36 +03:00
Lucas Fernandes Nogueira
073bb4f459
refactor(core): remove deprecated webview_fixed_runtime_path option (#10772)
* refactor(core): remove deprecated webview_fixed_runtime_path option

* update migration
2024-08-25 16:35:42 -03:00
Lucas Fernandes Nogueira
793ee05317
fix(core): allow hyphens and underscores on identifiers, closes #9707 (#10700)
* fix(core): allow hyphens and underscores on identifiers, closes #9707

* fix build

* fix build

* lint

* move replace

* update tao

* update tao-macros
2024-08-21 13:46:25 -03:00
Lucas Fernandes Nogueira
da381e07f3
feat(core): resources on mobile apps (#10696)
* feat(core): resources on mobile apps

* resources dir on android
2024-08-20 13:49:17 -03:00
Lucas Fernandes Nogueira
7796a8fc64
fix(cli): adapt Package.swift to work on older Swift versions (#10687)
I noticed the plugin build fails on older Swift (tested on macOS 12) because the default minimum required macOS version (10.10 in my case) is older than `v10_13` which is set by the Tauri iOS package (and also swift-rs).
So the plugins must explicitly define a minimum macOS version too.
2024-08-19 16:29:16 -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
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
d39c392b7c
chore(deps): update tao and wry to latest (#10655) 2024-08-16 20:30:34 -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
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
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
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
786f188923
feat(cli): allow using iOS device tun address for dev server (#10456)
- Changes the IP prompt to also show IPV6 address ending with ::2 (usually device's address)
- Adds --host option on ios dev to force the host
- Also makes it work with our own dev server impl (builtin)
2024-08-02 10:04:08 -03:00
Lucas Fernandes Nogueira
7ba67b4aca
refactor!: use localhost for development on Android devices and emulators or iOS simulators (#10437)
* feat(cli): use localhost on mobile!

* change cargo-mobile2

* use public network address on iOS device :(

* add change file

* actually breaking

* pin cargo-mobile2

* rename env var
2024-08-02 07:35:18 -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
Lucas Fernandes Nogueira
289ae5555d
feat: re-enable TLS checks for Android and dev proxy (#10386)
* feat: re-enable TLS checks for Android and dev proxy

* update time
2024-07-29 10:43:59 -03:00
Amr Bashir
261c9f942d
refactor!(core & api): rename drag events for better consistency and clarity (#10170)
* refacotr!(core & api): rename drag events for better consistency and clarity

* more renames

* remove imports

* fix drag over listen

* update example

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-07-12 10:22:06 -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
Amr Bashir
c01e87ad46
refactor(cli/migrate): use oxc kit to parse and migrate js/ts files (#10198)
* refactor(cli/migrate): use `oxc` kit to parse and migrate js/ts files

closes #10192

* fix tests

* use majic-string to perserve formatting

* more comments

* Discard changes to package.json

* Update cli-migrate-enhancemnets.md

* Update cli-migrate-enhancemnets.md

* more context

* add missing quotes, rename getcurrent

* fix change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-07-12 09:03:30 -03:00
Amr Bashir
ba9590aa92
feat!: add Listener and Emitter traits (#9640)
* feat!: add `Listener` and `Emitter` traits

* keep only trait implementation

* change file

* fix doctests

* fix build
2024-07-12 09:01:40 -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
Amr Bashir
2b1ceb40d3
refactor(api)!: renamed getCurrent functions to avoid ambiguity (#10229)
* refactor(api)!: renamed `getCurrent` functions to avoid ambiguity

closes #10193

* Update .changes/get-current-ambguity.md

* rename `getAll` and update docs and examples
2024-07-11 14:26:15 +03:00
Tony
249cdde9b6
Fix Serialize impl missing TSend (#10252) 2024-07-11 11:11:15 +02:00
Tony
11339418b1
chore(example/api): fix enter doesn't work on input with action button (#10254)
* Fix enter doesn't work on input with action button

* Use form
2024-07-11 11:06:36 +02:00
Lorenzo Rizzotti
b4e16f3d8e
fix(android): fix Android Studio project plugin link (#10235)
* add plugin resolution to gradle settings

This is needed to make Android Studio able to link to the project

* reflect codegen edit in the plugin example
2024-07-10 14:26:06 +03:00
Tony
a4a7233081
chore(example): refactor api example (#10228) 2024-07-09 12:00:06 +03:00
Tony
afb102c59b
fix(runtime-wry): window edge not working after setting resizable false and decorated false dynamically (#10211)
* Fix window edge not working
after setting resziable false and decorated false dynamically

* Fix example don't go crazy on resize

* cargo fmt
2024-07-08 15:24:55 +03:00
Tony
11aa7743e7
enhance!(nsis): use !ifmacrodef for installer hooks (#10177) 2024-07-03 05:48:22 +03:00