Merge branch 'dev' into next

This commit is contained in:
Lucas Nogueira 2022-11-09 11:00:54 -03:00
commit 602d3ed3f6
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1
181 changed files with 8212 additions and 3312 deletions

View File

@ -1,5 +0,0 @@
---
"api": minor
---
Added the `acceptFirstMouse` window option.

View File

@ -1,6 +0,0 @@
---
"tauri": minor
"tauri-runtime-wry": minor
---
Add `accept_first_mouse` option for macOS windows.

View File

@ -1,5 +0,0 @@
---
"api": patch
---
Fix incorrect return type on `fs/exists`

View File

@ -1,5 +0,0 @@
---
"api": "patch"
---
Initialize `Monitor` instances with the correct classes for `position` and `size` fields instead of plain object.

View File

@ -1,5 +0,0 @@
---
"api": minor
---
**Breaking change:** Node.js v12 is no longer supported.

View File

@ -1,6 +0,0 @@
---
"tauri": minor
"api": minor
---
Add new app-specific `BaseDirectory` enum variants `AppConfig`, `AppData`, `AppLocalData`, `AppCache` and `AppLog` along with equivalent functions in `path` module and deprecated ambiguous variants `Log` and `App` along with their equivalent functions in `path` module.

View File

@ -1,5 +0,0 @@
---
"tauri": "patch"
---
Set the correct mimetype when streaming files through `asset:` protocol

View File

@ -1,6 +0,0 @@
---
"tauri": minor
"tauri-runtime-wry": minor
---
Disable automatic window tabbing on macOS when the `tabbing_identifier` option is not defined, the window is transparent or does not have decorations.

View File

@ -1,5 +0,0 @@
---
"tauri-bundler": "patch"
---
Use correct code `ja-JP` for japanese instead of `jp-JP`.

View File

@ -1,5 +0,0 @@
---
"cli.rs": "patch"
---
Keep `tauri dev` watcher alive when the configuration is invalid.

View File

@ -1,5 +0,0 @@
---
"cli.rs": patch
---
Ignore workspace members in dev watcher if they are ignored by `.taurignore`

View File

@ -1,6 +0,0 @@
---
"cli.rs": patch
"cli.js": patch
---
Detect JSON5 and TOML configuration files in the dev watcher.

View File

@ -1,5 +0,0 @@
---
"cli.rs": "patch"
---
Fix cli passing `--no-default-features` to the app instead of the runner (Cargo).

View File

@ -1,7 +0,0 @@
---
"cli.rs": "patch"
"tauri-utils": "patch"
---
Validate `pacakge > productName` in the tauri config and produce errors if it contains one of the following characters `/\:*?\"<>|`

View File

@ -1,5 +0,0 @@
---
"cli.rs": "minor"
---
Hot-reload the frontend when `tauri.conf.json > build > devPath` points to a directory.

View File

@ -1,5 +0,0 @@
---
"cli.rs": "patch"
---
Expose `TAURI_TARGET_TRIPLE` to `beforeDevCommand`, `beforeBuildCommand` and `beforeBundleCommand`

View File

@ -1,6 +0,0 @@
---
"cli.rs": patch
"cli.js": patch
---
Log dev watcher file change detection.

View File

@ -1,5 +0,0 @@
---
"cli.js": patch
---
Fix crash when nodejs binary has the version in its name, for example `node18` or when running through deno.

View File

@ -207,7 +207,10 @@
"path": "./core/tauri-build",
"manager": "rust",
"dependencies": ["tauri-codegen", "tauri-utils"],
"postversion": "node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"postversion": [
"node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../config-schema/Cargo.toml"
],
"assets": [
{
"path": "./tooling/cli/schema.json",
@ -232,7 +235,7 @@
"dependencies": ["cli.rs"],
"postversion": [
"node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../../core/config-schema/Cargo.toml"
"cargo build --manifest-path ../../../core/config-schema/Cargo.toml"
],
"prepublish": [],
"publish": [],
@ -242,7 +245,10 @@
"path": "./tooling/cli",
"manager": "rust",
"dependencies": ["tauri-bundler", "tauri-utils"],
"postversion": "cargo check",
"postversion": [
"cargo check",
"cargo build --manifest-path ../../core/config-schema/Cargo.toml"
],
"assets": [
{
"path": "${ pkg.path }/target/package/tauri-cli-${ pkgFile.version }.crate",

View File

@ -1,5 +0,0 @@
---
"tauri": minor
---
The custom protocol now validates the request URI. This has implications when using the `asset` protocol without the `convertFileSrc` helper, the URL must now use the `asset://localhost/$filePath` format.

View File

@ -1,5 +0,0 @@
---
"api": patch
---
Fix `dialog.save` return type

View File

@ -1,5 +0,0 @@
---
"tauri-runtime-wry": patch
---
Drop the WebContext when the WebView is dropped.

View File

@ -1,5 +0,0 @@
---
"tauri": "patch"
---
Escape glob special characters in files/directories when dropping files or using the open/save dialogs.

View File

@ -1,5 +0,0 @@
---
"cli.rs": "patch"
---
Set `TAURI_PLATFORM_TYPE`, `TAURI_FAMILY`, `TAURI_ARCH` and `TAURI_PLATFORM` env vars for hook commands to based on the app not the cli.

View File

@ -1,5 +0,0 @@
---
"tauri": patch
---
Properly emit events with object payload.

View File

@ -1,6 +0,0 @@
---
"tauri-utils": patch
"tauri-codegen": patch
---
Properly serialize HTML template tags.

View File

@ -1,5 +0,0 @@
---
"tauri": patch
---
Fixes access to the `WebviewWindow.getByLabel` function in a `tauri://window-created` event listener.

View File

@ -1,5 +0,0 @@
---
"tauri": patch
---
Fixes resource reading being always rejected by the scope.

View File

@ -1,5 +0,0 @@
---
"tauri": patch
---
Fixes `__TAURI_PATTERN__` object freeze.

View File

@ -1,7 +0,0 @@
---
"tauri": minor
"tauri-runtime": minor
"tauri-runtime-wry": minor
---
Readd the option to create an unfocused window via the `focused` method. The `focus` function has been deprecated.

View File

@ -1,6 +0,0 @@
---
'tauri': minor
"tauri-runtime-wry": minor
---
Add `hidden_title` option for macOS windows.

View File

@ -1,5 +0,0 @@
---
"tauri-utils": minor
---
`PatternKind::Isolation` is now defined even without the `isolation` feature.

View File

@ -1,6 +0,0 @@
---
"tauri": minor
"tauri-runtime-wry": minor
---
Custom protocol headers are now implemented on Linux when running on webkit2gtk 2.36 or above.

View File

@ -1,5 +0,0 @@
---
"tauri-utils": minor
---
Added the `app` allowlist module.

View File

@ -1,5 +0,0 @@
---
"api": minor
---
Added `show` and `hide` methods on the `app` module.

View File

@ -1,6 +0,0 @@
---
"tauri-runtime-wry": minor
"tauri-runtime": minor
---
Added `Runtime::show()`, `RuntimeHandle::show()`, `Runtime::hide()`, `RuntimeHandle::hide()` for hiding/showing the entire application on macOS.

View File

@ -1,5 +0,0 @@
---
"tauri": minor
---
Add `App::show()`, `AppHandle::show()`, `App::hide()` and `AppHandle::hide()` for hiding/showing the entire application on macOS.

View File

@ -1,5 +0,0 @@
---
"tauri": "patch"
---
Fix a deadlock when modifying the menu in the `on_menu_event` closure.

View File

@ -1,6 +0,0 @@
---
"tauri-runtime-wry": "patch"
---
Fix regression in `SystemTray::with_menu_on_left_click`

View File

@ -1,12 +0,0 @@
---
"cli.rs": minor
"tauri-bundler": minor
"tauri": minor
"tauri-build": minor
"tauri-codegen": minor
"tauri-macros": minor
"tauri-utils": minor
"tauri-runtime": minor
"tauri-runtime-wry": minor
---

View File

@ -1,8 +0,0 @@
---
"tauri-utils": "minor"
"tauri-bundler": "minor"
"cli.rs": "minor"
---
Add `tauri.conf.json > bundle > publisher` field to specify the app publisher.

View File

@ -1,5 +0,0 @@
---
"tauri-utils": patch
---
Canonicalize the return value of `platform::resource_dir`.

View File

@ -1,5 +0,0 @@
---
"api": minor
---
Added `tabbingIdentifier` window option for macOS.

View File

@ -1,8 +0,0 @@
---
"tauri": minor
"tauri-runtime": minor
"tauri-runtime-wry": minor
"api": minor
---
Added `tabbing_identifier` to the window builder on macOS.

View File

@ -1,6 +0,0 @@
---
'tauri': minor
"tauri-runtime-wry": minor
---
Add `title_bar_style` option for macOS windows.

View File

@ -1,5 +0,0 @@
---
"tauri-runtime-wry": "patch"
---
Fix regression introduce in tauri@1.1 which prevented removing tray icon when the app exits on Windows.

View File

@ -1,5 +0,0 @@
---
"tauri-utils": minor
---
Added `title` option on the system tray configuration (macOS only).

View File

@ -1,7 +0,0 @@
---
"tauri": minor
"tauri-runtime": minor
"tauri-runtime-wry": minor
---
Added methods to set the system tray title on macOS.

View File

@ -1,5 +0,0 @@
---
"tauri-utils": minor
---
Added the `user_agent` option to the window configuration.

View File

@ -1,8 +0,0 @@
---
"api": minor
"tauri": minor
"tauri-runtime-wry": minor
"tauri-runtime": minor
---
Added the `user_agent` option when creating a window.

View File

@ -1,5 +0,0 @@
---
"tauri-utils": "patch"
---
Add `mime_type` module.

View File

@ -1,5 +0,0 @@
---
"tauri-bundler": patch
---
Clear environment variables on the WiX light.exe and candle.exe commands to avoid "Windows Installer Service could not be accessed" error. Variables prefixed with `TAURI` are propagated.

View File

@ -4,10 +4,8 @@
name: updater test artifacts
on:
push:
branches:
- dev
- next
schedule:
- cron: '0 0 * * *'
pull_request:
paths:
- '.github/workflows/artifacts-updater.yml'
@ -16,7 +14,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -45,59 +42,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache CLI cargo target
uses: actions/cache@v2
env:
cache-name: cargo_cli
with:
path: tooling/cli/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
workspaces: |
core -> ../target
tooling/cli
- name: build and install cli.rs
run: cargo install --path tooling/cli --force
@ -108,6 +57,7 @@ jobs:
run: |
echo "Enable code signing: ${{ env.ENABLE_CODE_SIGNING != '' }}"
echo "::set-output name=enabled::${{ env.ENABLE_CODE_SIGNING != '' }}"
# run only on tauri-apps/tauri repo (require secrets)
- name: build sample artifacts + code signing (updater)
if: steps.enablecodesigning.outputs.enabled == 'true'

View File

@ -9,7 +9,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -34,13 +33,14 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
override: true
default: true
components: rust-src
target: ${{ matrix.platform.target }}
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.10'
architecture: x64
- name: install dependencies
@ -52,54 +52,11 @@ jobs:
sudo dpkg -i hyperfine_1.11.0_amd64.deb
pip install memory_profiler
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-
${{ matrix.platform }}-${{ matrix.rust }}-
${{ matrix.platform }}-
- name: cache cargo `tooling/bench/tests` target
uses: actions/cache@v2
env:
cache-name: cargo_benches
with:
path: tooling/bench/tests/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('tooling/bench/tests/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-${{ hashFiles('tooling/bench/tests/Cargo.lock') }}
${{ matrix.platform }}-${{ matrix.rust }}-${{ env.cache-name }}-
${{ matrix.platform }}-${{ matrix.rust }}-
${{ matrix.platform }}-
workspaces: |
core -> ../target
tooling/bench/tests
- name: run benchmarks
run: |
@ -126,7 +83,7 @@ jobs:
git commit --message "Update Tauri benchmarks"
git push origin gh-pages
- name: Worker info
- name: Print worker info
run: |
cat /proc/cpuinfo
cat /proc/meminfo

View File

@ -44,6 +44,7 @@ jobs:
if: needs.changes.outputs.bundle == 'true'
steps:
- uses: actions/checkout@v2
- name: generate bundle
working-directory: tooling/api
run: yarn && yarn build
@ -57,7 +58,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: install stable
uses: actions-rs/toolchain@v1
with:
@ -69,39 +69,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
ubuntu-latest-stable-${{ env.cache-name }}-
ubuntu-latest-stable-
ubuntu-latest-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
ubuntu-latest-stable-${{ env.cache-name }}-
ubuntu-latest-stable-
ubuntu-latest-
workspaces: core -> ../target
- name: generate schema.json
uses: actions-rs/cargo@v1

View File

@ -16,8 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# platform: [ubuntu-latest, macos-latest, windows-latest]
platform: [ubuntu-latest, macos-latest]
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
@ -33,59 +32,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache CLI cargo target
uses: actions/cache@v2
env:
cache-name: cargo_cli
with:
path: tooling/cli/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
workspaces: |
core -> ../target
tooling/cli
- name: build CLI
uses: actions-rs/cargo@v1

View File

@ -67,6 +67,7 @@ jobs:
with:
toolchain: stable
override: true
default: true
target: ${{ matrix.target.name }}
- name: Setup node

View File

@ -16,7 +16,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -55,44 +54,14 @@ jobs:
override: true
components: clippy
- name: install Linux dependencies
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
ubuntu-latest-stable-${{ env.cache-name }}-
ubuntu-latest-stable-
ubuntu-latest-
- name: Cache CLI cargo target
uses: actions/cache@v2
env:
cache-name: cargo_cli
with:
path: tooling/cli/target
# Add date to the cache to keep it up to date
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
ubuntu-latest-stable-${{ env.cache-name }}-
ubuntu-latest-stable-
ubuntu-latest-
workspaces: tooling/cli
- uses: actions-rs/clippy-check@v1
with:

View File

@ -18,7 +18,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -59,7 +58,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install webkit2gtk
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
@ -71,44 +71,9 @@ jobs:
override: true
components: clippy
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
ubuntu-latest-stable-${{ env.cache-name }}-
ubuntu-latest-stable-
ubuntu-latest-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-stable-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
ubuntu-latest-stable-${{ env.cache-name }}-
ubuntu-latest-stable-
ubuntu-latest-
workspaces: core -> ../target
- uses: actions-rs/clippy-check@v1
with:

View File

@ -16,7 +16,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -34,49 +33,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache bundler cargo target
uses: actions/cache@v2
env:
cache-name: cargo_bundler
with:
path: tooling/bundler/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
workspaces: tooling/bundler
- name: test
run: |
@ -106,52 +71,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
default: true
components: rustfmt, clippy
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache bundler cargo target
uses: actions/cache@v2
env:
cache-name: cargo_bundler
with:
path: tooling/bundler/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
workspaces: tooling/bundler
- name: clippy check
uses: actions-rs/clippy-check@v1

View File

@ -17,7 +17,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -35,6 +34,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
@ -53,59 +53,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache CLI cargo target
uses: actions/cache@v2
env:
cache-name: cargo_cli
with:
path: tooling/cli/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache template cargo target
uses: actions/cache@v2
env:
cache-name: cargo_template
with:
path: tooling/cli/node/test/jest/fixtures/empty/src-tauri/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/templates/app/**') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/templates/app/**') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
workspaces: |
tooling/cli
tooling/cli/node/test/jest/fixtures/empty/src-tauri
- name: test
timeout-minutes: 30

View File

@ -16,7 +16,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -34,6 +33,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install stable
uses: actions-rs/toolchain@v1
with:
@ -46,44 +46,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform == 'macos-latest' || matrix.platform == 'ubuntu-latest'
- name: Get current date
if: matrix.platform == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
- name: Cache CLI cargo target
uses: actions/cache@v2
env:
cache-name: cargo_cli
with:
path: tooling/cli/target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
${{ matrix.platform }}-stable-${{ env.cache-name }}-
${{ matrix.platform }}-stable-
${{ matrix.platform }}-
workspaces: tooling/cli
- name: build CLI
uses: actions-rs/cargo@v1

View File

@ -17,7 +17,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -70,56 +69,24 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.platform.toolchain }}
target: ${{ matrix.platform.target }}
override: true
default: true
- name: install Linux dependencies
if: contains(matrix.platform.target, 'unknown-linux')
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.platform.os == 'macos-latest' || matrix.platform.os == 'ubuntu-latest'
- name: Get current date
if: matrix.platform.os == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-${{ env.cache-name }}-
${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-
${{ matrix.platform.os }}-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-${{ env.cache-name }}-
${{ matrix.platform.os }}-${{ matrix.platform.toolchain }}-
${{ matrix.platform.os }}-
workspaces: core -> ../target
- name: test
uses: actions-rs/cargo@v1

View File

@ -12,7 +12,6 @@ on:
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
@ -135,74 +134,17 @@ jobs:
toolchain: nightly
override: true
- name: install Linux dependencies
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Cache cargo state
uses: actions/cache@v2
env:
cache-name: cargo_state
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
restore-keys: |
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
ubuntu-latest-nightly-${{ env.cache-name }}-
ubuntu-latest-nightly-
ubuntu-latest-
- name: Cache core cargo target
uses: actions/cache@v2
env:
cache-name: cargo-core
with:
path: target
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('core/**/Cargo.toml') }}
ubuntu-latest-nightly-${{ env.cache-name }}-
ubuntu-latest-nightly-
ubuntu-latest-
- name: Cache bundler cargo target
uses: actions/cache@v2
env:
cache-name: cargo_bundler
with:
path: tooling/bundler/target
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/bundler/Cargo.lock') }}
ubuntu-latest-nightly-${{ env.cache-name }}-
ubuntu-latest-nightly-
ubuntu-latest-
- name: Cache CLI cargo target
uses: actions/cache@v2
env:
cache-name: cargo_cli
with:
path: tooling/cli/target
# Add date to the cache to keep it up to date
key: ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
ubuntu-latest-nightly-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
ubuntu-latest-nightly-${{ env.cache-name }}-
ubuntu-latest-nightly-
ubuntu-latest-
workspaces: |
core -> ../target
tooling/cli
tooling/bundler
- name: Download udeps
uses: actions/download-artifact@v3

View File

@ -9,3 +9,4 @@ dist
/tooling/cli/templates
/tooling/cli/node
/tooling/cli/schema.json
/core/config-schema/schema.json

View File

@ -20,7 +20,8 @@ exclude = [
"examples/api/src-tauri",
"examples/updater/src-tauri",
"examples/resources/src-tauri",
"examples/sidecar/src-tauri"
"examples/sidecar/src-tauri",
"examples/web/core"
]
# default to small, optimized workspace release binaries

View File

@ -1,5 +1,9 @@
# Changelog
## \[1.2.0]
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
## \[1.1.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -1,6 +1,6 @@
[package]
name = "tauri-build"
version = "1.1.1"
version = "1.2.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"
@ -19,8 +19,8 @@ rustdoc-args = [ "--cfg", "doc_cfg" ]
[dependencies]
anyhow = "1"
quote = { version = "1", optional = true }
tauri-codegen = { version = "1.1.1", path = "../tauri-codegen", optional = true }
tauri-utils = { version = "1.1.1", path = "../tauri-utils", features = [ "build", "resources" ] }
tauri-codegen = { version = "1.2.0", path = "../tauri-codegen", optional = true }
tauri-utils = { version = "1.2.0", path = "../tauri-utils", features = [ "build", "resources" ] }
cargo_toml = "0.13"
serde_json = "1"
heck = "0.4"

View File

@ -1,5 +1,11 @@
# Changelog
## \[1.2.0]
- Properly serialize HTML template tags.
- [aec5537d](https://www.github.com/tauri-apps/tauri/commit/aec5537de0205f62b2ae5c89da04d21930a6fc2e) fix(codegen): serialize template tags, closes [#4410](https://www.github.com/tauri-apps/tauri/pull/4410) ([#5247](https://www.github.com/tauri-apps/tauri/pull/5247)) on 2022-09-28
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
## \[1.1.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -1,6 +1,6 @@
[package]
name = "tauri-codegen"
version = "1.1.1"
version = "1.2.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"
@ -19,7 +19,7 @@ proc-macro2 = "1"
quote = "1"
serde = { version = "1", features = [ "derive" ] }
serde_json = "1"
tauri-utils = { version = "1.1.1", path = "../tauri-utils", features = [ "build" ] }
tauri-utils = { version = "1.2.0", path = "../tauri-utils", features = [ "build" ] }
thiserror = "1"
walkdir = "2"
brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] }

View File

@ -57,7 +57,7 @@ fn map_core_assets(
let mut hasher = Sha256::new();
hasher.update(&script);
let hash = hasher.finalize();
scripts.push(format!("'sha256-{}'", base64::encode(&hash)));
scripts.push(format!("'sha256-{}'", base64::encode(hash)));
}
csp_hashes
.inline_scripts
@ -76,7 +76,7 @@ fn map_core_assets(
let hash = hasher.finalize();
csp_hashes
.styles
.push(format!("'sha256-{}'", base64::encode(&hash)));
.push(format!("'sha256-{}'", base64::encode(hash)));
}
}
@ -475,7 +475,7 @@ fn ico_icon<P: AsRef<Path>>(
path: P,
) -> Result<TokenStream, EmbeddedAssetsError> {
let path = path.as_ref();
let bytes = std::fs::read(&path)
let bytes = std::fs::read(path)
.unwrap_or_else(|e| panic!("failed to read icon {}: {}", path.display(), e))
.to_vec();
let icon_dir = ico::IconDir::read(std::io::Cursor::new(bytes))
@ -503,7 +503,7 @@ fn ico_icon<P: AsRef<Path>>(
fn raw_icon<P: AsRef<Path>>(out_dir: &Path, path: P) -> Result<TokenStream, EmbeddedAssetsError> {
let path = path.as_ref();
let bytes = std::fs::read(&path)
let bytes = std::fs::read(path)
.unwrap_or_else(|e| panic!("failed to read icon {}: {}", path.display(), e))
.to_vec();
@ -525,7 +525,7 @@ fn png_icon<P: AsRef<Path>>(
path: P,
) -> Result<TokenStream, EmbeddedAssetsError> {
let path = path.as_ref();
let bytes = std::fs::read(&path)
let bytes = std::fs::read(path)
.unwrap_or_else(|e| panic!("failed to read icon {}: {}", path.display(), e))
.to_vec();
let decoder = png::Decoder::new(std::io::Cursor::new(bytes));
@ -555,13 +555,13 @@ fn write_if_changed(out_path: &Path, data: &[u8]) -> std::io::Result<()> {
use std::fs::File;
use std::io::Write;
if let Ok(curr) = std::fs::read(&out_path) {
if let Ok(curr) = std::fs::read(out_path) {
if curr == data {
return Ok(());
}
}
let mut out_file = File::create(&out_path)?;
let mut out_file = File::create(out_path)?;
out_file.write_all(data)
}

View File

@ -1,5 +1,9 @@
# Changelog
## \[1.2.0]
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
## \[1.1.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -1,6 +1,6 @@
[package]
name = "tauri-macros"
version = "1.1.1"
version = "1.2.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "os", "filesystem", "web-programming" ]
license = "Apache-2.0 OR MIT"
@ -20,8 +20,8 @@ proc-macro2 = "1"
quote = "1"
syn = { version = "1", features = [ "full" ] }
heck = "0.4"
tauri-codegen = { version = "1.1.1", default-features = false, path = "../tauri-codegen" }
tauri-utils = { version = "1.1.1", path = "../tauri-utils" }
tauri-codegen = { version = "1.2.0", default-features = false, path = "../tauri-codegen" }
tauri-utils = { version = "1.2.0", path = "../tauri-utils" }
[features]
custom-protocol = [ ]

View File

@ -1,5 +1,37 @@
# Changelog
## \[0.12.0]
- Add `accept_first_mouse` option for macOS windows.
- [95f467ad](https://www.github.com/tauri-apps/tauri/commit/95f467add51448319983c54e2f382c7c09fb72d6) feat(core): add window `accept_first_mouse` option, closes [#5347](https://www.github.com/tauri-apps/tauri/pull/5347) ([#5374](https://www.github.com/tauri-apps/tauri/pull/5374)) on 2022-10-17
- Disable automatic window tabbing on macOS when the `tabbing_identifier` option is not defined, the window is transparent or does not have decorations.
- [4137ab44](https://www.github.com/tauri-apps/tauri/commit/4137ab44a81d739556cbc7583485887e78952bf1) feat(macos): add `tabbing_identifier` option, closes [#2804](https://www.github.com/tauri-apps/tauri/pull/2804), [#3912](https://www.github.com/tauri-apps/tauri/pull/3912) ([#5399](https://www.github.com/tauri-apps/tauri/pull/5399)) on 2022-10-19
- Drop the WebContext when the WebView is dropped.
- [9d8b3774](https://www.github.com/tauri-apps/tauri/commit/9d8b377481abf975dc37f9050d2ac7b63ce353e9) feat(tauri-runtime-wry): drop the WebContext on WebView drop ([#5240](https://www.github.com/tauri-apps/tauri/pull/5240)) on 2022-10-19
- Readd the option to create an unfocused window via the `focused` method. The `focus` function has been deprecated.
- [4036e15f](https://www.github.com/tauri-apps/tauri/commit/4036e15f5af933bdc0d0913508b5103958afc143) feat(core): reimplement window initial focus flag, closes [#5120](https://www.github.com/tauri-apps/tauri/pull/5120) ([#5338](https://www.github.com/tauri-apps/tauri/pull/5338)) on 2022-10-08
- Add `hidden_title` option for macOS windows.
- [321f3fed](https://www.github.com/tauri-apps/tauri/commit/321f3fed19df40c1223099bce953332b7f00f7a9) feat(macos): `title_bar_style` and `hidden_title` window options, closes [#2663](https://www.github.com/tauri-apps/tauri/pull/2663) ([#3965](https://www.github.com/tauri-apps/tauri/pull/3965)) on 2022-09-30
- Custom protocol headers are now implemented on Linux when running on webkit2gtk 2.36 or above.
- [357480f4](https://www.github.com/tauri-apps/tauri/commit/357480f4ae43aa8da99f7ba61ae2ee51b4552c60) feat(core): custom protocol headers on Linux, closes [#4496](https://www.github.com/tauri-apps/tauri/pull/4496) ([#5421](https://www.github.com/tauri-apps/tauri/pull/5421)) on 2022-10-17
- Added `Runtime::show()`, `RuntimeHandle::show()`, `Runtime::hide()`, `RuntimeHandle::hide()` for hiding/showing the entire application on macOS.
- [39bf895b](https://www.github.com/tauri-apps/tauri/commit/39bf895b73ec6b53f5758815396ba85dda6b9c67) feat(macOS): Add application `show` and `hide` methods ([#3689](https://www.github.com/tauri-apps/tauri/pull/3689)) on 2022-10-03
- Fix regression in `SystemTray::with_menu_on_left_click`
- [f8a3becb](https://www.github.com/tauri-apps/tauri/commit/f8a3becb287942db7f7b551b5db6aeb5a2e939ee) feat(core): add option to disable tray menu on left click, closes [#4584](https://www.github.com/tauri-apps/tauri/pull/4584) ([#4587](https://www.github.com/tauri-apps/tauri/pull/4587)) on 2022-07-05
- [7bbf167c](https://www.github.com/tauri-apps/tauri/commit/7bbf167c1c84493ea6e2353f720edafd7daa47e4) Apply Version Updates From Current Changes ([#4560](https://www.github.com/tauri-apps/tauri/pull/4560)) on 2022-07-06
- [63011ca8](https://www.github.com/tauri-apps/tauri/commit/63011ca84e7a22c8c0d8bd1c1be6592140f93ff2) fix(macos): fix regression in `with_menu_on_left_click`, closes [#5220](https://www.github.com/tauri-apps/tauri/pull/5220) ([#5235](https://www.github.com/tauri-apps/tauri/pull/5235)) on 2022-09-30
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
- Added `tabbing_identifier` to the window builder on macOS.
- [4137ab44](https://www.github.com/tauri-apps/tauri/commit/4137ab44a81d739556cbc7583485887e78952bf1) feat(macos): add `tabbing_identifier` option, closes [#2804](https://www.github.com/tauri-apps/tauri/pull/2804), [#3912](https://www.github.com/tauri-apps/tauri/pull/3912) ([#5399](https://www.github.com/tauri-apps/tauri/pull/5399)) on 2022-10-19
- Add `title_bar_style` option for macOS windows.
- [321f3fed](https://www.github.com/tauri-apps/tauri/commit/321f3fed19df40c1223099bce953332b7f00f7a9) feat(macos): `title_bar_style` and `hidden_title` window options, closes [#2663](https://www.github.com/tauri-apps/tauri/pull/2663) ([#3965](https://www.github.com/tauri-apps/tauri/pull/3965)) on 2022-09-30
- Fix regression introduce in tauri@1.1 which prevented removing tray icon when the app exits on Windows.
- [f756cd5e](https://www.github.com/tauri-apps/tauri/commit/f756cd5e7ecc86f178f8d602eded1e1b6ecb51f3) fix(core): wait for tray cleanup before exiting app, closes [#5244](https://www.github.com/tauri-apps/tauri/pull/5244) ([#5245](https://www.github.com/tauri-apps/tauri/pull/5245)) on 2022-10-04
- Added methods to set the system tray title on macOS.
- [8f1ace77](https://www.github.com/tauri-apps/tauri/commit/8f1ace77956ac3477826ceb059a191e55b3fff93) feat: expose `set_title` for MacOS tray ([#5182](https://www.github.com/tauri-apps/tauri/pull/5182)) on 2022-09-30
- Added the `user_agent` option when creating a window.
- [a6c94119](https://www.github.com/tauri-apps/tauri/commit/a6c94119d8545d509723b147c273ca5edfe3729f) feat(core): expose user_agent to window config ([#5317](https://www.github.com/tauri-apps/tauri/pull/5317)) on 2022-10-02
## \[0.11.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -1,6 +1,6 @@
[package]
name = "tauri-runtime-wry"
version = "0.11.1"
version = "0.12.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"
@ -13,9 +13,9 @@ exclude = [ "CHANGELOG.md", "/target" ]
readme = "README.md"
[dependencies]
wry = { git = "https://github.com/tauri-apps/wry", branch = "dev", default-features = false, features = [ "file-drop", "protocol" ] }
tauri-runtime = { version = "0.11.1", path = "../tauri-runtime" }
tauri-utils = { version = "1.1.1", path = "../tauri-utils" }
wry = { version = "0.22", default-features = false, features = [ "file-drop", "protocol" ] }
tauri-runtime = { version = "0.12.0", path = "../tauri-runtime" }
tauri-utils = { version = "1.2.0", path = "../tauri-utils" }
uuid = { version = "1", features = [ "v4" ] }
rand = "0.8"
raw-window-handle = "0.5"

View File

@ -1,5 +1,19 @@
# Changelog
## \[0.12.0]
- Readd the option to create an unfocused window via the `focused` method. The `focus` function has been deprecated.
- [4036e15f](https://www.github.com/tauri-apps/tauri/commit/4036e15f5af933bdc0d0913508b5103958afc143) feat(core): reimplement window initial focus flag, closes [#5120](https://www.github.com/tauri-apps/tauri/pull/5120) ([#5338](https://www.github.com/tauri-apps/tauri/pull/5338)) on 2022-10-08
- Added `Runtime::show()`, `RuntimeHandle::show()`, `Runtime::hide()`, `RuntimeHandle::hide()` for hiding/showing the entire application on macOS.
- [39bf895b](https://www.github.com/tauri-apps/tauri/commit/39bf895b73ec6b53f5758815396ba85dda6b9c67) feat(macOS): Add application `show` and `hide` methods ([#3689](https://www.github.com/tauri-apps/tauri/pull/3689)) on 2022-10-03
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
- Added `tabbing_identifier` to the window builder on macOS.
- [4137ab44](https://www.github.com/tauri-apps/tauri/commit/4137ab44a81d739556cbc7583485887e78952bf1) feat(macos): add `tabbing_identifier` option, closes [#2804](https://www.github.com/tauri-apps/tauri/pull/2804), [#3912](https://www.github.com/tauri-apps/tauri/pull/3912) ([#5399](https://www.github.com/tauri-apps/tauri/pull/5399)) on 2022-10-19
- Added methods to set the system tray title on macOS.
- [8f1ace77](https://www.github.com/tauri-apps/tauri/commit/8f1ace77956ac3477826ceb059a191e55b3fff93) feat: expose `set_title` for MacOS tray ([#5182](https://www.github.com/tauri-apps/tauri/pull/5182)) on 2022-09-30
- Added the `user_agent` option when creating a window.
- [a6c94119](https://www.github.com/tauri-apps/tauri/commit/a6c94119d8545d509723b147c273ca5edfe3729f) feat(core): expose user_agent to window config ([#5317](https://www.github.com/tauri-apps/tauri/pull/5317)) on 2022-10-02
## \[0.11.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -1,6 +1,6 @@
[package]
name = "tauri-runtime"
version = "0.11.1"
version = "0.12.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
categories = [ "gui", "web-programming" ]
license = "Apache-2.0 OR MIT"
@ -26,7 +26,7 @@ targets = [
serde = { version = "1.0", features = [ "derive" ] }
serde_json = "1.0"
thiserror = "1.0"
tauri-utils = { version = "1.1.1", path = "../tauri-utils" }
tauri-utils = { version = "1.2.0", path = "../tauri-utils" }
uuid = { version = "1", features = [ "v4" ] }
http = "0.2.4"
http-range = "0.1.4"

View File

@ -1,5 +1,27 @@
# Changelog
## \[1.2.0]
- Validate `package > productName` in the tauri config and produce errors if it contains one of the following characters `/\:*?\"<>|`
- [b9316a64](https://www.github.com/tauri-apps/tauri/commit/b9316a64eaa9348c79efafb8b94960d9b4d5b27a) fix(cli): validate `productName` in config, closes [#5233](https://www.github.com/tauri-apps/tauri/pull/5233) ([#5262](https://www.github.com/tauri-apps/tauri/pull/5262)) on 2022-09-28
- Properly serialize HTML template tags.
- [aec5537d](https://www.github.com/tauri-apps/tauri/commit/aec5537de0205f62b2ae5c89da04d21930a6fc2e) fix(codegen): serialize template tags, closes [#4410](https://www.github.com/tauri-apps/tauri/pull/4410) ([#5247](https://www.github.com/tauri-apps/tauri/pull/5247)) on 2022-09-28
- `PatternKind::Isolation` is now defined even without the `isolation` feature.
- [a178f95d](https://www.github.com/tauri-apps/tauri/commit/a178f95d68b773779b40235a3a22115a5e36aa6a) feat: config schema generator ([#5193](https://www.github.com/tauri-apps/tauri/pull/5193)) on 2022-10-28
- Added the `app` allowlist module.
- [39bf895b](https://www.github.com/tauri-apps/tauri/commit/39bf895b73ec6b53f5758815396ba85dda6b9c67) feat(macOS): Add application `show` and `hide` methods ([#3689](https://www.github.com/tauri-apps/tauri/pull/3689)) on 2022-10-03
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
- Add `tauri.conf.json > bundle > publisher` field to specify the app publisher.
- [628285c1](https://www.github.com/tauri-apps/tauri/commit/628285c1cf43f03ed62378f3b6cc0c991317526f) feat(bundler): add `publisher` field, closes [#5273](https://www.github.com/tauri-apps/tauri/pull/5273) ([#5283](https://www.github.com/tauri-apps/tauri/pull/5283)) on 2022-09-28
- Canonicalize the return value of `platform::resource_dir`.
- [a06dc699](https://www.github.com/tauri-apps/tauri/commit/a06dc6993148f10ff7623c9dcc81f313dd960ad0) fix(core): canonicalize resource dir to fix scope check, closes [#5196](https://www.github.com/tauri-apps/tauri/pull/5196) ([#5218](https://www.github.com/tauri-apps/tauri/pull/5218)) on 2022-09-29
- Added `title` option on the system tray configuration (macOS only).
- [8f1ace77](https://www.github.com/tauri-apps/tauri/commit/8f1ace77956ac3477826ceb059a191e55b3fff93) feat: expose `set_title` for MacOS tray ([#5182](https://www.github.com/tauri-apps/tauri/pull/5182)) on 2022-09-30
- Added the `user_agent` option to the window configuration.
- [a6c94119](https://www.github.com/tauri-apps/tauri/commit/a6c94119d8545d509723b147c273ca5edfe3729f) feat(core): expose user_agent to window config ([#5317](https://www.github.com/tauri-apps/tauri/pull/5317)) on 2022-10-02
- Add `mime_type` module.
- [54c337e0](https://www.github.com/tauri-apps/tauri/commit/54c337e06f3bc624c4780cf002bc54790f446c90) feat(cli): hotreload support for frontend static files, closes [#2173](https://www.github.com/tauri-apps/tauri/pull/2173) ([#5256](https://www.github.com/tauri-apps/tauri/pull/5256)) on 2022-09-28
## \[1.1.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -1,6 +1,6 @@
[package]
name = "tauri-utils"
version = "1.1.1"
version = "1.2.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
license = "Apache-2.0 OR MIT"
homepage = "https://tauri.app"

View File

@ -2996,7 +2996,7 @@ mod build {
tokens.append_all(match self {
Self::App(path) => {
let path = path_buf_lit(&path);
let path = path_buf_lit(path);
quote! { #prefix::App(#path) }
}
Self::External(url) => {
@ -3226,7 +3226,7 @@ mod build {
quote! { #prefix::OfflineInstaller { silent: #silent } }
}
Self::FixedRuntime { path } => {
let path = path_buf_lit(&path);
let path = path_buf_lit(path);
quote! { #prefix::FixedRuntime { path: #path } }
}
})

View File

@ -1,5 +1,51 @@
# Changelog
## \[1.2.0]
- Add `accept_first_mouse` option for macOS windows.
- [95f467ad](https://www.github.com/tauri-apps/tauri/commit/95f467add51448319983c54e2f382c7c09fb72d6) feat(core): add window `accept_first_mouse` option, closes [#5347](https://www.github.com/tauri-apps/tauri/pull/5347) ([#5374](https://www.github.com/tauri-apps/tauri/pull/5374)) on 2022-10-17
- Add new app-specific `BaseDirectory` enum variants `AppConfig`, `AppData`, `AppLocalData`, `AppCache` and `AppLog` along with equivalent functions in `path` module and deprecated ambiguous variants `Log` and `App` along with their equivalent functions in `path` module.
- [5d89905e](https://www.github.com/tauri-apps/tauri/commit/5d89905e39ce0e6eaaec50a693679335449edb32) feat(api): add app-specific directory APIs, closes [#5263](https://www.github.com/tauri-apps/tauri/pull/5263) ([#5272](https://www.github.com/tauri-apps/tauri/pull/5272)) on 2022-09-28
- Set the correct mimetype when streaming files through `asset:` protocol
- [39443b43](https://www.github.com/tauri-apps/tauri/commit/39443b4350bd208c4d6eec5e1095f215199f8aa3) fix(core): set correct mimetype for asset protocol streams, closes [#5203](https://www.github.com/tauri-apps/tauri/pull/5203) ([#5210](https://www.github.com/tauri-apps/tauri/pull/5210)) on 2022-09-30
- [2d9c2b47](https://www.github.com/tauri-apps/tauri/commit/2d9c2b472416339829f9113f976f193bf8e0665f) Revert "fix(core): set correct mimetype for asset protocol streams, closes [#5203](https://www.github.com/tauri-apps/tauri/pull/5203) ([#5210](https://www.github.com/tauri-apps/tauri/pull/5210))" on 2022-09-30
- [9b1a6a1c](https://www.github.com/tauri-apps/tauri/commit/9b1a6a1c02b8d62dd47d9ce42aa05723d7c1b892) fix(core): set correct mimetype for asset protocol streams, [#5203](https://www.github.com/tauri-apps/tauri/pull/5203) ([#5536](https://www.github.com/tauri-apps/tauri/pull/5536)) on 2022-11-04
- Disable automatic window tabbing on macOS when the `tabbing_identifier` option is not defined, the window is transparent or does not have decorations.
- [4137ab44](https://www.github.com/tauri-apps/tauri/commit/4137ab44a81d739556cbc7583485887e78952bf1) feat(macos): add `tabbing_identifier` option, closes [#2804](https://www.github.com/tauri-apps/tauri/pull/2804), [#3912](https://www.github.com/tauri-apps/tauri/pull/3912) ([#5399](https://www.github.com/tauri-apps/tauri/pull/5399)) on 2022-10-19
- The custom protocol now validates the request URI. This has implications when using the `asset` protocol without the `convertFileSrc` helper, the URL must now use the `asset://localhost/$filePath` format.
- [357480f4](https://www.github.com/tauri-apps/tauri/commit/357480f4ae43aa8da99f7ba61ae2ee51b4552c60) feat(core): custom protocol headers on Linux, closes [#4496](https://www.github.com/tauri-apps/tauri/pull/4496) ([#5421](https://www.github.com/tauri-apps/tauri/pull/5421)) on 2022-10-17
- Escape glob special characters in files/directories when dropping files or using the open/save dialogs.
- [4cbdf0fb](https://www.github.com/tauri-apps/tauri/commit/4cbdf0fb1c0de5004eab51c36d5843a9816f18af) fix(core): escape glob characters in drop/dialogs , closes [#5234](https://www.github.com/tauri-apps/tauri/pull/5234) ([#5237](https://www.github.com/tauri-apps/tauri/pull/5237)) on 2022-10-05
- Properly emit events with object payload.
- [79dd6e16](https://www.github.com/tauri-apps/tauri/commit/79dd6e16a7306351e2acf21166506b2876b58a7e) fix(core): properly emit events with object payload, closes [#5482](https://www.github.com/tauri-apps/tauri/pull/5482) ([#5492](https://www.github.com/tauri-apps/tauri/pull/5492)) on 2022-10-27
- Fixes access to the `WebviewWindow.getByLabel` function in a `tauri://window-created` event listener.
- [e00b1e5f](https://www.github.com/tauri-apps/tauri/commit/e00b1e5f94b3f841bf107cc17ee74be9203ea080) fix(core): update metadata before window-created listeners, closes [#5191](https://www.github.com/tauri-apps/tauri/pull/5191) ([#5458](https://www.github.com/tauri-apps/tauri/pull/5458)) on 2022-10-22
- Fixes resource reading being always rejected by the scope.
- [a06dc699](https://www.github.com/tauri-apps/tauri/commit/a06dc6993148f10ff7623c9dcc81f313dd960ad0) fix(core): canonicalize resource dir to fix scope check, closes [#5196](https://www.github.com/tauri-apps/tauri/pull/5196) ([#5218](https://www.github.com/tauri-apps/tauri/pull/5218)) on 2022-09-29
- Fixes `__TAURI_PATTERN__` object freeze.
- [49f06ca4](https://www.github.com/tauri-apps/tauri/commit/49f06ca4b9f1d02933e46bbc50330b84ac81be87) fix: deepfreeze check by prop ([#5407](https://www.github.com/tauri-apps/tauri/pull/5407)) on 2022-10-17
- Readd the option to create an unfocused window via the `focused` method. The `focus` function has been deprecated.
- [4036e15f](https://www.github.com/tauri-apps/tauri/commit/4036e15f5af933bdc0d0913508b5103958afc143) feat(core): reimplement window initial focus flag, closes [#5120](https://www.github.com/tauri-apps/tauri/pull/5120) ([#5338](https://www.github.com/tauri-apps/tauri/pull/5338)) on 2022-10-08
- Add `hidden_title` option for macOS windows.
- [321f3fed](https://www.github.com/tauri-apps/tauri/commit/321f3fed19df40c1223099bce953332b7f00f7a9) feat(macos): `title_bar_style` and `hidden_title` window options, closes [#2663](https://www.github.com/tauri-apps/tauri/pull/2663) ([#3965](https://www.github.com/tauri-apps/tauri/pull/3965)) on 2022-09-30
- Custom protocol headers are now implemented on Linux when running on webkit2gtk 2.36 or above.
- [357480f4](https://www.github.com/tauri-apps/tauri/commit/357480f4ae43aa8da99f7ba61ae2ee51b4552c60) feat(core): custom protocol headers on Linux, closes [#4496](https://www.github.com/tauri-apps/tauri/pull/4496) ([#5421](https://www.github.com/tauri-apps/tauri/pull/5421)) on 2022-10-17
- Add `App::show()`, `AppHandle::show()`, `App::hide()` and `AppHandle::hide()` for hiding/showing the entire application on macOS.
- [39bf895b](https://www.github.com/tauri-apps/tauri/commit/39bf895b73ec6b53f5758815396ba85dda6b9c67) feat(macOS): Add application `show` and `hide` methods ([#3689](https://www.github.com/tauri-apps/tauri/pull/3689)) on 2022-10-03
- Fix a deadlock when modifying the menu in the `on_menu_event` closure.
- [ae65951b](https://www.github.com/tauri-apps/tauri/commit/ae65951bc477126b71816d77424f8167814bbe8d) fix(core): fix deadlock in `on_menu_event`, closes [#5254](https://www.github.com/tauri-apps/tauri/pull/5254) ([#5257](https://www.github.com/tauri-apps/tauri/pull/5257)) on 2022-09-28
- - [7d9aa398](https://www.github.com/tauri-apps/tauri/commit/7d9aa3987efce2d697179ffc33646d086c68030c) feat: bump MSRV to 1.59 ([#5296](https://www.github.com/tauri-apps/tauri/pull/5296)) on 2022-09-28
- Resolve base system directory in shell scope.
- [99fe1c56](https://www.github.com/tauri-apps/tauri/commit/99fe1c562ffcea4089f785c73f4e6706d4ebc16b) fix(core): resolve base dir in shell scope, closes [#5480](https://www.github.com/tauri-apps/tauri/pull/5480) ([#5508](https://www.github.com/tauri-apps/tauri/pull/5508)) on 2022-11-04
- Added `tabbing_identifier` to the window builder on macOS.
- [4137ab44](https://www.github.com/tauri-apps/tauri/commit/4137ab44a81d739556cbc7583485887e78952bf1) feat(macos): add `tabbing_identifier` option, closes [#2804](https://www.github.com/tauri-apps/tauri/pull/2804), [#3912](https://www.github.com/tauri-apps/tauri/pull/3912) ([#5399](https://www.github.com/tauri-apps/tauri/pull/5399)) on 2022-10-19
- Add `title_bar_style` option for macOS windows.
- [321f3fed](https://www.github.com/tauri-apps/tauri/commit/321f3fed19df40c1223099bce953332b7f00f7a9) feat(macos): `title_bar_style` and `hidden_title` window options, closes [#2663](https://www.github.com/tauri-apps/tauri/pull/2663) ([#3965](https://www.github.com/tauri-apps/tauri/pull/3965)) on 2022-09-30
- Added methods to set the system tray title on macOS.
- [8f1ace77](https://www.github.com/tauri-apps/tauri/commit/8f1ace77956ac3477826ceb059a191e55b3fff93) feat: expose `set_title` for MacOS tray ([#5182](https://www.github.com/tauri-apps/tauri/pull/5182)) on 2022-09-30
- Added the `user_agent` option when creating a window.
- [a6c94119](https://www.github.com/tauri-apps/tauri/commit/a6c94119d8545d509723b147c273ca5edfe3729f) feat(core): expose user_agent to window config ([#5317](https://www.github.com/tauri-apps/tauri/pull/5317)) on 2022-10-02
## \[1.1.1]
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.

View File

@ -10,7 +10,7 @@ license = "Apache-2.0 OR MIT"
name = "tauri"
readme = "README.md"
repository = "https://github.com/tauri-apps/tauri"
version = "1.1.1"
version = "1.2.0"
[package.metadata.docs.rs]
no-default-features = true
@ -49,10 +49,10 @@ url = { version = "2.3" }
anyhow = "1.0"
thiserror = "1.0"
once_cell = "1"
tauri-runtime = { version = "0.11.1", path = "../tauri-runtime" }
tauri-macros = { version = "1.1.1", path = "../tauri-macros" }
tauri-utils = { version = "1.1.1", features = [ "resources" ], path = "../tauri-utils" }
tauri-runtime-wry = { version = "0.11.1", path = "../tauri-runtime-wry", optional = true }
tauri-runtime = { version = "0.12.0", path = "../tauri-runtime" }
tauri-macros = { version = "1.2.0", path = "../tauri-macros" }
tauri-utils = { version = "1.2.0", features = [ "resources" ], path = "../tauri-utils" }
tauri-runtime-wry = { version = "0.12.0", path = "../tauri-runtime-wry", optional = true }
rand = "0.8"
semver = { version = "1.0", features = [ "serde" ] }
serde_repr = "0.1"

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ pub enum ArchiveReader<R: Read + Seek> {
/// A plain reader.
Plain(R),
/// A GZ- compressed reader (decoder).
GzCompressed(flate2::read::GzDecoder<R>),
GzCompressed(Box<flate2::read::GzDecoder<R>>),
}
impl<R: Read + Seek> Read for ArchiveReader<R> {
@ -161,7 +161,9 @@ impl<'a, R: Read + Seek> Extract<'a, R> {
};
Extract {
reader: match compression {
Some(Compression::Gz) => ArchiveReader::GzCompressed(flate2::read::GzDecoder::new(reader)),
Some(Compression::Gz) => {
ArchiveReader::GzCompressed(Box::new(flate2::read::GzDecoder::new(reader)))
}
_ => ArchiveReader::Plain(reader),
},
archive_format,
@ -248,7 +250,7 @@ impl<'a, R: Read + Seek> Extract<'a, R> {
fs::create_dir_all(&out_path)?;
} else {
if let Some(out_path_parent) = out_path.parent() {
fs::create_dir_all(&out_path_parent)?;
fs::create_dir_all(out_path_parent)?;
}
let mut out_file = fs::File::create(&out_path)?;
io::copy(&mut file, &mut out_file)?;

View File

@ -98,7 +98,7 @@ fn walkdir_and_copy(source: &path::Path, dest: &path::Path) -> crate::api::Resul
let element = entry?;
let metadata = element.metadata()?;
let destination = dest.join(element.path().strip_prefix(&source)?);
let destination = dest.join(element.path().strip_prefix(source)?);
// we make sure it's a directory and destination doesnt exist
if metadata.is_dir() && !&destination.exists() {

View File

@ -436,7 +436,7 @@ mod test {
#[test]
fn test_cmd_output() {
// create a command to run cat.
let cmd = Command::new("cat").args(&["test/api/test.txt"]);
let cmd = Command::new("cat").args(["test/api/test.txt"]);
let (mut rx, _) = cmd.spawn().unwrap();
crate::async_runtime::block_on(async move {
@ -458,7 +458,7 @@ mod test {
#[test]
// test the failure case
fn test_cmd_fail() {
let cmd = Command::new("cat").args(&["test/api/"]);
let cmd = Command::new("cat").args(["test/api/"]);
let (mut rx, _) = cmd.spawn().unwrap();
crate::async_runtime::block_on(async move {

View File

@ -1591,7 +1591,7 @@ impl<R: Runtime> Builder<R> {
#[cfg(http_request)]
http: crate::scope::HttpScope::for_http_api(&app.config().tauri.allowlist.http.scope),
#[cfg(shell_scope)]
shell: ShellScope::new(shell_scope),
shell: ShellScope::new(&app.manager.config(), app.package_info(), &env, shell_scope),
});
app.manage(env);

View File

@ -103,7 +103,7 @@ impl Cmd {
} = value
{
if crate::api::file::SafePathBuf::new(path.clone()).is_err()
|| !scopes.fs.is_allowed(&path)
|| !scopes.fs.is_allowed(path)
{
return Err(crate::Error::PathNotAllowed(path.clone()).into_anyhow());
}

View File

@ -387,7 +387,7 @@ pub enum Icon {
Raw(Vec<u8>),
/// Icon from raw RGBA bytes.
Rgba {
/// RGBA byes of the icon image.
/// RGBA bytes of the icon image.
rgba: Vec<u8>,
/// Icon width.
width: u32,

View File

@ -508,9 +508,7 @@ impl<R: Runtime> WindowManager<R> {
use crate::api::file::SafePathBuf;
use tokio::io::{AsyncReadExt, AsyncSeekExt};
use url::Position;
let state = self.state();
let asset_scope = state.get::<crate::Scopes>().asset_protocol.clone();
let mime_type_cache = MimeTypeCache::default();
let asset_scope = self.state().get::<crate::Scopes>().asset_protocol.clone();
pending.register_uri_scheme_protocol("asset", move |request| {
let parsed_path = Url::parse(request.uri())?;
let filtered_path = &parsed_path[..Position::AfterPath];
@ -544,23 +542,39 @@ impl<R: Runtime> WindowManager<R> {
.get("range")
.and_then(|r| r.to_str().map(|r| r.to_string()).ok())
{
let (headers, status_code, data) = crate::async_runtime::safe_block_on(async move {
let mut headers = HashMap::new();
let mut buf = Vec::new();
#[derive(Default)]
struct RangeMetadata {
file: Option<tokio::fs::File>,
range: Option<crate::runtime::http::HttpRange>,
metadata: Option<std::fs::Metadata>,
headers: HashMap<&'static str, String>,
status_code: u16,
body: Vec<u8>,
}
let mut range_metadata = crate::async_runtime::safe_block_on(async move {
let mut data = RangeMetadata::default();
// open the file
let mut file = match tokio::fs::File::open(path_.clone()).await {
Ok(file) => file,
Err(e) => {
debug_eprintln!("Failed to open asset: {}", e);
return (headers, 404, buf);
data.status_code = 404;
return data;
}
};
// Get the file size
let file_size = match file.metadata().await {
Ok(metadata) => metadata.len(),
Ok(metadata) => {
let len = metadata.len();
data.metadata.replace(metadata);
len
}
Err(e) => {
debug_eprintln!("Failed to read asset metadata: {}", e);
return (headers, 404, buf);
data.file.replace(file);
data.status_code = 404;
return data;
}
};
// parse the range
@ -575,13 +589,16 @@ impl<R: Runtime> WindowManager<R> {
Ok(r) => r,
Err(e) => {
debug_eprintln!("Failed to parse range {}: {:?}", range, e);
return (headers, 400, buf);
data.file.replace(file);
data.status_code = 400;
return data;
}
};
// FIXME: Support multiple ranges
// let support only 1 range for now
let status_code = if let Some(range) = range.first() {
if let Some(range) = range.first() {
data.range.replace(*range);
let mut real_length = range.length;
// prevent max_length;
// specially on webview2
@ -595,38 +612,84 @@ impl<R: Runtime> WindowManager<R> {
// who should be skipped on the header
let last_byte = range.start + real_length - 1;
headers.insert("Connection", "Keep-Alive".into());
headers.insert("Accept-Ranges", "bytes".into());
headers.insert("Content-Length", real_length.to_string());
headers.insert(
data.headers.insert("Connection", "Keep-Alive".into());
data.headers.insert("Accept-Ranges", "bytes".into());
data
.headers
.insert("Content-Length", real_length.to_string());
data.headers.insert(
"Content-Range",
format!("bytes {}-{}/{}", range.start, last_byte, file_size),
);
if let Err(e) = file.seek(std::io::SeekFrom::Start(range.start)).await {
debug_eprintln!("Failed to seek file to {}: {}", range.start, e);
return (headers, 422, buf);
data.file.replace(file);
data.status_code = 422;
return data;
}
if let Err(e) = file.take(real_length).read_to_end(&mut buf).await {
let mut f = file.take(real_length);
let r = f.read_to_end(&mut data.body).await;
file = f.into_inner();
data.file.replace(file);
if let Err(e) = r {
debug_eprintln!("Failed read file: {}", e);
return (headers, 422, buf);
data.status_code = 422;
return data;
}
// partial content
206
data.status_code = 206;
} else {
200
};
data.status_code = 200;
}
(headers, status_code, buf)
data
});
for (k, v) in headers {
for (k, v) in range_metadata.headers {
response = response.header(k, v);
}
let mime_type = mime_type_cache.get_or_insert(&data, &path);
response.mimetype(&mime_type).status(status_code).body(data)
let mime_type = if let (Some(mut file), Some(metadata), Some(range)) = (
range_metadata.file,
range_metadata.metadata,
range_metadata.range,
) {
// if we're already reading the beginning of the file, we do not need to re-read it
if range.start == 0 {
MimeType::parse(&range_metadata.body, &path)
} else {
let (status, bytes) = crate::async_runtime::safe_block_on(async move {
let mut status = None;
if let Err(e) = file.rewind().await {
debug_eprintln!("Failed to rewind file: {}", e);
status.replace(422);
(status, Vec::with_capacity(0))
} else {
// taken from https://docs.rs/infer/0.9.0/src/infer/lib.rs.html#240-251
let limit = std::cmp::min(metadata.len(), 8192) as usize + 1;
let mut bytes = Vec::with_capacity(limit);
if let Err(e) = file.take(8192).read_to_end(&mut bytes).await {
debug_eprintln!("Failed read file: {}", e);
status.replace(422);
}
(status, bytes)
}
});
if let Some(s) = status {
range_metadata.status_code = s;
}
MimeType::parse(&bytes, &path)
}
} else {
MimeType::parse(&range_metadata.body, &path)
};
response
.mimetype(&mime_type)
.status(range_metadata.status_code)
.body(range_metadata.body)
} else {
match crate::async_runtime::safe_block_on(async move { tokio::fs::read(path_).await }) {
Ok(data) => {
@ -1114,7 +1177,7 @@ impl<R: Runtime> WindowManager<R> {
// ignore "index.html" just to simplify the url
if path.to_str() != Some("index.html") {
url
.join(&*path.to_string_lossy())
.join(&path.to_string_lossy())
.map_err(crate::Error::InvalidUrl)
// this will never fail
.unwrap()
@ -1481,26 +1544,6 @@ fn request_to_path(request: &tauri_runtime::http::Request, base_url: &str) -> St
}
}
// key is uri/path, value is the store mime type
#[cfg(protocol_asset)]
#[derive(Debug, Clone, Default)]
struct MimeTypeCache(Arc<Mutex<HashMap<String, String>>>);
#[cfg(protocol_asset)]
impl MimeTypeCache {
pub fn get_or_insert(&self, content: &[u8], uri: &str) -> String {
let mut cache = self.0.lock().unwrap();
let uri = uri.to_string();
if let Some(mime_type) = cache.get(&uri) {
mime_type.clone()
} else {
let mime_type = MimeType::parse(content, &uri);
cache.insert(uri, mime_type.clone());
mime_type
}
}
}
#[cfg(test)]
mod tests {
use super::replace_with_callback;

View File

@ -148,9 +148,9 @@ impl Scope {
let mut list = self.allowed_patterns.lock().unwrap();
// allow the directory to be read
push_pattern(&mut list, &path, escaped_pattern)?;
push_pattern(&mut list, path, escaped_pattern)?;
// allow its files and subdirectories to be read
push_pattern(&mut list, &path, |p| {
push_pattern(&mut list, path, |p| {
escaped_pattern_with(p, if recursive { "**" } else { "*" })
})?;
}
@ -165,7 +165,7 @@ impl Scope {
let path = path.as_ref();
push_pattern(
&mut self.allowed_patterns.lock().unwrap(),
&path,
path,
escaped_pattern,
)?;
self.trigger(Event::PathAllowed(path.to_path_buf()));
@ -181,9 +181,9 @@ impl Scope {
let mut list = self.forbidden_patterns.lock().unwrap();
// allow the directory to be read
push_pattern(&mut list, &path, escaped_pattern)?;
push_pattern(&mut list, path, escaped_pattern)?;
// allow its files and subdirectories to be read
push_pattern(&mut list, &path, |p| {
push_pattern(&mut list, path, |p| {
escaped_pattern_with(p, if recursive { "**" } else { "*" })
})?;
}
@ -198,7 +198,7 @@ impl Scope {
let path = path.as_ref();
push_pattern(
&mut self.forbidden_patterns.lock().unwrap(),
&path,
path,
escaped_pattern,
)?;
self.trigger(Event::PathForbidden(path.to_path_buf()));

View File

@ -8,6 +8,7 @@ use crate::api::process::Command;
use crate::api::shell::Program;
use regex::Regex;
use tauri_utils::{config::Config, Env, PackageInfo};
use std::collections::HashMap;
@ -193,7 +194,17 @@ pub enum ScopeError {
impl Scope {
/// Creates a new shell scope.
pub(crate) fn new(scope: ScopeConfig) -> Self {
pub(crate) fn new(
config: &Config,
package_info: &PackageInfo,
env: &Env,
mut scope: ScopeConfig,
) -> Self {
for cmd in scope.scopes.values_mut() {
if let Ok(path) = crate::api::path::parse(config, package_info, env, &cmd.command) {
cmd.command = path;
}
}
Self(scope)
}
@ -306,8 +317,8 @@ impl Scope {
// The prevention of argument escaping is handled by the usage of std::process::Command::arg by
// the `open` dependency. This behavior should be re-confirmed during upgrades of `open`.
match with.map(Program::name) {
Some(program) => ::open::with(&path, program),
None => ::open::that(&path),
Some(program) => ::open::with(path, program),
None => ::open::that(path),
}
.map_err(Into::into)
}

View File

@ -30,9 +30,7 @@
"active": true,
"dialog": false,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK",
"endpoints": [
"http://localhost:3007"
],
"endpoints": ["http://localhost:3007"],
"windows": {
"installMode": "quiet"
}

File diff suppressed because one or more lines are too long

View File

@ -93,16 +93,17 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.65"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
[[package]]
name = "api"
version = "0.1.0"
dependencies = [
"android_logger",
"env_logger 0.9.1",
"env_logger 0.9.3",
"jni 0.19.0",
"log",
"serde",
"serde_json",
@ -140,7 +141,7 @@ dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -180,9 +181,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "base64"
version = "0.13.0"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "bitflags"
@ -237,15 +238,15 @@ dependencies = [
[[package]]
name = "bumpalo"
version = "3.11.0"
version = "3.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"
checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
[[package]]
name = "bytemuck"
version = "1.12.1"
version = "1.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da"
checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f"
[[package]]
name = "byteorder"
@ -283,7 +284,7 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8"
dependencies = [
"glib-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -298,9 +299,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.0.73"
version = "1.0.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574"
[[package]]
name = "cesu8"
@ -340,9 +341,9 @@ dependencies = [
[[package]]
name = "cfg-expr"
version = "0.10.3"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db"
checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa"
dependencies = [
"smallvec",
]
@ -370,9 +371,9 @@ dependencies = [
[[package]]
name = "clap"
version = "3.2.22"
version = "3.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
dependencies = [
"atty",
"bitflags",
@ -394,9 +395,9 @@ dependencies = [
[[package]]
name = "cocoa"
version = "0.24.0"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832"
checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a"
dependencies = [
"bitflags",
"block",
@ -562,9 +563,9 @@ dependencies = [
[[package]]
name = "ctor"
version = "0.1.23"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb"
checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
dependencies = [
"quote",
"syn",
@ -706,6 +707,12 @@ dependencies = [
"dtoa",
]
[[package]]
name = "dunce"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c"
[[package]]
name = "embed_plist"
version = "1.2.2"
@ -733,9 +740,9 @@ dependencies = [
[[package]]
name = "env_logger"
version = "0.9.1"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272"
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
dependencies = [
"atty",
"humantime",
@ -765,14 +772,14 @@ dependencies = [
[[package]]
name = "filetime"
version = "0.2.17"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c"
checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"windows-sys",
"windows-sys 0.42.0",
]
[[package]]
@ -782,7 +789,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
dependencies = [
"crc32fast",
"miniz_oxide",
"miniz_oxide 0.5.4",
]
[[package]]
@ -827,24 +834,24 @@ dependencies = [
[[package]]
name = "futures-channel"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050"
checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf"
checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
[[package]]
name = "futures-executor"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab"
checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"
dependencies = [
"futures-core",
"futures-task",
@ -853,15 +860,15 @@ dependencies = [
[[package]]
name = "futures-io"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68"
checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
[[package]]
name = "futures-macro"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"
checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
dependencies = [
"proc-macro2",
"quote",
@ -870,21 +877,21 @@ dependencies = [
[[package]]
name = "futures-sink"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56"
checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"
[[package]]
name = "futures-task"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"
checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
[[package]]
name = "futures-util"
version = "0.3.24"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90"
checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
dependencies = [
"futures-core",
"futures-macro",
@ -942,7 +949,7 @@ dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -959,7 +966,7 @@ dependencies = [
"libc",
"pango-sys",
"pkg-config",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -971,7 +978,7 @@ dependencies = [
"gdk-sys",
"glib-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
"x11",
]
@ -1011,9 +1018,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.2.7"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
dependencies = [
"cfg-if",
"libc",
@ -1056,7 +1063,7 @@ dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
"winapi",
]
@ -1102,7 +1109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4"
dependencies = [
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -1132,7 +1139,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a"
dependencies = [
"glib-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -1173,7 +1180,7 @@ dependencies = [
"gobject-sys",
"libc",
"pango-sys",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -1192,9 +1199,9 @@ dependencies = [
[[package]]
name = "h2"
version = "0.3.14"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be"
checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4"
dependencies = [
"bytes",
"fnv",
@ -1301,9 +1308,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
version = "0.14.20"
version = "0.14.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac"
checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"
dependencies = [
"bytes",
"futures-channel",
@ -1441,9 +1448,9 @@ dependencies = [
[[package]]
name = "ipnet"
version = "2.5.0"
version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745"
[[package]]
name = "itoa"
@ -1494,6 +1501,20 @@ dependencies = [
"walkdir",
]
[[package]]
name = "jni"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c"
dependencies = [
"cesu8",
"combine",
"jni-sys",
"log",
"thiserror",
"walkdir",
]
[[package]]
name = "jni-sys"
version = "0.3.0"
@ -1564,9 +1585,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.135"
version = "0.2.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c"
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
[[package]]
name = "libdbus-sys"
@ -1579,9 +1600,9 @@ dependencies = [
[[package]]
name = "libloading"
version = "0.7.3"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
@ -1746,15 +1767,24 @@ dependencies = [
]
[[package]]
name = "mio"
version = "0.8.4"
name = "miniz_oxide"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf"
checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
dependencies = [
"adler",
]
[[package]]
name = "mio"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
dependencies = [
"libc",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys",
"windows-sys 0.42.0",
]
[[package]]
@ -1772,9 +1802,9 @@ dependencies = [
[[package]]
name = "native-tls"
version = "0.2.10"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9"
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static",
"libc",
@ -1902,9 +1932,9 @@ dependencies = [
[[package]]
name = "num_cpus"
version = "1.13.1"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
dependencies = [
"hermit-abi",
"libc",
@ -1931,15 +1961,6 @@ dependencies = [
"syn",
]
[[package]]
name = "num_threads"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
dependencies = [
"libc",
]
[[package]]
name = "objc"
version = "0.2.7"
@ -1981,9 +2002,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.15.0"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]]
name = "opaque-debug"
@ -1998,7 +2019,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4a3100141f1733ea40b53381b0ae3117330735ef22309a190ac57b9576ea716"
dependencies = [
"pathdiff",
"windows-sys",
"windows-sys 0.36.1",
]
[[package]]
@ -2044,9 +2065,9 @@ dependencies = [
[[package]]
name = "openssl-sys"
version = "0.9.76"
version = "0.9.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5230151e44c0f05157effb743e8d517472843121cf9243e8b81393edb5acd9ce"
checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a"
dependencies = [
"autocfg",
"cc",
@ -2079,9 +2100,9 @@ dependencies = [
[[package]]
name = "os_str_bytes"
version = "6.3.0"
version = "6.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9"
[[package]]
name = "overload"
@ -2111,7 +2132,7 @@ dependencies = [
"glib-sys",
"gobject-sys",
"libc",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -2126,15 +2147,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.9.3"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-sys",
"windows-sys 0.42.0",
]
[[package]]
@ -2157,9 +2178,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
[[package]]
name = "pest"
version = "2.4.0"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a"
checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8"
dependencies = [
"thiserror",
"ucd-trie",
@ -2277,9 +2298,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
version = "0.3.25"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "plist"
@ -2309,14 +2330,14 @@ dependencies = [
[[package]]
name = "png"
version = "0.17.6"
version = "0.17.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c"
checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638"
dependencies = [
"bitflags",
"crc32fast",
"flate2",
"miniz_oxide",
"miniz_oxide 0.6.2",
]
[[package]]
@ -2333,9 +2354,9 @@ dependencies = [
[[package]]
name = "ppv-lite86"
version = "0.2.16"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "precomputed-hash"
@ -2471,7 +2492,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom 0.2.7",
"getrandom 0.2.8",
]
[[package]]
@ -2516,16 +2537,16 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
"getrandom 0.2.7",
"getrandom 0.2.8",
"redox_syscall",
"thiserror",
]
[[package]]
name = "regex"
version = "1.6.0"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
dependencies = [
"aho-corasick",
"memchr",
@ -2543,9 +2564,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.6.27"
version = "0.6.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]]
name = "remove_dir_all"
@ -2671,14 +2692,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2"
dependencies = [
"lazy_static",
"windows-sys",
"windows-sys 0.36.1",
]
[[package]]
name = "scoped-tls"
version = "1.0.0"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
[[package]]
name = "scopeguard"
@ -2758,18 +2779,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.145"
version = "1.0.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.145"
version = "1.0.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852"
dependencies = [
"proc-macro2",
"quote",
@ -2778,9 +2799,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.86"
version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074"
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
dependencies = [
"itoa 1.0.4",
"ryu",
@ -3029,9 +3050,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
name = "syn"
version = "1.0.102"
version = "1.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d"
dependencies = [
"proc-macro2",
"quote",
@ -3053,11 +3074,11 @@ dependencies = [
[[package]]
name = "system-deps"
version = "6.0.2"
version = "6.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"
checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff"
dependencies = [
"cfg-expr 0.10.3",
"cfg-expr 0.11.0",
"heck 0.4.0",
"pkg-config",
"toml",
@ -3066,8 +3087,9 @@ dependencies = [
[[package]]
name = "tao"
version = "0.14.0"
source = "git+https://github.com/tauri-apps/tao?branch=dev#38fef1087d217874aee016e237b6c15eedbd0250"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2845fd58915455c5faf2c9ac5d8a5ed43bd23ab57f0a67d63612936209eae74"
dependencies = [
"bitflags",
"cairo-rs",
@ -3088,7 +3110,7 @@ dependencies = [
"gtk",
"image",
"instant",
"jni",
"jni 0.20.0",
"lazy_static",
"libappindicator",
"libc",
@ -3100,7 +3122,7 @@ dependencies = [
"once_cell",
"parking_lot",
"paste",
"png 0.17.6",
"png 0.17.7",
"raw-window-handle",
"scopeguard",
"serde",
@ -3124,7 +3146,7 @@ dependencies = [
[[package]]
name = "tauri"
version = "1.1.1"
version = "1.2.0"
dependencies = [
"anyhow",
"attohttpc",
@ -3154,7 +3176,7 @@ dependencies = [
"os_pipe",
"paste",
"percent-encoding",
"png 0.17.6",
"png 0.17.7",
"rand 0.8.5",
"raw-window-handle",
"regex",
@ -3187,7 +3209,7 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "1.1.1"
version = "1.2.0"
dependencies = [
"anyhow",
"cargo_toml",
@ -3203,7 +3225,7 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "1.1.1"
version = "1.2.0"
dependencies = [
"base64",
"brotli",
@ -3211,7 +3233,7 @@ dependencies = [
"json-patch",
"local-ip-address",
"plist",
"png 0.17.6",
"png 0.17.7",
"proc-macro2",
"quote",
"regex",
@ -3229,7 +3251,7 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "1.1.1"
version = "1.2.0"
dependencies = [
"heck 0.4.0",
"proc-macro2",
@ -3241,7 +3263,7 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "0.11.1"
version = "0.12.0"
dependencies = [
"gtk",
"http",
@ -3259,7 +3281,7 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "0.11.1"
version = "0.12.0"
dependencies = [
"cocoa",
"gtk",
@ -3277,12 +3299,12 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "1.1.1"
version = "1.2.0"
dependencies = [
"aes-gcm",
"brotli",
"ctor",
"getrandom 0.2.7",
"getrandom 0.2.8",
"glob",
"heck 0.4.0",
"html5ever",
@ -3351,9 +3373,9 @@ dependencies = [
[[package]]
name = "textwrap"
version = "0.15.1"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]]
name = "thin-slice"
@ -3392,21 +3414,30 @@ dependencies = [
[[package]]
name = "time"
version = "0.3.15"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c"
checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
dependencies = [
"itoa 1.0.4",
"libc",
"num_threads",
"serde",
"time-core",
"time-macros",
]
[[package]]
name = "time-macros"
version = "0.2.4"
name = "time-core"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
[[package]]
name = "time-macros"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
dependencies = [
"time-core",
]
[[package]]
name = "tiny_http"
@ -3657,7 +3688,7 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83"
dependencies = [
"getrandom 0.2.7",
"getrandom 0.2.8",
]
[[package]]
@ -3843,7 +3874,7 @@ dependencies = [
"pango-sys",
"pkg-config",
"soup2-sys",
"system-deps 6.0.2",
"system-deps 6.0.3",
]
[[package]]
@ -3891,7 +3922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "210952d7163b9ed83a6fd9754ab2a101d14480f8491b5f1d6292771d88dbee70"
dependencies = [
"once_cell",
"windows-sys",
"windows-sys 0.36.1",
]
[[package]]
@ -3934,7 +3965,7 @@ dependencies = [
"cocoa",
"objc",
"raw-window-handle",
"windows-sys",
"windows-sys 0.36.1",
]
[[package]]
@ -3946,7 +3977,7 @@ dependencies = [
"cocoa",
"objc",
"raw-window-handle",
"windows-sys",
"windows-sys 0.36.1",
]
[[package]]
@ -4028,12 +4059,33 @@ dependencies = [
"windows_x86_64_msvc 0.36.1",
]
[[package]]
name = "windows-sys"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc 0.42.0",
"windows_i686_gnu 0.42.0",
"windows_i686_msvc 0.42.0",
"windows_x86_64_gnu 0.42.0",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc 0.42.0",
]
[[package]]
name = "windows-tokens"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
[[package]]
name = "windows_aarch64_msvc"
version = "0.32.0"
@ -4058,6 +4110,12 @@ version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2"
[[package]]
name = "windows_aarch64_msvc"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
[[package]]
name = "windows_i686_gnu"
version = "0.32.0"
@ -4082,6 +4140,12 @@ version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b"
[[package]]
name = "windows_i686_gnu"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
[[package]]
name = "windows_i686_msvc"
version = "0.32.0"
@ -4106,6 +4170,12 @@ version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106"
[[package]]
name = "windows_i686_msvc"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
[[package]]
name = "windows_x86_64_gnu"
version = "0.32.0"
@ -4130,6 +4200,18 @@ version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65"
[[package]]
name = "windows_x86_64_gnu"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
[[package]]
name = "windows_x86_64_msvc"
version = "0.32.0"
@ -4154,6 +4236,12 @@ version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809"
[[package]]
name = "windows_x86_64_msvc"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
[[package]]
name = "winreg"
version = "0.10.1"
@ -4174,14 +4262,16 @@ dependencies = [
[[package]]
name = "wry"
version = "0.21.1"
source = "git+https://github.com/tauri-apps/wry?branch=dev#3183e9333831cc407d2f193995cfda366e7c38d5"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "923d297b203eae65b095af16c02978b7932be1968012b4da7138390edf34dea5"
dependencies = [
"base64",
"block",
"cocoa",
"core-graphics",
"crossbeam-channel",
"dunce",
"gdk",
"gio",
"glib",

View File

@ -1,79 +1,79 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri</title>
</head>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri</title>
</head>
<body>
<h1>Tauri Commands</h1>
<div>Response: <span id="response"></span></div>
<div>Without Args: <span id="response-optional"></span></div>
<div id="container"></div>
<script>
function runCommand(commandName, args, optional) {
const id = optional ? '#response-optional' : '#response'
const result = document.querySelector(id)
window.__TAURI__
.invoke(commandName, args)
.then((response) => {
result.innerText = `Ok(${response})`
})
.catch((error) => {
result.innerText = `Err(${error})`
})
}
const container = document.querySelector('#container')
const commands = [
{ name: 'borrow_cmd' },
{ name: 'window_label' },
{ name: 'simple_command' },
{ name: 'stateful_command' },
{ name: 'async_simple_command' },
{ name: 'async_simple_command_snake' },
{ name: 'future_simple_command' },
{ name: 'async_stateful_command' },
{ name: 'simple_command_with_result' },
// snake
{ name: 'future_simple_command_snake' },
{ name: 'future_simple_command_with_return_snake' },
{ name: 'future_simple_command_with_result_snake' },
{ name: 'force_async_snake' },
{ name: 'force_async_with_result_snake' },
{ name: 'simple_command_with_result_snake' },
{ name: 'stateful_command_with_result_snake' },
// state
{ name: 'stateful_command_with_result' },
{ name: 'async_simple_command_with_result' },
{ name: 'future_simple_command_with_return' },
{ name: 'future_simple_command_with_result' },
{ name: 'async_stateful_command_with_result' },
{ name: 'command_arguments_wild' },
{
name: 'command_arguments_struct',
args: { Person: { name: 'ferris', age: 6 } }
},
{
name: 'command_arguments_tuple_struct',
args: { InlinePerson: ['ferris', 6] }
<body>
<h1>Tauri Commands</h1>
<div>Response: <span id="response"></span></div>
<div>Without Args: <span id="response-optional"></span></div>
<div id="container"></div>
<script>
function runCommand(commandName, args, optional) {
const id = optional ? '#response-optional' : '#response'
const result = document.querySelector(id)
window.__TAURI__
.invoke(commandName, args)
.then((response) => {
result.innerText = `Ok(${response})`
})
.catch((error) => {
result.innerText = `Err(${error})`
})
}
]
for (const command of commands) {
const { name } = command
const args = command.args ?? { [name.endsWith('snake') ? 'the_argument' : 'theArgument']: 'value' }
const button = document.createElement('button')
button.innerHTML = `Run ${name}`
button.addEventListener('click', function () {
runCommand(name, args, false)
runCommand(name, Object.create(null), true)
})
container.appendChild(button)
}
</script>
</body>
const container = document.querySelector('#container')
const commands = [
{ name: 'borrow_cmd' },
{ name: 'window_label' },
{ name: 'simple_command' },
{ name: 'stateful_command' },
{ name: 'async_simple_command' },
{ name: 'async_simple_command_snake' },
{ name: 'future_simple_command' },
{ name: 'async_stateful_command' },
{ name: 'simple_command_with_result' },
// snake
{ name: 'future_simple_command_snake' },
{ name: 'future_simple_command_with_return_snake' },
{ name: 'future_simple_command_with_result_snake' },
{ name: 'force_async_snake' },
{ name: 'force_async_with_result_snake' },
{ name: 'simple_command_with_result_snake' },
{ name: 'stateful_command_with_result_snake' },
// state
{ name: 'stateful_command_with_result' },
{ name: 'async_simple_command_with_result' },
{ name: 'future_simple_command_with_return' },
{ name: 'future_simple_command_with_result' },
{ name: 'async_stateful_command_with_result' },
{ name: 'command_arguments_wild' },
{
name: 'command_arguments_struct',
args: { Person: { name: 'ferris', age: 6 } }
},
{
name: 'command_arguments_tuple_struct',
args: { InlinePerson: ['ferris', 6] }
}
]
for (const command of commands) {
const { name } = command
const args = command.args ?? {
[name.endsWith('snake') ? 'the_argument' : 'theArgument']: 'value'
}
const button = document.createElement('button')
button.innerHTML = `Run ${name}`
button.addEventListener('click', function () {
runCommand(name, args, false)
runCommand(name, Object.create(null), true)
})
container.appendChild(button)
}
</script>
</body>
</html>

View File

@ -177,7 +177,7 @@ async fn async_stateful_command_with_result(
state: State<'_, MyState>,
) -> Result<String, MyError> {
println!("{:?} {:?}", the_argument, state.inner());
Ok(the_argument.unwrap_or_else(|| "".to_string()))
Ok(the_argument.unwrap_or_default())
}
// Non-Ident command function arguments

View File

@ -1,12 +1,8 @@
{
"$schema": "../../core/config-schema/schema.json",
"build": {
"distDir": [
"index.html"
],
"devPath": [
"index.html"
],
"distDir": ["index.html"],
"devPath": ["index.html"],
"beforeDevCommand": "",
"beforeBuildCommand": "",
"withGlobalTauri": true

View File

@ -1,12 +1,8 @@
{
"$schema": "../../core/config-schema/schema.json",
"build": {
"distDir": [
"index.html"
],
"devPath": [
"index.html"
],
"distDir": ["index.html"],
"devPath": ["index.html"],
"beforeDevCommand": "",
"beforeBuildCommand": ""
},

View File

@ -1,89 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<style>
#response {
white-space: pre-wrap;
}
</style>
</head>
<body>
<div id="window-label"></div>
<div id="container"></div>
<div id="response"></div>
<script>
var WebviewWindow = window.__TAURI__.window.WebviewWindow
var appWindow = window.__TAURI__.window.appWindow
var windowLabel = appWindow.label
var windowLabelContainer = document.getElementById('window-label')
windowLabelContainer.innerText = 'This is the ' + windowLabel + ' window.'
var container = document.getElementById('container')
function createWindowMessageBtn(label) {
var tauriWindow = WebviewWindow.getByLabel(label)
var button = document.createElement('button')
button.innerText = 'Send message to ' + label
button.addEventListener('click', function () {
tauriWindow.emit('clicked', 'message from ' + windowLabel)
})
container.appendChild(button)
}
// global listener
window.__TAURI__.event.listen('clicked', function (event) {
responseContainer.innerHTML +=
'Got ' + JSON.stringify(event) + ' on global listener\n\n'
})
window.__TAURI__.event.listen('tauri://window-created', function (event) {
createWindowMessageBtn(event.payload.label)
})
var responseContainer = document.getElementById('response')
// listener tied to this window
appWindow.listen('clicked', function (event) {
responseContainer.innerText +=
'Got ' + JSON.stringify(event) + ' on window listener\n\n'
})
var createWindowButton = document.createElement('button')
createWindowButton.innerHTML = 'Create window'
createWindowButton.addEventListener('click', function () {
var webviewWindow = new WebviewWindow(
Math.random().toString().replace('.', ''),
{
tabbingIdentifier: windowLabel
}
)
webviewWindow.once('tauri://created', function () {
responseContainer.innerHTML += 'Created new webview'
})
webviewWindow.once('tauri://error', function (e) {
responseContainer.innerHTML += 'Error creating new webview'
})
})
container.appendChild(createWindowButton)
var globalMessageButton = document.createElement('button')
globalMessageButton.innerHTML = 'Send global message'
globalMessageButton.addEventListener('click', function () {
// emit to all windows
window.__TAURI__.event.emit('clicked', 'message from ' + windowLabel)
})
container.appendChild(globalMessageButton)
var allWindows = window.__TAURI__.window.getAll()
for (var index in allWindows) {
var label = allWindows[index].label
if (label === windowLabel) {
continue
<head>
<style>
#response {
white-space: pre-wrap;
}
createWindowMessageBtn(label)
}
</script>
</body>
</style>
</head>
</html>
<body>
<div id="window-label"></div>
<div id="container"></div>
<div id="response"></div>
<script>
var WebviewWindow = window.__TAURI__.window.WebviewWindow
var appWindow = window.__TAURI__.window.appWindow
var windowLabel = appWindow.label
var windowLabelContainer = document.getElementById('window-label')
windowLabelContainer.innerText = 'This is the ' + windowLabel + ' window.'
var container = document.getElementById('container')
function createWindowMessageBtn(label) {
var tauriWindow = WebviewWindow.getByLabel(label)
var button = document.createElement('button')
button.innerText = 'Send message to ' + label
button.addEventListener('click', function () {
tauriWindow.emit('clicked', 'message from ' + windowLabel)
})
container.appendChild(button)
}
// global listener
window.__TAURI__.event.listen('clicked', function (event) {
responseContainer.innerHTML +=
'Got ' + JSON.stringify(event) + ' on global listener\n\n'
})
window.__TAURI__.event.listen('tauri://window-created', function (event) {
createWindowMessageBtn(event.payload.label)
})
var responseContainer = document.getElementById('response')
// listener tied to this window
appWindow.listen('clicked', function (event) {
responseContainer.innerText +=
'Got ' + JSON.stringify(event) + ' on window listener\n\n'
})
var createWindowButton = document.createElement('button')
createWindowButton.innerHTML = 'Create window'
createWindowButton.addEventListener('click', function () {
var webviewWindow = new WebviewWindow(
Math.random().toString().replace('.', ''),
{
tabbingIdentifier: windowLabel
}
)
webviewWindow.once('tauri://created', function () {
responseContainer.innerHTML += 'Created new webview'
})
webviewWindow.once('tauri://error', function (e) {
responseContainer.innerHTML += 'Error creating new webview'
})
})
container.appendChild(createWindowButton)
var globalMessageButton = document.createElement('button')
globalMessageButton.innerHTML = 'Send global message'
globalMessageButton.addEventListener('click', function () {
// emit to all windows
window.__TAURI__.event.emit('clicked', 'message from ' + windowLabel)
})
container.appendChild(globalMessageButton)
var allWindows = window.__TAURI__.window.getAll()
for (var index in allWindows) {
var label = allWindows[index].label
if (label === windowLabel) {
continue
}
createWindowMessageBtn(label)
}
</script>
</body>
</html>

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