mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 16:08:21 +03:00
Merge branch 'dev' into next
This commit is contained in:
commit
4585a1cbb0
@ -1,5 +0,0 @@
|
||||
---
|
||||
'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.
|
@ -209,7 +209,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": [
|
||||
{
|
||||
@ -237,7 +237,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": [],
|
||||
@ -249,7 +249,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/fix-wix-escape-resources.md
Normal file
5
.changes/fix-wix-escape-resources.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'patch'
|
||||
---
|
||||
|
||||
Correctly escape XML for resource files in WiX bundler.
|
8
.changes/nsis-spanish.md
Normal file
8
.changes/nsis-spanish.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
'tauri-bundler': 'patch'
|
||||
---
|
||||
|
||||
Added the following languages to the NSIS bundler:
|
||||
|
||||
- `Spanish`
|
||||
- `SpanishInternational`
|
5
.changes/nsis-webview-installmodes.md
Normal file
5
.changes/nsis-webview-installmodes.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'patch'
|
||||
---
|
||||
|
||||
Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.
|
7
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
7
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -30,11 +30,10 @@ body:
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: Reproduction
|
||||
description: Steps to reproduce the behavior.
|
||||
description: A link to a reproduction repo or steps to reproduce the behaviour.
|
||||
placeholder: |
|
||||
1. Go to ...
|
||||
2. Click on ...
|
||||
3. See error
|
||||
Please provide a minimal reproduction or steps to reproduce, see this guide https://stackoverflow.com/help/minimal-reproducible-example
|
||||
Why reproduction is required? see this article https://antfu.me/posts/why-reproductions-are-required
|
||||
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
|
8
.github/workflows/check-generated-files.yml
vendored
8
.github/workflows/check-generated-files.yml
vendored
@ -12,7 +12,7 @@ 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
|
||||
@ -22,7 +22,7 @@ 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'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@ -47,7 +47,7 @@ jobs:
|
||||
schema:
|
||||
- 'core/tauri-utils/src/config.rs'
|
||||
- 'tooling/cli/schema.json'
|
||||
- 'core/config-schema/schema.json'
|
||||
- 'core/tauri-config-schema/schema.json'
|
||||
|
||||
check-api:
|
||||
runs-on: ubuntu-latest
|
||||
@ -90,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
|
||||
|
18
.github/workflows/publish-cli-js.yml
vendored
18
.github/workflows/publish-cli-js.yml
vendored
@ -33,11 +33,11 @@ jobs:
|
||||
yarn build:release --features openssl-vendored
|
||||
strip -x *.node
|
||||
- host: windows-latest
|
||||
build: yarn build:release
|
||||
build: yarn build:release --features openssl-vendored
|
||||
target: x86_64-pc-windows-msvc
|
||||
architecture: x64
|
||||
- host: windows-latest
|
||||
build: yarn build:release --target i686-pc-windows-msvc
|
||||
build: yarn build:release --features openssl-vendored --target i686-pc-windows-msvc
|
||||
target: i686-pc-windows-msvc
|
||||
architecture: x64
|
||||
- host: ubuntu-20.04
|
||||
@ -45,14 +45,14 @@ jobs:
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release --target x86_64-unknown-linux-gnu
|
||||
yarn build:release --features openssl-vendored --target x86_64-unknown-linux-gnu
|
||||
strip *.node
|
||||
- host: ubuntu-20.04
|
||||
target: x86_64-unknown-linux-musl
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release
|
||||
yarn build:release --features openssl-vendored
|
||||
strip *.node
|
||||
- host: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release --target aarch64-unknown-linux-gnu
|
||||
yarn build:release --features openssl-vendored --target aarch64-unknown-linux-gnu
|
||||
aarch64-unknown-linux-gnu-strip *.node
|
||||
- host: ubuntu-20.04
|
||||
architecture: x64
|
||||
@ -73,7 +73,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
|
||||
build: |
|
||||
yarn build:release --target=armv7-unknown-linux-gnueabihf
|
||||
yarn build:release --features openssl-vendored --target=armv7-unknown-linux-gnueabihf
|
||||
arm-linux-gnueabihf-strip *.node
|
||||
- host: ubuntu-20.04
|
||||
architecture: x64
|
||||
@ -82,12 +82,12 @@ jobs:
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
rustup target add aarch64-unknown-linux-musl
|
||||
yarn build:release --target aarch64-unknown-linux-musl
|
||||
yarn build:release --features openssl-vendored --target aarch64-unknown-linux-musl
|
||||
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
|
||||
#- host: windows-latest
|
||||
# architecture: x64
|
||||
# target: aarch64-pc-windows-msvc
|
||||
# build: yarn build:release --target aarch64-pc-windows-msvc
|
||||
# build: yarn build:release --features openssl-vendored --target aarch64-pc-windows-msvc
|
||||
name: stable - ${{ matrix.settings.target }} - node@16
|
||||
runs-on: ${{ matrix.settings.host }}
|
||||
steps:
|
||||
@ -181,7 +181,7 @@ jobs:
|
||||
# freebsd-version
|
||||
# cd ./tooling/cli/node/
|
||||
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
# yarn build:release
|
||||
# yarn build:release --features openssl-vendored
|
||||
# strip -x *.node
|
||||
# rm -rf node_modules
|
||||
# rm -rf ../target
|
||||
|
@ -10,4 +10,4 @@ dist
|
||||
/tooling/cli/node
|
||||
/tooling/cli/schema.json
|
||||
/tooling/api/docs/js-api.json
|
||||
/core/config-schema/schema.json
|
||||
/core/tauri-config-schema/schema.json
|
||||
|
@ -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')
|
||||
}
|
||||
})
|
||||
|
@ -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
|
||||
|
@ -1,13 +0,0 @@
|
||||
[package]
|
||||
name = "config-schema"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[build-dependencies]
|
||||
tauri-utils = { path = "../tauri-utils", features = [ "schema" ] }
|
||||
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" ] }
|
@ -32,6 +32,19 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
- [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19
|
||||
- Add `WindowsAttributes::app_manifest` to specify the application manifest on Windows.
|
||||
- [bca09f7f](https://www.github.com/tauri-apps/tauri/commit/bca09f7f5ff1c9c5a4b51da043bdd5da668a179b) feat(tauri-build): add option to specify Windows manifest, closes [#5584](https://www.github.com/tauri-apps/tauri/pull/5584) ([#5730](https://www.github.com/tauri-apps/tauri/pull/5730)) on 2022-12-14
|
||||
- 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.
|
||||
- [cd8c074a](https://www.github.com/tauri-apps/tauri/commit/cd8c074ae6592303d3f6844a4fb6d262eae913b2) feat(cli): add support for Cargo's workspace inheritance for the package version, closes [#5070](https://www.github.com/tauri-apps/tauri/pull/5070) ([#5775](https://www.github.com/tauri-apps/tauri/pull/5775)) on 2022-12-14
|
||||
- [d20a7288](https://www.github.com/tauri-apps/tauri/commit/d20a728892eee1858ab525ab6216cd721f473ab5) feat: Further improve workspace inheritance, closes [#6122](https://www.github.com/tauri-apps/tauri/pull/6122), [#5070](https://www.github.com/tauri-apps/tauri/pull/5070) ([#6144](https://www.github.com/tauri-apps/tauri/pull/6144)) on 2023-01-26
|
||||
- Pin `winnow` crate to 0.4.1 to keep the 1.60 MSRV.
|
||||
|
||||
## \[1.2.1]
|
||||
|
||||
- Fix `allowlist > app > show/hide` always disabled when `allowlist > app > all: false`.
|
||||
|
@ -21,11 +21,11 @@ anyhow = "1"
|
||||
quote = { version = "1", optional = true }
|
||||
tauri-codegen = { version = "2.0.0-alpha.4", path = "../tauri-codegen", optional = true }
|
||||
tauri-utils = { version = "2.0.0-alpha.4", 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"
|
||||
walkdir = "2"
|
||||
filetime = "0.2"
|
||||
tauri-winres = "0.1"
|
||||
|
@ -30,6 +30,13 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Pin `time` to `0.3.15`.
|
||||
- [3d16461b](https://www.github.com/tauri-apps/tauri/commit/3d16461b68583ba7db037fbc217786e79b46ddf2) fix(core): pin time to 0.3.15 ([#6312](https://www.github.com/tauri-apps/tauri/pull/6312)) on 2023-02-19
|
||||
|
||||
## \[1.2.1]
|
||||
|
||||
- Fix `allowlist > app > show/hide` always disabled when `allowlist > app > all: false`.
|
||||
|
@ -27,7 +27,7 @@ uuid = { version = "1", features = [ "v4" ] }
|
||||
semver = "1"
|
||||
ico = "0.3"
|
||||
png = "0.17"
|
||||
json-patch = "0.3"
|
||||
json-patch = "1.0"
|
||||
url = "2"
|
||||
|
||||
[target."cfg(target_os = \"macos\")".dependencies]
|
||||
|
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 = "2.0.0-alpha.4", 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"] }
|
@ -168,6 +168,7 @@
|
||||
},
|
||||
"security": {
|
||||
"dangerousDisableAssetCspModification": false,
|
||||
"dangerousRemoteDomainIpcAccess": [],
|
||||
"freezePrototype": false
|
||||
},
|
||||
"updater": {
|
||||
@ -413,6 +414,7 @@
|
||||
"description": "Security configuration.",
|
||||
"default": {
|
||||
"dangerousDisableAssetCspModification": false,
|
||||
"dangerousRemoteDomainIpcAccess": [],
|
||||
"freezePrototype": false
|
||||
},
|
||||
"allOf": [
|
||||
@ -2413,6 +2415,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
|
||||
@ -2465,6 +2475,48 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"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.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig",
|
||||
"type": "object",
|
@ -36,6 +36,11 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
|
||||
## \[1.2.1]
|
||||
|
||||
- Fix `allowlist > app > show/hide` always disabled when `allowlist > app > all: false`.
|
||||
|
@ -36,6 +36,42 @@
|
||||
- Support `with_webview` for Android platform alowing execution of JNI code in context.
|
||||
- [8ea87e9c](https://www.github.com/tauri-apps/tauri/commit/8ea87e9c9ca8ba4c7017c8281f78aacd08f45785) feat(android): with_webview access for jni execution ([#5148](https://www.github.com/tauri-apps/tauri/pull/5148)) on 2022-09-08
|
||||
|
||||
## \[0.13.0]
|
||||
|
||||
- Added the `additional_browser_args` option when creating a window.
|
||||
- [3dc38b15](https://www.github.com/tauri-apps/tauri/commit/3dc38b150ea8c59c8ba67fd586f921016928f47c) feat(core): expose additional_browser_args to window config (fix: [#5757](https://www.github.com/tauri-apps/tauri/pull/5757)) ([#5799](https://www.github.com/tauri-apps/tauri/pull/5799)) on 2022-12-14
|
||||
- Added the `content_protected` option when creating a window and `Window::set_content_protected` to change it at runtime.
|
||||
- [4ab5545b](https://www.github.com/tauri-apps/tauri/commit/4ab5545b7a831c549f3c65e74de487ede3ab7ce5) feat: add content protection api, closes [#5132](https://www.github.com/tauri-apps/tauri/pull/5132) ([#5513](https://www.github.com/tauri-apps/tauri/pull/5513)) on 2022-12-13
|
||||
- Added `Builder::device_event_filter` and `App::set_device_event_filter` methods.
|
||||
- [73fd60ee](https://www.github.com/tauri-apps/tauri/commit/73fd60eef2b60f5dc84525ef9c315f4d80c4414f) expose set_device_event_filter in tauri ([#5562](https://www.github.com/tauri-apps/tauri/pull/5562)) on 2022-12-13
|
||||
- Fixes tray events not being delivered.
|
||||
- [138cb8d7](https://www.github.com/tauri-apps/tauri/commit/138cb8d739b15bccdb388e555c20f17ffe16318c) fix(tauri-runtime-wry): tray event listener not registered ([#6270](https://www.github.com/tauri-apps/tauri/pull/6270)) on 2023-02-14
|
||||
- Add `is_minimized()` window method.
|
||||
- [62144ef3](https://www.github.com/tauri-apps/tauri/commit/62144ef3be63b237869e511826edfb938e2c7174) feat: add is_minimized (fix [#3878](https://www.github.com/tauri-apps/tauri/pull/3878)) ([#5618](https://www.github.com/tauri-apps/tauri/pull/5618)) on 2022-12-13
|
||||
- Disable cursor mouse events on Linux.
|
||||
- [8c842a54](https://www.github.com/tauri-apps/tauri/commit/8c842a54a6f3dc5327b4d737df7123dcddaa5769) feature: disable mouse event when building windows on Linux, closes [#5913](https://www.github.com/tauri-apps/tauri/pull/5913) ([#6025](https://www.github.com/tauri-apps/tauri/pull/6025)) on 2023-01-16
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Pin raw-window-handle to 0.5.0 to keep MSRV.
|
||||
- [c46c09f3](https://www.github.com/tauri-apps/tauri/commit/c46c09f31d9f5169ca8a7e62406a9ea170e3a5c5) fix(deps): pin raw-window-handle to 0.5.0 ([#6480](https://www.github.com/tauri-apps/tauri/pull/6480)) on 2023-03-17
|
||||
- Add `title` getter on window.
|
||||
- [233e43b0](https://www.github.com/tauri-apps/tauri/commit/233e43b0c34fada1ca025378533a0b76931a6540) feat: add `title` getter on window, closes [#5023](https://www.github.com/tauri-apps/tauri/pull/5023) ([#5515](https://www.github.com/tauri-apps/tauri/pull/5515)) on 2022-12-13
|
||||
- Added `TrayHandle::set_tooltip` and `SystemTray::with_tooltip`.
|
||||
- [2265e097](https://www.github.com/tauri-apps/tauri/commit/2265e09718f6ebfeb1d200f11e1e1e069075af6e) feat(windows): implement `with_tooltip` ([#5938](https://www.github.com/tauri-apps/tauri/pull/5938)) on 2023-01-01
|
||||
- Added window's `url()` getter.
|
||||
- [d17027e1](https://www.github.com/tauri-apps/tauri/commit/d17027e1a0db3e8c5ae81fc4f472c5918fbce611) feat: expose url method ([#5914](https://www.github.com/tauri-apps/tauri/pull/5914)) on 2022-12-26
|
||||
- On Windows, change webview theme based on Window theme for more accurate `prefers-color-scheme` support.
|
||||
- [7a8d570d](https://www.github.com/tauri-apps/tauri/commit/7a8d570db72667367eb24b75ddc5dd07a968f7c0) fix: sync webview theme with window theme on Windows, closes [#5802](https://www.github.com/tauri-apps/tauri/pull/5802) ([#5874](https://www.github.com/tauri-apps/tauri/pull/5874)) on 2022-12-27
|
||||
- On Windows, Fix missing `WindowEvent::Focused` in `App::run` callback.
|
||||
- [ff4ea1ea](https://www.github.com/tauri-apps/tauri/commit/ff4ea1eabbf2874b113c6b4698002929bbac737a) fix: dispatch focus event to app.run on Windows, closes [#6460](https://www.github.com/tauri-apps/tauri/pull/6460) ([#6504](https://www.github.com/tauri-apps/tauri/pull/6504)) on 2023-03-31
|
||||
- Implement the webview navigation handler.
|
||||
- [3f35b452](https://www.github.com/tauri-apps/tauri/commit/3f35b452637ef1c794a423f1eda62a15d2ddaf42) Expose wry navigation_handler via WindowBuilder closes [#4080](https://www.github.com/tauri-apps/tauri/pull/4080) ([#5686](https://www.github.com/tauri-apps/tauri/pull/5686)) on 2022-12-27
|
||||
|
||||
## \[0.12.3]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [9c0593c33](https://www.github.com/tauri-apps/tauri/commit/9c0593c33af52cd9e00ec784d15f63efebdf039c) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[0.12.2]
|
||||
|
||||
- Fix compatibility with older Linux distributions.
|
||||
@ -81,6 +117,11 @@
|
||||
- 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.2]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [58ea0b452](https://www.github.com/tauri-apps/tauri/commit/58ea0b45268dbd46cbac0ebb0887353d057ca767) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[0.11.1]
|
||||
|
||||
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.
|
||||
@ -100,6 +141,11 @@
|
||||
- Update windows to 0.39.0 and webview2-com to 0.19.1.
|
||||
- [e6d9b670](https://www.github.com/tauri-apps/tauri/commit/e6d9b670b0b314ed667b0e164f2c8d27048e678f) refactor: remove unneeded focus code ([#5065](https://www.github.com/tauri-apps/tauri/pull/5065)) on 2022-09-03
|
||||
|
||||
## \[0.10.3]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [fa90214b0](https://www.github.com/tauri-apps/tauri/commit/fa90214b052b1a5d38d54fbf1ca422b4c37cfd1f) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[0.10.2]
|
||||
|
||||
- Disable drag-n-drop of tao based on `fileDropEnabled` value.
|
||||
|
@ -204,6 +204,7 @@ impl<T: UserEvent> Context<T> {
|
||||
impl<T: UserEvent> Context<T> {
|
||||
fn create_webview(&self, pending: PendingWindow<T, Wry<T>>) -> Result<DetachedWindow<T, Wry<T>>> {
|
||||
let label = pending.label.clone();
|
||||
let current_url = pending.current_url.clone();
|
||||
let menu_ids = pending.menu_ids.clone();
|
||||
let js_event_listeners = pending.js_event_listeners.clone();
|
||||
let context = self.clone();
|
||||
@ -225,6 +226,7 @@ impl<T: UserEvent> Context<T> {
|
||||
};
|
||||
Ok(DetachedWindow {
|
||||
label,
|
||||
current_url,
|
||||
dispatcher,
|
||||
menu_ids,
|
||||
js_event_listeners,
|
||||
@ -1940,6 +1942,7 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
|
||||
|
||||
fn create_window(&self, pending: PendingWindow<T, Self>) -> Result<DetachedWindow<T, Self>> {
|
||||
let label = pending.label.clone();
|
||||
let current_url = pending.current_url.clone();
|
||||
let menu_ids = pending.menu_ids.clone();
|
||||
let js_event_listeners = pending.js_event_listeners.clone();
|
||||
let window_id = rand::random();
|
||||
@ -1966,6 +1969,7 @@ impl<T: UserEvent> Runtime<T> for Wry<T> {
|
||||
|
||||
Ok(DetachedWindow {
|
||||
label,
|
||||
current_url,
|
||||
dispatcher,
|
||||
menu_ids,
|
||||
js_event_listeners,
|
||||
@ -2936,7 +2940,7 @@ fn create_webview<T: UserEvent>(
|
||||
mut window_builder,
|
||||
ipc_handler,
|
||||
label,
|
||||
url,
|
||||
current_url,
|
||||
menu_ids,
|
||||
js_event_listeners,
|
||||
#[cfg(target_os = "android")]
|
||||
@ -2987,7 +2991,7 @@ fn create_webview<T: UserEvent>(
|
||||
}
|
||||
let mut webview_builder = WebViewBuilder::new(window)
|
||||
.map_err(|e| Error::CreateWebview(Box::new(e)))?
|
||||
.with_url(&url)
|
||||
.with_url(current_url.lock().unwrap().as_str())
|
||||
.unwrap() // safe to unwrap because we validate the URL beforehand
|
||||
.with_transparent(is_window_transparent)
|
||||
.with_accept_first_mouse(webview_attributes.accept_first_mouse);
|
||||
@ -3022,6 +3026,7 @@ fn create_webview<T: UserEvent>(
|
||||
webview_builder = webview_builder.with_ipc_handler(create_ipc_handler(
|
||||
context,
|
||||
label.clone(),
|
||||
current_url,
|
||||
menu_ids,
|
||||
js_event_listeners,
|
||||
handler,
|
||||
@ -3145,6 +3150,7 @@ fn create_webview<T: UserEvent>(
|
||||
fn create_ipc_handler<T: UserEvent>(
|
||||
context: Context<T>,
|
||||
label: String,
|
||||
current_url: Arc<Mutex<Url>>,
|
||||
menu_ids: Arc<Mutex<HashMap<MenuHash, MenuId>>>,
|
||||
js_event_listeners: Arc<Mutex<HashMap<JsEventListenerKey, HashSet<u64>>>>,
|
||||
handler: WebviewIpcHandler<T, Wry<T>>,
|
||||
@ -3153,6 +3159,7 @@ fn create_ipc_handler<T: UserEvent>(
|
||||
let window_id = context.webview_id_map.get(&window.id()).unwrap();
|
||||
handler(
|
||||
DetachedWindow {
|
||||
current_url: current_url.clone(),
|
||||
dispatcher: WryDispatcher {
|
||||
window_id,
|
||||
context: context.clone(),
|
||||
|
@ -36,6 +36,36 @@
|
||||
- Bumped due to a bump in tauri-utils.
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[0.13.0]
|
||||
|
||||
- Added the `additional_browser_args` option when creating a window.
|
||||
- [3dc38b15](https://www.github.com/tauri-apps/tauri/commit/3dc38b150ea8c59c8ba67fd586f921016928f47c) feat(core): expose additional_browser_args to window config (fix: [#5757](https://www.github.com/tauri-apps/tauri/pull/5757)) ([#5799](https://www.github.com/tauri-apps/tauri/pull/5799)) on 2022-12-14
|
||||
- Added the `content_protected` option when creating a window and `Window::set_content_protected` to change it at runtime.
|
||||
- [4ab5545b](https://www.github.com/tauri-apps/tauri/commit/4ab5545b7a831c549f3c65e74de487ede3ab7ce5) feat: add content protection api, closes [#5132](https://www.github.com/tauri-apps/tauri/pull/5132) ([#5513](https://www.github.com/tauri-apps/tauri/pull/5513)) on 2022-12-13
|
||||
- Added `Builder::device_event_filter` and `App::set_device_event_filter` methods.
|
||||
- [73fd60ee](https://www.github.com/tauri-apps/tauri/commit/73fd60eef2b60f5dc84525ef9c315f4d80c4414f) expose set_device_event_filter in tauri ([#5562](https://www.github.com/tauri-apps/tauri/pull/5562)) on 2022-12-13
|
||||
- Add `is_minimized()` window method.
|
||||
- [62144ef3](https://www.github.com/tauri-apps/tauri/commit/62144ef3be63b237869e511826edfb938e2c7174) feat: add is_minimized (fix [#3878](https://www.github.com/tauri-apps/tauri/pull/3878)) ([#5618](https://www.github.com/tauri-apps/tauri/pull/5618)) on 2022-12-13
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Pin raw-window-handle to 0.5.0 to keep MSRV.
|
||||
- [c46c09f3](https://www.github.com/tauri-apps/tauri/commit/c46c09f31d9f5169ca8a7e62406a9ea170e3a5c5) fix(deps): pin raw-window-handle to 0.5.0 ([#6480](https://www.github.com/tauri-apps/tauri/pull/6480)) on 2023-03-17
|
||||
- Added `navigation_handler` field on `PendingWindow`.
|
||||
- [3f35b452](https://www.github.com/tauri-apps/tauri/commit/3f35b452637ef1c794a423f1eda62a15d2ddaf42) Expose wry navigation_handler via WindowBuilder closes [#4080](https://www.github.com/tauri-apps/tauri/pull/4080) ([#5686](https://www.github.com/tauri-apps/tauri/pull/5686)) on 2022-12-27
|
||||
- Add `title` getter on window.
|
||||
- [233e43b0](https://www.github.com/tauri-apps/tauri/commit/233e43b0c34fada1ca025378533a0b76931a6540) feat: add `title` getter on window, closes [#5023](https://www.github.com/tauri-apps/tauri/pull/5023) ([#5515](https://www.github.com/tauri-apps/tauri/pull/5515)) on 2022-12-13
|
||||
- Added `TrayHandle::set_tooltip` and `SystemTray::with_tooltip`.
|
||||
- [2265e097](https://www.github.com/tauri-apps/tauri/commit/2265e09718f6ebfeb1d200f11e1e1e069075af6e) feat(windows): implement `with_tooltip` ([#5938](https://www.github.com/tauri-apps/tauri/pull/5938)) on 2023-01-01
|
||||
- Added window's `url()` getter.
|
||||
- [d17027e1](https://www.github.com/tauri-apps/tauri/commit/d17027e1a0db3e8c5ae81fc4f472c5918fbce611) feat: expose url method ([#5914](https://www.github.com/tauri-apps/tauri/pull/5914)) on 2022-12-26
|
||||
- On Windows, change webview theme based on Window theme for more accurate `prefers-color-scheme` support.
|
||||
- [7a8d570d](https://www.github.com/tauri-apps/tauri/commit/7a8d570db72667367eb24b75ddc5dd07a968f7c0) fix: sync webview theme with window theme on Windows, closes [#5802](https://www.github.com/tauri-apps/tauri/pull/5802) ([#5874](https://www.github.com/tauri-apps/tauri/pull/5874)) on 2022-12-27
|
||||
|
||||
## \[0.12.2]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [9c0593c33](https://www.github.com/tauri-apps/tauri/commit/9c0593c33af52cd9e00ec784d15f63efebdf039c) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[0.12.1]
|
||||
|
||||
- Fix `allowlist > app > show/hide` always disabled when `allowlist > app > all: false`.
|
||||
@ -56,6 +86,11 @@
|
||||
- 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.2]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [58ea0b452](https://www.github.com/tauri-apps/tauri/commit/58ea0b45268dbd46cbac0ebb0887353d057ca767) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[0.11.1]
|
||||
|
||||
- Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.
|
||||
@ -69,6 +104,11 @@
|
||||
- Update windows to 0.39.0 and webview2-com to 0.19.1.
|
||||
- [e6d9b670](https://www.github.com/tauri-apps/tauri/commit/e6d9b670b0b314ed667b0e164f2c8d27048e678f) refactor: remove unneeded focus code ([#5065](https://www.github.com/tauri-apps/tauri/pull/5065)) on 2022-09-03
|
||||
|
||||
## \[0.10.3]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [fa90214b0](https://www.github.com/tauri-apps/tauri/commit/fa90214b052b1a5d38d54fbf1ca422b4c37cfd1f) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[0.10.2]
|
||||
|
||||
- Added option to disable tray menu on left click on macOS.
|
||||
|
@ -227,9 +227,6 @@ pub struct PendingWindow<T: UserEvent, R: Runtime<T>> {
|
||||
/// How to handle IPC calls on the webview window.
|
||||
pub ipc_handler: Option<WebviewIpcHandler<T, R>>,
|
||||
|
||||
/// The resolved URL to load on the webview.
|
||||
pub url: String,
|
||||
|
||||
/// Maps runtime id to a string menu id.
|
||||
pub menu_ids: Arc<Mutex<HashMap<MenuHash, MenuId>>>,
|
||||
|
||||
@ -239,6 +236,9 @@ pub struct PendingWindow<T: UserEvent, R: Runtime<T>> {
|
||||
/// A handler to decide if incoming url is allowed to navigate.
|
||||
pub navigation_handler: Option<Box<dyn Fn(Url) -> bool + Send>>,
|
||||
|
||||
/// The current webview URL.
|
||||
pub current_url: Arc<Mutex<Url>>,
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub on_webview_created:
|
||||
@ -279,10 +279,10 @@ impl<T: UserEvent, R: Runtime<T>> PendingWindow<T, R> {
|
||||
uri_scheme_protocols: Default::default(),
|
||||
label,
|
||||
ipc_handler: None,
|
||||
url: "tauri://localhost".to_string(),
|
||||
menu_ids: Arc::new(Mutex::new(menu_ids)),
|
||||
js_event_listeners: Default::default(),
|
||||
navigation_handler: Default::default(),
|
||||
current_url: Arc::new(Mutex::new("tauri://localhost".parse().unwrap())),
|
||||
#[cfg(target_os = "android")]
|
||||
on_webview_created: None,
|
||||
})
|
||||
@ -311,10 +311,10 @@ impl<T: UserEvent, R: Runtime<T>> PendingWindow<T, R> {
|
||||
uri_scheme_protocols: Default::default(),
|
||||
label,
|
||||
ipc_handler: None,
|
||||
url: "tauri://localhost".to_string(),
|
||||
menu_ids: Arc::new(Mutex::new(menu_ids)),
|
||||
js_event_listeners: Default::default(),
|
||||
navigation_handler: Default::default(),
|
||||
current_url: Arc::new(Mutex::new("tauri://localhost".parse().unwrap())),
|
||||
#[cfg(target_os = "android")]
|
||||
on_webview_created: None,
|
||||
})
|
||||
@ -368,6 +368,9 @@ pub struct JsEventListenerKey {
|
||||
/// A webview window that is not yet managed by Tauri.
|
||||
#[derive(Debug)]
|
||||
pub struct DetachedWindow<T: UserEvent, R: Runtime<T>> {
|
||||
/// The current webview URL.
|
||||
pub current_url: Arc<Mutex<Url>>,
|
||||
|
||||
/// Name of the window
|
||||
pub label: String,
|
||||
|
||||
@ -384,6 +387,7 @@ pub struct DetachedWindow<T: UserEvent, R: Runtime<T>> {
|
||||
impl<T: UserEvent, R: Runtime<T>> Clone for DetachedWindow<T, R> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
current_url: self.current_url.clone(),
|
||||
label: self.label.clone(),
|
||||
dispatcher: self.dispatcher.clone(),
|
||||
menu_ids: self.menu_ids.clone(),
|
||||
|
@ -29,6 +29,23 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Added the `additional_browser_args` option to the window configuration.
|
||||
- [3dc38b15](https://www.github.com/tauri-apps/tauri/commit/3dc38b150ea8c59c8ba67fd586f921016928f47c) feat(core): expose additional_browser_args to window config (fix: [#5757](https://www.github.com/tauri-apps/tauri/pull/5757)) ([#5799](https://www.github.com/tauri-apps/tauri/pull/5799)) on 2022-12-14
|
||||
- Added the `content_protected` option to the window configuration.
|
||||
- [4ab5545b](https://www.github.com/tauri-apps/tauri/commit/4ab5545b7a831c549f3c65e74de487ede3ab7ce5) feat: add content protection api, closes [#5132](https://www.github.com/tauri-apps/tauri/pull/5132) ([#5513](https://www.github.com/tauri-apps/tauri/pull/5513)) on 2022-12-13
|
||||
- Correctly determine mime type of `.less`, `.sass` and `.styl` files.
|
||||
- [5fdf8dcb](https://www.github.com/tauri-apps/tauri/commit/5fdf8dcb8ed171d06121dceb32078a7e4f86cc64) fix(core): mime type of .less, .sass and .styl files ([#6316](https://www.github.com/tauri-apps/tauri/pull/6316)) on 2023-02-19
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
- [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19
|
||||
- Add `nsis` bundle target
|
||||
- [c94e1326](https://www.github.com/tauri-apps/tauri/commit/c94e1326a7c0767a13128a8b1d327a00156ece12) feat(bundler): add `nsis`, closes [#4450](https://www.github.com/tauri-apps/tauri/pull/4450), closes [#2319](https://www.github.com/tauri-apps/tauri/pull/2319) ([#4674](https://www.github.com/tauri-apps/tauri/pull/4674)) on 2023-01-03
|
||||
- Added configuration to specify remote URLs allowed to access the IPC.
|
||||
- [ee71c31f](https://www.github.com/tauri-apps/tauri/commit/ee71c31fd09cc5427da6d29d37c003a914547696) feat(core): allow configuring remote domains with IPC access, closes [#5088](https://www.github.com/tauri-apps/tauri/pull/5088) ([#5918](https://www.github.com/tauri-apps/tauri/pull/5918)) on 2023-04-11
|
||||
|
||||
## \[1.2.1]
|
||||
|
||||
- Fix `allowlist > app > show/hide` always disabled when `allowlist > app > all: false`.
|
||||
|
@ -23,14 +23,14 @@ html5ever = "0.25"
|
||||
proc-macro2 = { version = "1", optional = true }
|
||||
quote = { version = "1", optional = true }
|
||||
schemars = { version = "0.8", features = [ "url" ], optional = true }
|
||||
serde_with = "1"
|
||||
serde_with = "2"
|
||||
aes-gcm = { version = "0.10", optional = true }
|
||||
getrandom = { version = "0.2", optional = true, features = [ "std" ] }
|
||||
serialize-to-javascript = { version = "=0.1.1", optional = true }
|
||||
ctor = "0.1"
|
||||
json5 = { version = "0.4", optional = true }
|
||||
toml = { version = "0.5", optional = true }
|
||||
json-patch = "0.3"
|
||||
json-patch = "1.0"
|
||||
glob = { version = "0.3", optional = true }
|
||||
walkdir = { version = "2", optional = true }
|
||||
memchr = "2"
|
||||
|
@ -1005,6 +1005,25 @@ impl Default for DisabledCspModificationKind {
|
||||
}
|
||||
}
|
||||
|
||||
/// External command access definition.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
|
||||
#[cfg_attr(feature = "schema", derive(JsonSchema))]
|
||||
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
||||
pub struct RemoteDomainAccessScope {
|
||||
/// The URL scheme to allow. By default, all schemas are allowed.
|
||||
pub scheme: Option<String>,
|
||||
/// The domain to allow.
|
||||
pub domain: String,
|
||||
/// The list of window labels this scope applies to.
|
||||
pub windows: Vec<String>,
|
||||
/// The list of plugins that are allowed in this scope.
|
||||
#[serde(default)]
|
||||
pub plugins: Vec<String>,
|
||||
/// Enables access to the Tauri API.
|
||||
#[serde(default, rename = "enableTauriAPI", alias = "enable-tauri-api")]
|
||||
pub enable_tauri_api: bool,
|
||||
}
|
||||
|
||||
/// Security configuration.
|
||||
///
|
||||
/// See more: https://tauri.app/v1/api/config#securityconfig
|
||||
@ -1042,6 +1061,20 @@ pub struct SecurityConfig {
|
||||
/// Your application might be vulnerable to XSS attacks without this Tauri protection.
|
||||
#[serde(default, alias = "dangerous-disable-asset-csp-modification")]
|
||||
pub dangerous_disable_asset_csp_modification: DisabledCspModificationKind,
|
||||
/// Allow external domains to send command to Tauri.
|
||||
///
|
||||
/// By 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.
|
||||
///
|
||||
/// This 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.
|
||||
///
|
||||
/// **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.
|
||||
#[serde(default, alias = "dangerous-remote-domain-ipc-access")]
|
||||
pub dangerous_remote_domain_ipc_access: Vec<RemoteDomainAccessScope>,
|
||||
}
|
||||
|
||||
/// Defines an allowlist type.
|
||||
@ -3313,12 +3346,34 @@ mod build {
|
||||
}
|
||||
}
|
||||
|
||||
impl ToTokens for RemoteDomainAccessScope {
|
||||
fn to_tokens(&self, tokens: &mut TokenStream) {
|
||||
let scheme = opt_str_lit(self.scheme.as_ref());
|
||||
let domain = str_lit(&self.domain);
|
||||
let windows = vec_lit(&self.windows, str_lit);
|
||||
let plugins = vec_lit(&self.plugins, str_lit);
|
||||
let enable_tauri_api = self.enable_tauri_api;
|
||||
|
||||
literal_struct!(
|
||||
tokens,
|
||||
RemoteDomainAccessScope,
|
||||
scheme,
|
||||
domain,
|
||||
windows,
|
||||
plugins,
|
||||
enable_tauri_api
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl ToTokens for SecurityConfig {
|
||||
fn to_tokens(&self, tokens: &mut TokenStream) {
|
||||
let csp = opt_lit(self.csp.as_ref());
|
||||
let dev_csp = opt_lit(self.dev_csp.as_ref());
|
||||
let freeze_prototype = self.freeze_prototype;
|
||||
let dangerous_disable_asset_csp_modification = &self.dangerous_disable_asset_csp_modification;
|
||||
let dangerous_remote_domain_ipc_access =
|
||||
vec_lit(&self.dangerous_remote_domain_ipc_access, identity);
|
||||
|
||||
literal_struct!(
|
||||
tokens,
|
||||
@ -3326,7 +3381,8 @@ mod build {
|
||||
csp,
|
||||
dev_csp,
|
||||
freeze_prototype,
|
||||
dangerous_disable_asset_csp_modification
|
||||
dangerous_disable_asset_csp_modification,
|
||||
dangerous_remote_domain_ipc_access
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -3589,6 +3645,7 @@ mod test {
|
||||
dev_csp: None,
|
||||
freeze_prototype: false,
|
||||
dangerous_disable_asset_csp_modification: DisabledCspModificationKind::Flag(false),
|
||||
dangerous_remote_domain_ipc_access: Vec::new(),
|
||||
},
|
||||
allowlist: AllowlistConfig::default(),
|
||||
system_tray: None,
|
||||
|
@ -97,6 +97,67 @@
|
||||
- Export types required by the `mobile_entry_point` macro.
|
||||
- [98904863](https://www.github.com/tauri-apps/tauri/commit/9890486321c9c79ccfb7c547fafee85b5c3ffa71) feat(core): add `mobile_entry_point` macro ([#4983](https://www.github.com/tauri-apps/tauri/pull/4983)) on 2022-08-21
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Added the `additional_browser_args` option when creating a window.
|
||||
- [3dc38b15](https://www.github.com/tauri-apps/tauri/commit/3dc38b150ea8c59c8ba67fd586f921016928f47c) feat(core): expose additional_browser_args to window config (fix: [#5757](https://www.github.com/tauri-apps/tauri/pull/5757)) ([#5799](https://www.github.com/tauri-apps/tauri/pull/5799)) on 2022-12-14
|
||||
- Fix passing `--profile` to cargo in `tauri build` causing conflict with `--release` passed by the CLI.
|
||||
- [bfa69691](https://www.github.com/tauri-apps/tauri/commit/bfa69691a5171af97cc6a6d880cb3090338ed9e9) fix(cli): detect `--profile`. closes [#6255](https://www.github.com/tauri-apps/tauri/pull/6255) ([#6268](https://www.github.com/tauri-apps/tauri/pull/6268)) on 2023-02-18
|
||||
- Added the `content_protected` option when creating a window and `Window::set_content_protected` to change it at runtime.
|
||||
- [4ab5545b](https://www.github.com/tauri-apps/tauri/commit/4ab5545b7a831c549f3c65e74de487ede3ab7ce5) feat: add content protection api, closes [#5132](https://www.github.com/tauri-apps/tauri/pull/5132) ([#5513](https://www.github.com/tauri-apps/tauri/pull/5513)) on 2022-12-13
|
||||
- Fix serialization of js `Map` when used in `invoke`.
|
||||
- [d4d6a98d](https://www.github.com/tauri-apps/tauri/commit/d4d6a98d98fd09ba4e9ee4857ef3604d9e454337) fix(core): convert js `Map` to object before serialization, closes [#6078](https://www.github.com/tauri-apps/tauri/pull/6078) ([#6099](https://www.github.com/tauri-apps/tauri/pull/6099)) on 2023-01-19
|
||||
- Added `Window::on_navigation`.
|
||||
- [3f35b452](https://www.github.com/tauri-apps/tauri/commit/3f35b452637ef1c794a423f1eda62a15d2ddaf42) Expose wry navigation_handler via WindowBuilder closes [#4080](https://www.github.com/tauri-apps/tauri/pull/4080) ([#5686](https://www.github.com/tauri-apps/tauri/pull/5686)) on 2022-12-27
|
||||
- Sync `__TAURI_METADATA__.__windows` across all windows.
|
||||
- [146a794c](https://www.github.com/tauri-apps/tauri/commit/146a794cb696816854648d33e2124e82154c7b2f) fix(core): sync windows metadata across all windows, closes [#5571](https://www.github.com/tauri-apps/tauri/pull/5571) ([#5615](https://www.github.com/tauri-apps/tauri/pull/5615)) on 2022-12-27
|
||||
- Fix `UpdaterBuilder::check` returning a parsing error when `204` is sent from server where it should instead return a `UpToDate` error.
|
||||
- [eb1ec041](https://www.github.com/tauri-apps/tauri/commit/eb1ec0416c52c75830dee77e4d714d882d1145b3) fix(core/updater): read and parse response after checking status code, closes [#6192](https://www.github.com/tauri-apps/tauri/pull/6192) ([#6575](https://www.github.com/tauri-apps/tauri/pull/6575)) on 2023-03-31
|
||||
- Added `OkWithLabel` and `OkCancelWithLabels` variants to the `api::dialog::MessageDialogButtons` enum to set the text of the dialog buttons.
|
||||
- [00e1efaa](https://www.github.com/tauri-apps/tauri/commit/00e1efaa9b33876d41dd360624b69971e70d3856) feat: customize button texts of message dialog ([#4383](https://www.github.com/tauri-apps/tauri/pull/4383)) on 2022-12-28
|
||||
- Added `Builder::device_event_filter` and `App::set_device_event_filter` methods.
|
||||
- [73fd60ee](https://www.github.com/tauri-apps/tauri/commit/73fd60eef2b60f5dc84525ef9c315f4d80c4414f) expose set_device_event_filter in tauri ([#5562](https://www.github.com/tauri-apps/tauri/pull/5562)) on 2022-12-13
|
||||
- Fix resize glitch when double clicking a custom titlebar in the top resize area.
|
||||
- [4892637f](https://www.github.com/tauri-apps/tauri/commit/4892637f83b0f64822a5d304e8786a4c92a8957d) fix: Resizing glitch on custom titlebar click (closes [#2549](https://www.github.com/tauri-apps/tauri/pull/2549)) ([#5966](https://www.github.com/tauri-apps/tauri/pull/5966)) on 2023-01-04
|
||||
- Fixes tray events not being delivered.
|
||||
- [138cb8d7](https://www.github.com/tauri-apps/tauri/commit/138cb8d739b15bccdb388e555c20f17ffe16318c) fix(tauri-runtime-wry): tray event listener not registered ([#6270](https://www.github.com/tauri-apps/tauri/pull/6270)) on 2023-02-14
|
||||
- Fix the filesystem scope allowing sub-directories of the directory picked by the dialog when `recursive` option was `false`.
|
||||
- [72389b00](https://www.github.com/tauri-apps/tauri/commit/72389b00d7b495ffd7750eb1e75a3b8537d07cf3) Merge pull request from GHSA-6mv3-wm7j-h4w5 on 2022-12-22
|
||||
- Add `is_minimized()` window method.
|
||||
- [62144ef3](https://www.github.com/tauri-apps/tauri/commit/62144ef3be63b237869e511826edfb938e2c7174) feat: add is_minimized (fix [#3878](https://www.github.com/tauri-apps/tauri/pull/3878)) ([#5618](https://www.github.com/tauri-apps/tauri/pull/5618)) on 2022-12-13
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Update the `open` crate to v3.2 to fix an URL encoding bug on Windows.
|
||||
- [708efbd9](https://www.github.com/tauri-apps/tauri/commit/708efbd9b72508a5a5aa55092a48d3218e008ce3) fix(core/tauri): upgrade `open` to 3.2 to fix a bug on Windows ([#6441](https://www.github.com/tauri-apps/tauri/pull/6441)) on 2023-04-06
|
||||
- Added support to `mailto:` and `tel:` links on the shell API.
|
||||
- [d0d873e3](https://www.github.com/tauri-apps/tauri/commit/d0d873e39a3cd5e51e9cf0145a024ffdb0c2a941) feat(core): add support to mailto: and tel: links, closes [#5521](https://www.github.com/tauri-apps/tauri/pull/5521) ([#5544](https://www.github.com/tauri-apps/tauri/pull/5544)) on 2022-12-12
|
||||
- Pin `os_info` to `=3.5`.
|
||||
- [a8d640b3](https://www.github.com/tauri-apps/tauri/commit/a8d640b3c659c7cfea23fe60cc5d9ef377841c5e) fix(core): pin unarray and os_info ([#6212](https://www.github.com/tauri-apps/tauri/pull/6212)) on 2023-02-07
|
||||
- Pin raw-window-handle to 0.5.0 to keep MSRV.
|
||||
- [c46c09f3](https://www.github.com/tauri-apps/tauri/commit/c46c09f31d9f5169ca8a7e62406a9ea170e3a5c5) fix(deps): pin raw-window-handle to 0.5.0 ([#6480](https://www.github.com/tauri-apps/tauri/pull/6480)) on 2023-03-17
|
||||
- Pin `time` to `0.3.15`.
|
||||
- [3d16461b](https://www.github.com/tauri-apps/tauri/commit/3d16461b68583ba7db037fbc217786e79b46ddf2) fix(core): pin time to 0.3.15 ([#6312](https://www.github.com/tauri-apps/tauri/pull/6312)) on 2023-02-19
|
||||
- Added configuration to specify remote URLs allowed to access the IPC.
|
||||
- [ee71c31f](https://www.github.com/tauri-apps/tauri/commit/ee71c31fd09cc5427da6d29d37c003a914547696) feat(core): allow configuring remote domains with IPC access, closes [#5088](https://www.github.com/tauri-apps/tauri/pull/5088) ([#5918](https://www.github.com/tauri-apps/tauri/pull/5918)) on 2023-04-11
|
||||
- Add `title` getter on window.
|
||||
- [233e43b0](https://www.github.com/tauri-apps/tauri/commit/233e43b0c34fada1ca025378533a0b76931a6540) feat: add `title` getter on window, closes [#5023](https://www.github.com/tauri-apps/tauri/pull/5023) ([#5515](https://www.github.com/tauri-apps/tauri/pull/5515)) on 2022-12-13
|
||||
- Implement `SystemTray::with_tooltip` and `SystemTrayHandle::set_tooltip` for Windows and macOS.
|
||||
- [2265e097](https://www.github.com/tauri-apps/tauri/commit/2265e09718f6ebfeb1d200f11e1e1e069075af6e) feat(windows): implement `with_tooltip` ([#5938](https://www.github.com/tauri-apps/tauri/pull/5938)) on 2023-01-01
|
||||
- Added window's `url()` getter.
|
||||
- [d17027e1](https://www.github.com/tauri-apps/tauri/commit/d17027e1a0db3e8c5ae81fc4f472c5918fbce611) feat: expose url method ([#5914](https://www.github.com/tauri-apps/tauri/pull/5914)) on 2022-12-26
|
||||
- On Windows, change webview theme based on Window theme for more accurate `prefers-color-scheme` support.
|
||||
- [7a8d570d](https://www.github.com/tauri-apps/tauri/commit/7a8d570db72667367eb24b75ddc5dd07a968f7c0) fix: sync webview theme with window theme on Windows, closes [#5802](https://www.github.com/tauri-apps/tauri/pull/5802) ([#5874](https://www.github.com/tauri-apps/tauri/pull/5874)) on 2022-12-27
|
||||
- Add a method to the `WindowBuilder` struct to recreate windows from tauri.conf.json configurations.
|
||||
- [49dff27e](https://www.github.com/tauri-apps/tauri/commit/49dff27ef1b36c48dbfd49f44b9b3ac07b372bdf) feat(core): create WindowBuilder from WindowConfig ([#6073](https://www.github.com/tauri-apps/tauri/pull/6073)) on 2023-01-17
|
||||
- On Windows, Fix missing `WindowEvent::Focused` in `App::run` callback.
|
||||
- [ff4ea1ea](https://www.github.com/tauri-apps/tauri/commit/ff4ea1eabbf2874b113c6b4698002929bbac737a) fix: dispatch focus event to app.run on Windows, closes [#6460](https://www.github.com/tauri-apps/tauri/pull/6460) ([#6504](https://www.github.com/tauri-apps/tauri/pull/6504)) on 2023-03-31
|
||||
- Pin `winnow` crate to 0.4.1 to keep the 1.60 MSRV.
|
||||
|
||||
## \[1.2.5]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [9c0593c33](https://www.github.com/tauri-apps/tauri/commit/9c0593c33af52cd9e00ec784d15f63efebdf039c) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[1.2.4]
|
||||
|
||||
- Pin `ignore` to `=0.4.18`.
|
||||
@ -174,6 +235,11 @@
|
||||
- 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.4]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [58ea0b452](https://www.github.com/tauri-apps/tauri/commit/58ea0b45268dbd46cbac0ebb0887353d057ca767) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[1.1.3]
|
||||
|
||||
- Fix the filesystem scope allowing sub-directories of the directory picked by the dialog when `recursive` option was `false`.
|
||||
@ -229,6 +295,11 @@
|
||||
- Add `exists` function to the fs module.
|
||||
- [3c62dbc9](https://www.github.com/tauri-apps/tauri/commit/3c62dbc902c904d35a7472ce72a969084c95fbbe) feat(api): Add `exists` function to the fs module. ([#5060](https://www.github.com/tauri-apps/tauri/pull/5060)) on 2022-09-15
|
||||
|
||||
## \[1.0.9]
|
||||
|
||||
- Block remote URLs from accessing the IPC.
|
||||
- [fa90214b0](https://www.github.com/tauri-apps/tauri/commit/fa90214b052b1a5d38d54fbf1ca422b4c37cfd1f) feat(core): block remote URLs from accessing the IPC on 2023-04-12
|
||||
|
||||
## \[1.0.8]
|
||||
|
||||
- Fix the filesystem scope allowing sub-directories of the directory picked by the dialog when `recursive` option was `false`.
|
||||
|
@ -121,6 +121,7 @@ tauri = { path = ".", default-features = false, features = [ "wry" ] }
|
||||
tokio-test = "0.4.2"
|
||||
tokio = { version = "1", features = [ "full" ] }
|
||||
cargo_toml = "0.11"
|
||||
winnow = "=0.4.1"
|
||||
|
||||
[features]
|
||||
default = [ "wry", "compression", "objc-exception" ]
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,24 +2,23 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
;(function () {
|
||||
if (window.location.origin.startsWith(__TEMPLATE_origin__)) {
|
||||
__RAW_freeze_prototype__
|
||||
; (function () {
|
||||
__RAW_freeze_prototype__
|
||||
|
||||
;(function () {
|
||||
; (function () {
|
||||
__RAW_hotkeys__
|
||||
})()
|
||||
|
||||
__RAW_pattern_script__
|
||||
__RAW_pattern_script__
|
||||
|
||||
__RAW_ipc_script__
|
||||
;(function () {
|
||||
__RAW_ipc_script__
|
||||
; (function () {
|
||||
__RAW_bundle_script__
|
||||
})()
|
||||
|
||||
__RAW_listen_function__
|
||||
__RAW_listen_function__
|
||||
|
||||
__RAW_core_script__
|
||||
__RAW_core_script__
|
||||
|
||||
__RAW_window_dialogs_script__
|
||||
|
||||
@ -27,14 +26,13 @@
|
||||
|
||||
__RAW_event_initialization_script__
|
||||
|
||||
if (window.ipc) {
|
||||
if (window.ipc) {
|
||||
window.__TAURI_INVOKE__('__initialized', { url: window.location.href })
|
||||
} else {
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
window.__TAURI_INVOKE__('__initialized', { url: window.location.href })
|
||||
} else {
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
window.__TAURI_INVOKE__('__initialized', { url: window.location.href })
|
||||
})
|
||||
}
|
||||
|
||||
__RAW_plugin_initialization_script__
|
||||
})
|
||||
}
|
||||
|
||||
__RAW_plugin_initialization_script__
|
||||
})()
|
||||
|
@ -3,15 +3,13 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
if (window.location.origin.startsWith(__TEMPLATE_origin__)) {
|
||||
let style = document.createElement('style')
|
||||
style.textContent = __TEMPLATE_style__
|
||||
document.head.append(style)
|
||||
let style = document.createElement('style')
|
||||
style.textContent = __TEMPLATE_style__
|
||||
document.head.append(style)
|
||||
|
||||
let iframe = document.createElement('iframe')
|
||||
iframe.id = '__tauri_isolation__'
|
||||
iframe.sandbox.add('allow-scripts')
|
||||
iframe.src = __TEMPLATE_isolation_src__
|
||||
document.body.append(iframe)
|
||||
}
|
||||
let iframe = document.createElement('iframe')
|
||||
iframe.id = '__tauri_isolation__'
|
||||
iframe.sandbox.add('allow-scripts')
|
||||
iframe.src = __TEMPLATE_isolation_src__
|
||||
document.body.append(iframe)
|
||||
})
|
||||
|
@ -19,7 +19,7 @@ use crate::{
|
||||
window::{PendingWindow, WindowEvent as RuntimeWindowEvent},
|
||||
ExitRequestedEventAction, RunEvent as RuntimeRunEvent,
|
||||
},
|
||||
scope::FsScope,
|
||||
scope::{FsScope, IpcScope},
|
||||
sealed::{ManagerBase, RuntimeOrDispatch},
|
||||
utils::config::Config,
|
||||
utils::{assets::Assets, Env},
|
||||
@ -1393,10 +1393,10 @@ impl<R: Runtime> Builder<R> {
|
||||
let mut webview_attributes =
|
||||
WebviewAttributes::new(url).accept_first_mouse(config.accept_first_mouse);
|
||||
if let Some(ua) = &config.user_agent {
|
||||
webview_attributes = webview_attributes.user_agent(&ua.to_string());
|
||||
webview_attributes = webview_attributes.user_agent(ua);
|
||||
}
|
||||
if let Some(args) = &config.additional_browser_args {
|
||||
webview_attributes = webview_attributes.additional_browser_args(&args.to_string());
|
||||
webview_attributes = webview_attributes.additional_browser_args(args);
|
||||
}
|
||||
if !config.file_drop_enabled {
|
||||
webview_attributes = webview_attributes.disable_file_drop_handler();
|
||||
@ -1442,6 +1442,7 @@ impl<R: Runtime> Builder<R> {
|
||||
app.manage(env);
|
||||
|
||||
app.manage(Scopes {
|
||||
ipc: IpcScope::new(&app.config()),
|
||||
fs: FsScope::for_fs_api(&app, &app.config().tauri.allowlist.fs.scope)?,
|
||||
#[cfg(protocol_asset)]
|
||||
asset_protocol: FsScope::for_fs_api(
|
||||
|
@ -85,6 +85,10 @@ pub enum Error {
|
||||
/// Error initializing plugin.
|
||||
#[error("failed to initialize plugin `{0}`: {1}")]
|
||||
PluginInitialization(String, String),
|
||||
/// A part of the URL is malformed or invalid. This may occur when parsing and combining
|
||||
/// user-provided URLs and paths.
|
||||
#[error("invalid url: {0}")]
|
||||
InvalidUrl(url::ParseError),
|
||||
/// Task join error.
|
||||
#[error(transparent)]
|
||||
JoinError(#[from] tokio::task::JoinError),
|
||||
|
@ -39,7 +39,6 @@ pub(crate) struct IpcJavascript<'a> {
|
||||
#[derive(Template)]
|
||||
#[default_template("../scripts/isolation.js")]
|
||||
pub(crate) struct IsolationJavascript<'a> {
|
||||
pub(crate) origin: String,
|
||||
pub(crate) isolation_src: &'a str,
|
||||
pub(crate) style: &'a str,
|
||||
}
|
||||
|
@ -866,6 +866,11 @@ pub trait Manager<R: Runtime>: sealed::ManagerBase<R> {
|
||||
self.state::<Scopes>().inner().fs.clone()
|
||||
}
|
||||
|
||||
/// Gets the scope for the IPC.
|
||||
fn ipc_scope(&self) -> IpcScope {
|
||||
self.state::<Scopes>().inner().ipc.clone()
|
||||
}
|
||||
|
||||
/// Gets the scope for the asset protocol.
|
||||
#[cfg(protocol_asset)]
|
||||
fn asset_protocol_scope(&self) -> FsScope {
|
||||
|
@ -28,7 +28,7 @@ use tauri_utils::{
|
||||
use crate::hooks::IpcJavascript;
|
||||
#[cfg(feature = "isolation")]
|
||||
use crate::hooks::IsolationJavascript;
|
||||
use crate::pattern::{format_real_schema, PatternJavascript};
|
||||
use crate::pattern::PatternJavascript;
|
||||
use crate::{
|
||||
app::{AppHandle, GlobalWindowEvent, GlobalWindowEventListener},
|
||||
event::{assert_event_name_is_valid, Event, EventHandler, Listeners},
|
||||
@ -148,7 +148,7 @@ fn set_csp<R: Runtime>(
|
||||
let default_src = csp
|
||||
.entry("default-src".into())
|
||||
.or_insert_with(Default::default);
|
||||
default_src.push(format_real_schema(schema));
|
||||
default_src.push(crate::pattern::format_real_schema(schema));
|
||||
}
|
||||
|
||||
Csp::DirectiveMap(csp).to_string()
|
||||
@ -236,7 +236,7 @@ pub struct InnerWindowManager<R: Runtime> {
|
||||
/// The script that initializes the invoke system.
|
||||
invoke_initialization_script: String,
|
||||
/// Application pattern.
|
||||
pattern: Pattern,
|
||||
pub(crate) pattern: Pattern,
|
||||
}
|
||||
|
||||
impl<R: Runtime> fmt::Debug for InnerWindowManager<R> {
|
||||
@ -377,27 +377,16 @@ impl<R: Runtime> WindowManager<R> {
|
||||
/// Get the base URL to use for webview requests.
|
||||
///
|
||||
/// In dev mode, this will be based on the `devPath` configuration value.
|
||||
fn get_url(&self) -> Cow<'_, Url> {
|
||||
pub(crate) fn get_url(&self) -> Cow<'_, Url> {
|
||||
match self.base_path() {
|
||||
AppUrl::Url(WindowUrl::External(url)) => Cow::Borrowed(url),
|
||||
#[cfg(windows)]
|
||||
_ => Cow::Owned(Url::parse("https://tauri.localhost").unwrap()),
|
||||
#[cfg(not(windows))]
|
||||
_ => Cow::Owned(Url::parse("tauri://localhost").unwrap()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the origin as it will be seen in the webview.
|
||||
fn get_browser_origin(&self) -> String {
|
||||
match self.base_path() {
|
||||
AppUrl::Url(WindowUrl::External(url)) => {
|
||||
if PROXY_DEV_SERVER {
|
||||
format_real_schema("tauri")
|
||||
} else {
|
||||
url.origin().ascii_serialization()
|
||||
}
|
||||
}
|
||||
_ => format_real_schema("tauri"),
|
||||
}
|
||||
}
|
||||
|
||||
fn csp(&self) -> Option<Csp> {
|
||||
if cfg!(feature = "custom-protocol") {
|
||||
self.inner.config.tauri.security.csp.clone()
|
||||
@ -470,7 +459,6 @@ impl<R: Runtime> WindowManager<R> {
|
||||
if let Pattern::Isolation { schema, .. } = self.pattern() {
|
||||
webview_attributes = webview_attributes.initialization_script(
|
||||
&IsolationJavascript {
|
||||
origin: self.get_browser_origin(),
|
||||
isolation_src: &crate::pattern::format_real_schema(schema),
|
||||
style: tauri_utils::pattern::isolation::IFRAME_STYLE,
|
||||
}
|
||||
@ -492,7 +480,7 @@ impl<R: Runtime> WindowManager<R> {
|
||||
});
|
||||
}
|
||||
|
||||
let window_url = Url::parse(&pending.url).unwrap();
|
||||
let window_url = pending.current_url.lock().unwrap().clone();
|
||||
let window_origin =
|
||||
if cfg!(windows) && window_url.scheme() != "http" && window_url.scheme() != "https" {
|
||||
format!("https://{}.localhost", window_url.scheme())
|
||||
@ -1028,7 +1016,6 @@ impl<R: Runtime> WindowManager<R> {
|
||||
#[derive(Template)]
|
||||
#[default_template("../scripts/init.js")]
|
||||
struct InitJavascript<'a> {
|
||||
origin: String,
|
||||
#[raw]
|
||||
pattern_script: &'a str,
|
||||
#[raw]
|
||||
@ -1095,7 +1082,6 @@ impl<R: Runtime> WindowManager<R> {
|
||||
let hotkeys = "";
|
||||
|
||||
InitJavascript {
|
||||
origin: self.get_browser_origin(),
|
||||
pattern_script,
|
||||
ipc_script,
|
||||
bundle_script,
|
||||
@ -1178,7 +1164,16 @@ mod test {
|
||||
);
|
||||
|
||||
#[cfg(custom_protocol)]
|
||||
assert_eq!(manager.get_url().to_string(), "tauri://localhost");
|
||||
{
|
||||
assert_eq!(
|
||||
manager.get_url().to_string(),
|
||||
if cfg!(windows) {
|
||||
"https://tauri.localhost/"
|
||||
} else {
|
||||
"tauri://localhost"
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(dev)]
|
||||
assert_eq!(manager.get_url().to_string(), "http://localhost:4000/");
|
||||
@ -1229,25 +1224,23 @@ impl<R: Runtime> WindowManager<R> {
|
||||
return Err(crate::Error::WindowLabelAlreadyExists(pending.label));
|
||||
}
|
||||
#[allow(unused_mut)] // mut url only for the data-url parsing
|
||||
let (is_local, mut url) = match &pending.webview_attributes.url {
|
||||
let mut url = match &pending.webview_attributes.url {
|
||||
WindowUrl::App(path) => {
|
||||
let url = if PROXY_DEV_SERVER {
|
||||
Cow::Owned(Url::parse("tauri://localhost").unwrap())
|
||||
} else {
|
||||
self.get_url()
|
||||
};
|
||||
(
|
||||
true,
|
||||
// ignore "index.html" just to simplify the url
|
||||
if path.to_str() != Some("index.html") {
|
||||
url
|
||||
.join(&path.to_string_lossy())
|
||||
// this will never fail
|
||||
.unwrap()
|
||||
} else {
|
||||
url.into_owned()
|
||||
},
|
||||
)
|
||||
// ignore "index.html" just to simplify the url
|
||||
if path.to_str() != Some("index.html") {
|
||||
url
|
||||
.join(&path.to_string_lossy())
|
||||
.map_err(crate::Error::InvalidUrl)
|
||||
// this will never fail
|
||||
.unwrap()
|
||||
} else {
|
||||
url.into_owned()
|
||||
}
|
||||
}
|
||||
WindowUrl::External(url) => {
|
||||
let config_url = self.get_url();
|
||||
@ -1257,7 +1250,7 @@ impl<R: Runtime> WindowManager<R> {
|
||||
url.set_scheme("tauri").unwrap();
|
||||
url.set_host(Some("localhost")).unwrap();
|
||||
}
|
||||
(is_local, url)
|
||||
url
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
};
|
||||
@ -1285,7 +1278,7 @@ impl<R: Runtime> WindowManager<R> {
|
||||
}
|
||||
}
|
||||
|
||||
pending.url = url.to_string();
|
||||
*pending.current_url.lock().unwrap() = url;
|
||||
|
||||
if !pending.window_builder.has_icon() {
|
||||
if let Some(default_window_icon) = self.inner.default_window_icon.clone() {
|
||||
@ -1326,6 +1319,16 @@ impl<R: Runtime> WindowManager<R> {
|
||||
});
|
||||
}
|
||||
|
||||
let label = pending.label.clone();
|
||||
pending = self.prepare_pending_window(
|
||||
pending,
|
||||
&label,
|
||||
window_labels,
|
||||
app_handle.clone(),
|
||||
web_resource_request_handler,
|
||||
)?;
|
||||
pending.ipc_handler = Some(self.prepare_ipc_handler(app_handle.clone()));
|
||||
|
||||
// in `Windows`, we need to force a data_directory
|
||||
// but we do respect user-specification
|
||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||
@ -1346,17 +1349,27 @@ impl<R: Runtime> WindowManager<R> {
|
||||
}
|
||||
}
|
||||
|
||||
if is_local {
|
||||
let label = pending.label.clone();
|
||||
pending = self.prepare_pending_window(
|
||||
pending,
|
||||
&label,
|
||||
window_labels,
|
||||
app_handle.clone(),
|
||||
web_resource_request_handler,
|
||||
)?;
|
||||
pending.ipc_handler = Some(self.prepare_ipc_handler(app_handle));
|
||||
}
|
||||
#[cfg(feature = "isolation")]
|
||||
let pattern = self.pattern().clone();
|
||||
let current_url_ = pending.current_url.clone();
|
||||
let navigation_handler = pending.navigation_handler.take();
|
||||
pending.navigation_handler = Some(Box::new(move |url| {
|
||||
// always allow navigation events for the isolation iframe and do not emit them for consumers
|
||||
#[cfg(feature = "isolation")]
|
||||
if let Pattern::Isolation { schema, .. } = &pattern {
|
||||
if url.scheme() == schema
|
||||
&& url.domain() == Some(crate::pattern::ISOLATION_IFRAME_SRC_DOMAIN)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*current_url_.lock().unwrap() = url.clone();
|
||||
if let Some(handler) = &navigation_handler {
|
||||
handler(url)
|
||||
} else {
|
||||
true
|
||||
}
|
||||
}));
|
||||
|
||||
Ok(pending)
|
||||
}
|
||||
|
@ -11,8 +11,11 @@ use serialize_to_javascript::{default_template, Template};
|
||||
|
||||
use tauri_utils::assets::{Assets, EmbeddedAssets};
|
||||
|
||||
/// The domain of the isolation iframe source.
|
||||
pub const ISOLATION_IFRAME_SRC_DOMAIN: &str = "localhost";
|
||||
|
||||
/// An application pattern.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
pub enum Pattern<A: Assets = EmbeddedAssets> {
|
||||
/// The brownfield pattern.
|
||||
Brownfield(PhantomData<A>),
|
||||
@ -35,6 +38,26 @@ pub enum Pattern<A: Assets = EmbeddedAssets> {
|
||||
},
|
||||
}
|
||||
|
||||
impl<A: Assets> Clone for Pattern<A> {
|
||||
fn clone(&self) -> Self {
|
||||
match self {
|
||||
Self::Brownfield(a) => Self::Brownfield(*a),
|
||||
#[cfg(feature = "isolation")]
|
||||
Self::Isolation {
|
||||
assets,
|
||||
schema,
|
||||
key,
|
||||
crypto_keys,
|
||||
} => Self::Isolation {
|
||||
assets: assets.clone(),
|
||||
schema: schema.clone(),
|
||||
key: key.clone(),
|
||||
crypto_keys: crypto_keys.clone(),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The shape of the JavaScript Pattern config
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "lowercase", tag = "pattern")]
|
||||
@ -87,8 +110,8 @@ pub(crate) struct PatternJavascript {
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn format_real_schema(schema: &str) -> String {
|
||||
if cfg!(windows) || cfg!(target_os = "android") {
|
||||
format!("https://{schema}.localhost")
|
||||
format!("https://{schema}.{ISOLATION_IFRAME_SRC_DOMAIN}")
|
||||
} else {
|
||||
format!("{schema}://localhost")
|
||||
format!("{schema}://{ISOLATION_IFRAME_SRC_DOMAIN}")
|
||||
}
|
||||
}
|
||||
|
409
core/tauri/src/scope/ipc.rs
Normal file
409
core/tauri/src/scope/ipc.rs
Normal file
@ -0,0 +1,409 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use crate::{Config, Runtime, Window};
|
||||
use url::Url;
|
||||
|
||||
/// IPC access configuration for a remote domain.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RemoteDomainAccessScope {
|
||||
scheme: Option<String>,
|
||||
domain: String,
|
||||
windows: Vec<String>,
|
||||
plugins: Vec<String>,
|
||||
enable_tauri_api: bool,
|
||||
}
|
||||
|
||||
impl RemoteDomainAccessScope {
|
||||
/// Creates a new access scope.
|
||||
pub fn new(domain: impl Into<String>) -> Self {
|
||||
Self {
|
||||
scheme: None,
|
||||
domain: domain.into(),
|
||||
windows: Vec::new(),
|
||||
plugins: Vec::new(),
|
||||
enable_tauri_api: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the scheme of the URL to allow in this scope. By default, all schemes with the given domain are allowed.
|
||||
pub fn allow_on_scheme(mut self, scheme: impl Into<String>) -> Self {
|
||||
self.scheme.replace(scheme.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Adds the given window label to the list of windows that uses this scope.
|
||||
pub fn add_window(mut self, window: impl Into<String>) -> Self {
|
||||
self.windows.push(window.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Adds the given plugin to the allowed plugin list.
|
||||
pub fn add_plugin(mut self, plugin: impl Into<String>) -> Self {
|
||||
self.plugins.push(plugin.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Enables access to the Tauri API.
|
||||
pub fn enable_tauri_api(mut self) -> Self {
|
||||
self.enable_tauri_api = true;
|
||||
self
|
||||
}
|
||||
|
||||
/// The domain of the URLs that can access this scope.
|
||||
pub fn domain(&self) -> &str {
|
||||
&self.domain
|
||||
}
|
||||
|
||||
/// The list of window labels that can access this scope.
|
||||
pub fn windows(&self) -> &Vec<String> {
|
||||
&self.windows
|
||||
}
|
||||
|
||||
/// The list of plugins enabled by this scope.
|
||||
pub fn plugins(&self) -> &Vec<String> {
|
||||
&self.plugins
|
||||
}
|
||||
|
||||
/// Whether this scope enables Tauri API access or not.
|
||||
pub fn enables_tauri_api(&self) -> bool {
|
||||
self.enable_tauri_api
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct RemoteAccessError {
|
||||
pub matches_window: bool,
|
||||
pub matches_domain: bool,
|
||||
}
|
||||
|
||||
/// IPC scope.
|
||||
#[derive(Clone)]
|
||||
pub struct Scope {
|
||||
remote_access: Arc<Mutex<Vec<RemoteDomainAccessScope>>>,
|
||||
}
|
||||
|
||||
impl Scope {
|
||||
pub(crate) fn new(config: &Config) -> Self {
|
||||
#[allow(unused_mut)]
|
||||
let mut remote_access: Vec<RemoteDomainAccessScope> = config
|
||||
.tauri
|
||||
.security
|
||||
.dangerous_remote_domain_ipc_access
|
||||
.clone()
|
||||
.into_iter()
|
||||
.map(|s| RemoteDomainAccessScope {
|
||||
scheme: s.scheme,
|
||||
domain: s.domain,
|
||||
windows: s.windows,
|
||||
plugins: s.plugins,
|
||||
enable_tauri_api: s.enable_tauri_api,
|
||||
})
|
||||
.collect();
|
||||
|
||||
Self {
|
||||
remote_access: Arc::new(Mutex::new(remote_access)),
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds the given configuration for remote access.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use tauri::{Manager, scope::ipc::RemoteDomainAccessScope};
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// app.ipc_scope().configure_remote_access(
|
||||
/// RemoteDomainAccessScope::new("tauri.app")
|
||||
/// .add_window("main")
|
||||
/// .enable_tauri_api()
|
||||
/// );
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
pub fn configure_remote_access(&self, access: RemoteDomainAccessScope) {
|
||||
self.remote_access.lock().unwrap().push(access);
|
||||
}
|
||||
|
||||
pub(crate) fn remote_access_for<R: Runtime>(
|
||||
&self,
|
||||
window: &Window<R>,
|
||||
url: &Url,
|
||||
) -> Result<RemoteDomainAccessScope, RemoteAccessError> {
|
||||
let mut scope = None;
|
||||
let mut found_scope_for_window = false;
|
||||
let mut found_scope_for_domain = false;
|
||||
let label = window.label().to_string();
|
||||
|
||||
for s in &*self.remote_access.lock().unwrap() {
|
||||
#[allow(unused_mut)]
|
||||
let mut matches_window = s.windows.contains(&label);
|
||||
|
||||
let matches_scheme = s
|
||||
.scheme
|
||||
.as_ref()
|
||||
.map(|scheme| scheme == url.scheme())
|
||||
.unwrap_or(true);
|
||||
|
||||
let matches_domain =
|
||||
matches_scheme && url.domain().map(|d| d == s.domain).unwrap_or_default();
|
||||
found_scope_for_window = found_scope_for_window || matches_window;
|
||||
found_scope_for_domain = found_scope_for_domain || matches_domain;
|
||||
if matches_window && matches_domain && scope.is_none() {
|
||||
scope.replace(s.clone());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(s) = scope {
|
||||
Ok(s)
|
||||
} else {
|
||||
Err(RemoteAccessError {
|
||||
matches_window: found_scope_for_window,
|
||||
matches_domain: found_scope_for_domain,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::RemoteDomainAccessScope;
|
||||
use crate::{api::ipc::CallbackFn, test::MockRuntime, App, InvokePayload, Manager, Window};
|
||||
|
||||
const PLUGIN_NAME: &str = "test";
|
||||
|
||||
fn test_context(scopes: Vec<RemoteDomainAccessScope>) -> (App<MockRuntime>, Window<MockRuntime>) {
|
||||
let app = crate::test::mock_app();
|
||||
let window = app.get_window("main").unwrap();
|
||||
|
||||
for scope in scopes {
|
||||
app.ipc_scope().configure_remote_access(scope);
|
||||
}
|
||||
|
||||
(app, window)
|
||||
}
|
||||
|
||||
fn assert_ipc_response(
|
||||
window: &Window<MockRuntime>,
|
||||
payload: InvokePayload,
|
||||
expected: Result<&str, &str>,
|
||||
) {
|
||||
let callback = payload.callback;
|
||||
let error = payload.error;
|
||||
window.clone().on_message(payload).unwrap();
|
||||
|
||||
let mut num_tries = 0;
|
||||
let evaluated_script = loop {
|
||||
std::thread::sleep(std::time::Duration::from_millis(50));
|
||||
let evaluated_script = window.dispatcher().last_evaluated_script();
|
||||
if let Some(s) = evaluated_script {
|
||||
break s;
|
||||
}
|
||||
num_tries += 1;
|
||||
if num_tries == 20 {
|
||||
panic!("Response script not evaluated");
|
||||
}
|
||||
};
|
||||
let (expected_response, fn_name) = match expected {
|
||||
Ok(payload) => (payload, callback),
|
||||
Err(payload) => (payload, error),
|
||||
};
|
||||
let expected = format!(
|
||||
"window[\"_{}\"]({})",
|
||||
fn_name.0,
|
||||
crate::api::ipc::serialize_js(&expected_response).unwrap()
|
||||
);
|
||||
|
||||
println!("Last evaluated script:");
|
||||
println!("{evaluated_script}");
|
||||
println!("Expected:");
|
||||
println!("{expected}");
|
||||
assert!(evaluated_script.contains(&expected));
|
||||
}
|
||||
|
||||
fn app_version_payload() -> InvokePayload {
|
||||
let callback = CallbackFn(0);
|
||||
let error = CallbackFn(1);
|
||||
|
||||
let mut payload = serde_json::Map::new();
|
||||
let mut msg = serde_json::Map::new();
|
||||
msg.insert(
|
||||
"cmd".into(),
|
||||
serde_json::Value::String("getAppVersion".into()),
|
||||
);
|
||||
payload.insert("message".into(), serde_json::Value::Object(msg));
|
||||
|
||||
InvokePayload {
|
||||
cmd: "".into(),
|
||||
tauri_module: Some("App".into()),
|
||||
callback,
|
||||
error,
|
||||
inner: serde_json::Value::Object(payload),
|
||||
}
|
||||
}
|
||||
|
||||
fn plugin_test_payload() -> InvokePayload {
|
||||
let callback = CallbackFn(0);
|
||||
let error = CallbackFn(1);
|
||||
|
||||
InvokePayload {
|
||||
cmd: format!("plugin:{PLUGIN_NAME}|doSomething"),
|
||||
tauri_module: None,
|
||||
callback,
|
||||
error,
|
||||
inner: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scope_not_defined() {
|
||||
let (_app, window) = test_context(vec![RemoteDomainAccessScope::new("app.tauri.app")
|
||||
.add_window("other")
|
||||
.enable_tauri_api()]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Err(&crate::window::ipc_scope_not_found_error_message(
|
||||
"main",
|
||||
"https://tauri.app/",
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scope_not_defined_for_window() {
|
||||
let (_app, window) = test_context(vec![RemoteDomainAccessScope::new("tauri.app")
|
||||
.add_window("second")
|
||||
.enable_tauri_api()]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Err(&crate::window::ipc_scope_window_error_message("main")),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scope_not_defined_for_url() {
|
||||
let (_app, window) = test_context(vec![RemoteDomainAccessScope::new("github.com")
|
||||
.add_window("main")
|
||||
.enable_tauri_api()]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Err(&crate::window::ipc_scope_domain_error_message(
|
||||
"https://tauri.app/",
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn subdomain_is_not_allowed() {
|
||||
let (app, mut window) = test_context(vec![
|
||||
RemoteDomainAccessScope::new("tauri.app")
|
||||
.add_window("main")
|
||||
.enable_tauri_api(),
|
||||
RemoteDomainAccessScope::new("sub.tauri.app")
|
||||
.add_window("main")
|
||||
.enable_tauri_api(),
|
||||
]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Ok(app.package_info().version.to_string().as_str()),
|
||||
);
|
||||
|
||||
window.navigate("https://blog.tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Err(&crate::window::ipc_scope_domain_error_message(
|
||||
"https://blog.tauri.app/",
|
||||
)),
|
||||
);
|
||||
|
||||
window.navigate("https://sub.tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Ok(app.package_info().version.to_string().as_str()),
|
||||
);
|
||||
|
||||
window.window.label = "test".into();
|
||||
window.navigate("https://dev.tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Err(&crate::window::ipc_scope_not_found_error_message(
|
||||
"test",
|
||||
"https://dev.tauri.app/",
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn subpath_is_allowed() {
|
||||
let (app, window) = test_context(vec![RemoteDomainAccessScope::new("tauri.app")
|
||||
.add_window("main")
|
||||
.enable_tauri_api()]);
|
||||
|
||||
window.navigate("https://tauri.app/inner/path".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Ok(app.package_info().version.to_string().as_str()),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tauri_api_not_allowed() {
|
||||
let (_app, window) = test_context(vec![
|
||||
RemoteDomainAccessScope::new("tauri.app").add_window("main")
|
||||
]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
app_version_payload(),
|
||||
Err(crate::window::IPC_SCOPE_DOES_NOT_ALLOW),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_allowed() {
|
||||
let (_app, window) = test_context(vec![RemoteDomainAccessScope::new("tauri.app")
|
||||
.add_window("main")
|
||||
.add_plugin(PLUGIN_NAME)]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
plugin_test_payload(),
|
||||
Err(&format!("plugin {PLUGIN_NAME} not found")),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plugin_not_allowed() {
|
||||
let (_app, window) = test_context(vec![
|
||||
RemoteDomainAccessScope::new("tauri.app").add_window("main")
|
||||
]);
|
||||
|
||||
window.navigate("https://tauri.app".parse().unwrap());
|
||||
assert_ipc_response(
|
||||
&window,
|
||||
plugin_test_payload(),
|
||||
Err(crate::window::IPC_SCOPE_DOES_NOT_ALLOW),
|
||||
);
|
||||
}
|
||||
}
|
@ -3,11 +3,15 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
mod fs;
|
||||
/// IPC scope.
|
||||
pub mod ipc;
|
||||
|
||||
pub use self::ipc::Scope as IpcScope;
|
||||
pub use fs::{Event as FsScopeEvent, Pattern as GlobPattern, Scope as FsScope};
|
||||
use std::path::Path;
|
||||
|
||||
pub(crate) struct Scopes {
|
||||
pub ipc: IpcScope,
|
||||
pub fs: FsScope,
|
||||
#[cfg(protocol_asset)]
|
||||
pub asset_protocol: FsScope,
|
||||
|
@ -66,8 +66,10 @@ impl<T: UserEvent> RuntimeHandle<T> for MockRuntimeHandle {
|
||||
) -> Result<DetachedWindow<T, Self::Runtime>> {
|
||||
Ok(DetachedWindow {
|
||||
label: pending.label,
|
||||
current_url: Arc::new(Mutex::new("tauri://localhost".parse().unwrap())),
|
||||
dispatcher: MockDispatcher {
|
||||
context: self.context.clone(),
|
||||
last_evaluated_script: Default::default(),
|
||||
},
|
||||
menu_ids: Default::default(),
|
||||
js_event_listeners: Default::default(),
|
||||
@ -128,6 +130,13 @@ impl<T: UserEvent> RuntimeHandle<T> for MockRuntimeHandle {
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct MockDispatcher {
|
||||
context: RuntimeContext,
|
||||
last_evaluated_script: Arc<Mutex<Option<String>>>,
|
||||
}
|
||||
|
||||
impl MockDispatcher {
|
||||
pub fn last_evaluated_script(&self) -> Option<String> {
|
||||
self.last_evaluated_script.lock().unwrap().clone()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@ -529,6 +538,11 @@ impl<T: UserEvent> Dispatch<T> for MockDispatcher {
|
||||
}
|
||||
|
||||
fn eval_script<S: Into<String>>(&self, script: S) -> Result<()> {
|
||||
self
|
||||
.last_evaluated_script
|
||||
.lock()
|
||||
.unwrap()
|
||||
.replace(script.into());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -633,8 +647,10 @@ impl<T: UserEvent> Runtime<T> for MockRuntime {
|
||||
fn create_window(&self, pending: PendingWindow<T, Self>) -> Result<DetachedWindow<T, Self>> {
|
||||
Ok(DetachedWindow {
|
||||
label: pending.label,
|
||||
current_url: Arc::new(Mutex::new("tauri://localhost".parse().unwrap())),
|
||||
dispatcher: MockDispatcher {
|
||||
context: self.context.clone(),
|
||||
last_evaluated_script: Default::default(),
|
||||
},
|
||||
menu_ids: Default::default(),
|
||||
js_event_listeners: Default::default(),
|
||||
|
@ -325,13 +325,13 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> {
|
||||
self.label.clone(),
|
||||
)?;
|
||||
let labels = self.manager.labels().into_iter().collect::<Vec<_>>();
|
||||
let mut pending = self.manager.prepare_window(
|
||||
let pending = self.manager.prepare_window(
|
||||
self.app_handle.clone(),
|
||||
pending,
|
||||
&labels,
|
||||
web_resource_request_handler,
|
||||
)?;
|
||||
pending.navigation_handler = self.navigation_handler.take();
|
||||
|
||||
let window = match &mut self.runtime {
|
||||
RuntimeOrDispatch::Runtime(runtime) => runtime.create_window(pending),
|
||||
RuntimeOrDispatch::RuntimeHandle(handle) => handle.create_window(pending),
|
||||
@ -704,7 +704,7 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> {
|
||||
#[derive(Debug)]
|
||||
pub struct Window<R: Runtime> {
|
||||
/// The webview window created by the runtime.
|
||||
window: DetachedWindow<EventLoopMessage, R>,
|
||||
pub(crate) window: DetachedWindow<EventLoopMessage, R>,
|
||||
/// The manager to associate this webview window with.
|
||||
manager: WindowManager<R>,
|
||||
pub(crate) app_handle: AppHandle<R>,
|
||||
@ -1447,13 +1447,40 @@ impl<R: Runtime> Window<R> {
|
||||
/// Webview APIs.
|
||||
impl<R: Runtime> Window<R> {
|
||||
/// Returns the current url of the webview.
|
||||
pub fn url(&self) -> crate::Result<Url> {
|
||||
self.window.dispatcher.url().map_err(Into::into)
|
||||
pub fn url(&self) -> Url {
|
||||
self.window.current_url.lock().unwrap().clone()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn navigate(&self, url: Url) {
|
||||
*self.window.current_url.lock().unwrap() = url;
|
||||
}
|
||||
|
||||
/// Handles this window receiving an [`InvokeMessage`].
|
||||
pub fn on_message(self, payload: InvokePayload) -> crate::Result<()> {
|
||||
let manager = self.manager.clone();
|
||||
let current_url = self.url();
|
||||
let config_url = manager.get_url();
|
||||
let is_local =
|
||||
config_url.make_relative(¤t_url).is_some() || current_url.scheme() == "tauri";
|
||||
|
||||
let mut scope_not_found_error_message =
|
||||
ipc_scope_not_found_error_message(&self.window.label, current_url.as_str());
|
||||
let scope = if is_local {
|
||||
None
|
||||
} else {
|
||||
match self.ipc_scope().remote_access_for(&self, ¤t_url) {
|
||||
Ok(scope) => Some(scope),
|
||||
Err(e) => {
|
||||
if e.matches_window {
|
||||
scope_not_found_error_message = ipc_scope_domain_error_message(current_url.as_str());
|
||||
} else if e.matches_domain {
|
||||
scope_not_found_error_message = ipc_scope_window_error_message(&self.window.label);
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
};
|
||||
match payload.cmd.as_str() {
|
||||
"__initialized" => {
|
||||
let payload: PageLoadPayload = serde_json::from_value(payload.inner)?;
|
||||
@ -1470,7 +1497,16 @@ impl<R: Runtime> Window<R> {
|
||||
let resolver = InvokeResolver::new(self.clone(), payload.callback, payload.error);
|
||||
|
||||
let mut invoke = Invoke { message, resolver };
|
||||
if !is_local && scope.is_none() {
|
||||
invoke.resolver.reject(scope_not_found_error_message);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if let Some(module) = &payload.tauri_module {
|
||||
if !is_local && scope.map(|s| !s.enables_tauri_api()).unwrap_or_default() {
|
||||
invoke.resolver.reject(IPC_SCOPE_DOES_NOT_ALLOW);
|
||||
return Ok(());
|
||||
}
|
||||
crate::endpoints::handle(
|
||||
module.to_string(),
|
||||
invoke,
|
||||
@ -1478,6 +1514,17 @@ impl<R: Runtime> Window<R> {
|
||||
manager.package_info(),
|
||||
);
|
||||
} else if payload.cmd.starts_with("plugin:") {
|
||||
if !is_local {
|
||||
let command = invoke.message.command.replace("plugin:", "");
|
||||
let plugin_name = command.split('|').next().unwrap().to_string();
|
||||
if !scope
|
||||
.map(|s| s.plugins().contains(&plugin_name))
|
||||
.unwrap_or(true)
|
||||
{
|
||||
invoke.resolver.reject(IPC_SCOPE_DOES_NOT_ALLOW);
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
let command = invoke.message.command.replace("plugin:", "");
|
||||
let mut tokens = command.split('|');
|
||||
// safe to unwrap: split always has a least one item
|
||||
@ -1824,6 +1871,20 @@ impl<R: Runtime> Window<R> {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) const IPC_SCOPE_DOES_NOT_ALLOW: &str = "Not allowed by the scope";
|
||||
|
||||
pub(crate) fn ipc_scope_not_found_error_message(label: &str, url: &str) -> String {
|
||||
format!("Scope not defined for window `{label}` and URL `{url}`. See https://tauri.app/v1/api/config/#securityconfig.dangerousremotedomainipcaccess and https://docs.rs/tauri/1/tauri/scope/struct.IpcScope.html#method.configure_remote_access")
|
||||
}
|
||||
|
||||
pub(crate) fn ipc_scope_window_error_message(label: &str) -> String {
|
||||
format!("Scope not defined for window `{}`. See https://tauri.app/v1/api/config/#securityconfig.dangerousremotedomainipcaccess and https://docs.rs/tauri/1/tauri/scope/struct.IpcScope.html#method.configure_remote_access", label)
|
||||
}
|
||||
|
||||
pub(crate) fn ipc_scope_domain_error_message(url: &str) -> String {
|
||||
format!("Scope not defined for URL `{url}`. See https://tauri.app/v1/api/config/#securityconfig.dangerousremotedomainipcaccess and https://docs.rs/tauri/1/tauri/scope/struct.IpcScope.html#method.configure_remote_access")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "../dist",
|
||||
"devPath": "http://localhost:4000"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": [],
|
||||
"devPath": []
|
||||
|
196
examples/api/src-tauri/Cargo.lock
generated
196
examples/api/src-tauri/Cargo.lock
generated
@ -94,6 +94,15 @@ dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android_system_properties"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.3.2"
|
||||
@ -329,12 +338,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cargo_toml"
|
||||
version = "0.14.1"
|
||||
version = "0.15.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bfbc36312494041e2cdd5f06697b7e89d4b76f42773a0b5556ac290ff22acc2"
|
||||
checksum = "7f83bc2e401ed041b7057345ebc488c005efa0341d5541ce7004d30458d0090b"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"toml 0.5.11",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -376,6 +385,19 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
|
||||
dependencies = [
|
||||
"iana-time-zone",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
"serde",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chunked_transfer"
|
||||
version = "1.4.1"
|
||||
@ -451,6 +473,16 @@ dependencies = [
|
||||
"objc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codespan-reporting"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
|
||||
dependencies = [
|
||||
"termcolor",
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "color_quant"
|
||||
version = "1.1.0"
|
||||
@ -615,10 +647,54 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.13.4"
|
||||
name = "cxx"
|
||||
version = "1.0.94"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
|
||||
checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cxxbridge-flags",
|
||||
"cxxbridge-macro",
|
||||
"link-cplusplus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cxx-build"
|
||||
version = "1.0.94"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"codespan-reporting",
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"scratch",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cxxbridge-flags"
|
||||
version = "1.0.94"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb"
|
||||
|
||||
[[package]]
|
||||
name = "cxxbridge-macro"
|
||||
version = "1.0.94"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"darling_macro",
|
||||
@ -626,27 +702,27 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "darling_core"
|
||||
version = "0.13.4"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
|
||||
checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"ident_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_macro"
|
||||
version = "0.13.4"
|
||||
version = "0.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
|
||||
checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -728,7 +804,7 @@ checksum = "80663502655af01a2902dff3f06869330782267924bf1788410b74edcd93770a"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"rustc_version",
|
||||
"toml 0.7.3",
|
||||
"toml",
|
||||
"vswhom",
|
||||
"winreg 0.11.0",
|
||||
]
|
||||
@ -1311,6 +1387,12 @@ version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
|
||||
|
||||
[[package]]
|
||||
name = "hex"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
|
||||
[[package]]
|
||||
name = "html5ever"
|
||||
version = "0.25.2"
|
||||
@ -1389,6 +1471,30 @@ dependencies = [
|
||||
"want",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.56"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"core-foundation-sys",
|
||||
"iana-time-zone-haiku",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"windows 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone-haiku"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
|
||||
dependencies = [
|
||||
"cxx",
|
||||
"cxx-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ico"
|
||||
version = "0.2.0"
|
||||
@ -1463,6 +1569,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"hashbrown",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1596,9 +1703,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "json-patch"
|
||||
version = "0.3.0"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef"
|
||||
checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -1673,6 +1780,15 @@ dependencies = [
|
||||
"safemem",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "link-cplusplus"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.3.7"
|
||||
@ -2519,6 +2635,12 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "scratch"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
|
||||
|
||||
[[package]]
|
||||
name = "selectors"
|
||||
version = "0.22.0"
|
||||
@ -2613,24 +2735,30 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_with"
|
||||
version = "1.14.0"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff"
|
||||
checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"chrono",
|
||||
"hex",
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_with_macros",
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_with_macros"
|
||||
version = "1.5.2"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
|
||||
checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2845,7 +2973,7 @@ dependencies = [
|
||||
"cfg-expr",
|
||||
"heck",
|
||||
"pkg-config",
|
||||
"toml 0.7.3",
|
||||
"toml",
|
||||
"version-compare",
|
||||
]
|
||||
|
||||
@ -3159,7 +3287,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb"
|
||||
dependencies = [
|
||||
"embed-resource",
|
||||
"toml 0.7.3",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3186,6 +3314,15 @@ dependencies = [
|
||||
"utf-8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thin-slice"
|
||||
version = "0.1.1"
|
||||
@ -3309,15 +3446,6 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.7.3"
|
||||
@ -3468,6 +3596,12 @@ version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "universal-hash"
|
||||
version = "0.5.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "../dist",
|
||||
"devPath": "http://localhost:5173",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["index.html"],
|
||||
"devPath": ["index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["index.html"],
|
||||
"devPath": ["index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"package": {
|
||||
"productName": "Isolation",
|
||||
"version": "0.1.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["index.html"],
|
||||
"devPath": ["index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "public",
|
||||
"devPath": "public",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["index.html"],
|
||||
"devPath": ["index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["../index.html"],
|
||||
"devPath": ["../index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["../index.html"],
|
||||
"devPath": ["../index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "dist",
|
||||
"devPath": "dist",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["index.html"],
|
||||
"devPath": ["index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../core/config-schema/schema.json",
|
||||
"$schema": "../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["index.html"],
|
||||
"devPath": ["index.html"],
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["src/index.html"],
|
||||
"devPath": ["src/index.html"],
|
||||
|
73
examples/updater/src-tauri/Cargo.lock
generated
73
examples/updater/src-tauri/Cargo.lock
generated
@ -92,9 +92,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.20.0"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
|
||||
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
@ -1480,6 +1480,15 @@ 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"
|
||||
@ -1527,9 +1536,9 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.10.45"
|
||||
version = "0.10.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1"
|
||||
checksum = "518915b97df115dd36109bfa429a48b8f737bd05508cf9588977b599648926d2"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
@ -1559,9 +1568,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.80"
|
||||
version = "0.9.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7"
|
||||
checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cc",
|
||||
@ -2498,11 +2507,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "1.2.3"
|
||||
version = "1.2.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"attohttpc",
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.0",
|
||||
"cocoa",
|
||||
"dirs-next",
|
||||
"embed_plist",
|
||||
@ -2555,17 +2564,18 @@ dependencies = [
|
||||
"json-patch",
|
||||
"quote",
|
||||
"semver 1.0.16",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri-codegen",
|
||||
"tauri-utils",
|
||||
"winres",
|
||||
"tauri-winres",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "1.2.1"
|
||||
dependencies = [
|
||||
"base64 0.20.0",
|
||||
"base64 0.21.0",
|
||||
"brotli",
|
||||
"ico",
|
||||
"json-patch",
|
||||
@ -2659,6 +2669,16 @@ dependencies = [
|
||||
"windows 0.39.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-winres"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b7a78dc04f75fb5ab815e66ac561c81e92a968a40f29e7c21afd152d694fad8"
|
||||
dependencies = [
|
||||
"toml",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.3.0"
|
||||
@ -2721,29 +2741,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.17"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
|
||||
checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c"
|
||||
dependencies = [
|
||||
"itoa 1.0.5",
|
||||
"serde",
|
||||
"time-core",
|
||||
"time-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time-core"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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",
|
||||
"libc",
|
||||
"num_threads",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3352,15 +3356,6 @@ version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||
|
||||
[[package]]
|
||||
name = "winres"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c"
|
||||
dependencies = [
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.24.1"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": ["../index.html"],
|
||||
"devPath": ["../index.html"],
|
||||
|
@ -1,13 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Workspace Example!</h1>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<body>
|
||||
<h1>Workspace Example!</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,11 +1,7 @@
|
||||
{
|
||||
"build": {
|
||||
"distDir": [
|
||||
"../index.html"
|
||||
],
|
||||
"devPath": [
|
||||
"../index.html"
|
||||
]
|
||||
"distDir": ["../index.html"],
|
||||
"devPath": ["../index.html"]
|
||||
},
|
||||
"package": {
|
||||
"productName": "workspace"
|
||||
|
@ -22,6 +22,19 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Return correct type for ` event.payload ` in `onResized` and `onMoved` window event handlers.
|
||||
- [0b46637e](https://www.github.com/tauri-apps/tauri/commit/0b46637ebaba54403afa32a1cb466f09df2db999) fix(api): construct correct object for onResized and onMoved, closes [#6507](https://www.github.com/tauri-apps/tauri/pull/6507) ([#6509](https://www.github.com/tauri-apps/tauri/pull/6509)) on 2023-04-03
|
||||
- Added the `WindowOptions::contentProtected` option and `WebviewWindow#setContentProtected` to change it at runtime.
|
||||
- [4ab5545b](https://www.github.com/tauri-apps/tauri/commit/4ab5545b7a831c549f3c65e74de487ede3ab7ce5) feat: add content protection api, closes [#5132](https://www.github.com/tauri-apps/tauri/pull/5132) ([#5513](https://www.github.com/tauri-apps/tauri/pull/5513)) on 2022-12-13
|
||||
- Allow setting the text of the dialog buttons.
|
||||
- [00e1efaa](https://www.github.com/tauri-apps/tauri/commit/00e1efaa9b33876d41dd360624b69971e70d3856) feat: customize button texts of message dialog ([#4383](https://www.github.com/tauri-apps/tauri/pull/4383)) on 2022-12-28
|
||||
- Add `is_minimized()` window method.
|
||||
- [62144ef3](https://www.github.com/tauri-apps/tauri/commit/62144ef3be63b237869e511826edfb938e2c7174) feat: add is_minimized (fix [#3878](https://www.github.com/tauri-apps/tauri/pull/3878)) ([#5618](https://www.github.com/tauri-apps/tauri/pull/5618)) on 2022-12-13
|
||||
- Add `title` getter on window.
|
||||
- [233e43b0](https://www.github.com/tauri-apps/tauri/commit/233e43b0c34fada1ca025378533a0b76931a6540) feat: add `title` getter on window, closes [#5023](https://www.github.com/tauri-apps/tauri/pull/5023) ([#5515](https://www.github.com/tauri-apps/tauri/pull/5515)) on 2022-12-13
|
||||
|
||||
## \[1.2.0]
|
||||
|
||||
- Added the `acceptFirstMouse` window option.
|
||||
|
File diff suppressed because one or more lines are too long
@ -41,19 +41,19 @@
|
||||
"yarn": ">= 1.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "5.52.0",
|
||||
"@typescript-eslint/parser": "5.52.0",
|
||||
"eslint": "8.34.0",
|
||||
"eslint-config-prettier": "8.6.0",
|
||||
"eslint-config-standard-with-typescript": "32.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.59.0",
|
||||
"@typescript-eslint/parser": "5.59.0",
|
||||
"eslint": "8.38.0",
|
||||
"eslint-config-prettier": "8.8.0",
|
||||
"eslint-config-standard-with-typescript": "34.0.1",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-n": "15.6.1",
|
||||
"eslint-plugin-n": "15.7.0",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-security": "1.7.1",
|
||||
"prettier": "2.8.4",
|
||||
"tsup": "6.6.3",
|
||||
"typedoc": "0.23.25",
|
||||
"prettier": "2.8.7",
|
||||
"tsup": "6.7.0",
|
||||
"typedoc": "0.23.28",
|
||||
"typedoc-plugin-markdown": "3.14.0",
|
||||
"typedoc-plugin-mdn-links": "2.0.2",
|
||||
"typescript": "4.9.5"
|
||||
|
@ -1710,7 +1710,10 @@ class WindowManager extends WebviewWindowHandle {
|
||||
* @since 1.0.2
|
||||
*/
|
||||
async onResized(handler: EventCallback<PhysicalSize>): Promise<UnlistenFn> {
|
||||
return this.listen<PhysicalSize>(TauriEvent.WINDOW_RESIZED, handler)
|
||||
return this.listen<PhysicalSize>(TauriEvent.WINDOW_RESIZED, (e) => {
|
||||
e.payload = mapPhysicalSize(e.payload)
|
||||
handler(e)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1733,7 +1736,10 @@ class WindowManager extends WebviewWindowHandle {
|
||||
* @since 1.0.2
|
||||
*/
|
||||
async onMoved(handler: EventCallback<PhysicalPosition>): Promise<UnlistenFn> {
|
||||
return this.listen<PhysicalPosition>(TauriEvent.WINDOW_MOVED, handler)
|
||||
return this.listen<PhysicalPosition>(TauriEvent.WINDOW_MOVED, (e) => {
|
||||
e.payload = mapPhysicalPosition(e.payload)
|
||||
handler(e)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1760,6 +1766,7 @@ class WindowManager extends WebviewWindowHandle {
|
||||
*
|
||||
* @since 1.0.2
|
||||
*/
|
||||
/* eslint-disable @typescript-eslint/promise-function-async */
|
||||
async onCloseRequested(
|
||||
handler: (event: CloseRequestedEvent) => void | Promise<void>
|
||||
): Promise<UnlistenFn> {
|
||||
@ -1772,6 +1779,7 @@ class WindowManager extends WebviewWindowHandle {
|
||||
})
|
||||
})
|
||||
}
|
||||
/* eslint-enable */
|
||||
|
||||
/**
|
||||
* Listen to window focus change.
|
||||
@ -2204,11 +2212,19 @@ function mapMonitor(m: Monitor | null): Monitor | null {
|
||||
: {
|
||||
name: m.name,
|
||||
scaleFactor: m.scaleFactor,
|
||||
position: new PhysicalPosition(m.position.x, m.position.y),
|
||||
size: new PhysicalSize(m.size.width, m.size.height)
|
||||
position: mapPhysicalPosition(m.position),
|
||||
size: mapPhysicalSize(m.size)
|
||||
}
|
||||
}
|
||||
|
||||
function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition {
|
||||
return new PhysicalPosition(m.x, m.y)
|
||||
}
|
||||
|
||||
function mapPhysicalSize(m: PhysicalSize): PhysicalSize {
|
||||
return new PhysicalSize(m.width, m.height)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the monitor on which the window currently resides.
|
||||
* Returns `null` if current monitor can't be detected.
|
||||
|
@ -112,14 +112,26 @@
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.6.tgz#563ff4277f1230a006472664fa9278a83dd124da"
|
||||
integrity sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==
|
||||
|
||||
"@eslint/eslintrc@^1.4.1":
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e"
|
||||
integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==
|
||||
"@eslint-community/eslint-utils@^4.2.0":
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz#a556790523a351b4e47e9d385f47265eaaf9780a"
|
||||
integrity sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@eslint-community/regexpp@^4.4.0":
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403"
|
||||
integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==
|
||||
|
||||
"@eslint/eslintrc@^2.0.2":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.2.tgz#01575e38707add677cf73ca1589abba8da899a02"
|
||||
integrity sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==
|
||||
dependencies:
|
||||
ajv "^6.12.4"
|
||||
debug "^4.3.2"
|
||||
espree "^9.4.0"
|
||||
espree "^9.5.1"
|
||||
globals "^13.19.0"
|
||||
ignore "^5.2.0"
|
||||
import-fresh "^3.2.1"
|
||||
@ -127,6 +139,11 @@
|
||||
minimatch "^3.1.2"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@eslint/js@8.38.0":
|
||||
version "8.38.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.38.0.tgz#73a8a0d8aa8a8e6fe270431c5e72ae91b5337892"
|
||||
integrity sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==
|
||||
|
||||
"@humanwhocodes/config-array@^0.11.8":
|
||||
version "0.11.8"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9"
|
||||
@ -182,132 +199,132 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.12.tgz#920447fdd78d76b19de0438b7f60df3c4a80bf1c"
|
||||
integrity sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==
|
||||
|
||||
"@typescript-eslint/eslint-plugin@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz#5fb0d43574c2411f16ea80f5fc335b8eaa7b28a8"
|
||||
integrity sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==
|
||||
"@typescript-eslint/eslint-plugin@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz#c0e10eeb936debe5d1c3433cf36206a95befefd0"
|
||||
integrity sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.52.0"
|
||||
"@typescript-eslint/type-utils" "5.52.0"
|
||||
"@typescript-eslint/utils" "5.52.0"
|
||||
"@eslint-community/regexpp" "^4.4.0"
|
||||
"@typescript-eslint/scope-manager" "5.59.0"
|
||||
"@typescript-eslint/type-utils" "5.59.0"
|
||||
"@typescript-eslint/utils" "5.59.0"
|
||||
debug "^4.3.4"
|
||||
grapheme-splitter "^1.0.4"
|
||||
ignore "^5.2.0"
|
||||
natural-compare-lite "^1.4.0"
|
||||
regexpp "^3.2.0"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/parser@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.52.0.tgz#73c136df6c0133f1d7870de7131ccf356f5be5a4"
|
||||
integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==
|
||||
"@typescript-eslint/parser@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.0.tgz#0ad7cd019346cc5d150363f64869eca10ca9977c"
|
||||
integrity sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.52.0"
|
||||
"@typescript-eslint/types" "5.52.0"
|
||||
"@typescript-eslint/typescript-estree" "5.52.0"
|
||||
"@typescript-eslint/scope-manager" "5.59.0"
|
||||
"@typescript-eslint/types" "5.59.0"
|
||||
"@typescript-eslint/typescript-estree" "5.59.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/parser@^5.0.0":
|
||||
version "5.30.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.5.tgz#f667c34e4e4c299d98281246c9b1e68c03a92522"
|
||||
integrity sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q==
|
||||
"@typescript-eslint/parser@^5.43.0":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.57.1.tgz#af911234bd4401d09668c5faf708a0570a17a748"
|
||||
integrity sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.30.5"
|
||||
"@typescript-eslint/types" "5.30.5"
|
||||
"@typescript-eslint/typescript-estree" "5.30.5"
|
||||
"@typescript-eslint/scope-manager" "5.57.1"
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/typescript-estree" "5.57.1"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.30.5":
|
||||
version "5.30.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz#7f90b9d6800552c856a5f3644f5e55dd1469d964"
|
||||
integrity sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==
|
||||
"@typescript-eslint/scope-manager@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz#5d28799c0fc8b501a29ba1749d827800ef22d710"
|
||||
integrity sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.30.5"
|
||||
"@typescript-eslint/visitor-keys" "5.30.5"
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/visitor-keys" "5.57.1"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1"
|
||||
integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==
|
||||
"@typescript-eslint/scope-manager@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz#86501d7a17885710b6716a23be2e93fc54a4fe8c"
|
||||
integrity sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.52.0"
|
||||
"@typescript-eslint/visitor-keys" "5.52.0"
|
||||
"@typescript-eslint/types" "5.59.0"
|
||||
"@typescript-eslint/visitor-keys" "5.59.0"
|
||||
|
||||
"@typescript-eslint/type-utils@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz#9fd28cd02e6f21f5109e35496df41893f33167aa"
|
||||
integrity sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==
|
||||
"@typescript-eslint/type-utils@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz#8e8d1420fc2265989fa3a0d897bde37f3851e8c9"
|
||||
integrity sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==
|
||||
dependencies:
|
||||
"@typescript-eslint/typescript-estree" "5.52.0"
|
||||
"@typescript-eslint/utils" "5.52.0"
|
||||
"@typescript-eslint/typescript-estree" "5.59.0"
|
||||
"@typescript-eslint/utils" "5.59.0"
|
||||
debug "^4.3.4"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/types@5.30.5":
|
||||
version "5.30.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.5.tgz#36a0c05a72af3623cdf9ee8b81ea743b7de75a98"
|
||||
integrity sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==
|
||||
"@typescript-eslint/types@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.1.tgz#d9989c7a9025897ea6f0550b7036027f69e8a603"
|
||||
integrity sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA==
|
||||
|
||||
"@typescript-eslint/types@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b"
|
||||
integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==
|
||||
"@typescript-eslint/types@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32"
|
||||
integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.30.5":
|
||||
version "5.30.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz#c520e4eba20551c4ec76af8d344a42eb6c9767bb"
|
||||
integrity sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==
|
||||
"@typescript-eslint/typescript-estree@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz#10d9643e503afc1ca4f5553d9bbe672ea4050b71"
|
||||
integrity sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.30.5"
|
||||
"@typescript-eslint/visitor-keys" "5.30.5"
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/visitor-keys" "5.57.1"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca"
|
||||
integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==
|
||||
"@typescript-eslint/typescript-estree@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz#8869156ee1dcfc5a95be3ed0e2809969ea28e965"
|
||||
integrity sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.52.0"
|
||||
"@typescript-eslint/visitor-keys" "5.52.0"
|
||||
"@typescript-eslint/types" "5.59.0"
|
||||
"@typescript-eslint/visitor-keys" "5.59.0"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/utils@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.52.0.tgz#b260bb5a8f6b00a0ed51db66bdba4ed5e4845a72"
|
||||
integrity sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==
|
||||
"@typescript-eslint/utils@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.0.tgz#063d066b3bc4850c18872649ed0da9ee72d833d5"
|
||||
integrity sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils" "^4.2.0"
|
||||
"@types/json-schema" "^7.0.9"
|
||||
"@types/semver" "^7.3.12"
|
||||
"@typescript-eslint/scope-manager" "5.52.0"
|
||||
"@typescript-eslint/types" "5.52.0"
|
||||
"@typescript-eslint/typescript-estree" "5.52.0"
|
||||
"@typescript-eslint/scope-manager" "5.59.0"
|
||||
"@typescript-eslint/types" "5.59.0"
|
||||
"@typescript-eslint/typescript-estree" "5.59.0"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
semver "^7.3.7"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.30.5":
|
||||
version "5.30.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz#d4bb969202019d5d5d849a0aaedc7370cc044b14"
|
||||
integrity sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==
|
||||
"@typescript-eslint/visitor-keys@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz#585e5fa42a9bbcd9065f334fd7c8a4ddfa7d905e"
|
||||
integrity sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.30.5"
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.52.0":
|
||||
version "5.52.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f"
|
||||
integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==
|
||||
"@typescript-eslint/visitor-keys@5.59.0":
|
||||
version "5.59.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz#a59913f2bf0baeb61b5cfcb6135d3926c3854365"
|
||||
integrity sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.52.0"
|
||||
"@typescript-eslint/types" "5.59.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
acorn-jsx@^5.3.2:
|
||||
@ -698,17 +715,17 @@ escape-string-regexp@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||
|
||||
eslint-config-prettier@8.6.0:
|
||||
version "8.6.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207"
|
||||
integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==
|
||||
eslint-config-prettier@8.8.0:
|
||||
version "8.8.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348"
|
||||
integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==
|
||||
|
||||
eslint-config-standard-with-typescript@32.0.0:
|
||||
version "32.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-32.0.0.tgz#31d9212fc8e7a3f0b67bad98828829161bb3d89f"
|
||||
integrity sha512-SyfzLvyBbPfxr2K/zNphtl5CGIS7FHH7v0TZrpmuyEXe+S1LFgt8hdJcWZHNxFckAGVQqrCxe/8+9T6n8x0gEA==
|
||||
eslint-config-standard-with-typescript@34.0.1:
|
||||
version "34.0.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-34.0.1.tgz#4cf797c7f54b2eb1683c7e990b45a257ed4a9992"
|
||||
integrity sha512-J7WvZeLtd0Vr9F+v4dZbqJCLD16cbIy4U+alJMq4MiXdpipdBM3U5NkXaGUjePc4sb1ZE01U9g6VuTBpHHz1fg==
|
||||
dependencies:
|
||||
"@typescript-eslint/parser" "^5.0.0"
|
||||
"@typescript-eslint/parser" "^5.43.0"
|
||||
eslint-config-standard "17.0.0"
|
||||
|
||||
eslint-config-standard@17.0.0:
|
||||
@ -769,10 +786,10 @@ eslint-plugin-import@2.27.5:
|
||||
semver "^6.3.0"
|
||||
tsconfig-paths "^3.14.1"
|
||||
|
||||
eslint-plugin-n@15.6.1:
|
||||
version "15.6.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz#f7e77f24abb92a550115cf11e29695da122c398c"
|
||||
integrity sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==
|
||||
eslint-plugin-n@15.7.0:
|
||||
version "15.7.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz#e29221d8f5174f84d18f2eb94765f2eeea033b90"
|
||||
integrity sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==
|
||||
dependencies:
|
||||
builtins "^5.0.1"
|
||||
eslint-plugin-es "^4.1.0"
|
||||
@ -852,12 +869,20 @@ eslint-visitor-keys@^3.3.0:
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
|
||||
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
|
||||
|
||||
eslint@8.34.0:
|
||||
version "8.34.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6"
|
||||
integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==
|
||||
eslint-visitor-keys@^3.4.0:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"
|
||||
integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==
|
||||
|
||||
eslint@8.38.0:
|
||||
version "8.38.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.38.0.tgz#a62c6f36e548a5574dd35728ac3c6209bd1e2f1a"
|
||||
integrity sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==
|
||||
dependencies:
|
||||
"@eslint/eslintrc" "^1.4.1"
|
||||
"@eslint-community/eslint-utils" "^4.2.0"
|
||||
"@eslint-community/regexpp" "^4.4.0"
|
||||
"@eslint/eslintrc" "^2.0.2"
|
||||
"@eslint/js" "8.38.0"
|
||||
"@humanwhocodes/config-array" "^0.11.8"
|
||||
"@humanwhocodes/module-importer" "^1.0.1"
|
||||
"@nodelib/fs.walk" "^1.2.8"
|
||||
@ -868,10 +893,9 @@ eslint@8.34.0:
|
||||
doctrine "^3.0.0"
|
||||
escape-string-regexp "^4.0.0"
|
||||
eslint-scope "^7.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
espree "^9.4.0"
|
||||
esquery "^1.4.0"
|
||||
eslint-visitor-keys "^3.4.0"
|
||||
espree "^9.5.1"
|
||||
esquery "^1.4.2"
|
||||
esutils "^2.0.2"
|
||||
fast-deep-equal "^3.1.3"
|
||||
file-entry-cache "^6.0.1"
|
||||
@ -892,24 +916,23 @@ eslint@8.34.0:
|
||||
minimatch "^3.1.2"
|
||||
natural-compare "^1.4.0"
|
||||
optionator "^0.9.1"
|
||||
regexpp "^3.2.0"
|
||||
strip-ansi "^6.0.1"
|
||||
strip-json-comments "^3.1.0"
|
||||
text-table "^0.2.0"
|
||||
|
||||
espree@^9.4.0:
|
||||
version "9.4.0"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.0.tgz#cd4bc3d6e9336c433265fc0aa016fc1aaf182f8a"
|
||||
integrity sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==
|
||||
espree@^9.5.1:
|
||||
version "9.5.1"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4"
|
||||
integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==
|
||||
dependencies:
|
||||
acorn "^8.8.0"
|
||||
acorn-jsx "^5.3.2"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
eslint-visitor-keys "^3.4.0"
|
||||
|
||||
esquery@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
|
||||
integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
|
||||
esquery@^1.4.2:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
|
||||
integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
|
||||
dependencies:
|
||||
estraverse "^5.1.0"
|
||||
|
||||
@ -1528,9 +1551,9 @@ lunr@^2.3.9:
|
||||
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==
|
||||
|
||||
marked@^4.2.12:
|
||||
version "4.2.12"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.12.tgz#d69a64e21d71b06250da995dcd065c11083bebb5"
|
||||
integrity sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
|
||||
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
|
||||
|
||||
merge-stream@^2.0.0:
|
||||
version "2.0.0"
|
||||
@ -1562,10 +1585,10 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimatch@^6.1.6:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-6.2.0.tgz#2b70fd13294178c69c04dfc05aebdb97a4e79e42"
|
||||
integrity sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==
|
||||
minimatch@^7.1.3:
|
||||
version "7.4.6"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb"
|
||||
integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
@ -1769,10 +1792,10 @@ prelude-ls@^1.2.1:
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
||||
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
|
||||
|
||||
prettier@2.8.4:
|
||||
version "2.8.4"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3"
|
||||
integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==
|
||||
prettier@2.8.7:
|
||||
version "2.8.7"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
|
||||
integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==
|
||||
|
||||
punycode@^2.1.0:
|
||||
version "2.1.1"
|
||||
@ -1805,7 +1828,7 @@ regexp.prototype.flags@^1.4.3:
|
||||
define-properties "^1.1.3"
|
||||
functions-have-names "^1.2.2"
|
||||
|
||||
regexpp@^3.0.0, regexpp@^3.2.0:
|
||||
regexpp@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
|
||||
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
|
||||
@ -1912,9 +1935,9 @@ shebang-regex@^3.0.0:
|
||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
|
||||
shiki@^0.14.1:
|
||||
version "0.14.1"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.1.tgz#9fbe082d0a8aa2ad63df4fbf2ee11ec924aa7ee1"
|
||||
integrity sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==
|
||||
version "0.14.2"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.2.tgz#d51440800b701392b31ce2336036058e338247a1"
|
||||
integrity sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==
|
||||
dependencies:
|
||||
ansi-sequence-parser "^1.1.0"
|
||||
jsonc-parser "^3.2.0"
|
||||
@ -2092,10 +2115,10 @@ tslib@^1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||
|
||||
tsup@6.6.3:
|
||||
version "6.6.3"
|
||||
resolved "https://registry.yarnpkg.com/tsup/-/tsup-6.6.3.tgz#f6f975a8656cfd9b8e115f33b1aa0f0fd4df78e2"
|
||||
integrity sha512-OLx/jFllYlVeZQ7sCHBuRVEQBBa1tFbouoc/gbYakyipjVQdWy/iQOvmExUA/ewap9iQ7tbJf9pW0PgcEFfJcQ==
|
||||
tsup@6.7.0:
|
||||
version "6.7.0"
|
||||
resolved "https://registry.yarnpkg.com/tsup/-/tsup-6.7.0.tgz#416f350f32a07b6ae86792ad7e52b0cafc566d64"
|
||||
integrity sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==
|
||||
dependencies:
|
||||
bundle-require "^4.0.0"
|
||||
cac "^6.7.12"
|
||||
@ -2152,14 +2175,14 @@ typedoc-plugin-mdn-links@2.0.2:
|
||||
resolved "https://registry.yarnpkg.com/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-2.0.2.tgz#5a6aa268950c41a1437b57e2c72ed77f8ba323d2"
|
||||
integrity sha512-Fzjvfsj3rxvmZNqWRvq9JTGBkOkrPp0kBtvJCJ4U5Jm14OF1KoRErtmwgVQcPLA5Xs8h5I/W4uZBaL8SDHsgxQ==
|
||||
|
||||
typedoc@0.23.25:
|
||||
version "0.23.25"
|
||||
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.25.tgz#5f8f1850fd044c4d15d453117affddf11a265610"
|
||||
integrity sha512-O1he153qVyoCgJYSvIyY3bPP1wAJTegZfa6tL3APinSZhJOf8CSd8F/21M6ex8pUY/fuY6n0jAsT4fIuMGA6sA==
|
||||
typedoc@0.23.28:
|
||||
version "0.23.28"
|
||||
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.28.tgz#3ce9c36ef1c273fa849d2dea18651855100d3ccd"
|
||||
integrity sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==
|
||||
dependencies:
|
||||
lunr "^2.3.9"
|
||||
marked "^4.2.12"
|
||||
minimatch "^6.1.6"
|
||||
minimatch "^7.1.3"
|
||||
shiki "^0.14.1"
|
||||
|
||||
typescript@4.9.5:
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "../public",
|
||||
"devPath": "../public",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "../public",
|
||||
"devPath": "../public",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"distDir": "../public",
|
||||
"devPath": "../public",
|
||||
|
@ -27,6 +27,29 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.2.0]
|
||||
|
||||
- Add dylib support to `tauri.bundle.macOS.frameworks`.
|
||||
- [ce76d95a](https://www.github.com/tauri-apps/tauri/commit/ce76d95ab186f4556166a2a22360067eab000fc8) feat(tauri-cli): add dylib support to `tauri.bundle.macOS.frameworks`, closes [#4615](https://www.github.com/tauri-apps/tauri/pull/4615) ([#5732](https://www.github.com/tauri-apps/tauri/pull/5732)) on 2022-12-31
|
||||
- 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/.
|
||||
- [20ff1f45](https://www.github.com/tauri-apps/tauri/commit/20ff1f45968f1cfd30d093bb58255b348fbdfb98) feat(bundler): Add support for numeric-only build numbers in msi version ([#6096](https://www.github.com/tauri-apps/tauri/pull/6096)) on 2023-01-19
|
||||
- On Windows, printing consistent paths on Windows with backslashs only.
|
||||
- [9da99607](https://www.github.com/tauri-apps/tauri/commit/9da996073ff07d4b59668a5315d40e9bc578e340) fix(cli): fix printing paths on Windows ([#6137](https://www.github.com/tauri-apps/tauri/pull/6137)) on 2023-01-26
|
||||
- Fixed error during bundling process for the appimage target on subsequent bundling attempts.
|
||||
- [2f70d8da](https://www.github.com/tauri-apps/tauri/commit/2f70d8da2bc079400bb49e6793f755306049aab2) fix: symlink issue bundling for linux [#5781](https://www.github.com/tauri-apps/tauri/pull/5781) ([#6391](https://www.github.com/tauri-apps/tauri/pull/6391)) on 2023-03-17
|
||||
- Fixes DMG bundling not finding bundle to set icon position.
|
||||
- [7489f966](https://www.github.com/tauri-apps/tauri/commit/7489f9669734a48be063907696b0f200a293ccb6) fix(bundler): fix problem of macOS bunder while i18n is set, closes [#6614](https://www.github.com/tauri-apps/tauri/pull/6614) ([#6615](https://www.github.com/tauri-apps/tauri/pull/6615)) on 2023-04-03
|
||||
- Use escaping on Handlebars templates.
|
||||
- [6d6b6e65](https://www.github.com/tauri-apps/tauri/commit/6d6b6e653ea70fc02794f723092cdc860995c259) feat: configure escaping on handlebars templates ([#6678](https://www.github.com/tauri-apps/tauri/pull/6678)) on 2023-05-02
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
- [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19
|
||||
- Add `nsis` bundle target
|
||||
- [c94e1326](https://www.github.com/tauri-apps/tauri/commit/c94e1326a7c0767a13128a8b1d327a00156ece12) feat(bundler): add `nsis`, closes [#4450](https://www.github.com/tauri-apps/tauri/pull/4450), closes [#2319](https://www.github.com/tauri-apps/tauri/pull/2319) ([#4674](https://www.github.com/tauri-apps/tauri/pull/4674)) on 2023-01-03
|
||||
- On Windows, the `msi` installer's `Launch App` checkbox will be checked by default.
|
||||
- [89602cdc](https://www.github.com/tauri-apps/tauri/commit/89602cdce34f3ea5b4a9b8921dc04a197f2d7de8) feat(bundler): check `Launch app` by default for WiX, closes [#5859](https://www.github.com/tauri-apps/tauri/pull/5859) ([#5871](https://www.github.com/tauri-apps/tauri/pull/5871)) on 2022-12-26
|
||||
|
||||
## \[1.1.2]
|
||||
|
||||
- Fixes blank taskbar icon on WiX updates.
|
||||
|
@ -18,8 +18,8 @@ exclude = [ "CHANGELOG.md", "/target", "rustfmt.toml" ]
|
||||
|
||||
[dependencies]
|
||||
tauri-utils = { version = "2.0.0-alpha.4", path = "../../core/tauri-utils", features = [ "resources" ] }
|
||||
image = "0.24.5"
|
||||
libflate = "1.2"
|
||||
image = "0.24.6"
|
||||
libflate = "1.3"
|
||||
anyhow = "1.0"
|
||||
thiserror = "1.0"
|
||||
serde_json = "1.0"
|
||||
@ -28,7 +28,7 @@ strsim = "0.10.0"
|
||||
tar = "0.4.38"
|
||||
walkdir = "2"
|
||||
handlebars = "4.3"
|
||||
tempfile = "3.3.0"
|
||||
tempfile = "3.5.0"
|
||||
log = { version = "0.4.17", features = [ "kv_unstable" ] }
|
||||
dirs-next = "2.0"
|
||||
encoding_rs = "0.8"
|
||||
@ -43,7 +43,7 @@ zip = "0.6"
|
||||
[target."cfg(target_os = \"windows\")".dependencies]
|
||||
uuid = { version = "1", features = [ "v4", "v5" ] }
|
||||
bitness = "0.4"
|
||||
winreg = "0.10"
|
||||
winreg = "0.50"
|
||||
glob = "0.3"
|
||||
|
||||
[target."cfg(target_os = \"macos\")".dependencies]
|
||||
|
@ -81,6 +81,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
|
||||
|
||||
// initialize shell script template.
|
||||
let mut handlebars = Handlebars::new();
|
||||
handlebars.register_escape_fn(|s| s.into());
|
||||
handlebars
|
||||
.register_template_string("appimage", include_str!("templates/appimage"))
|
||||
.expect("Failed to register template for handlebars");
|
||||
|
@ -614,6 +614,7 @@ pub fn build_wix_app_installer(
|
||||
|
||||
let mut fragment_paths = Vec::new();
|
||||
let mut handlebars = Handlebars::new();
|
||||
handlebars.register_escape_fn(|s| s.into());
|
||||
let mut has_custom_template = false;
|
||||
let mut enable_elevated_update_task = false;
|
||||
|
||||
@ -692,6 +693,7 @@ pub fn build_wix_app_installer(
|
||||
|
||||
// Create the Powershell script to install the task
|
||||
let mut skip_uac_task_installer = Handlebars::new();
|
||||
skip_uac_task_installer.register_escape_fn(|s| s.into());
|
||||
let xml = include_str!("../templates/install-task.ps1");
|
||||
skip_uac_task_installer
|
||||
.register_template_string("install-task.ps1", xml)
|
||||
@ -703,6 +705,7 @@ pub fn build_wix_app_installer(
|
||||
|
||||
// Create the Powershell script to uninstall the task
|
||||
let mut skip_uac_task_uninstaller = Handlebars::new();
|
||||
skip_uac_task_uninstaller.register_escape_fn(|s| s.into());
|
||||
let xml = include_str!("../templates/uninstall-task.ps1");
|
||||
skip_uac_task_uninstaller
|
||||
.register_template_string("uninstall-task.ps1", xml)
|
||||
|
@ -35,7 +35,7 @@ use std::{
|
||||
// URLS for the NSIS toolchain.
|
||||
#[cfg(target_os = "windows")]
|
||||
const NSIS_URL: &str =
|
||||
"https://sourceforge.net/projects/nsis/files/NSIS%203/3.08/nsis-3.08.zip/download";
|
||||
"https://github.com/tauri-apps/binary-releases/releases/download/nsis-3/nsis-3.zip";
|
||||
#[cfg(target_os = "windows")]
|
||||
const NSIS_SHA1: &str = "057e83c7d82462ec394af76c87d06733605543d4";
|
||||
const NSIS_APPLICATIONID_URL: &str = "https://github.com/tauri-apps/binary-releases/releases/download/nsis-plugins-v0/NSIS-ApplicationID.zip";
|
||||
@ -100,6 +100,9 @@ fn get_and_extract_nsis(nsis_toolset_path: &Path, _tauri_tools_path: &Path) -> c
|
||||
let data = download(NSIS_APPLICATIONID_URL)?;
|
||||
info!("extracting NSIS ApplicationID plugin");
|
||||
extract_zip(&data, &nsis_plugins)?;
|
||||
|
||||
create_dir_all(nsis_plugins.join("x86-unicode"))?;
|
||||
|
||||
copy(
|
||||
nsis_plugins
|
||||
.join("ReleaseUnicode")
|
||||
@ -341,6 +344,21 @@ fn build_nsis_app_installer(
|
||||
}
|
||||
|
||||
let mut handlebars = Handlebars::new();
|
||||
handlebars.register_escape_fn(|s| {
|
||||
let mut output = String::new();
|
||||
for c in s.chars() {
|
||||
match c {
|
||||
'\"' => output.push_str("$\\\""),
|
||||
'$' => output.push_str("$$"),
|
||||
'`' => output.push_str("$\\`"),
|
||||
'\n' => output.push_str("$\\n"),
|
||||
'\t' => output.push_str("$\\t"),
|
||||
'\r' => output.push_str("$\\r"),
|
||||
_ => output.push(c),
|
||||
}
|
||||
}
|
||||
output
|
||||
});
|
||||
handlebars
|
||||
.register_template_string("installer.nsi", include_str!("./templates/installer.nsi"))
|
||||
.map_err(|e| e.to_string())
|
||||
@ -508,6 +526,14 @@ fn get_lang_data(lang: &str) -> Option<(&'static str, &'static encoding_rs::Enco
|
||||
UTF_8,
|
||||
)),
|
||||
"french" => Some((include_str!("./templates/nsis-languages/French.nsh"), UTF_8)),
|
||||
"spanish" => Some((
|
||||
include_str!("./templates/nsis-languages/Spanish.nsh"),
|
||||
UTF_8,
|
||||
)),
|
||||
"spanishinternational" => Some((
|
||||
include_str!("./templates/nsis-languages/SpanishInternational.nsh"),
|
||||
UTF_8,
|
||||
)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,4 @@ if ($ChangeDir -ne "") {
|
||||
# Change directories to the install path
|
||||
Set-Location -Path $ChangeDir
|
||||
}
|
||||
SCHTASKS.EXE /CREATE /XML update.xml /TN "Update {{{product_name}}} - Skip UAC" /F
|
||||
SCHTASKS.EXE /CREATE /XML update.xml /TN "Update {{product_name}} - Skip UAC" /F
|
||||
|
@ -6,26 +6,26 @@ Var ReinstallPageCheck
|
||||
!include x64.nsh
|
||||
!include WordFunc.nsh
|
||||
|
||||
!define MANUFACTURER "{{{manufacturer}}}"
|
||||
!define PRODUCTNAME "{{{product_name}}}"
|
||||
!define VERSION "{{{version}}}"
|
||||
!define INSTALLMODE "{{{install_mode}}}"
|
||||
!define LICENSE "{{{license}}}"
|
||||
!define INSTALLERICON "{{{installer_icon}}}"
|
||||
!define SIDEBARIMAGE "{{{sidebar_image}}}"
|
||||
!define HEADERIMAGE "{{{header_image}}}"
|
||||
!define MAINBINARYNAME "{{{main_binary_name}}}"
|
||||
!define MAINBINARYSRCPATH "{{{main_binary_path}}}"
|
||||
!define BUNDLEID "{{{bundle_id}}}"
|
||||
!define OUTFILE "{{{out_file}}}"
|
||||
!define ARCH "{{{arch}}}"
|
||||
!define PLUGINSPATH "{{{additional_plugins_path}}}"
|
||||
!define ALLOWDOWNGRADES "{{{allow_downgrades}}}"
|
||||
!define DISPLAYLANGUAGESELECTOR "{{{display_language_selector}}}"
|
||||
!define INSTALLWEBVIEW2MODE "{{{install_webview2_mode}}}"
|
||||
!define WEBVIEW2INSTALLERARGS "{{{webview2_installer_args}}}"
|
||||
!define WEBVIEW2BOOTSTRAPPERPATH "{{{webview2_bootstrapper_path}}}"
|
||||
!define WEBVIEW2INSTALLERPATH "{{{webview2_installer_path}}}"
|
||||
!define MANUFACTURER "{{manufacturer}}"
|
||||
!define PRODUCTNAME "{{product_name}}"
|
||||
!define VERSION "{{version}}"
|
||||
!define INSTALLMODE "{{install_mode}}"
|
||||
!define LICENSE "{{license}}"
|
||||
!define INSTALLERICON "{{installer_icon}}"
|
||||
!define SIDEBARIMAGE "{{sidebar_image}}"
|
||||
!define HEADERIMAGE "{{header_image}}"
|
||||
!define MAINBINARYNAME "{{main_binary_name}}"
|
||||
!define MAINBINARYSRCPATH "{{main_binary_path}}"
|
||||
!define BUNDLEID "{{bundle_id}}"
|
||||
!define OUTFILE "{{out_file}}"
|
||||
!define ARCH "{{arch}}"
|
||||
!define PLUGINSPATH "{{additional_plugins_path}}"
|
||||
!define ALLOWDOWNGRADES "{{allow_downgrades}}"
|
||||
!define DISPLAYLANGUAGESELECTOR "{{display_language_selector}}"
|
||||
!define INSTALLWEBVIEW2MODE "{{install_webview2_mode}}"
|
||||
!define WEBVIEW2INSTALLERARGS "{{webview2_installer_args}}"
|
||||
!define WEBVIEW2BOOTSTRAPPERPATH "{{webview2_bootstrapper_path}}"
|
||||
!define WEBVIEW2INSTALLERPATH "{{webview2_installer_path}}"
|
||||
!define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}"
|
||||
!define MANUPRODUCTKEY "Software\${MANUFACTURER}\${PRODUCTNAME}"
|
||||
|
||||
@ -356,7 +356,7 @@ Section Webview2
|
||||
|
||||
!if "${INSTALLWEBVIEW2MODE}" == "embedBootstrapper"
|
||||
CreateDirectory "$INSTDIR\redist"
|
||||
File /oname="$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe" "WEBVIEW2BOOTSTRAPPERPATH"
|
||||
File "/oname=$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe" "${WEBVIEW2BOOTSTRAPPERPATH}"
|
||||
DetailPrint "$(installingWebview2)"
|
||||
StrCpy $6 "$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe"
|
||||
Goto install_webview2
|
||||
@ -364,7 +364,7 @@ Section Webview2
|
||||
|
||||
!if "${INSTALLWEBVIEW2MODE}" == "offlineInstaller"
|
||||
CreateDirectory "$INSTDIR\redist"
|
||||
File /oname="$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe" "WEBVIEW2INSTALLERPATH"
|
||||
File "/oname=$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe" "${WEBVIEW2INSTALLERPATH}"
|
||||
DetailPrint "$(installingWebview2)"
|
||||
StrCpy $6 "$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe"
|
||||
Goto install_webview2
|
||||
|
@ -11,11 +11,11 @@
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Product
|
||||
Id="*"
|
||||
Name="{{{product_name}}}"
|
||||
UpgradeCode="{{{upgrade_code}}}"
|
||||
Name="{{product_name}}"
|
||||
UpgradeCode="{{upgrade_code}}"
|
||||
Language="!(loc.TauriLanguage)"
|
||||
Manufacturer="{{{manufacturer}}}"
|
||||
Version="{{{version}}}">
|
||||
Manufacturer="{{manufacturer}}"
|
||||
Version="{{version}}">
|
||||
|
||||
<Package Id="*"
|
||||
Keywords="Installer"
|
||||
@ -42,23 +42,23 @@
|
||||
<Media Id="1" Cabinet="app.cab" EmbedCab="yes" />
|
||||
|
||||
{{#if banner_path}}
|
||||
<WixVariable Id="WixUIBannerBmp" Value="{{{banner_path}}}" />
|
||||
<WixVariable Id="WixUIBannerBmp" Value="{{banner_path}}" />
|
||||
{{/if}}
|
||||
{{#if dialog_image_path}}
|
||||
<WixVariable Id="WixUIDialogBmp" Value="{{{dialog_image_path}}}" />
|
||||
<WixVariable Id="WixUIDialogBmp" Value="{{dialog_image_path}}" />
|
||||
{{/if}}
|
||||
{{#if license}}
|
||||
<WixVariable Id="WixUILicenseRtf" Value="{{{license}}}" />
|
||||
<WixVariable Id="WixUILicenseRtf" Value="{{license}}" />
|
||||
{{/if}}
|
||||
|
||||
<Icon Id="ProductIcon" SourceFile="{{{icon_path}}}"/>
|
||||
<Icon Id="ProductIcon" SourceFile="{{icon_path}}"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="ProductIcon" />
|
||||
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
|
||||
<SetProperty Id="ARPNOMODIFY" Value="1" After="InstallValidate" Sequence="execute"/>
|
||||
|
||||
<!-- initialize with previous InstallDir -->
|
||||
<Property Id="INSTALLDIR">
|
||||
<RegistrySearch Id="PrevInstallDirReg" Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="InstallDir" Type="raw"/>
|
||||
<RegistrySearch Id="PrevInstallDirReg" Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="InstallDir" Type="raw"/>
|
||||
</Property>
|
||||
|
||||
<!-- launch app checkbox -->
|
||||
@ -93,27 +93,27 @@
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="DesktopFolder" Name="Desktop">
|
||||
<Component Id="ApplicationShortcutDesktop" Guid="*">
|
||||
<Shortcut Id="ApplicationDesktopShortcut" Name="{{{product_name}}}" Description="Runs {{{product_name}}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
|
||||
<Shortcut Id="ApplicationDesktopShortcut" Name="{{product_name}}" Description="Runs {{product_name}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
|
||||
<RemoveFolder Id="DesktopFolder" On="uninstall" />
|
||||
<RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="Desktop Shortcut" Type="integer" Value="1" KeyPath="yes" />
|
||||
<RegistryValue Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="Desktop Shortcut" Type="integer" Value="1" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
|
||||
<Directory Id="INSTALLDIR" Name="{{{product_name}}}"/>
|
||||
<Directory Id="INSTALLDIR" Name="{{product_name}}"/>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="{{{product_name}}}"/>
|
||||
<Directory Id="ApplicationProgramsFolder" Name="{{product_name}}"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<DirectoryRef Id="INSTALLDIR">
|
||||
<Component Id="RegistryEntries" Guid="*">
|
||||
<RegistryKey Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}">
|
||||
<RegistryKey Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}">
|
||||
<RegistryValue Name="InstallDir" Type="string" Value="[INSTALLDIR]" KeyPath="yes" />
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
<Component Id="Path" Guid="{{{path_component_guid}}}" Win64="$(var.Win64)">
|
||||
<File Id="Path" Source="{{{app_exe_source}}}" KeyPath="yes" Checksum="yes"/>
|
||||
<Component Id="Path" Guid="{{path_component_guid}}" Win64="$(var.Win64)">
|
||||
<File Id="Path" Source="{{app_exe_source}}" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
{{#each binaries as |bin| ~}}
|
||||
<Component Id="{{ bin.id }}" Guid="{{bin.guid}}" Win64="$(var.Win64)">
|
||||
@ -131,12 +131,12 @@
|
||||
<File Id="UpdateTaskUninstaller" Source="uninstall-task.ps1" KeyPath="yes" Checksum="yes"/>
|
||||
</Component>
|
||||
{{/if}}
|
||||
{{{resources}}}
|
||||
{{resources}}
|
||||
<Component Id="CMP_UninstallShortcut" Guid="*">
|
||||
|
||||
<Shortcut Id="UninstallShortcut"
|
||||
Name="Uninstall {{{product_name}}}"
|
||||
Description="Uninstalls {{{product_name}}}"
|
||||
Name="Uninstall {{product_name}}"
|
||||
Description="Uninstalls {{product_name}}"
|
||||
Target="[System64Folder]msiexec.exe"
|
||||
Arguments="/x [ProductCode]" />
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
On="uninstall" />
|
||||
|
||||
<RegistryValue Root="HKCU"
|
||||
Key="Software\\{{{manufacturer}}}\\{{{product_name}}}"
|
||||
Key="Software\\{{manufacturer}}\\{{product_name}}"
|
||||
Name="Uninstaller Shortcut"
|
||||
Type="integer"
|
||||
Value="1"
|
||||
@ -155,15 +155,15 @@
|
||||
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||
<Component Id="ApplicationShortcut" Guid="*">
|
||||
<Shortcut Id="ApplicationStartMenuShortcut"
|
||||
Name="{{{product_name}}}"
|
||||
Description="Runs {{{product_name}}}"
|
||||
Name="{{product_name}}"
|
||||
Description="Runs {{product_name}}"
|
||||
Target="[!Path]"
|
||||
Icon="ProductIcon"
|
||||
WorkingDirectory="INSTALLDIR">
|
||||
<ShortcutProperty Key="System.AppUserModel.ID" Value="{{{bundle_id}}}"/>
|
||||
<ShortcutProperty Key="System.AppUserModel.ID" Value="{{bundle_id}}"/>
|
||||
</Shortcut>
|
||||
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
|
||||
<RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="Start Menu Shortcut" Type="integer" Value="1" KeyPath="yes"/>
|
||||
<RegistryValue Root="HKCU" Key="Software\\{{manufacturer}}\\{{product_name}}" Name="Start Menu Shortcut" Type="integer" Value="1" KeyPath="yes"/>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
</Property>
|
||||
|
||||
{{#if download_bootstrapper}}
|
||||
<CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden try [\{] [\[]Net.ServicePointManager[\]]::SecurityProtocol = [\[]Net.SecurityProtocolType[\]]::Tls12 [\}] catch [\{][\}]; Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList ({{{webview_installer_args}}} '/install') -Wait' Return='check'/>
|
||||
<CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden try [\{] [\[]Net.ServicePointManager[\]]::SecurityProtocol = [\[]Net.SecurityProtocolType[\]]::Tls12 [\}] catch [\{][\}]; Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList ({{webview_installer_args}} '/install') -Wait' Return='check'/>
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action='DownloadAndInvokeBootstrapper' Before='InstallFinalize'>
|
||||
<![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
|
||||
@ -257,8 +257,8 @@
|
||||
|
||||
<!-- Embedded webview bootstrapper mode -->
|
||||
{{#if webview2_bootstrapper_path}}
|
||||
<Binary Id="MicrosoftEdgeWebview2Setup.exe" SourceFile="{{{webview2_bootstrapper_path}}}"/>
|
||||
<CustomAction Id='InvokeBootstrapper' BinaryKey='MicrosoftEdgeWebview2Setup.exe' Execute="deferred" ExeCommand='{{{webview_installer_args}}} /install' Return='check' />
|
||||
<Binary Id="MicrosoftEdgeWebview2Setup.exe" SourceFile="{{webview2_bootstrapper_path}}"/>
|
||||
<CustomAction Id='InvokeBootstrapper' BinaryKey='MicrosoftEdgeWebview2Setup.exe' Execute="deferred" ExeCommand='{{webview_installer_args}} /install' Return='check' />
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action='InvokeBootstrapper' Before='InstallFinalize'>
|
||||
<![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
|
||||
@ -268,8 +268,8 @@
|
||||
|
||||
<!-- Embedded offline installer -->
|
||||
{{#if webview2_installer_path}}
|
||||
<Binary Id="MicrosoftEdgeWebView2RuntimeInstaller.exe" SourceFile="{{{webview2_installer_path}}}"/>
|
||||
<CustomAction Id='InvokeStandalone' BinaryKey='MicrosoftEdgeWebView2RuntimeInstaller.exe' Execute="deferred" ExeCommand='{{{webview_installer_args}}} /install' Return='check' />
|
||||
<Binary Id="MicrosoftEdgeWebView2RuntimeInstaller.exe" SourceFile="{{webview2_installer_path}}"/>
|
||||
<CustomAction Id='InvokeStandalone' BinaryKey='MicrosoftEdgeWebView2RuntimeInstaller.exe' Execute="deferred" ExeCommand='{{webview_installer_args}} /install' Return='check' />
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action='InvokeStandalone' Before='InstallFinalize'>
|
||||
<![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
|
||||
|
@ -0,0 +1,27 @@
|
||||
LangString addOrReinstall ${LANG_SPANISH} "Añadir o reinstalar componentes"
|
||||
LangString alreadyInstalled ${LANG_SPANISH} "Ya está instalado"
|
||||
LangString alreadyInstalledLong ${LANG_SPANISH} "${PRODUCTNAME} ${VERSION} ya está instalado. Seleccione la operación que desee realizar y pulse Siguiente para continuar."
|
||||
LangString appRunning ${LANG_SPANISH} "¡${PRODUCTNAME} está abierto! Por favor ciérrelo e intente de nuevo."
|
||||
LangString appRunningOkKill ${LANG_SPANISH} "¡${PRODUCTNAME} está abierto!$\nPulse Aceptar para cerrarlo."
|
||||
LangString chooseMaintenanceOption ${LANG_SPANISH} "Elija la operación de mantenimiento que desee realizar."
|
||||
LangString choowHowToInstall ${LANG_SPANISH} "Elija cómo desea instalar ${PRODUCTNAME}."
|
||||
LangString createDesktop ${LANG_SPANISH} "Crear acceso directo en el escritorio"
|
||||
LangString dontUninstall ${LANG_SPANISH} "No desinstalar"
|
||||
LangString dontUninstallDowngrade ${LANG_SPANISH} "No desinstalar (Disminuir la versión sin desinstalar está deshabilitado para este instalador)"
|
||||
LangString failedToKillApp ${LANG_SPANISH} "No se ha podido cerrar ${PRODUCTNAME}. Por favor ciérrelo e intente de nuevo."
|
||||
LangString installingWebview2 ${LANG_SPANISH} "Instalando WebView2..."
|
||||
LangString newerVersionInstalled ${LANG_SPANISH} "Ya está instalada una versión más reciente de ${PRODUCTNAME}. No se recomienda que instale una versión anterior. Si realmente desea instalar esta versión anterior, es recomendable desinstalar la versión actual antes de continuar. Seleccione la operación que desee realizar y pulse Siguiente para continuar."
|
||||
LangString older ${LANG_SPANISH} "anterior"
|
||||
LangString olderOrUnknownVersionInstalled ${LANG_SPANISH} "Una versión $R4 de ${PRODUCTNAME} está instalada en su sistema. Es recomendable desinstalar la versión actual antes de continuar. Seleccione la operación que desee realizar y pulse Siguiente para continuar."
|
||||
LangString silentDowngrades ${LANG_SPANISH} "Disminuir la versión está deshabilitado para este instalador. No se puede continuar con el instalador silencioso, por favor use el instalador de interfaz gráfica.$\n"
|
||||
LangString unableToUninstall ${LANG_SPANISH} "No se ha podido desinstalar."
|
||||
LangString uninstallApp ${LANG_SPANISH} "Desinstalar ${PRODUCTNAME}"
|
||||
LangString uninstallBeforeInstalling ${LANG_SPANISH} "Desinstalar antes de instalar"
|
||||
LangString unknown ${LANG_SPANISH} "desconocida"
|
||||
LangString webview2AbortError ${LANG_SPANISH} "No se ha podido instalar WebView2. Intente reiniciar el instalador."
|
||||
LangString webview2DownloadError ${LANG_SPANISH} "Error: No se ha podido descargar WebView2 - $0"
|
||||
LangString webview2DownloadSuccess ${LANG_SPANISH} "El bootstrapper de WebView2 fue descargado con éxito."
|
||||
LangString webview2Downloading ${LANG_SPANISH} "Descargando el bootstrapper de WebView2..."
|
||||
LangString webview2InstallError ${LANG_SPANISH} "Error: La instalación de WebView2 falló con el código $1."
|
||||
LangString webview2InstallSuccess ${LANG_SPANISH} "WebView2 fue instalado con éxito."
|
||||
LangString deleteAppData ${LANG_SPANISH} "Eliminar los datos de aplicación"
|
@ -0,0 +1,27 @@
|
||||
LangString addOrReinstall ${LANG_SPANISH} "Añadir o reinstalar componentes"
|
||||
LangString alreadyInstalled ${LANG_SPANISH} "Ya está instalado"
|
||||
LangString alreadyInstalledLong ${LANG_SPANISH} "${PRODUCTNAME} ${VERSION} ya está instalado. Seleccione la operación que desee realizar y pulse Siguiente para continuar."
|
||||
LangString appRunning ${LANG_SPANISH} "¡${PRODUCTNAME} está abierto! Por favor ciérrelo e intente de nuevo."
|
||||
LangString appRunningOkKill ${LANG_SPANISH} "¡${PRODUCTNAME} está abierto!$\nPulse Aceptar para cerrarlo."
|
||||
LangString chooseMaintenanceOption ${LANG_SPANISH} "Elija la operación de mantenimiento que desee realizar."
|
||||
LangString choowHowToInstall ${LANG_SPANISH} "Elija cómo desea instalar ${PRODUCTNAME}."
|
||||
LangString createDesktop ${LANG_SPANISH} "Crear acceso directo en el escritorio"
|
||||
LangString dontUninstall ${LANG_SPANISH} "No desinstalar"
|
||||
LangString dontUninstallDowngrade ${LANG_SPANISH} "No desinstalar (Disminuir la versión sin desinstalar está deshabilitado para este instalador)"
|
||||
LangString failedToKillApp ${LANG_SPANISH} "No se ha podido cerrar ${PRODUCTNAME}. Por favor ciérrelo e intente de nuevo."
|
||||
LangString installingWebview2 ${LANG_SPANISH} "Instalando WebView2..."
|
||||
LangString newerVersionInstalled ${LANG_SPANISH} "Ya está instalada una versión más reciente de ${PRODUCTNAME}. No se recomienda que instale una versión anterior. Si realmente desea instalar esta versión anterior, es recomendable desinstalar la versión actual antes de continuar. Seleccione la operación que desee realizar y pulse Siguiente para continuar."
|
||||
LangString older ${LANG_SPANISH} "anterior"
|
||||
LangString olderOrUnknownVersionInstalled ${LANG_SPANISH} "Una versión $R4 de ${PRODUCTNAME} está instalada en su sistema. Es recomendable desinstalar la versión actual antes de continuar. Seleccione la operación que desee realizar y pulse Siguiente para continuar."
|
||||
LangString silentDowngrades ${LANG_SPANISH} "Disminuir la versión está deshabilitado para este instalador. No se puede continuar con el instalador silencioso, por favor use el instalador de interfaz gráfica.$\n"
|
||||
LangString unableToUninstall ${LANG_SPANISH} "No se ha podido desinstalar."
|
||||
LangString uninstallApp ${LANG_SPANISH} "Desinstalar ${PRODUCTNAME}"
|
||||
LangString uninstallBeforeInstalling ${LANG_SPANISH} "Desinstalar antes de instalar"
|
||||
LangString unknown ${LANG_SPANISH} "desconocida"
|
||||
LangString webview2AbortError ${LANG_SPANISH} "No se ha podido instalar WebView2. Intente reiniciar el instalador."
|
||||
LangString webview2DownloadError ${LANG_SPANISH} "Error: No se ha podido descargar WebView2 - $0"
|
||||
LangString webview2DownloadSuccess ${LANG_SPANISH} "El bootstrapper de WebView2 fue descargado con éxito."
|
||||
LangString webview2Downloading ${LANG_SPANISH} "Descargando el bootstrapper de WebView2..."
|
||||
LangString webview2InstallError ${LANG_SPANISH} "Error: La instalación de WebView2 falló con el código $1."
|
||||
LangString webview2InstallSuccess ${LANG_SPANISH} "WebView2 fue instalado con éxito."
|
||||
LangString deleteAppData ${LANG_SPANISH} "Eliminar los datos de aplicación"
|
@ -20,4 +20,4 @@ if ((Test-Admin) -eq $false) {
|
||||
exit
|
||||
}
|
||||
|
||||
SCHTASKS.EXE /DELETE /TN 'Update {{{product_name}}} - Skip UAC' /F
|
||||
SCHTASKS.EXE /DELETE /TN 'Update {{product_name}} - Skip UAC' /F
|
||||
|
@ -6,7 +6,7 @@
|
||||
-->
|
||||
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
||||
<RegistrationInfo>
|
||||
<URI>\Update {{{product_name}}} - Skip UAC</URI>
|
||||
<URI>\Update {{product_name}} - Skip UAC</URI>
|
||||
</RegistrationInfo>
|
||||
<Triggers />
|
||||
<Principals>
|
||||
@ -37,7 +37,7 @@
|
||||
<Actions Context="Author">
|
||||
<Exec>
|
||||
<Command>cmd.exe</Command>
|
||||
<Arguments>/c "%SYSTEMROOT%\System32\msiexec.exe /i %TEMP%\\{{{product_name}}}.msi {{{msiexec_args}}} /promptrestart"</Arguments>
|
||||
<Arguments>/c "%SYSTEMROOT%\System32\msiexec.exe /i %TEMP%\\{{product_name}}.msi {{msiexec_args}} /promptrestart"</Arguments>
|
||||
</Exec>
|
||||
</Actions>
|
||||
</Task>
|
||||
|
@ -117,6 +117,49 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- Look for available port when using the built-in dev server for static files.
|
||||
- [a7ee5ca7](https://www.github.com/tauri-apps/tauri/commit/a7ee5ca7c348d33bdfdc1213b6850bcf5c39d6e6) fix(cli): look for available ports for built-in dev server, closes [#6511](https://www.github.com/tauri-apps/tauri/pull/6511) ([#6514](https://www.github.com/tauri-apps/tauri/pull/6514)) on 2023-03-31
|
||||
- Add `--port` to specify the port used for static files dev server. It can also be specified through `TAURI_DEV_SERVER_PORT` env var.
|
||||
- [b7a2ce2c](https://www.github.com/tauri-apps/tauri/commit/b7a2ce2c633c8383851ec9ec3c2cafda39f19745) feat(cli): add --port, closes [#6186](https://www.github.com/tauri-apps/tauri/pull/6186) ([#6283](https://www.github.com/tauri-apps/tauri/pull/6283)) on 2023-03-16
|
||||
- Fix `tauri info` panicking when parsing crates version on a newly created project without a `Cargo.lock` file.
|
||||
- [c2608423](https://www.github.com/tauri-apps/tauri/commit/c2608423b6eec5eb91d0ffc861714c011ad3988b) fix(cli): don't panic when a crate version couldn't be parsed ([#5873](https://www.github.com/tauri-apps/tauri/pull/5873)) on 2022-12-26
|
||||
- Improve the error message when `rustc` couldn't be found.
|
||||
- [7aab3e20](https://www.github.com/tauri-apps/tauri/commit/7aab3e2076272c14c78a563e288a1b04ed3cfd41) fix(cli.rs): improve `rustc` not found error msg ([#6021](https://www.github.com/tauri-apps/tauri/pull/6021)) on 2023-01-17
|
||||
- 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.
|
||||
- [8fb1df8a](https://www.github.com/tauri-apps/tauri/commit/8fb1df8aa65a52cdb4a7e1bb9dda9b912a7a2895) feat(cli): add `--ci` flag to `signer generate`, closes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) ([#6097](https://www.github.com/tauri-apps/tauri/pull/6097)) on 2023-01-19
|
||||
- Fix Outdated Github Actions in the Plugin Templates `with-api` and `backend`
|
||||
- [a926b49a](https://www.github.com/tauri-apps/tauri/commit/a926b49a01925ca757d391994bfac3beea29599b) Fix Github Actions of Tauri Plugin with-api template ([#6603](https://www.github.com/tauri-apps/tauri/pull/6603)) on 2023-04-03
|
||||
- Do not crash on Cargo.toml watcher.
|
||||
- [e8014a7f](https://www.github.com/tauri-apps/tauri/commit/e8014a7f612a1094461ddad63aacc498a2682ff5) fix(cli): do not crash on watcher ([#6303](https://www.github.com/tauri-apps/tauri/pull/6303)) on 2023-02-17
|
||||
- On Windows, printing consistent paths on Windows with backslashs only.
|
||||
- [9da99607](https://www.github.com/tauri-apps/tauri/commit/9da996073ff07d4b59668a5315d40e9bc578e340) fix(cli): fix printing paths on Windows ([#6137](https://www.github.com/tauri-apps/tauri/pull/6137)) on 2023-01-26
|
||||
- Add `--png` option for the `icon` command to generate custom icon sizes.
|
||||
- [9d214412](https://www.github.com/tauri-apps/tauri/commit/9d2144128fc5fad67d8404bce95f82297ebb0e4a) feat(cli): add option to make custom icon sizes, closes [#5121](https://www.github.com/tauri-apps/tauri/pull/5121) ([#5246](https://www.github.com/tauri-apps/tauri/pull/5246)) on 2022-12-27
|
||||
- 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.
|
||||
- [d4f89af1](https://www.github.com/tauri-apps/tauri/commit/d4f89af18d69fd95a4d8a1ede8442547c6a6d0ee) feat: skip password prompt on the build command if CI is set fixes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) on 2023-01-18
|
||||
- Fix `default-run` not deserialized.
|
||||
- [57c6bf07](https://www.github.com/tauri-apps/tauri/commit/57c6bf07bb380847abdf27c3fff9891d99c1c98c) fix(cli): fix default-run not deserialized ([#6584](https://www.github.com/tauri-apps/tauri/pull/6584)) on 2023-03-30
|
||||
- Fixes HTML serialization removing template tags on the dev server.
|
||||
- [314f0e21](https://www.github.com/tauri-apps/tauri/commit/314f0e212fd2b9e452bfe3424cdce2b0bf37b5d7) fix(cli): web_dev_server html template serialization (fix [#6165](https://www.github.com/tauri-apps/tauri/pull/6165)) ([#6166](https://www.github.com/tauri-apps/tauri/pull/6166)) on 2023-01-29
|
||||
- Use escaping on Handlebars templates.
|
||||
- [6d6b6e65](https://www.github.com/tauri-apps/tauri/commit/6d6b6e653ea70fc02794f723092cdc860995c259) feat: configure escaping on handlebars templates ([#6678](https://www.github.com/tauri-apps/tauri/pull/6678)) on 2023-05-02
|
||||
- Fix building apps with unicode characters in their `productName`.
|
||||
- [72621892](https://www.github.com/tauri-apps/tauri/commit/72621892fe8195bad67b4237467ebd7e89f6af7f) fix(cli): use `unicode` feature for `heck` crate, closes [#5860](https://www.github.com/tauri-apps/tauri/pull/5860) ([#5872](https://www.github.com/tauri-apps/tauri/pull/5872)) on 2022-12-26
|
||||
- Bump minimum supported Rust version to 1.60.
|
||||
- [5fdc616d](https://www.github.com/tauri-apps/tauri/commit/5fdc616df9bea633810dcb814ac615911d77222c) feat: Use the zbus-backed of notify-rust ([#6332](https://www.github.com/tauri-apps/tauri/pull/6332)) on 2023-03-31
|
||||
- Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
- [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19
|
||||
- Add `nsis` bundle target
|
||||
- [c94e1326](https://www.github.com/tauri-apps/tauri/commit/c94e1326a7c0767a13128a8b1d327a00156ece12) feat(bundler): add `nsis`, closes [#4450](https://www.github.com/tauri-apps/tauri/pull/4450), closes [#2319](https://www.github.com/tauri-apps/tauri/pull/2319) ([#4674](https://www.github.com/tauri-apps/tauri/pull/4674)) on 2023-01-03
|
||||
- Remove default features from Cargo.toml template.
|
||||
- [b08ae637](https://www.github.com/tauri-apps/tauri/commit/b08ae637a0f58b38cbce9b8a1fa0b6c5dc0cfd05) fix(cli): remove default features from template ([#6074](https://www.github.com/tauri-apps/tauri/pull/6074)) on 2023-01-17
|
||||
- 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.
|
||||
- [cd8c074a](https://www.github.com/tauri-apps/tauri/commit/cd8c074ae6592303d3f6844a4fb6d262eae913b2) feat(cli): add support for Cargo's workspace inheritance for the package version, closes [#5070](https://www.github.com/tauri-apps/tauri/pull/5070) ([#5775](https://www.github.com/tauri-apps/tauri/pull/5775)) on 2022-12-14
|
||||
- [d20a7288](https://www.github.com/tauri-apps/tauri/commit/d20a728892eee1858ab525ab6216cd721f473ab5) feat: Further improve workspace inheritance, closes [#6122](https://www.github.com/tauri-apps/tauri/pull/6122), [#5070](https://www.github.com/tauri-apps/tauri/pull/5070) ([#6144](https://www.github.com/tauri-apps/tauri/pull/6144)) on 2023-01-26
|
||||
- Use Ubuntu 20.04 to compile the CLI for cargo-binstall, increasing the minimum libc required.
|
||||
|
||||
## \[1.2.3]
|
||||
|
||||
- Pin `ignore` to `=0.4.18`.
|
||||
|
700
tooling/cli/Cargo.lock
generated
700
tooling/cli/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -38,9 +38,6 @@ pkg-fmt = "zip"
|
||||
name = "cargo-tauri"
|
||||
path = "src/main.rs"
|
||||
|
||||
[features]
|
||||
openssl-vendored = [ "tauri-mobile/openssl-vendored" ]
|
||||
|
||||
[dependencies]
|
||||
tauri-mobile = { version = "0.4", default-features = false }
|
||||
textwrap = { version = "0.11.0", features = [ "term_size" ] }
|
||||
@ -104,3 +101,6 @@ libc = "0.2"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
||||
[features]
|
||||
openssl-vendored = [ "tauri-mobile/openssl-vendored" ]
|
||||
|
@ -109,6 +109,34 @@
|
||||
- First mobile alpha release!
|
||||
- [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08
|
||||
|
||||
## \[1.3.0]
|
||||
|
||||
- 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.
|
||||
- [8fb1df8a](https://www.github.com/tauri-apps/tauri/commit/8fb1df8aa65a52cdb4a7e1bb9dda9b912a7a2895) feat(cli): add `--ci` flag to `signer generate`, closes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) ([#6097](https://www.github.com/tauri-apps/tauri/pull/6097)) on 2023-01-19
|
||||
- Fix Outdated Github Actions in the Plugin Templates `with-api` and `backend`
|
||||
- [a926b49a](https://www.github.com/tauri-apps/tauri/commit/a926b49a01925ca757d391994bfac3beea29599b) Fix Github Actions of Tauri Plugin with-api template ([#6603](https://www.github.com/tauri-apps/tauri/pull/6603)) on 2023-04-03
|
||||
- Do not crash on Cargo.toml watcher.
|
||||
- [e8014a7f](https://www.github.com/tauri-apps/tauri/commit/e8014a7f612a1094461ddad63aacc498a2682ff5) fix(cli): do not crash on watcher ([#6303](https://www.github.com/tauri-apps/tauri/pull/6303)) on 2023-02-17
|
||||
- Fix crash when nodejs binary has the version in its name, for example `node-18`
|
||||
- [1c8229fb](https://www.github.com/tauri-apps/tauri/commit/1c8229fbe273554c0c97cccee45d5967f5df1b9f) fix(cli.js): detect `node-<version>` binary, closes [#6427](https://www.github.com/tauri-apps/tauri/pull/6427) ([#6432](https://www.github.com/tauri-apps/tauri/pull/6432)) on 2023-03-16
|
||||
- Add `--png` option for the `icon` command to generate custom icon sizes.
|
||||
- [9d214412](https://www.github.com/tauri-apps/tauri/commit/9d2144128fc5fad67d8404bce95f82297ebb0e4a) feat(cli): add option to make custom icon sizes, closes [#5121](https://www.github.com/tauri-apps/tauri/pull/5121) ([#5246](https://www.github.com/tauri-apps/tauri/pull/5246)) on 2022-12-27
|
||||
- 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.
|
||||
- [d4f89af1](https://www.github.com/tauri-apps/tauri/commit/d4f89af18d69fd95a4d8a1ede8442547c6a6d0ee) feat: skip password prompt on the build command if CI is set fixes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) on 2023-01-18
|
||||
- Fix `default-run` not deserialized.
|
||||
- [57c6bf07](https://www.github.com/tauri-apps/tauri/commit/57c6bf07bb380847abdf27c3fff9891d99c1c98c) fix(cli): fix default-run not deserialized ([#6584](https://www.github.com/tauri-apps/tauri/pull/6584)) on 2023-03-30
|
||||
- Fixes HTML serialization removing template tags on the dev server.
|
||||
- [314f0e21](https://www.github.com/tauri-apps/tauri/commit/314f0e212fd2b9e452bfe3424cdce2b0bf37b5d7) fix(cli): web_dev_server html template serialization (fix [#6165](https://www.github.com/tauri-apps/tauri/pull/6165)) ([#6166](https://www.github.com/tauri-apps/tauri/pull/6166)) on 2023-01-29
|
||||
- Use escaping on Handlebars templates.
|
||||
- [6d6b6e65](https://www.github.com/tauri-apps/tauri/commit/6d6b6e653ea70fc02794f723092cdc860995c259) feat: configure escaping on handlebars templates ([#6678](https://www.github.com/tauri-apps/tauri/pull/6678)) on 2023-05-02
|
||||
- Add initial support for building `nsis` bundles on non-Windows platforms.
|
||||
- [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19
|
||||
- Add `nsis` bundle target
|
||||
- [c94e1326](https://www.github.com/tauri-apps/tauri/commit/c94e1326a7c0767a13128a8b1d327a00156ece12) feat(bundler): add `nsis`, closes [#4450](https://www.github.com/tauri-apps/tauri/pull/4450), closes [#2319](https://www.github.com/tauri-apps/tauri/pull/2319) ([#4674](https://www.github.com/tauri-apps/tauri/pull/4674)) on 2023-01-03
|
||||
- Remove default features from Cargo.toml template.
|
||||
- [b08ae637](https://www.github.com/tauri-apps/tauri/commit/b08ae637a0f58b38cbce9b8a1fa0b6c5dc0cfd05) fix(cli): remove default features from template ([#6074](https://www.github.com/tauri-apps/tauri/pull/6074)) on 2023-01-17
|
||||
- Use Ubuntu 20.04 to compile the CLI, increasing the minimum libc version required.
|
||||
|
||||
## \[1.2.3]
|
||||
|
||||
- Pin `ignore` to `=0.4.18`.
|
||||
|
@ -6,9 +6,6 @@ version = "0.0.0"
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[features]
|
||||
openssl-vendored = ["tauri-cli/openssl-vendored"]
|
||||
|
||||
[dependencies]
|
||||
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
|
||||
napi = { version = "2.12", default-features = false, features = ["napi4"] }
|
||||
@ -18,3 +15,6 @@ log = "0.4.17"
|
||||
|
||||
[build-dependencies]
|
||||
napi-build = "2.0"
|
||||
|
||||
[features]
|
||||
openssl-vendored = ["tauri-cli/openssl-vendored"]
|
||||
|
4
tooling/cli/node/index.d.ts
vendored
4
tooling/cli/node/index.d.ts
vendored
@ -1,7 +1,3 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
|
@ -37,13 +37,13 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "2.15.1",
|
||||
"@napi-rs/cli": "2.15.2",
|
||||
"cross-env": "7.0.3",
|
||||
"cross-spawn": "7.0.3",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest": "29.4.0",
|
||||
"fs-extra": "11.1.1",
|
||||
"jest": "29.5.0",
|
||||
"jest-transform-toml": "1.0.0",
|
||||
"prettier": "2.8.3"
|
||||
"prettier": "2.8.7"
|
||||
},
|
||||
"resolutions": {
|
||||
"json5": "2.2.3"
|
||||
|
@ -24,7 +24,7 @@ icon = [
|
||||
tauri-build = { path = "../../../../../../../../core/tauri-build", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.91"
|
||||
serde_json = "1.0.96"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
tauri = { path = "../../../../../../../../core/tauri", features = ["api-all"] }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../../../../core/config-schema/schema.json",
|
||||
"$schema": "../../../../../../../../core/tauri-config-schema/schema.json",
|
||||
"build": {
|
||||
"devPath": "../dist",
|
||||
"distDir": "../dist",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -168,6 +168,7 @@
|
||||
},
|
||||
"security": {
|
||||
"dangerousDisableAssetCspModification": false,
|
||||
"dangerousRemoteDomainIpcAccess": [],
|
||||
"freezePrototype": false
|
||||
},
|
||||
"updater": {
|
||||
@ -413,6 +414,7 @@
|
||||
"description": "Security configuration.",
|
||||
"default": {
|
||||
"dangerousDisableAssetCspModification": false,
|
||||
"dangerousRemoteDomainIpcAccess": [],
|
||||
"freezePrototype": false
|
||||
},
|
||||
"allOf": [
|
||||
@ -2413,6 +2415,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
|
||||
@ -2465,6 +2475,48 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"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.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig",
|
||||
"type": "object",
|
||||
|
@ -183,7 +183,8 @@ pub fn command(mut options: Options) -> Result<()> {
|
||||
};
|
||||
|
||||
let _ = remove_dir_all(&template_target_path);
|
||||
let handlebars = Handlebars::new();
|
||||
let mut handlebars = Handlebars::new();
|
||||
handlebars.register_escape_fn(|s| s.into());
|
||||
|
||||
let mut data = BTreeMap::new();
|
||||
data.insert("tauri_dep", to_json(tauri_dep));
|
||||
|
@ -97,7 +97,8 @@ pub fn command(mut options: Options) -> Result<()> {
|
||||
};
|
||||
|
||||
let _ = remove_dir_all(&template_target_path);
|
||||
let handlebars = Handlebars::new();
|
||||
let mut handlebars = Handlebars::new();
|
||||
handlebars.register_escape_fn(|s| s.into());
|
||||
|
||||
let mut data = BTreeMap::new();
|
||||
plugin_name_data(&mut data, &options.plugin_name);
|
||||
|
@ -15,12 +15,12 @@ name = "app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = {{{ tauri_build_dep }}}
|
||||
tauri-build = {{ tauri_build_dep }}
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = {{{ tauri_dep }}}
|
||||
tauri = {{ tauri_dep }}
|
||||
|
||||
[features]
|
||||
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
|
||||
|
@ -1 +1 @@
|
||||
{{{ tauri_config }}}
|
||||
{{ tauri_config }}
|
||||
|
@ -8,7 +8,7 @@ rust-version = "1.65"
|
||||
exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"]
|
||||
|
||||
[dependencies]
|
||||
tauri = {{{ tauri_dep }}}
|
||||
tauri = {{ tauri_dep }}
|
||||
serde = "1.0"
|
||||
thiserror = "1.0"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user