mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-13 10:48:39 +02:00
Compare commits
126 Commits
feat/comma
...
feat/traci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93452b791a | ||
|
|
6d6b6e653e | ||
|
|
40f137c214 | ||
|
|
e8e214b72e | ||
|
|
eae0150b0a | ||
|
|
51460340bf | ||
|
|
dfb5f52d3c | ||
|
|
80069e1dc0 | ||
|
|
5fcb55e420 | ||
|
|
ee71c31fd0 | ||
|
|
6ff801e27d | ||
|
|
44b4e2ee00 | ||
|
|
5a1d86b346 | ||
|
|
f4c9635724 | ||
|
|
565dc3baa7 | ||
|
|
a3c9754950 | ||
|
|
708efbd9b7 | ||
|
|
da30753754 | ||
|
|
0b46637eba | ||
|
|
d3e4fb20b5 | ||
|
|
919d96dd8a | ||
|
|
6c7eac7288 | ||
|
|
901ce937d6 | ||
|
|
81b9c505cc | ||
|
|
7489f96697 | ||
|
|
a926b49a01 | ||
|
|
5fdc616df9 | ||
|
|
1487b18dcb | ||
|
|
7f820ee190 | ||
|
|
54c6f158d9 | ||
|
|
23282873e7 | ||
|
|
eb1ec0416c | ||
|
|
5e0c4489df | ||
|
|
d788d23071 | ||
|
|
a7ee5ca7c3 | ||
|
|
ff4ea1eabb | ||
|
|
57c6bf07bb | ||
|
|
38ee5066e7 | ||
|
|
8c07076e25 | ||
|
|
2f70d8da2b | ||
|
|
c46c09f31d | ||
|
|
c2867a65d8 | ||
|
|
058469114d | ||
|
|
00c60097c5 | ||
|
|
1d0de2a558 | ||
|
|
1fa729b218 | ||
|
|
808deecfff | ||
|
|
b7a2ce2c63 | ||
|
|
3536aa00d1 | ||
|
|
1c8229fbe2 | ||
|
|
e513b69d98 | ||
|
|
cfcc7f3c20 | ||
|
|
5fdf8dcb8e | ||
|
|
36e4837cea | ||
|
|
17bf7f1f0f | ||
|
|
46e6187c89 | ||
|
|
3d16461b68 | ||
|
|
8661e4a0d7 | ||
|
|
f6c3ea6faa | ||
|
|
bfa69691a5 | ||
|
|
e8014a7f61 | ||
|
|
138cb8d739 | ||
|
|
852e11e17b | ||
|
|
c9364c2a4c | ||
|
|
a8d640b3c6 | ||
|
|
b72adc0a66 | ||
|
|
7e8e0e76ec | ||
|
|
50576a5e1e | ||
|
|
314f0e212f | ||
|
|
f7ac2e9250 | ||
|
|
db7765edad | ||
|
|
d20a728892 | ||
|
|
9da996073f | ||
|
|
ed6b81b29d | ||
|
|
b0d3128597 | ||
|
|
2d9936931a | ||
|
|
0d6bc3b583 | ||
|
|
aff1fd2c7d | ||
|
|
7a17c1e89f | ||
|
|
e71e375c29 | ||
|
|
36540ce3c3 | ||
|
|
275800a603 | ||
|
|
f29c56da8c | ||
|
|
328583e12e | ||
|
|
26f306d65c | ||
|
|
87ea607ef4 | ||
|
|
763f0bdcb0 | ||
|
|
27fa1022ee | ||
|
|
e601b9a790 | ||
|
|
60e6f6c3f1 | ||
|
|
35b587c830 | ||
|
|
b9559b35d1 | ||
|
|
d4f89af18d | ||
|
|
8fb1df8aa6 | ||
|
|
e0631d379c | ||
|
|
581b515e08 | ||
|
|
20ff1f4596 | ||
|
|
fc193a502f | ||
|
|
d4d6a98d98 | ||
|
|
a822a6ad74 | ||
|
|
6ed2b04872 | ||
|
|
7ccfa2fb0b | ||
|
|
1b9f0ec350 | ||
|
|
2455328f81 | ||
|
|
f4fe3beb84 | ||
|
|
54a4a14b41 | ||
|
|
b3591d46e6 | ||
|
|
0b4882ed92 | ||
|
|
ca3a53005a | ||
|
|
6ccfce4180 | ||
|
|
7aca4527e8 | ||
|
|
9d543f6ed3 | ||
|
|
2761dd037f | ||
|
|
9afbeb6b7a | ||
|
|
6e60bd637c | ||
|
|
8e4820642e | ||
|
|
a788aea85d | ||
|
|
7aab3e2076 | ||
|
|
05662b3129 | ||
|
|
62f8659bef | ||
|
|
8ac2f412be | ||
|
|
01b876761a | ||
|
|
8eabb09e80 | ||
|
|
49dff27ef1 | ||
|
|
b08ae637a0 | ||
|
|
8c842a54a6 |
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"api": minor
|
||||
---
|
||||
|
||||
Added the `additionalBrowserArgs` option when creating a window.
|
||||
5
.changes/api-on-resized-on-moved.md
Normal file
5
.changes/api-on-resized-on-moved.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'api': 'patch'
|
||||
---
|
||||
|
||||
Return correct type for `event.payload ` in `onResized` and `onMoved` window event handlers.
|
||||
5
.changes/bundler-msi-mini-version.md
Normal file
5
.changes/bundler-msi-mini-version.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'minor'
|
||||
---
|
||||
|
||||
Added support for pre-release identifiers and build numbers for the `.msi` bundle target. Only one of each can be used and it must be numeric only. The version must still be semver compatible according to https://semver.org/.
|
||||
5
.changes/cli-detect-profile.md
Normal file
5
.changes/cli-detect-profile.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': 'patch'
|
||||
---
|
||||
|
||||
Fix passing `--profile` to cargo in `tauri build` causing conflict with `--release` passed by the CLI.
|
||||
5
.changes/cli-dev-server-available-port.md
Normal file
5
.changes/cli-dev-server-available-port.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'cli.rs': 'patch'
|
||||
---
|
||||
|
||||
Look for available port when using the built-in dev server for static files.
|
||||
5
.changes/cli-dev-server-port.md
Normal file
5
.changes/cli-dev-server-port.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'cli.rs': 'patch'
|
||||
---
|
||||
|
||||
Add `--port` to specify the port used for static files dev server. It can also be specified through `TAURI_DEV_SERVER_PORT` env var.
|
||||
5
.changes/cli-rustc-not-found-msg.md
Normal file
5
.changes/cli-rustc-not-found-msg.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
---
|
||||
|
||||
Improve the error message when `rustc` couldn't be found.
|
||||
6
.changes/cli-sign-non-interactive.md
Normal file
6
.changes/cli-sign-non-interactive.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Add `--ci` flag and respect the `CI` environment variable on the `signer generate` command. In this case the default password will be an empty string and the CLI will not prompt for a value.
|
||||
7
.changes/cli-templates.md
Normal file
7
.changes/cli-templates.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
"cli.js": "patch"
|
||||
---
|
||||
|
||||
Fix Outdated Github Actions in the Plugin Templates `with-api` and `backend`
|
||||
|
||||
6
.changes/cli-watcher-crash.md
Normal file
6
.changes/cli-watcher-crash.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Do not crash on Cargo.toml watcher.
|
||||
7
.changes/cli-windows-paths-print.md
Normal file
7
.changes/cli-windows-paths-print.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"cli.rs": "patch"
|
||||
"tauri-bundler": "patch"
|
||||
---
|
||||
|
||||
On Windows, printing consistent paths on Windows with backslashs only.
|
||||
|
||||
5
.changes/clijs-node-version.md
Normal file
5
.changes/clijs-node-version.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'cli.js': patch
|
||||
---
|
||||
|
||||
Fix crash when nodejs binary has the version in its name, for example `node-18`
|
||||
@@ -211,7 +211,7 @@
|
||||
"dependencies": ["tauri-codegen", "tauri-utils"],
|
||||
"postversion": [
|
||||
"node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||
"cargo build --manifest-path ../config-schema/Cargo.toml"
|
||||
"cargo build --manifest-path ../tauri-config-schema/Cargo.toml"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
@@ -238,7 +238,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/tauri-config-schema/Cargo.toml"
|
||||
],
|
||||
"prepublish": [],
|
||||
"publish": [],
|
||||
@@ -250,7 +250,7 @@
|
||||
"dependencies": ["tauri-bundler", "tauri-utils"],
|
||||
"postversion": [
|
||||
"cargo check",
|
||||
"cargo build --manifest-path ../../core/config-schema/Cargo.toml"
|
||||
"cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
|
||||
5
.changes/core-js-Map.md
Normal file
5
.changes/core-js-Map.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": "patch"
|
||||
---
|
||||
|
||||
Fix serialization of js `Map` when used in `invoke`.
|
||||
5
.changes/core-updater-204.md
Normal file
5
.changes/core-updater-204.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': 'patch'
|
||||
---
|
||||
|
||||
Fix `UpdaterBuilder::check` returning a parsing error when `204` is sent from server where it should instead return a `UpToDate` error.
|
||||
5
.changes/css-preprocessor-mime-type.md
Normal file
5
.changes/css-preprocessor-mime-type.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": patch
|
||||
---
|
||||
|
||||
Correctly determine mime type of `.less`, `.sass` and `.styl` files.
|
||||
6
.changes/empty-tauri-key-password.md
Normal file
6
.changes/empty-tauri-key-password.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Skip the password prompt on the build command when `TAURI_KEY_PASSWORD` environment variable is empty and the `--ci` argument is provided or the `CI` environment variable is set.
|
||||
5
.changes/fix-5781.md
Normal file
5
.changes/fix-5781.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'patch'
|
||||
---
|
||||
|
||||
Fixed error during bundling process for the appimage target on subsequent bundling attempts.
|
||||
6
.changes/fix-cli-default-run.md
Normal file
6
.changes/fix-cli-default-run.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Fix `default-run` not deserialized.
|
||||
6
.changes/fix-dev-server-html-serialization.md
Normal file
6
.changes/fix-dev-server-html-serialization.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Fixes HTML serialization removing template tags on the dev server.
|
||||
5
.changes/fix-dmg-bundle.md
Normal file
5
.changes/fix-dmg-bundle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-bundler": patch
|
||||
---
|
||||
|
||||
Fixes DMG bundling not finding bundle to set icon position.
|
||||
6
.changes/fix-tray-events.md
Normal file
6
.changes/fix-tray-events.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes tray events not being delivered.
|
||||
7
.changes/handlebars-escape.md
Normal file
7
.changes/handlebars-escape.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri-bundler": patch
|
||||
"cli.rs": patch
|
||||
"cli.js": patch
|
||||
---
|
||||
|
||||
Use escaping on Handlebars templates.
|
||||
5
.changes/linux-mouse.md
Normal file
5
.changes/linux-mouse.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-runtime-wry": patch
|
||||
---
|
||||
|
||||
Disable cursor mouse events on Linux.
|
||||
13
.changes/msrv-1.60.md
Normal file
13
.changes/msrv-1.60.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
"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
|
||||
---
|
||||
|
||||
Bump minimum supported Rust version to 1.60.
|
||||
9
.changes/nsis-linux.md
Normal file
9
.changes/nsis-linux.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
"tauri-bundler": minor
|
||||
"tauri-utils": minor
|
||||
"cli.rs": minor
|
||||
"cli.js": minor
|
||||
"tauri-build": minor
|
||||
---
|
||||
|
||||
Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
5
.changes/open-3.2.md
Normal file
5
.changes/open-3.2.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Update the `open` crate to v3.2 to fix an URL encoding bug on Windows.
|
||||
5
.changes/pin-os-info.md
Normal file
5
.changes/pin-os-info.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Pin `os_info` to `=3.5`.
|
||||
7
.changes/pin-raw-window-handle.md
Normal file
7
.changes/pin-raw-window-handle.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"tauri": patch
|
||||
"tauri-runtime": patch
|
||||
"tauri-runtime-wry": patch
|
||||
---
|
||||
|
||||
Pin raw-window-handle to 0.5.0 to keep MSRV.
|
||||
6
.changes/pin-time.md
Normal file
6
.changes/pin-time.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri": patch
|
||||
"tauri-codegen": patch
|
||||
---
|
||||
|
||||
Pin `time` to `0.3.15`.
|
||||
6
.changes/remote-urls.md
Normal file
6
.changes/remote-urls.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri": patch
|
||||
"tauri-utils": patch
|
||||
---
|
||||
|
||||
Added configuration to specify remote URLs allowed to access the IPC.
|
||||
6
.changes/template-default-features.md
Normal file
6
.changes/template-default-features.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'cli.rs': minor
|
||||
'cli.js': minor
|
||||
---
|
||||
|
||||
Remove default features from Cargo.toml template.
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
'cli.rs': 'minor'
|
||||
'tauri-build': 'minor'
|
||||
---
|
||||
|
||||
Add support for Cargo's workspace inheritance for the package version.
|
||||
Added support for Cargo's workspace inheritance for package information. The cli now also detects inherited `tauri` and `tauri-build` dependencies and disables manifest rewrites accordingly.
|
||||
|
||||
5
.changes/window-from-config.md
Normal file
5
.changes/window-from-config.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': 'minor'
|
||||
---
|
||||
|
||||
Add a method to the `WindowBuilder` struct to recreate windows from tauri.conf.json configurations.
|
||||
6
.changes/windows-focused-event.md
Normal file
6
.changes/windows-focused-event.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'tauri': 'patch'
|
||||
'tauri-runtime-wry': 'patch'
|
||||
---
|
||||
|
||||
On Windows, Fix missing `WindowEvent::Focused` in `App::run` callback.
|
||||
6
.github/FUNDING.yml
vendored
6
.github/FUNDING.yml
vendored
@@ -1,6 +1,10 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: nothingismagick
|
||||
github: tauri-apps
|
||||
patreon: #
|
||||
open_collective: tauri
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
|
||||
9
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
9
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: 🐞 Bug Report
|
||||
title: '[bug] '
|
||||
description: Report a bug
|
||||
@@ -43,6 +47,7 @@ body:
|
||||
attributes:
|
||||
label: Platform and versions
|
||||
description: "Output of `npm run tauri info` or `cargo tauri info`"
|
||||
render: text
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -50,8 +55,8 @@ body:
|
||||
id: logs
|
||||
attributes:
|
||||
label: Stack trace
|
||||
render: shell
|
||||
|
||||
render: text
|
||||
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
contact_links:
|
||||
- name: 💬 Discord Chat
|
||||
url: https://discord.com/invite/tauri
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: 💡 Feature Request
|
||||
title: '[feat] '
|
||||
description: Suggest an idea
|
||||
|
||||
3
.github/config.yml
vendored
3
.github/config.yml
vendored
@@ -0,0 +1,3 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
2
.github/workflows/artifacts-updater.yml
vendored
2
.github/workflows/artifacts-updater.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
6
.github/workflows/bench.yml
vendored
6
.github/workflows/bench.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: benches
|
||||
|
||||
on:
|
||||
@@ -23,7 +27,7 @@ jobs:
|
||||
matrix:
|
||||
rust: [nightly]
|
||||
platform:
|
||||
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
|
||||
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 }
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
|
||||
|
||||
2
.github/workflows/change-status-on-PR.yml
vendored
2
.github/workflows/change-status-on-PR.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
35
.github/workflows/check-generated-files.yml
vendored
35
.github/workflows/check-generated-files.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -12,15 +12,17 @@ on:
|
||||
- 'core/tauri/scripts/bundle.global.js'
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
- 'core/tauri-config-schema/schema.json'
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- '.github/workflows/check-generated-files.yml'
|
||||
- 'tooling/api/src/**'
|
||||
- 'core/tauri/scripts/bundle.global.js'
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
- 'core/tauri-config-schema/schema.json'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -30,41 +32,44 @@ jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
bundle: ${{ steps.filter.outputs.bundle }}
|
||||
api: ${{ steps.filter.outputs.api }}
|
||||
schema: ${{ steps.filter.outputs.schema }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
bundle:
|
||||
api:
|
||||
- 'tooling/api/src/**'
|
||||
- 'tooling/api/docs/js-api.json'
|
||||
- 'core/tauri/scripts/bundle.global.js'
|
||||
schema:
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
- 'core/tauri-config-schema/schema.json'
|
||||
|
||||
check-bundle:
|
||||
check-api:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.bundle == 'true'
|
||||
if: needs.changes.outputs.api == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: generate bundle
|
||||
- name: build api
|
||||
working-directory: tooling/api
|
||||
run: yarn && yarn build
|
||||
- name: check bundle
|
||||
run: ./.scripts/ci/has-diff.sh
|
||||
- name: check api
|
||||
run: |
|
||||
git restore tooling/api/docs/js-api.json
|
||||
./.scripts/ci/has-diff.sh
|
||||
|
||||
check-schema:
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.schema == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
@@ -85,7 +90,7 @@ jobs:
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path ./core/config-schema/Cargo.toml
|
||||
args: --manifest-path ./core/tauri-config-schema/Cargo.toml
|
||||
|
||||
- name: check schema
|
||||
run: ./.scripts/ci/has-diff.sh
|
||||
|
||||
28
.github/workflows/check-license-header.yml
vendored
Normal file
28
.github/workflows/check-license-header.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Check generated files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
list-files: shell
|
||||
filters: |
|
||||
added:
|
||||
- added: '**'
|
||||
- name: check header license on new files
|
||||
if: ${{ steps.filter.outputs.added == 'true' }}
|
||||
run: node check-license-header.js ${{ steps.filter.outputs.added_files }}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: docker
|
||||
|
||||
on:
|
||||
|
||||
2
.github/workflows/lint-fmt-cli.yml
vendored
2
.github/workflows/lint-fmt-cli.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
2
.github/workflows/lint-fmt-core.yml
vendored
2
.github/workflows/lint-fmt-core.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
2
.github/workflows/lint-js.yml
vendored
2
.github/workflows/lint-js.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
4
.github/workflows/publish-cli-js.yml
vendored
4
.github/workflows/publish-cli-js.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: publish cli.js
|
||||
env:
|
||||
DEBUG: napi:*
|
||||
|
||||
49
.github/workflows/publish-cli-rs.yml
vendored
49
.github/workflows/publish-cli-rs.yml
vendored
@@ -1,3 +1,7 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: publish cli.rs
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
||||
@@ -8,40 +12,45 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.target.platform }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- {
|
||||
name: 'x86_64-unknown-linux-gnu',
|
||||
platform: 'ubuntu-18.04',
|
||||
ext: ''
|
||||
}
|
||||
- { name: 'x86_64-apple-darwin', platform: 'macos-latest', ext: '' }
|
||||
- {
|
||||
name: 'x86_64-pc-windows-msvc',
|
||||
platform: 'windows-latest',
|
||||
ext: '.exe'
|
||||
}
|
||||
config:
|
||||
- os: ubuntu-18.04
|
||||
rust_target: x86_64-unknown-linux-gnu
|
||||
ext: ''
|
||||
- os: macos-latest
|
||||
rust_target: x86_64-apple-darwin
|
||||
ext: ''
|
||||
- os: macos-latest
|
||||
rust_target: aarch64-apple-darwin
|
||||
ext: ''
|
||||
- os: windows-latest
|
||||
rust_target: x86_64-pc-windows-msvc
|
||||
ext: '.exe'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: 'Setup Rust'
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: ${{ matrix.config.rust_target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: ${{ matrix.config.rust_target }}
|
||||
|
||||
- name: install Linux dependencies
|
||||
if: matrix.target.platform == 'ubuntu-latest'
|
||||
if: matrix.config.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev
|
||||
|
||||
- name: build CLI
|
||||
- name: Build CLI
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
@@ -50,8 +59,8 @@ jobs:
|
||||
- name: Upload CLI
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cargo-tauri-${{ matrix.target.name }}${{ matrix.target.ext }}
|
||||
path: tooling/cli/target/release/cargo-tauri${{ matrix.target.ext }}
|
||||
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
|
||||
path: tooling/cli/target/release/cargo-tauri${{ matrix.config.ext }}
|
||||
if-no-files-found: error
|
||||
|
||||
upload:
|
||||
|
||||
2
.github/workflows/test-bundler.yml
vendored
2
.github/workflows/test-bundler.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
2
.github/workflows/test-cli-js.yml
vendored
2
.github/workflows/test-cli-js.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
2
.github/workflows/test-cli-rs.yml
vendored
2
.github/workflows/test-cli-rs.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
6
.github/workflows/test-core.yml
vendored
6
.github/workflows/test-core.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -39,12 +39,12 @@ jobs:
|
||||
- {
|
||||
target: x86_64-unknown-linux-gnu,
|
||||
os: ubuntu-latest,
|
||||
toolchain: '1.59.0'
|
||||
toolchain: '1.60.0'
|
||||
}
|
||||
- {
|
||||
target: x86_64-apple-darwin,
|
||||
os: macos-latest,
|
||||
toolchain: '1.59.0'
|
||||
toolchain: '1.60.0'
|
||||
}
|
||||
features:
|
||||
- {
|
||||
|
||||
2
.github/workflows/udeps.yml
vendored
2
.github/workflows/udeps.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -9,4 +9,5 @@ dist
|
||||
/tooling/cli/templates
|
||||
/tooling/cli/node
|
||||
/tooling/cli/schema.json
|
||||
/core/config-schema/schema.json
|
||||
/tooling/api/docs/js-api.json
|
||||
/core/tauri-config-schema/schema.json
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
module.exports = {
|
||||
singleQuote: true,
|
||||
semi: false,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env pwsh
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -19,10 +19,10 @@ let url = null
|
||||
switch (kind) {
|
||||
case 'cargo':
|
||||
url = `https://crates.io/api/v1/crates/${packageName}`
|
||||
break;
|
||||
break
|
||||
case 'npm':
|
||||
url = `https://registry.npmjs.org/${packageName}`
|
||||
break;
|
||||
break
|
||||
default:
|
||||
throw new Error('unexpected kind ' + kind)
|
||||
}
|
||||
@@ -30,7 +30,7 @@ switch (kind) {
|
||||
const options = {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
Accept: 'application/json',
|
||||
'User-Agent': 'tauri (https://github.com/tauri-apps/tauri)'
|
||||
}
|
||||
}
|
||||
@@ -44,10 +44,12 @@ https.get(url, options, (response) => {
|
||||
response.on('end', function () {
|
||||
const data = JSON.parse(chunks.join(''))
|
||||
if (kind === 'cargo') {
|
||||
const versions = data.versions.filter(v => v.num.startsWith(target))
|
||||
const versions = data.versions.filter((v) => v.num.startsWith(target))
|
||||
console.log(versions.length ? versions[0].num : '0.0.0')
|
||||
} else if (kind === 'npm') {
|
||||
const versions = Object.keys(data.versions).filter(v => v.startsWith(target))
|
||||
const versions = Object.keys(data.versions).filter((v) =>
|
||||
v.startsWith(target)
|
||||
)
|
||||
console.log(versions[versions.length - 1] || '0.0.0')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env pwsh
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
REM Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
REM SPDX-License-Identifier: Apache-2.0
|
||||
REM SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ members = [
|
||||
"core/tauri-utils",
|
||||
"core/tauri-build",
|
||||
"core/tauri-codegen",
|
||||
"core/config-schema",
|
||||
"core/tauri-config-schema",
|
||||
|
||||
# integration tests
|
||||
"core/tests/restart",
|
||||
"core/tests/app-updater"
|
||||
"core/tests/app-updater",
|
||||
]
|
||||
|
||||
exclude = [
|
||||
@@ -22,7 +22,7 @@ exclude = [
|
||||
"examples/resources/src-tauri",
|
||||
"examples/sidecar/src-tauri",
|
||||
"examples/web/core",
|
||||
"examples/workspace"
|
||||
"examples/workspace",
|
||||
]
|
||||
|
||||
# default to small, optimized workspace release binaries
|
||||
|
||||
102
check-license-header.js
Normal file
102
check-license-header.js
Normal file
@@ -0,0 +1,102 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const readline = require('readline')
|
||||
|
||||
const header = `Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
SPDX-License-Identifier: MIT`
|
||||
const bundlerLicense = '// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle>'
|
||||
|
||||
const extensions = ['.rs', '.js', '.ts', '.yml']
|
||||
const ignore = ['target', 'templates', 'node_modules', 'gen', 'dist', 'bundle.js', 'bundle.global.js']
|
||||
|
||||
async function checkFile(file) {
|
||||
if (extensions.some(e => file.endsWith(e))) {
|
||||
const fileStream = fs.createReadStream(file)
|
||||
const rl = readline.createInterface({
|
||||
input: fileStream,
|
||||
crlfDelay: Infinity
|
||||
})
|
||||
|
||||
let contents = ``
|
||||
let i = 0
|
||||
for await (let line of rl) {
|
||||
// ignore empty lines, allow shebang and bundler license
|
||||
if (line.length === 0 || line.startsWith("#!") || line === bundlerLicense) {
|
||||
continue
|
||||
}
|
||||
|
||||
// strip comment marker
|
||||
if (line.startsWith('// ')) {
|
||||
line = line.substring(3)
|
||||
} else if (line.startsWith('# ')) {
|
||||
line = line.substring(2)
|
||||
}
|
||||
|
||||
contents += line
|
||||
if (++i === 3) {
|
||||
break
|
||||
}
|
||||
contents += '\n'
|
||||
}
|
||||
if (contents !== header) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
async function check(src) {
|
||||
const missingHeader = []
|
||||
|
||||
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
||||
const p = path.join(src, entry.name)
|
||||
|
||||
if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
const missing = await check(p)
|
||||
missingHeader.push(...missing)
|
||||
} else {
|
||||
const isMissing = await checkFile(p)
|
||||
if (isMissing) {
|
||||
missingHeader.push(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return missingHeader
|
||||
}
|
||||
|
||||
const [_bin, _script, ...files] = process.argv
|
||||
|
||||
if (files.length > 0) {
|
||||
async function run() {
|
||||
const missing = []
|
||||
for (const f of files) {
|
||||
const isMissing = await checkFile(f)
|
||||
if (isMissing) {
|
||||
missing.push(f)
|
||||
}
|
||||
}
|
||||
if (missing.length > 0) {
|
||||
console.log(missing.join('\n'))
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
||||
} else {
|
||||
check('.').then(missing => {
|
||||
if (missing.length > 0) {
|
||||
console.log(missing.join('\n'))
|
||||
process.exit(1)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
[package]
|
||||
name = "config-schema"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[build-dependencies]
|
||||
tauri-utils = { version = "1.0.0", features = [ "schema" ], path = "../tauri-utils" }
|
||||
schemars = { version = "0.8", features = [ "url", "preserve_order" ] }
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
serde_json = "1.0"
|
||||
serde_with = "1.12"
|
||||
url = { version = "2.3", features = [ "serde" ] }
|
||||
@@ -1 +0,0 @@
|
||||
fn main() {}
|
||||
@@ -8,7 +8,7 @@ homepage = "https://tauri.app"
|
||||
repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-build"
|
||||
description = "build time code to pair with https://crates.io/crates/tauri"
|
||||
edition = "2021"
|
||||
rust-version = "1.59"
|
||||
rust-version = "1.60"
|
||||
exclude = [ "CHANGELOG.md", "/target" ]
|
||||
readme = "README.md"
|
||||
|
||||
@@ -21,13 +21,14 @@ anyhow = "1"
|
||||
quote = { version = "1", optional = true }
|
||||
tauri-codegen = { version = "1.2.1", path = "../tauri-codegen", optional = true }
|
||||
tauri-utils = { version = "1.2.1", path = "../tauri-utils", features = [ "build", "resources" ] }
|
||||
cargo_toml = "0.14"
|
||||
cargo_toml = "0.15"
|
||||
serde = "1"
|
||||
serde_json = "1"
|
||||
heck = "0.4"
|
||||
json-patch = "0.3"
|
||||
json-patch = "1.0"
|
||||
|
||||
[target."cfg(windows)".dependencies]
|
||||
winres = "0.1"
|
||||
# dependencies for Windows targets
|
||||
tauri-winres = "0.1"
|
||||
semver = "1"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#![cfg_attr(doc_cfg, feature(doc_cfg))]
|
||||
|
||||
pub use anyhow::Result;
|
||||
use cargo_toml::{Dependency, Manifest};
|
||||
use heck::AsShoutySnakeCase;
|
||||
|
||||
use tauri_utils::resources::{external_binaries, resource_relpath, ResourcePaths};
|
||||
use tauri_utils::{
|
||||
config::Config,
|
||||
resources::{external_binaries, resource_relpath, ResourcePaths},
|
||||
};
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[cfg(feature = "codegen")]
|
||||
mod codegen;
|
||||
#[cfg(windows)]
|
||||
mod static_vcruntime;
|
||||
|
||||
#[cfg(feature = "codegen")]
|
||||
@@ -243,8 +246,6 @@ pub fn build() {
|
||||
#[allow(unused_variables)]
|
||||
pub fn try_build(attributes: Attributes) -> Result<()> {
|
||||
use anyhow::anyhow;
|
||||
use cargo_toml::{Dependency, Manifest};
|
||||
use tauri_utils::config::{Config, TauriConfig};
|
||||
|
||||
println!("cargo:rerun-if-env-changed=TAURI_CONFIG");
|
||||
println!("cargo:rerun-if-changed=tauri.conf.json");
|
||||
@@ -269,50 +270,33 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
|
||||
|
||||
cfg_alias("dev", !has_feature("custom-protocol"));
|
||||
|
||||
let mut manifest = Manifest::from_path("Cargo.toml")?;
|
||||
let ws_path = get_workspace_dir()?;
|
||||
let mut manifest =
|
||||
Manifest::<cargo_toml::Value>::from_slice_with_metadata(&std::fs::read("Cargo.toml")?)?;
|
||||
|
||||
if let Ok(ws_manifest) = Manifest::from_path(ws_path.join("Cargo.toml")) {
|
||||
Manifest::complete_from_path_and_workspace(
|
||||
&mut manifest,
|
||||
Path::new("Cargo.toml"),
|
||||
Some((&ws_manifest, ws_path.as_path())),
|
||||
)?;
|
||||
} else {
|
||||
Manifest::complete_from_path(&mut manifest, Path::new("Cargo.toml"))?;
|
||||
}
|
||||
|
||||
if let Some(tauri_build) = manifest.build_dependencies.remove("tauri-build") {
|
||||
let error_message = check_features(&config, tauri_build, true);
|
||||
|
||||
if !error_message.is_empty() {
|
||||
return Err(anyhow!("
|
||||
The `tauri-build` dependency features on the `Cargo.toml` file does not match the allowlist defined under `tauri.conf.json`.
|
||||
Please run `tauri dev` or `tauri build` or {}.
|
||||
", error_message));
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(tauri) = manifest.dependencies.remove("tauri") {
|
||||
let features = match tauri {
|
||||
Dependency::Simple(_) => Vec::new(),
|
||||
Dependency::Detailed(dep) => dep.features,
|
||||
Dependency::Inherited(dep) => dep.features,
|
||||
};
|
||||
|
||||
let all_cli_managed_features = TauriConfig::all_features();
|
||||
let diff = features_diff(
|
||||
&features
|
||||
.into_iter()
|
||||
.filter(|f| all_cli_managed_features.contains(&f.as_str()))
|
||||
.collect::<Vec<String>>(),
|
||||
&config
|
||||
.tauri
|
||||
.features()
|
||||
.into_iter()
|
||||
.map(|f| f.to_string())
|
||||
.collect::<Vec<String>>(),
|
||||
);
|
||||
|
||||
let mut error_message = String::new();
|
||||
if !diff.remove.is_empty() {
|
||||
error_message.push_str("remove the `");
|
||||
error_message.push_str(&diff.remove.join(", "));
|
||||
error_message.push_str(if diff.remove.len() == 1 {
|
||||
"` feature"
|
||||
} else {
|
||||
"` features"
|
||||
});
|
||||
if !diff.add.is_empty() {
|
||||
error_message.push_str(" and ");
|
||||
}
|
||||
}
|
||||
if !diff.add.is_empty() {
|
||||
error_message.push_str("add the `");
|
||||
error_message.push_str(&diff.add.join(", "));
|
||||
error_message.push_str(if diff.add.len() == 1 {
|
||||
"` feature"
|
||||
} else {
|
||||
"` features"
|
||||
});
|
||||
}
|
||||
let error_message = check_features(&config, tauri, false);
|
||||
|
||||
if !error_message.is_empty() {
|
||||
return Err(anyhow!("
|
||||
@@ -344,25 +328,25 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
|
||||
|
||||
#[allow(unused_mut, clippy::redundant_clone)]
|
||||
let mut resources = config.tauri.bundle.resources.clone().unwrap_or_default();
|
||||
#[cfg(windows)]
|
||||
if let Some(fixed_webview2_runtime_path) = &config.tauri.bundle.windows.webview_fixed_runtime_path
|
||||
{
|
||||
resources.push(fixed_webview2_runtime_path.display().to_string());
|
||||
if target_triple.contains("windows") {
|
||||
if let Some(fixed_webview2_runtime_path) =
|
||||
&config.tauri.bundle.windows.webview_fixed_runtime_path
|
||||
{
|
||||
resources.push(fixed_webview2_runtime_path.display().to_string());
|
||||
}
|
||||
}
|
||||
copy_resources(ResourcePaths::new(resources.as_slice(), true), target_dir)?;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
if let Some(version) = config.tauri.bundle.macos.minimum_system_version {
|
||||
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={}", version);
|
||||
if target_triple.contains("darwin") {
|
||||
if let Some(version) = &config.tauri.bundle.macos.minimum_system_version {
|
||||
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={version}");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
if target_triple.contains("windows") {
|
||||
use anyhow::Context;
|
||||
use semver::Version;
|
||||
use winres::{VersionInfo, WindowsResource};
|
||||
use tauri_winres::{VersionInfo, WindowsResource};
|
||||
|
||||
fn find_icon<F: Fn(&&String) -> bool>(config: &Config, predicate: F, default: &str) -> PathBuf {
|
||||
let icon_path = config
|
||||
@@ -486,6 +470,89 @@ fn features_diff(current: &[String], expected: &[String]) -> Diff {
|
||||
Diff { remove, add }
|
||||
}
|
||||
|
||||
fn check_features(config: &Config, dependency: Dependency, is_tauri_build: bool) -> String {
|
||||
use tauri_utils::config::{PatternKind, TauriConfig};
|
||||
|
||||
let features = match dependency {
|
||||
Dependency::Simple(_) => Vec::new(),
|
||||
Dependency::Detailed(dep) => dep.features,
|
||||
Dependency::Inherited(dep) => dep.features,
|
||||
};
|
||||
|
||||
let all_cli_managed_features = if is_tauri_build {
|
||||
vec!["isolation"]
|
||||
} else {
|
||||
TauriConfig::all_features()
|
||||
};
|
||||
|
||||
let expected = if is_tauri_build {
|
||||
match config.tauri.pattern {
|
||||
PatternKind::Isolation { .. } => vec!["isolation".to_string()],
|
||||
_ => vec![],
|
||||
}
|
||||
} else {
|
||||
config
|
||||
.tauri
|
||||
.features()
|
||||
.into_iter()
|
||||
.map(|f| f.to_string())
|
||||
.collect::<Vec<String>>()
|
||||
};
|
||||
|
||||
let diff = features_diff(
|
||||
&features
|
||||
.into_iter()
|
||||
.filter(|f| all_cli_managed_features.contains(&f.as_str()))
|
||||
.collect::<Vec<String>>(),
|
||||
&expected,
|
||||
);
|
||||
|
||||
let mut error_message = String::new();
|
||||
if !diff.remove.is_empty() {
|
||||
error_message.push_str("remove the `");
|
||||
error_message.push_str(&diff.remove.join(", "));
|
||||
error_message.push_str(if diff.remove.len() == 1 {
|
||||
"` feature"
|
||||
} else {
|
||||
"` features"
|
||||
});
|
||||
if !diff.add.is_empty() {
|
||||
error_message.push_str(" and ");
|
||||
}
|
||||
}
|
||||
if !diff.add.is_empty() {
|
||||
error_message.push_str("add the `");
|
||||
error_message.push_str(&diff.add.join(", "));
|
||||
error_message.push_str(if diff.add.len() == 1 {
|
||||
"` feature"
|
||||
} else {
|
||||
"` features"
|
||||
});
|
||||
}
|
||||
|
||||
error_message
|
||||
}
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
struct CargoMetadata {
|
||||
workspace_root: PathBuf,
|
||||
}
|
||||
|
||||
fn get_workspace_dir() -> Result<PathBuf> {
|
||||
let output = std::process::Command::new("cargo")
|
||||
.args(["metadata", "--no-deps", "--format-version", "1"])
|
||||
.output()?;
|
||||
|
||||
if !output.status.success() {
|
||||
return Err(anyhow::anyhow!(
|
||||
"cargo metadata command exited with a non zero exit code: {}",
|
||||
String::from_utf8(output.stderr)?
|
||||
));
|
||||
}
|
||||
|
||||
Ok(serde_json::from_slice::<CargoMetadata>(&output.stdout)?.workspace_root)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Diff;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -48,11 +48,11 @@ fn override_msvcrt_lib() {
|
||||
let f = fs::OpenOptions::new()
|
||||
.write(true)
|
||||
.create_new(true)
|
||||
.open(&path);
|
||||
.open(path);
|
||||
if let Ok(mut f) = f {
|
||||
f.write_all(machine).unwrap();
|
||||
f.write_all(bytes).unwrap();
|
||||
}
|
||||
// Add the output directory to the native library path.
|
||||
println!("cargo:rustc-link-search=native={}", out_dir);
|
||||
println!("cargo:rustc-link-search=native={out_dir}");
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ homepage = "https://tauri.app"
|
||||
repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen"
|
||||
description = "code generation meant to be consumed inside of `tauri` through `tauri-build` or `tauri-macros`"
|
||||
edition = "2021"
|
||||
rust-version = "1.59"
|
||||
rust-version = "1.60"
|
||||
exclude = [ "CHANGELOG.md", "/target" ]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
sha2 = "0.10"
|
||||
base64 = "0.20"
|
||||
base64 = "0.21"
|
||||
proc-macro2 = "1"
|
||||
quote = "1"
|
||||
serde = { version = "1", features = [ "derive" ] }
|
||||
@@ -23,16 +23,16 @@ tauri-utils = { version = "1.2.1", path = "../tauri-utils", features = [ "build"
|
||||
thiserror = "1"
|
||||
walkdir = "2"
|
||||
brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] }
|
||||
regex = { version = "1.7.0", optional = true }
|
||||
regex = { version = "1.7.1", optional = true }
|
||||
uuid = { version = "1", features = [ "v4" ] }
|
||||
semver = "1"
|
||||
ico = "0.3"
|
||||
png = "0.17"
|
||||
json-patch = "0.3"
|
||||
json-patch = "1.0"
|
||||
|
||||
[target."cfg(target_os = \"macos\")".dependencies]
|
||||
plist = "1"
|
||||
time = { version = "0.3", features = [ "parsing", "formatting" ] }
|
||||
time = { version = "=0.3.15", features = [ "parsing", "formatting" ] }
|
||||
|
||||
[features]
|
||||
default = [ "compression" ]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{ffi::OsStr, str::FromStr};
|
||||
|
||||
use base64::Engine;
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::quote;
|
||||
use sha2::{Digest, Sha256};
|
||||
@@ -57,7 +58,10 @@ 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::engine::general_purpose::STANDARD.encode(hash)
|
||||
));
|
||||
}
|
||||
csp_hashes
|
||||
.inline_scripts
|
||||
@@ -74,9 +78,10 @@ fn map_core_assets(
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(tauri_utils::pattern::isolation::IFRAME_STYLE);
|
||||
let hash = hasher.finalize();
|
||||
csp_hashes
|
||||
.styles
|
||||
.push(format!("'sha256-{}'", base64::encode(hash)));
|
||||
csp_hashes.styles.push(format!(
|
||||
"'sha256-{}'",
|
||||
base64::engine::general_purpose::STANDARD.encode(hash)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use base64::Engine;
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::{quote, ToTokens, TokenStreamExt};
|
||||
use sha2::{Digest, Sha256};
|
||||
@@ -181,9 +182,10 @@ impl CspHashes {
|
||||
})?,
|
||||
);
|
||||
let hash = hasher.finalize();
|
||||
self
|
||||
.scripts
|
||||
.push(format!("'sha256-{}'", base64::encode(hash)));
|
||||
self.scripts.push(format!(
|
||||
"'sha256-{}'",
|
||||
base64::engine::general_purpose::STANDARD.encode(hash)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,6 +433,7 @@ impl ToTokens for EmbeddedAssets {
|
||||
|
||||
// we expect phf related items to be in path when generating the path code
|
||||
tokens.append_all(quote! {{
|
||||
#[allow(unused)]
|
||||
use ::tauri::utils::assets::{CspHash, EmbeddedAssets, phf, phf::phf_map};
|
||||
EmbeddedAssets::new(phf_map! { #assets }, &[#global_hashes], phf_map! { #html_hashes })
|
||||
}});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
2
core/tauri-codegen/src/vendor/mod.rs
vendored
2
core/tauri-codegen/src/vendor/mod.rs
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
15
core/tauri-config-schema/Cargo.toml
Normal file
15
core/tauri-config-schema/Cargo.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "tauri-tauri-config-schema"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[build-dependencies]
|
||||
tauri-utils = { version = "1.0.0", features = [
|
||||
"schema",
|
||||
], path = "../tauri-utils" }
|
||||
schemars = { version = "0.8", features = ["url", "preserve_order"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_with = "1.12"
|
||||
url = { version = "2.3", features = ["serde"] }
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
},
|
||||
"security": {
|
||||
"dangerousDisableAssetCspModification": false,
|
||||
"dangerousRemoteDomainIpcAccess": [],
|
||||
"freezePrototype": false
|
||||
},
|
||||
"updater": {
|
||||
@@ -208,7 +209,7 @@
|
||||
"additionalProperties": false,
|
||||
"definitions": {
|
||||
"PackageConfig": {
|
||||
"description": "The package configuration.",
|
||||
"description": "The package configuration.\n\nSee more: https://tauri.app/v1/api/config#packageconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"productName": {
|
||||
@@ -231,7 +232,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"TauriConfig": {
|
||||
"description": "The Tauri configuration object.",
|
||||
"description": "The Tauri configuration object.\n\nSee more: https://tauri.app/v1/api/config#tauriconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pattern": {
|
||||
@@ -415,6 +416,7 @@
|
||||
"description": "Security configuration.",
|
||||
"default": {
|
||||
"dangerousDisableAssetCspModification": false,
|
||||
"dangerousRemoteDomainIpcAccess": [],
|
||||
"freezePrototype": false
|
||||
},
|
||||
"allOf": [
|
||||
@@ -508,7 +510,7 @@
|
||||
]
|
||||
},
|
||||
"WindowConfig": {
|
||||
"description": "The window configuration object.",
|
||||
"description": "The window configuration object.\n\nSee more: https://tauri.app/v1/api/config#windowconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
@@ -764,7 +766,7 @@
|
||||
]
|
||||
},
|
||||
"CliConfig": {
|
||||
"description": "describes a CLI configuration",
|
||||
"description": "describes a CLI configuration\n\nSee more: https://tauri.app/v1/api/config#cliconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
@@ -1010,7 +1012,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"BundleConfig": {
|
||||
"description": "Configuration for tauri-bundler.",
|
||||
"description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"identifier"
|
||||
@@ -1236,7 +1238,7 @@
|
||||
]
|
||||
},
|
||||
"AppImageConfig": {
|
||||
"description": "Configuration for AppImage bundles.",
|
||||
"description": "Configuration for AppImage bundles.\n\nSee more: https://tauri.app/v1/api/config#appimageconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bundleMediaFramework": {
|
||||
@@ -1248,7 +1250,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"DebConfig": {
|
||||
"description": "Configuration for Debian (.deb) bundles.",
|
||||
"description": "Configuration for Debian (.deb) bundles.\n\nSee more: https://tauri.app/v1/api/config#debconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"depends": {
|
||||
@@ -1273,7 +1275,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MacConfig": {
|
||||
"description": "Configuration for the macOS bundles.",
|
||||
"description": "Configuration for the macOS bundles.\n\nSee more: https://tauri.app/v1/api/config#macconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"frameworks": {
|
||||
@@ -1333,7 +1335,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"WindowsConfig": {
|
||||
"description": "Windows bundler configuration.",
|
||||
"description": "Windows bundler configuration.\n\nSee more: https://tauri.app/v1/api/config#windowsconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"digestAlgorithm": {
|
||||
@@ -1431,7 +1433,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"description": "Download the bootstrapper and run it. Requires internet connection. Results in a smaller installer size, but is not recommended on Windows 7.",
|
||||
"description": "Download the bootstrapper and run it. Requires an internet connection. Results in a smaller installer size, but is not recommended on Windows 7.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
@@ -1452,7 +1454,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"description": "Embed the bootstrapper and run it. Requires internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.",
|
||||
"description": "Embed the bootstrapper and run it. Requires an internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
@@ -1473,7 +1475,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"description": "Embed the offline installer and run it. Does not require internet connection. Increases the installer size by around 127MB.",
|
||||
"description": "Embed the offline installer and run it. Does not require an internet connection. Increases the installer size by around 127MB.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
@@ -1517,7 +1519,7 @@
|
||||
]
|
||||
},
|
||||
"WixConfig": {
|
||||
"description": "Configuration for the MSI bundle using WiX.",
|
||||
"description": "Configuration for the MSI bundle using WiX.\n\nSee more: https://tauri.app/v1/api/config#wixconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"language": {
|
||||
@@ -1642,7 +1644,7 @@
|
||||
]
|
||||
},
|
||||
"WixLanguageConfig": {
|
||||
"description": "Configuration for a target language for the WiX build.",
|
||||
"description": "Configuration for a target language for the WiX build.\n\nSee more: https://tauri.app/v1/api/config#wixlanguageconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"localePath": {
|
||||
@@ -1695,6 +1697,21 @@
|
||||
"$ref": "#/definitions/NSISInstallerMode"
|
||||
}
|
||||
]
|
||||
},
|
||||
"languages": {
|
||||
"description": "A list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set `display_language_selector` to `true`.\n\nSee <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"displayLanguageSelector": {
|
||||
"description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -1941,7 +1958,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"FsAllowlistConfig": {
|
||||
"description": "Allowlist for the file system APIs.",
|
||||
"description": "Allowlist for the file system APIs.\n\nSee more: https://tauri.app/v1/api/config#fsallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
@@ -2041,7 +2058,7 @@
|
||||
]
|
||||
},
|
||||
"WindowAllowlistConfig": {
|
||||
"description": "Allowlist for the window APIs.",
|
||||
"description": "Allowlist for the window APIs.\n\nSee more: https://tauri.app/v1/api/config#windowallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2203,7 +2220,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ShellAllowlistConfig": {
|
||||
"description": "Allowlist for the shell APIs.",
|
||||
"description": "Allowlist for the shell APIs.\n\nSee more: https://tauri.app/v1/api/config#shellallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
@@ -2334,7 +2351,7 @@
|
||||
]
|
||||
},
|
||||
"DialogAllowlistConfig": {
|
||||
"description": "Allowlist for the dialog APIs.",
|
||||
"description": "Allowlist for the dialog APIs.\n\nSee more: https://tauri.app/v1/api/config#dialogallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2371,7 +2388,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"HttpAllowlistConfig": {
|
||||
"description": "Allowlist for the HTTP APIs.",
|
||||
"description": "Allowlist for the HTTP APIs.\n\nSee more: https://tauri.app/v1/api/config#httpallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
@@ -2405,7 +2422,7 @@
|
||||
}
|
||||
},
|
||||
"NotificationAllowlistConfig": {
|
||||
"description": "Allowlist for the notification APIs.",
|
||||
"description": "Allowlist for the notification APIs.\n\nSee more: https://tauri.app/v1/api/config#notificationallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2417,7 +2434,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"GlobalShortcutAllowlistConfig": {
|
||||
"description": "Allowlist for the global shortcut APIs.",
|
||||
"description": "Allowlist for the global shortcut APIs.\n\nSee more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2429,7 +2446,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"OsAllowlistConfig": {
|
||||
"description": "Allowlist for the OS APIs.",
|
||||
"description": "Allowlist for the OS APIs.\n\nSee more: https://tauri.app/v1/api/config#osallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2441,7 +2458,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"PathAllowlistConfig": {
|
||||
"description": "Allowlist for the path APIs.",
|
||||
"description": "Allowlist for the path APIs.\n\nSee more: https://tauri.app/v1/api/config#pathallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2453,7 +2470,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ProtocolAllowlistConfig": {
|
||||
"description": "Allowlist for the custom protocols.",
|
||||
"description": "Allowlist for the custom protocols.\n\nSee more: https://tauri.app/v1/api/config#protocolallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assetScope": {
|
||||
@@ -2479,7 +2496,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ProcessAllowlistConfig": {
|
||||
"description": "Allowlist for the process APIs.",
|
||||
"description": "Allowlist for the process APIs.\n\nSee more: https://tauri.app/v1/api/config#processallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2506,7 +2523,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ClipboardAllowlistConfig": {
|
||||
"description": "Allowlist for the clipboard APIs.",
|
||||
"description": "Allowlist for the clipboard APIs.\n\nSee more: https://tauri.app/v1/api/config#clipboardallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2528,7 +2545,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"AppAllowlistConfig": {
|
||||
"description": "Allowlist for the app APIs.",
|
||||
"description": "Allowlist for the app APIs.\n\nSee more: https://tauri.app/v1/api/config#appallowlistconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"all": {
|
||||
@@ -2550,7 +2567,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SecurityConfig": {
|
||||
"description": "Security configuration.",
|
||||
"description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"csp": {
|
||||
@@ -2588,6 +2605,14 @@
|
||||
"$ref": "#/definitions/DisabledCspModificationKind"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dangerousRemoteDomainIpcAccess": {
|
||||
"description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.",
|
||||
"default": [],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/RemoteDomainAccessScope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -2640,8 +2665,50 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"RemoteDomainAccessScope": {
|
||||
"description": "External command access definition.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"domain",
|
||||
"windows"
|
||||
],
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"description": "The URL scheme to allow. By default, all schemas are allowed.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"domain": {
|
||||
"description": "The domain to allow.",
|
||||
"type": "string"
|
||||
},
|
||||
"windows": {
|
||||
"description": "The list of window labels this scope applies to.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
"description": "The list of plugins that are allowed in this scope.",
|
||||
"default": [],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"enableTauriAPI": {
|
||||
"description": "Enables access to the Tauri API.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"UpdaterConfig": {
|
||||
"description": "The Updater configuration object.",
|
||||
"description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
@@ -2690,7 +2757,7 @@
|
||||
"format": "uri"
|
||||
},
|
||||
"UpdaterWindowsConfig": {
|
||||
"description": "The updater configuration for Windows.",
|
||||
"description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"installerArgs": {
|
||||
@@ -2740,7 +2807,7 @@
|
||||
]
|
||||
},
|
||||
"SystemTrayConfig": {
|
||||
"description": "Configuration for application system tray icon.",
|
||||
"description": "Configuration for application system tray icon.\n\nSee more: https://tauri.app/v1/api/config#systemtrayconfig",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"iconPath"
|
||||
@@ -2771,7 +2838,7 @@
|
||||
"additionalProperties": false
|
||||
},
|
||||
"BuildConfig": {
|
||||
"description": "The Build configuration object.",
|
||||
"description": "The Build configuration object.\n\nSee more: https://tauri.app/v1/api/config#buildconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"runner": {
|
||||
@@ -2934,7 +3001,7 @@
|
||||
]
|
||||
},
|
||||
"PluginConfig": {
|
||||
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.",
|
||||
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\nSee more: https://tauri.app/v1/api/config#pluginconfig",
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
5
core/tauri-config-schema/src/main.rs
Normal file
5
core/tauri-config-schema/src/main.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
fn main() {}
|
||||
@@ -8,7 +8,7 @@ homepage = "https://tauri.app"
|
||||
repository = "https://github.com/tauri-apps/tauri"
|
||||
description = "Macros for the tauri crate."
|
||||
edition = "2021"
|
||||
rust-version = "1.59"
|
||||
rust-version = "1.60"
|
||||
exclude = [ "CHANGELOG.md", "/target" ]
|
||||
readme = "README.md"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -8,17 +8,17 @@ homepage = "https://tauri.app"
|
||||
repository = "https://github.com/tauri-apps/tauri"
|
||||
description = "Wry bindings to the Tauri runtime"
|
||||
edition = "2021"
|
||||
rust-version = "1.59"
|
||||
rust-version = "1.60"
|
||||
exclude = [ "CHANGELOG.md", "/target" ]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
wry = { git = "https://github.com/tauri-apps/wry", default-features = false, features = [ "file-drop", "protocol" ] }
|
||||
wry = { version = "0.24.1", default-features = false, features = [ "file-drop", "protocol" ] }
|
||||
tauri-runtime = { version = "0.12.1", path = "../tauri-runtime" }
|
||||
tauri-utils = { version = "1.2.1", path = "../tauri-utils" }
|
||||
uuid = { version = "1", features = [ "v4" ] }
|
||||
rand = "0.8"
|
||||
raw-window-handle = "0.5"
|
||||
raw-window-handle = "=0.5.0"
|
||||
|
||||
[target."cfg(windows)".dependencies]
|
||||
webview2-com = "0.19.1"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user