From be6f4319ff8c8e8b62f2166c5324dac46caa9426 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sat, 17 Jun 2023 15:14:12 -0700 Subject: [PATCH 001/104] fix(ci): correctly set tag for tauri-cli release (#7246) --- .github/workflows/publish-cli-rs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-cli-rs.yml b/.github/workflows/publish-cli-rs.yml index d7d6df216..fd9ddcaa8 100644 --- a/.github/workflows/publish-cli-rs.yml +++ b/.github/workflows/publish-cli-rs.yml @@ -88,7 +88,7 @@ jobs: run: ./.scripts/ci/pack-cli.sh - name: Get CLI version - run: echo "CLI_VERSION=$(cat tooling/cli/metadata.json | jq '."@tauri-apps/cli".version' -r)" >> $GITHUB_ENV + run: echo "CLI_VERSION=$(cat tooling/cli/metadata.json | jq '."cli.js".version' -r)" >> $GITHUB_ENV - name: Publish release uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa From fdf68405a4744a88951b4203321371fd1e258a9c Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sun, 18 Jun 2023 02:57:37 -0700 Subject: [PATCH 002/104] chore(ci): use a separate covector workflor for 1.x (#7243) --- .../covector-version-or-publish-v1.yml | 148 ++++++++++++++++++ .../workflows/covector-version-or-publish.yml | 6 +- 2 files changed, 151 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/covector-version-or-publish-v1.yml diff --git a/.github/workflows/covector-version-or-publish-v1.yml b/.github/workflows/covector-version-or-publish-v1.yml new file mode 100644 index 000000000..4be13c600 --- /dev/null +++ b/.github/workflows/covector-version-or-publish-v1.yml @@ -0,0 +1,148 @@ +# Copyright 2019-2023 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + +name: covector version or publish + +on: + push: + branches: + - 1.x + +jobs: + run-integration-tests: + runs-on: ${{ matrix.platform }} + + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: install Linux dependencies + if: matrix.platform == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev libfuse2 + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + core -> ../target + tooling/cli + + - name: build CLI + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path ./tooling/cli/Cargo.toml + + - name: run integration tests + run: cargo test --test '*' -- --ignored + + - name: run CLI tests + timeout-minutes: 30 + run: | + cd ./tooling/cli/node + yarn + yarn build + yarn test + + version-or-publish: + runs-on: ubuntu-latest + timeout-minutes: 65 + outputs: + change: ${{ steps.covector.outputs.change }} + commandRan: ${{ steps.covector.outputs.commandRan }} + successfulPublish: ${{ steps.covector.outputs.successfulPublish }} + needs: + - run-integration-tests + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-node@v2 + with: + node-version: 14 + registry-url: 'https://registry.npmjs.org' + cache: yarn + cache-dependency-path: tooling/*/yarn.lock + + - name: cargo login + run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }} + - name: git config + run: | + git config --global user.name "${{ github.event.pusher.name }}" + git config --global user.email "${{ github.event.pusher.email }}" + + - name: covector version or publish (publish when no change files present) + uses: jbolda/covector/packages/action@covector-v0 + id: covector + env: + NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }} + CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + command: 'version-or-publish' + createRelease: true + + - name: Create Pull Request With Versions Bumped + if: steps.covector.outputs.commandRan == 'version' + uses: tauri-apps/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: release/version-updates-v1 + title: Apply Version Updates From Current Changes (v1) + commit-message: 'apply version updates' + labels: 'version updates' + body: ${{ steps.covector.outputs.change }} + + - name: Trigger doc update + if: | + steps.covector.outputs.successfulPublish == 'true' && + steps.covector.outputs.packagesPublished != '' + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ORG_TAURI_BOT_PAT }} + repository: tauri-apps/tauri-docs + event-type: update-docs + + - name: Get `@tauri-apps/cli` release id + id: cliReleaseId + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') + run: | + echo '${{ steps.covector.outputs }}' > output.json + id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json) + rm output.json + echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT" + + - name: Trigger `@tauri-apps/cli` publishing workflow + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ORG_TAURI_BOT_PAT }} + repository: tauri-apps/tauri + event-type: publish-js-cli + client-payload: '{"releaseId": "${{ steps.cliReleaseId.outputs.cliReleaseId }}" }' + + - name: Trigger `tauri-cli` publishing workflow + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, 'tauri-cli') + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ORG_TAURI_BOT_PAT }} + repository: tauri-apps/tauri + event-type: publish-clirs diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 4be13c600..33f7b7c36 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -7,7 +7,7 @@ name: covector version or publish on: push: branches: - - 1.x + - dev jobs: run-integration-tests: @@ -99,8 +99,8 @@ jobs: uses: tauri-apps/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: release/version-updates-v1 - title: Apply Version Updates From Current Changes (v1) + branch: release/version-updates + title: Apply Version Updates From Current Changes commit-message: 'apply version updates' labels: 'version updates' body: ${{ steps.covector.outputs.change }} From 8c0166f459cb61cb654423ed6adab1936d8732e4 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Sun, 18 Jun 2023 12:58:34 +0300 Subject: [PATCH 003/104] ci: use `toJSON` (#7248) --- .github/workflows/covector-version-or-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 33f7b7c36..ecce56af2 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -121,7 +121,7 @@ jobs: steps.covector.outputs.successfulPublish == 'true' && contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') run: | - echo '${{ steps.covector.outputs }}' > output.json + echo '${{ toJSON(steps.covector.outputs) }}' > output.json id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json) rm output.json echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT" From 1a3dcdb8302fad511f2c1cd418fbc4cff0bd62ac Mon Sep 17 00:00:00 2001 From: Raphii Date: Mon, 19 Jun 2023 17:11:16 +0200 Subject: [PATCH 004/104] fix(core): fix nsis updater unable to launch installers requiring elevation, closes #7184 (#7185) * Launch NSIS updaters requiring elevation from non-elevated process * Add changes file * remove detached process, use powershell * Update updater-admin-launch-fix.md --------- Co-authored-by: Amr Bashir --- .changes/updater-admin-launch-fix.md | 5 ++++ core/tauri/src/updater/core.rs | 43 ++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 .changes/updater-admin-launch-fix.md diff --git a/.changes/updater-admin-launch-fix.md b/.changes/updater-admin-launch-fix.md new file mode 100644 index 000000000..06783c496 --- /dev/null +++ b/.changes/updater-admin-launch-fix.md @@ -0,0 +1,5 @@ +--- +'tauri': 'patch:bug' +--- + +On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater. diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index 4aa42e49f..685acafdc 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -709,15 +709,45 @@ fn copy_files_and_run( let paths = read_dir(&tmp_dir)?; + let system_root = std::env::var("SYSTEMROOT"); + let powershell_path = system_root.as_ref().map_or_else( + |_| "powershell.exe".to_string(), + |p| format!("{p}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"), + ); + for path in paths { let found_path = path?.path(); // we support 2 type of files exe & msi for now // If it's an `exe` we expect an installer not a runtime. if found_path.extension() == Some(OsStr::new("exe")) { + // we need to wrap the installer path in quotes for Start-Process + let mut installer_arg = std::ffi::OsString::new(); + installer_arg.push("\""); + installer_arg.push(&found_path); + installer_arg.push("\""); + // Run the EXE - Command::new(found_path) - .args(config.tauri.updater.windows.install_mode.nsis_args()) - .args(&config.tauri.updater.windows.installer_args) + Command::new(powershell_path) + .args(["-NoProfile", "-WindowStyle", "Hidden"]) + .args(["Start-Process"]) + .arg(found_path) + .arg("-ArgumentList") + .arg( + [ + config.tauri.updater.windows.install_mode.nsis_args(), + config + .tauri + .updater + .windows + .installer_args + .iter() + .map(AsRef::as_ref) + .collect::>() + .as_slice(), + ] + .concat() + .join(", "), + ) .spawn() .expect("installer failed to start"); @@ -785,13 +815,8 @@ fn copy_files_and_run( msiexec_args.extend(config.tauri.updater.windows.installer_args.clone()); // run the installer and relaunch the application - let system_root = std::env::var("SYSTEMROOT"); - let powershell_path = system_root.as_ref().map_or_else( - |_| "powershell.exe".to_string(), - |p| format!("{p}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"), - ); let powershell_install_res = Command::new(powershell_path) - .args(["-NoProfile", "-windowstyle", "hidden"]) + .args(["-NoProfile", "-WindowStyle", "Hidden"]) .args([ "Start-Process", "-Wait", From df6712cfb30c934ccb5eeaab8543e3b0e1193d13 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 21 Jun 2023 03:50:41 -0700 Subject: [PATCH 005/104] docs(core): fix panic section on manage documentation (#7251) --- core/tauri/src/app.rs | 1 + core/tauri/src/lib.rs | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index dcb965cda..97652556f 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -1214,6 +1214,7 @@ impl Builder { /// [`State`](crate::State) guard. In particular, if a value of type `T` /// is managed by Tauri, adding `State` to the list of arguments in a /// command handler instructs Tauri to retrieve the managed value. + /// Additionally, [`state`](crate::Manager#method.state) can be used to retrieve the value manually. /// /// # Panics /// diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 32c86cc92..7be4034ca 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -756,18 +756,13 @@ pub trait Manager: sealed::ManagerBase { /// Add `state` to the state managed by the application. /// - /// This method can be called any number of times as long as each call - /// refers to a different `T`. - /// If a state for `T` is already managed, the function returns false and the value is ignored. + /// If the state for the `T` type has previously been set, the state is unchanged and false is returned. Otherwise true is returned. /// /// Managed state can be retrieved by any command handler via the /// [`State`](crate::State) guard. In particular, if a value of type `T` /// is managed by Tauri, adding `State` to the list of arguments in a /// command handler instructs Tauri to retrieve the managed value. - /// - /// # Panics - /// - /// Panics if state of type `T` is already being managed. + /// Additionally, [`state`](Self#method.state) can be used to retrieve the value manually. /// /// # Mutability /// From dad4f54eec9773d2ea6233a7d9fd218741173823 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 21 Jun 2023 13:19:31 +0200 Subject: [PATCH 006/104] fix(cli): Disable version check, fixes #7273 (#7277) --- .changes/cli-disable-version-check.md | 6 ++++++ tooling/cli/src/dev.rs | 24 ------------------------ 2 files changed, 6 insertions(+), 24 deletions(-) create mode 100644 .changes/cli-disable-version-check.md diff --git a/.changes/cli-disable-version-check.md b/.changes/cli-disable-version-check.md new file mode 100644 index 000000000..d30f5bb37 --- /dev/null +++ b/.changes/cli-disable-version-check.md @@ -0,0 +1,6 @@ +--- +'tauri-cli': 'patch:bug' +'@tauri-apps/cli': 'patch:bug' +--- + +Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues. diff --git a/tooling/cli/src/dev.rs b/tooling/cli/src/dev.rs index 7aa007a5c..b0bae7157 100644 --- a/tooling/cli/src/dev.rs +++ b/tooling/cli/src/dev.rs @@ -74,8 +74,6 @@ pub fn command(options: Options) -> Result<()> { let r = command_internal(options); if r.is_err() { kill_before_dev_process(); - #[cfg(not(debug_assertions))] - let _ = check_for_updates(); } r } @@ -185,8 +183,6 @@ fn command_internal(mut options: Options) -> Result<()> { let _ = ctrlc::set_handler(move || { kill_before_dev_process(); - #[cfg(not(debug_assertions))] - let _ = check_for_updates(); exit(130); }); } @@ -319,30 +315,10 @@ fn on_dev_exit(status: ExitStatus, reason: ExitReason, exit_on_panic: bool, no_w && (exit_on_panic || matches!(reason, ExitReason::NormalExit))) { kill_before_dev_process(); - #[cfg(not(debug_assertions))] - let _ = check_for_updates(); exit(status.code().unwrap_or(0)); } } -#[cfg(not(debug_assertions))] -fn check_for_updates() -> Result<()> { - if std::env::var_os("TAURI_SKIP_UPDATE_CHECK") != Some("true".into()) { - let current_version = crate::info::cli_current_version()?; - let current = semver::Version::parse(¤t_version)?; - - let upstream_version = crate::info::cli_upstream_version()?; - let upstream = semver::Version::parse(&upstream_version)?; - if current < upstream { - println!( - "🚀 A new version of Tauri CLI is available! [{}]", - upstream.to_string() - ); - }; - } - Ok(()) -} - fn kill_before_dev_process() { if let Some(child) = BEFORE_DEV.get() { let child = child.lock().unwrap(); From 539247aacfb44ab699c1456fcb888ff7e3711dab Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 30 Jun 2023 09:04:09 -0700 Subject: [PATCH 007/104] fix(ci): adjust downgrade crates version step on test-core workflow (#7309) --- .github/workflows/test-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 657652567..f66bab51d 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -85,7 +85,7 @@ jobs: - name: Downgrade crates with MSRV conflict # The --precise flag can only be used once per invocation. run: | - cargo update -p toml:0.7.4 --precise 0.7.3 + cargo update -p toml:0.7.5 --precise 0.7.3 cargo update -p toml_edit --precise 0.19.8 cargo update -p toml_datetime --precise 0.6.1 cargo update -p serde_spanned --precise 0.6.1 From f4aedce96c684d5f8b7cac380408a429dfb57cc9 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 3 Jul 2023 15:42:34 -0700 Subject: [PATCH 008/104] fix(ci): adjust crate downgrades for test-core MSRV (#7346) --- .github/workflows/test-core.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index f66bab51d..f6db4e06a 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -94,6 +94,8 @@ jobs: cargo update -p ignore --precise 0.4.18 cargo update -p raw-window-handle --precise 0.5.0 cargo update -p cargo_toml:0.15.3 --precise 0.15.2 + cargo update -p zbus --precise 3.13.0 + cargo update -p zbus_names --precise 2.5.0 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} From 46df2c9b917096388695f72ca4c56791fe652ef6 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 5 Jul 2023 23:17:31 +0300 Subject: [PATCH 009/104] fix(bundler): sort package types before bundling, closes #7349 (#7360) fix(bundler): sort package types before bundling, closes #7349 --- .changes/bundler-bundle-order.md | 5 +++++ tooling/bundler/src/bundle.rs | 4 +++- tooling/bundler/src/bundle/settings.rs | 20 ++++++++++++++++++++ tooling/cli/src/build.rs | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .changes/bundler-bundle-order.md diff --git a/.changes/bundler-bundle-order.md b/.changes/bundler-bundle-order.md new file mode 100644 index 000000000..35f5443f0 --- /dev/null +++ b/.changes/bundler-bundle-order.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +Fix bundler skipping updater artifacts if `updater` target shows before other updater-enabled targets in the list, see [#7349](https://github.com/tauri-apps/tauri/issues/7349). diff --git a/tooling/bundler/src/bundle.rs b/tooling/bundler/src/bundle.rs index 04966bac6..375ad212c 100644 --- a/tooling/bundler/src/bundle.rs +++ b/tooling/bundler/src/bundle.rs @@ -43,11 +43,13 @@ pub struct Bundle { /// Bundles the project. /// Returns the list of paths where the bundles can be found. pub fn bundle_project(settings: Settings) -> crate::Result> { - let package_types = settings.package_types()?; + let mut package_types = settings.package_types()?; if package_types.is_empty() { return Ok(Vec::new()); } + package_types.sort_by_key(|a| a.priority()); + let mut bundles: Vec = Vec::new(); let target_os = settings diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index ed09964c6..613e12931 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -93,6 +93,26 @@ impl PackageType { pub fn all() -> &'static [PackageType] { ALL_PACKAGE_TYPES } + + /// Gets a number representing priority which used to sort package types + /// in an order that guarantees that if a certain package type + /// depends on another (like Dmg depending on MacOsBundle), the dependency + /// will be built first + /// + /// The lower the number, the higher the priority + pub fn priority(&self) -> u32 { + match self { + PackageType::MacOsBundle => 0, + PackageType::IosBundle => 0, + PackageType::WindowsMsi => 0, + PackageType::Nsis => 0, + PackageType::Deb => 0, + PackageType::Rpm => 0, + PackageType::AppImage => 0, + PackageType::Dmg => 1, + PackageType::Updater => 2, + } + } } const ALL_PACKAGE_TYPES: &[PackageType] = &[ diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index 6b668b91c..cd51e802d 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -324,7 +324,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { "The updater secret key from `TAURI_PRIVATE_KEY` does not match the public key defined in `tauri.conf.json > tauri > updater > pubkey`." )); } - signed_paths.append(&mut vec![signature_path]); + signed_paths.push(signature_path); } } From 0ae53f413948c7b955e595aa9c6c9e777caa8666 Mon Sep 17 00:00:00 2001 From: luofei Date: Sat, 8 Jul 2023 08:43:35 +0800 Subject: [PATCH 010/104] fix(bundler/nsis): fix error message appears even after successful uninstall, closes #7317 (#7361) * fix(bundler/nsis): Uninstall the previous installation package * Update .changes/fix-nsis-uninstall-previous-version.md --------- Co-authored-by: Amr Bashir --- .changes/fix-nsis-uninstall-previous-version.md | 5 +++++ tooling/bundler/src/bundle/windows/templates/installer.nsi | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-nsis-uninstall-previous-version.md diff --git a/.changes/fix-nsis-uninstall-previous-version.md b/.changes/fix-nsis-uninstall-previous-version.md new file mode 100644 index 000000000..29a6ffc8a --- /dev/null +++ b/.changes/fix-nsis-uninstall-previous-version.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +On Windows, fix NSIS installer showing an error dialog even when the previous version was uninstalled sucessfully. diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index c8f5e2602..93f0159e3 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -243,7 +243,6 @@ Function PageLeaveReinstall reinst_uninstall: HideWindow ClearErrors - ExecWait '$R1 /P _?=$4' $0 ${If} $R5 == "wix" ReadRegStr $R1 HKLM "$R6" "UninstallString" @@ -251,7 +250,7 @@ Function PageLeaveReinstall ${Else} ReadRegStr $4 SHCTX "${MANUPRODUCTKEY}" "" ReadRegStr $R1 SHCTX "${UNINSTKEY}" "UninstallString" - ExecWait '$R1 _?=$4' $0 + ExecWait '$R1 /P _?=$4' $0 ${EndIf} BringToFront From 32218a6f8c1d90c2503e7cbc4523e4ab464ba032 Mon Sep 17 00:00:00 2001 From: luofei Date: Sat, 8 Jul 2023 09:26:40 +0800 Subject: [PATCH 011/104] fix(bundler/nsis): use uninstallstring to find wix installation (#7326) * add change file Signed-off-by: luofei * fix(bundler/nsis): Check if the previous installation was done using WiX Signed-off-by: luofei * Update .changes/fix-nsis-previous-installation-method.md --------- Signed-off-by: luofei --- .../fix-nsis-previous-installation-method.md | 5 +++++ .../src/bundle/windows/templates/installer.nsi | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .changes/fix-nsis-previous-installation-method.md diff --git a/.changes/fix-nsis-previous-installation-method.md b/.changes/fix-nsis-previous-installation-method.md new file mode 100644 index 000000000..452d4f5e8 --- /dev/null +++ b/.changes/fix-nsis-previous-installation-method.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +On Windows, fix NSIS installer identifying a previous NSIS-installed app as WiX-installed app and then fails to uninstall it. diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index 93f0159e3..a7136f586 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -1,7 +1,13 @@ +Unicode true +SetCompressor /SOLID lzma + !include MUI2.nsh !include FileFunc.nsh !include x64.nsh !include WordFunc.nsh +!include "StrFunc.nsh" +${StrCase} +${StrLoc} !define MANUFACTURER "{{manufacturer}}" !define PRODUCTNAME "{{product_name}}" @@ -31,8 +37,6 @@ Name "${PRODUCTNAME}" BrandingText "{{copyright}}" OutFile "${OUTFILE}" -Unicode true -SetCompressor /SOLID lzma VIProductVersion "${VERSIONWITHBUILD}" VIAddVersionKey "ProductName" "${PRODUCTNAME}" @@ -135,7 +139,11 @@ Function PageReinstall ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" "DisplayName" ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" "Publisher" StrCmp "$R0$R1" "${PRODUCTNAME}${MANUFACTURER}" 0 wix_loop - StrCpy $R5 "wix" + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" "UninstallString" + ${StrCase} $R1 $R0 "L" + ${StrLoc} $R0 $R1 "msiexec" ">" + StrCmp $R0 0 0 wix_done + StrCpy $R7 "wix" StrCpy $R6 "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" Goto compare_version wix_done: @@ -149,7 +157,7 @@ Function PageReinstall ; and modify the messages presented to the user accordingly compare_version: StrCpy $R4 "$(older)" - ${If} $R5 == "wix" + ${If} $R7 == "wix" ReadRegStr $R0 HKLM "$R6" "DisplayVersion" ${Else} ReadRegStr $R0 SHCTX "${UNINSTKEY}" "DisplayVersion" @@ -244,7 +252,7 @@ Function PageLeaveReinstall HideWindow ClearErrors - ${If} $R5 == "wix" + ${If} $R7 == "wix" ReadRegStr $R1 HKLM "$R6" "UninstallString" ExecWait '$R1' $0 ${Else} From 6e36ebbf84dee11a98d8df916c316c7d6f67b2a8 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 10 Jul 2023 14:46:15 +0300 Subject: [PATCH 012/104] fix(nsis): set correct `ShellVarContext` for uninstaller, closes #7315 (#7342) --- .changes/nsis-start-menu-shortcut.md | 5 +++ .../bundle/windows/templates/installer.nsi | 34 ++++++++----------- 2 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 .changes/nsis-start-menu-shortcut.md diff --git a/.changes/nsis-start-menu-shortcut.md b/.changes/nsis-start-menu-shortcut.md new file mode 100644 index 000000000..eea0d9b22 --- /dev/null +++ b/.changes/nsis-start-menu-shortcut.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +On Windows, fix NSIS uninstaller failing to remove Start Menu shortcut if `perMachine` mode is used. diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index a7136f586..2d62bc1f1 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -344,16 +344,7 @@ FunctionEnd !include "{{this}}" {{/each}} -Var PassiveMode -Function .onInit - ${GetOptions} $CMDLINE "/P" $PassiveMode - IfErrors +2 0 - StrCpy $PassiveMode 1 - - !if "${DISPLAYLANGUAGESELECTOR}" == "true" - !insertmacro MUI_LANGDLL_DISPLAY - !endif - +!macro SetContext !if "${INSTALLMODE}" == "currentUser" SetShellVarContext current !else if "${INSTALLMODE}" == "perMachine" @@ -369,6 +360,19 @@ Function .onInit SetRegView 32 !endif ${EndIf} +!macroend + +Var PassiveMode +Function .onInit + ${GetOptions} $CMDLINE "/P" $PassiveMode + IfErrors +2 0 + StrCpy $PassiveMode 1 + + !if "${DISPLAYLANGUAGESELECTOR}" == "true" + !insertmacro MUI_LANGDLL_DISPLAY + !endif + + !insertmacro SetContext ${If} $INSTDIR == "" ; Set default install location @@ -595,15 +599,7 @@ Function .onInstSuccess FunctionEnd Function un.onInit - ${If} ${RunningX64} - !if "${ARCH}" == "x64" - SetRegView 64 - !else if "${ARCH}" == "arm64" - SetRegView 64 - !else - SetRegView 32 - !endif - ${EndIf} + !insertmacro SetContext !if "${INSTALLMODE}" == "both" !insertmacro MULTIUSER_UNINIT From eba8e1315ed7078eb9a9479f9e0072b061067341 Mon Sep 17 00:00:00 2001 From: luofei Date: Mon, 10 Jul 2023 19:56:13 +0800 Subject: [PATCH 013/104] fix(bundler/nsis): fix installer incorrect copyright info (#7386) Signed-off-by: luofei --- .changes/fix-nsis-legal-copyright.md | 5 +++++ tooling/bundler/src/bundle/windows/templates/installer.nsi | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/fix-nsis-legal-copyright.md diff --git a/.changes/fix-nsis-legal-copyright.md b/.changes/fix-nsis-legal-copyright.md new file mode 100644 index 000000000..f865f5d54 --- /dev/null +++ b/.changes/fix-nsis-legal-copyright.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +On Windows, fix installation packages not showing correct copyright information. diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index 2d62bc1f1..1674adc78 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -22,6 +22,7 @@ ${StrLoc} !define MAINBINARYNAME "{{main_binary_name}}" !define MAINBINARYSRCPATH "{{main_binary_path}}" !define BUNDLEID "{{bundle_id}}" +!define COPYRIGHT "{{copyright}}" !define OUTFILE "{{out_file}}" !define ARCH "{{arch}}" !define PLUGINSPATH "{{additional_plugins_path}}" @@ -35,7 +36,7 @@ ${StrLoc} !define MANUPRODUCTKEY "Software\${MANUFACTURER}\${PRODUCTNAME}" Name "${PRODUCTNAME}" -BrandingText "{{copyright}}" +BrandingText "${COPYRIGHT}" OutFile "${OUTFILE}" VIProductVersion "${VERSIONWITHBUILD}" From f6a13f6f2335c4c83a371e0a3b6c18ea2a402439 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 10 Jul 2023 16:45:50 +0300 Subject: [PATCH 014/104] ci: downgrade more crates `is-terminal`, `colored` and `toml:0.7.6` (#7391) * ci: downgrade more crates `is-terminal`, `colored` and `toml:0.7.6` * downgrade all versions of toml and cargo_toml * revert --- .github/workflows/test-core.yml | 4 +- tooling/bench/Cargo.lock | 213 ++++++++++++++++++++++++-------- 2 files changed, 162 insertions(+), 55 deletions(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index f6db4e06a..4a854bb5d 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -85,7 +85,7 @@ jobs: - name: Downgrade crates with MSRV conflict # The --precise flag can only be used once per invocation. run: | - cargo update -p toml:0.7.5 --precise 0.7.3 + cargo update -p toml:0.7.6 --precise 0.7.3 cargo update -p toml_edit --precise 0.19.8 cargo update -p toml_datetime --precise 0.6.1 cargo update -p serde_spanned --precise 0.6.1 @@ -96,6 +96,8 @@ jobs: cargo update -p cargo_toml:0.15.3 --precise 0.15.2 cargo update -p zbus --precise 3.13.0 cargo update -p zbus_names --precise 2.5.0 + cargo update -p is-terminal --precise 0.4.7 + cargo update -p colored --precise 2.0.2 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} diff --git a/tooling/bench/Cargo.lock b/tooling/bench/Cargo.lock index 17a88936e..183857351 100644 --- a/tooling/bench/Cargo.lock +++ b/tooling/bench/Cargo.lock @@ -4,9 +4,15 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" @@ -14,6 +20,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + [[package]] name = "cfg-if" version = "1.0.0" @@ -21,14 +33,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "fastrand" -version = "1.8.0" +name = "errno" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + [[package]] name = "instant" version = "0.1.12" @@ -39,73 +78,95 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.4" +name = "io-lifetimes" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + +[[package]] +name = "itoa" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags", ] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rustix" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "winapi", + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "serde" -version = "1.0.147" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", @@ -114,9 +175,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" dependencies = [ "itoa", "ryu", @@ -125,9 +186,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.103" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", @@ -147,23 +208,23 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys", ] [[package]] name = "time" -version = "0.3.17" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "serde", @@ -173,43 +234,87 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] -name = "winapi" -version = "0.3.9" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-targets", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-targets" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows_aarch64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" From e05cd940d6cbb9d1400f32e70059ce1ae6547bf0 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 11 Jul 2023 00:25:18 +0300 Subject: [PATCH 015/104] ci: fix audit workflow and add resolutions for vuln packages (#7392) * ci: fix audit workflow and add resolutions for vuln packages * revert rust audit changes --- .github/workflows/audit.yml | 8 ++++++- tooling/api/package.json | 4 ++++ tooling/api/yarn.lock | 40 ++++++++++++----------------------- tooling/cli/node/index.js | 2 +- tooling/cli/node/package.json | 2 +- tooling/cli/node/yarn.lock | 15 +++++-------- 6 files changed, 32 insertions(+), 39 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index a11f6de7b..2b4305fa2 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -10,6 +10,7 @@ on: - cron: '0 0 * * *' push: paths: + - '.github/workflows/audit.yml' - '**/Cargo.lock' - '**/Cargo.toml' - '**/package.json' @@ -33,6 +34,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: yarn audit + - name: audit workspace + run: yarn audit + - name: audit @tauri-apps/api + working-directory: tooling/api + run: yarn audit + - name: audit @tauri-apps/cli working-directory: tooling/cli/node run: yarn audit diff --git a/tooling/api/package.json b/tooling/api/package.json index 69348748c..0fb317b74 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -57,5 +57,9 @@ "typedoc-plugin-markdown": "3.15.3", "typedoc-plugin-mdn-links": "3.0.3", "typescript": "5.1.3" + }, + "resolutions": { + "semver": ">=7.5.2", + "optionator": ">=0.9.3" } } diff --git a/tooling/api/yarn.lock b/tooling/api/yarn.lock index 213ecf7e9..53559aebb 100644 --- a/tooling/api/yarn.lock +++ b/tooling/api/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@esbuild/android-arm64@0.17.6": version "0.17.6" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.6.tgz#b11bd4e4d031bb320c93c83c137797b2be5b403b" @@ -1710,17 +1715,17 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@>=0.9.3, optionator@^0.9.1: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" p-limit@^3.0.2: version "3.1.0" @@ -1902,22 +1907,10 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -semver@^6.1.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.0.0, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== +semver@>=7.5.2, semver@^6.1.0, semver@^6.3.0, semver@^7.0.0, semver@^7.3.7, semver@^7.3.8: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" @@ -2265,11 +2258,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" diff --git a/tooling/cli/node/index.js b/tooling/cli/node/index.js index df687e1ce..4bf34ea76 100644 --- a/tooling/cli/node/index.js +++ b/tooling/cli/node/index.js @@ -17,7 +17,7 @@ function isMusl() { // For Node 10 if (!process.report || typeof process.report.getReport !== 'function') { try { - const lddPath = require('child_process').execSync('which ldd').toString().trim(); + const lddPath = require('child_process').execSync('which ldd').toString().trim() return readFileSync(lddPath, 'utf8').includes('musl') } catch (e) { return true diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index ea3c5b106..58f1c9426 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -47,7 +47,7 @@ "prettier": "2.8.8" }, "resolutions": { - "json5": "2.2.3" + "semver": ">=7.5.2" }, "engines": { "node": ">= 10" diff --git a/tooling/cli/node/yarn.lock b/tooling/cli/node/yarn.lock index 7b418faf8..9b28ddc93 100644 --- a/tooling/cli/node/yarn.lock +++ b/tooling/cli/node/yarn.lock @@ -1822,7 +1822,7 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -json5@2.2.3, json5@^2.1.2, json5@^2.2.1: +json5@^2.1.2, json5@^2.2.1: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -2101,15 +2101,10 @@ safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.5: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== +semver@>=7.5.2, semver@^6.0.0, semver@^6.3.0, semver@^7.3.5: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" From eeff1784e1ffa568e4ba024e17dd611f8e086784 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 11 Jul 2023 03:19:13 -0700 Subject: [PATCH 016/104] chore(deps): update unmaintained dependency from kuchiki to kuchikiki (#7359) (#7367) Co-authored-by: Davide Baldo Co-authored-by: Amr Bashir --- .changes/kuchikiki.md | 5 +++++ core/tauri-utils/Cargo.toml | 4 ++-- core/tauri-utils/src/html.rs | 2 +- tooling/cli/Cargo.toml | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changes/kuchikiki.md diff --git a/.changes/kuchikiki.md b/.changes/kuchikiki.md new file mode 100644 index 000000000..b57057901 --- /dev/null +++ b/.changes/kuchikiki.md @@ -0,0 +1,5 @@ +--- +"tauri-utils": patch:sec +--- + +Changed HTML implementation from unmaintained `kuchiki` to `kuchikiki`. diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index 86076c606..bbd672fc5 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -18,8 +18,8 @@ thiserror = "1" phf = { version = "0.10", features = [ "macros" ] } brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] } url = { version = "2", features = [ "serde" ] } -kuchiki = "0.8" -html5ever = "0.25" +html5ever = "0.26" +kuchiki = { package = "kuchikiki", version = "0.8" } proc-macro2 = { version = "1", optional = true } quote = { version = "1", optional = true } schemars = { version = "0.8", features = [ "url" ], optional = true } diff --git a/core/tauri-utils/src/html.rs b/core/tauri-utils/src/html.rs index 13600817d..5b8af5772 100644 --- a/core/tauri-utils/src/html.rs +++ b/core/tauri-utils/src/html.rs @@ -302,7 +302,7 @@ mod tests { assert_eq!( document.to_string(), format!( - r#""#, + r#""#, super::CSP_TOKEN ) ); diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 29c9772e4..49d3b8038 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -76,8 +76,8 @@ env_logger = "0.9.1" icns = { package = "tauri-icns", version = "0.1" } image = { version = "0.24", default-features = false, features = [ "ico" ] } axum = { version = "0.5.16", features = [ "ws" ] } -html5ever = "0.25" -kuchiki = "0.8" +html5ever = "0.26" +kuchiki = { package = "kuchikiki", version = "0.8" } tokio = { version = "1", features = [ "macros", "sync" ] } common-path = "1" serde-value = "0.7.0" From fa7f9b77ab8f0c890e9d7b120901610e0d3e4c46 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 11 Jul 2023 15:08:53 +0300 Subject: [PATCH 017/104] fix(core/updater): set `max_redirections` of 5, closes #7329 (#7341) * fix(core/updater): set `max_redirections` of 5, closes #7329 * Update .changes/updater-redirect.md --- .changes/updater-redirect.md | 5 +++++ core/tauri/src/updater/core.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/updater-redirect.md diff --git a/.changes/updater-redirect.md b/.changes/updater-redirect.md new file mode 100644 index 000000000..1b7dee940 --- /dev/null +++ b/.changes/updater-redirect.md @@ -0,0 +1,5 @@ +--- +'tauri': 'patch:bug' +--- + +Fix updater not following endpoint redirects. diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index 685acafdc..98936e707 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -535,7 +535,7 @@ impl Update { HeaderValue::from_str("tauri/updater").unwrap(), ); - let client = ClientBuilder::new().build()?; + let client = ClientBuilder::new().max_redirections(5).build()?; // Create our request let mut req = HttpRequestBuilder::new("GET", self.download_url.as_str())?.headers(headers); if let Some(timeout) = self.timeout { From 757e959eb276ed535cfddb0dea8897c56441c644 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 11 Jul 2023 15:11:23 +0300 Subject: [PATCH 018/104] feat: respect `base` tag's `target` attribute, closes #7285 (#7344) * feat: respect `base` tag's `target` attribute, closes #7285 * Update core.js * fix condition --- .changes/core-base-links-target.md | 5 +++++ core/tauri/scripts/core.js | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changes/core-base-links-target.md diff --git a/.changes/core-base-links-target.md b/.changes/core-base-links-target.md new file mode 100644 index 000000000..231383077 --- /dev/null +++ b/.changes/core-base-links-target.md @@ -0,0 +1,5 @@ +--- +'tauri': 'minor:enhance' +--- + +Open links externally when `` exists diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index 0ac489544..ad2196c17 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -91,13 +91,14 @@ document.querySelector('body').addEventListener( 'click', function (e) { - var target = e.target + let target = e.target + const baseTarget = document.querySelector('head base')?.target while (target != null) { if (target.matches('a')) { if ( target.href && (['http://', 'https://', 'mailto:', 'tel:'].some(v => target.href.startsWith(v))) && - target.target === '_blank' + (target.target === '_blank' || (!target.target && baseTarget === "_blank")) ) { window.__TAURI_INVOKE__('tauri', { __tauriModule: 'Shell', From 764968ab383ec639e061986bc2411dd44e71b612 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 11 Jul 2023 15:54:59 +0300 Subject: [PATCH 019/104] feat(bundler/nsis): sign uninstaller, closes #7348 (#7398) * feat(bundler/nsis): sign uninstaller, closes #7348 * Update bundler-nsis-sign-uninstaller.md * clippy --- .changes/bundler-nsis-sign-uninstaller.md | 5 ++ tooling/bundler/src/bundle/windows/msi/wix.rs | 11 ++-- tooling/bundler/src/bundle/windows/nsis.rs | 15 ++++- tooling/bundler/src/bundle/windows/sign.rs | 62 +++++++++++++++---- .../bundle/windows/templates/installer.nsi | 5 ++ tooling/bundler/src/bundle/windows/util.rs | 34 ---------- 6 files changed, 82 insertions(+), 50 deletions(-) create mode 100644 .changes/bundler-nsis-sign-uninstaller.md diff --git a/.changes/bundler-nsis-sign-uninstaller.md b/.changes/bundler-nsis-sign-uninstaller.md new file mode 100644 index 000000000..73721da13 --- /dev/null +++ b/.changes/bundler-nsis-sign-uninstaller.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'minor:enhance' +--- + +Sign NSIS uninstaller as well. diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index d1945de11..9144ead29 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -7,10 +7,13 @@ use crate::bundle::{ common::CommandExt, path_utils::{copy_file, FileOpts}, settings::Settings, - windows::util::{ - download, download_and_verify, extract_zip, try_sign, HashAlgorithm, WEBVIEW2_BOOTSTRAPPER_URL, - WEBVIEW2_X64_INSTALLER_GUID, WEBVIEW2_X86_INSTALLER_GUID, WIX_OUTPUT_FOLDER_NAME, - WIX_UPDATER_OUTPUT_FOLDER_NAME, + windows::{ + sign::try_sign, + util::{ + download, download_and_verify, extract_zip, HashAlgorithm, WEBVIEW2_BOOTSTRAPPER_URL, + WEBVIEW2_X64_INSTALLER_GUID, WEBVIEW2_X86_INSTALLER_GUID, WIX_OUTPUT_FOLDER_NAME, + WIX_UPDATER_OUTPUT_FOLDER_NAME, + }, }, }; use anyhow::{bail, Context}; diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 57960c879..76fa745ff 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT #[cfg(target_os = "windows")] -use crate::bundle::windows::util::try_sign; +use crate::bundle::windows::sign::{sign_command, try_sign}; use crate::{ bundle::{ common::CommandExt, @@ -160,6 +160,7 @@ fn build_nsis_app_installer( info!("Target: {}", arch); + // Code signing is currently only supported on Windows hosts #[cfg(target_os = "windows")] { let main_binary = settings @@ -201,6 +202,18 @@ fn build_nsis_app_installer( data.insert("short_description", to_json(settings.short_description())); data.insert("copyright", to_json(settings.copyright_string())); + // Code signing is currently only supported on Windows hosts + #[cfg(target_os = "windows")] + if settings.can_sign() { + data.insert( + "uninstaller_sign_cmd", + to_json(format!( + "{:?}", + sign_command("%1", &settings.sign_params())?.0 + )), + ); + } + let version = settings.version_string(); data.insert("version", to_json(version)); data.insert( diff --git a/tooling/bundler/src/bundle/windows/sign.rs b/tooling/bundler/src/bundle/windows/sign.rs index 95b2559b4..792b0771f 100644 --- a/tooling/bundler/src/bundle/windows/sign.rs +++ b/tooling/bundler/src/bundle/windows/sign.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use crate::bundle::common::CommandExt; +use crate::{bundle::common::CommandExt, Settings}; use bitness::{self, Bitness}; use log::{debug, info}; use std::{ @@ -90,18 +90,11 @@ fn locate_signtool() -> crate::Result { Err(crate::Error::SignToolNotFound) } -pub fn sign>(path: P, params: &SignParams) -> crate::Result<()> { - // Convert path to string reference, as we need to pass it as a command-line parameter to signtool - let path_str = path.as_ref().to_str().unwrap(); - - info!(action = "Signing"; "{} with identity \"{}\"", path_str, params.certificate_thumbprint); - +pub fn sign_command(path: &str, params: &SignParams) -> crate::Result<(Command, PathBuf)> { // Construct SignTool command let signtool = locate_signtool()?; - debug!("Running signtool {:?}", signtool); - - let mut cmd = Command::new(signtool); + let mut cmd = Command::new(&signtool); cmd.arg("sign"); cmd.args(["/fd", ¶ms.digest_algorithm]); cmd.args(["/sha1", ¶ms.certificate_thumbprint]); @@ -116,7 +109,18 @@ pub fn sign>(path: P, params: &SignParams) -> crate::Result<()> { } } - cmd.arg(path_str); + cmd.arg(path); + + Ok((cmd, signtool)) +} + +pub fn sign>(path: P, params: &SignParams) -> crate::Result<()> { + let path_str = path.as_ref().to_str().unwrap(); + + info!(action = "Signing"; "{} with identity \"{}\"", path_str, params.certificate_thumbprint); + + let (mut cmd, signtool) = sign_command(path_str, params)?; + debug!("Running signtool {:?}", signtool); // Execute SignTool command let output = cmd.output_ok()?; @@ -126,3 +130,39 @@ pub fn sign>(path: P, params: &SignParams) -> crate::Result<()> { Ok(()) } + +impl Settings { + pub(crate) fn can_sign(&self) -> bool { + self.windows().certificate_thumbprint.is_some() + } + pub(crate) fn sign_params(&self) -> SignParams { + SignParams { + product_name: self.product_name().into(), + digest_algorithm: self + .windows() + .digest_algorithm + .as_ref() + .map(|algorithm| algorithm.to_string()) + .unwrap_or_else(|| "sha256".to_string()), + certificate_thumbprint: self + .windows() + .certificate_thumbprint + .clone() + .unwrap_or_default(), + timestamp_url: self + .windows() + .timestamp_url + .as_ref() + .map(|url| url.to_string()), + tsp: self.windows().tsp, + } + } +} + +pub fn try_sign(file_path: &std::path::PathBuf, settings: &Settings) -> crate::Result<()> { + if settings.can_sign() { + info!(action = "Signing"; "{}", tauri_utils::display_path(file_path)); + sign(file_path, &settings.sign_params())?; + } + Ok(()) +} diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index 1674adc78..6b52d2808 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -34,6 +34,7 @@ ${StrLoc} !define WEBVIEW2INSTALLERPATH "{{webview2_installer_path}}" !define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCTNAME}" !define MANUPRODUCTKEY "Software\${MANUFACTURER}\${PRODUCTNAME}" +!define UNINSTALLERSIGNCOMMAND "{{uninstaller_sign_cmd}}" Name "${PRODUCTNAME}" BrandingText "${COPYRIGHT}" @@ -51,6 +52,10 @@ VIAddVersionKey "ProductVersion" "${VERSION}" !addplugindir "${PLUGINSPATH}" !endif +!if "${UNINSTALLERSIGNCOMMAND}" != "" + !uninstfinalize '${UNINSTALLERSIGNCOMMAND}' +!endif + ; Handle install mode, `perUser`, `perMachine` or `both` !if "${INSTALLMODE}" == "perMachine" RequestExecutionLevel highest diff --git a/tooling/bundler/src/bundle/windows/util.rs b/tooling/bundler/src/bundle/windows/util.rs index 2672302a0..2ebe6dcb4 100644 --- a/tooling/bundler/src/bundle/windows/util.rs +++ b/tooling/bundler/src/bundle/windows/util.rs @@ -12,11 +12,6 @@ use log::info; use sha2::Digest; use zip::ZipArchive; -#[cfg(target_os = "windows")] -use crate::bundle::windows::sign::{sign, SignParams}; -#[cfg(target_os = "windows")] -use crate::Settings; - pub const WEBVIEW2_BOOTSTRAPPER_URL: &str = "https://go.microsoft.com/fwlink/p/?LinkId=2124703"; pub const WEBVIEW2_X86_INSTALLER_GUID: &str = "a17bde80-b5ab-47b5-8bbb-1cbe93fc6ec9"; pub const WEBVIEW2_X64_INSTALLER_GUID: &str = "aa5fd9b3-dc11-4cbc-8343-a50f57b311e1"; @@ -75,35 +70,6 @@ fn verify(data: &Vec, hash: &str, mut hasher: impl Digest) -> crate::Result< } } -#[cfg(target_os = "windows")] -pub fn try_sign(file_path: &std::path::PathBuf, settings: &Settings) -> crate::Result<()> { - use tauri_utils::display_path; - - if let Some(certificate_thumbprint) = settings.windows().certificate_thumbprint.as_ref() { - info!(action = "Signing"; "{}", display_path(file_path)); - sign( - file_path, - &SignParams { - product_name: settings.product_name().into(), - digest_algorithm: settings - .windows() - .digest_algorithm - .as_ref() - .map(|algorithm| algorithm.to_string()) - .unwrap_or_else(|| "sha256".to_string()), - certificate_thumbprint: certificate_thumbprint.to_string(), - timestamp_url: settings - .windows() - .timestamp_url - .as_ref() - .map(|url| url.to_string()), - tsp: settings.windows().tsp, - }, - )?; - } - Ok(()) -} - /// Extracts the zips from memory into a useable path. pub fn extract_zip(data: &[u8], path: &Path) -> crate::Result<()> { let cursor = Cursor::new(data); From 907425df55bc800a93495999d60c56e664d095f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E8=8C=B6?= Date: Tue, 11 Jul 2023 23:29:15 +0800 Subject: [PATCH 020/104] feat(cli): check `cwd` for config file before traversing (#7395) --- tooling/cli/src/helpers/app_paths.rs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tooling/cli/src/helpers/app_paths.rs b/tooling/cli/src/helpers/app_paths.rs index 77c5bee7a..117d6a67f 100644 --- a/tooling/cli/src/helpers/app_paths.rs +++ b/tooling/cli/src/helpers/app_paths.rs @@ -62,10 +62,21 @@ fn lookup bool>(dir: &Path, checker: F) -> Option { fn get_tauri_dir() -> PathBuf { let cwd = current_dir().expect("failed to read cwd"); - if cwd.join("src-tauri/tauri.conf.json").exists() - || cwd.join("src-tauri/tauri.conf.json5").exists() + if cwd.join(ConfigFormat::Json.into_file_name()).exists() + || cwd.join(ConfigFormat::Json5.into_file_name()).exists() + || cwd.join(ConfigFormat::Toml.into_file_name()).exists() { - return cwd.join("src-tauri/"); + return cwd; + } + + let src_tauri = cwd.join("src-tauri"); + if src_tauri.join(ConfigFormat::Json.into_file_name()).exists() + || src_tauri + .join(ConfigFormat::Json5.into_file_name()) + .exists() + || src_tauri.join(ConfigFormat::Toml.into_file_name()).exists() + { + return src_tauri; } lookup(&cwd, |path| folder_has_configuration_file(path) || is_configuration_file(path)) @@ -80,7 +91,13 @@ fn get_tauri_dir() -> PathBuf { } fn get_app_dir() -> Option { - lookup(¤t_dir().expect("failed to read cwd"), |path| { + let cwd = current_dir().expect("failed to read cwd"); + + if cwd.join("package.json").exists() { + return Some(cwd); + } + + lookup(&cwd, |path| { if let Some(file_name) = path.file_name() { file_name == OsStr::new("package.json") } else { From a2be88a21db76e9fa063c527031f3849f066eecd Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 12 Jul 2023 13:38:25 +0300 Subject: [PATCH 021/104] refactor: remove `bitness` crate from bundler (#7405) Co-authored-by: Lucas Nogueira --- .changes/remove-bitness.md | 5 ++ tooling/bundler/Cargo.toml | 8 ++- tooling/bundler/src/bundle/windows/sign.rs | 12 ++-- tooling/bundler/src/bundle/windows/util.rs | 16 +++++ tooling/cli/Cargo.lock | 71 ++++++++-------------- 5 files changed, 57 insertions(+), 55 deletions(-) create mode 100644 .changes/remove-bitness.md diff --git a/.changes/remove-bitness.md b/.changes/remove-bitness.md new file mode 100644 index 000000000..d875dc28d --- /dev/null +++ b/.changes/remove-bitness.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:deps' +--- + +Removed the `bitness` dependency to speed up compile time. diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index b0b3489fb..13abfa040 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -43,10 +43,16 @@ dunce = "1" [target."cfg(target_os = \"windows\")".dependencies] uuid = { version = "1", features = [ "v4", "v5" ] } -bitness = "0.4" winreg = "0.50" glob = "0.3" +[target."cfg(target_os = \"windows\")".dependencies.windows-sys] +version = "0.48" +features = [ + "Win32_System_SystemInformation", + "Win32_System_Diagnostics_Debug" +] + [target."cfg(target_os = \"macos\")".dependencies] icns = { package = "tauri-icns", version = "0.1" } time = { version = "0.3", features = [ "formatting" ] } diff --git a/tooling/bundler/src/bundle/windows/sign.rs b/tooling/bundler/src/bundle/windows/sign.rs index 792b0771f..8a2725a72 100644 --- a/tooling/bundler/src/bundle/windows/sign.rs +++ b/tooling/bundler/src/bundle/windows/sign.rs @@ -3,8 +3,10 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use crate::{bundle::common::CommandExt, Settings}; -use bitness::{self, Bitness}; +use crate::{ + bundle::{common::CommandExt, windows::util}, + Settings, +}; use log::{debug, info}; use std::{ path::{Path, PathBuf}, @@ -69,11 +71,7 @@ fn locate_signtool() -> crate::Result { kit_bin_paths.push(kits_root_10_bin_path); // Choose which version of SignTool to use based on OS bitness - let arch_dir = match bitness::os_bitness().expect("failed to get os bitness") { - Bitness::X86_32 => "x86", - Bitness::X86_64 => "x64", - _ => return Err(crate::Error::UnsupportedBitness), - }; + let arch_dir = util::os_bitness().ok_or(crate::Error::UnsupportedBitness)?; /* Iterate through all bin paths, checking for existence of a SignTool executable. */ for kit_bin_path in &kit_bin_paths { diff --git a/tooling/bundler/src/bundle/windows/util.rs b/tooling/bundler/src/bundle/windows/util.rs index 2ebe6dcb4..f7c82baa5 100644 --- a/tooling/bundler/src/bundle/windows/util.rs +++ b/tooling/bundler/src/bundle/windows/util.rs @@ -102,3 +102,19 @@ pub fn extract_zip(data: &[u8], path: &Path) -> crate::Result<()> { Ok(()) } + +#[cfg(target_os = "windows")] +pub fn os_bitness<'a>() -> Option<&'a str> { + use windows_sys::Win32::System::{ + Diagnostics::Debug::{PROCESSOR_ARCHITECTURE_AMD64, PROCESSOR_ARCHITECTURE_INTEL}, + SystemInformation::{GetNativeSystemInfo, SYSTEM_INFO}, + }; + + let mut system_info: SYSTEM_INFO = unsafe { std::mem::zeroed() }; + unsafe { GetNativeSystemInfo(&mut system_info) }; + match unsafe { system_info.Anonymous.Anonymous.wProcessorArchitecture } { + PROCESSOR_ARCHITECTURE_INTEL => Some("x86"), + PROCESSOR_ARCHITECTURE_AMD64 => Some("x64"), + _ => None, + } +} diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 833593af5..28090c49d 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -279,18 +279,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" -[[package]] -name = "bitness" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57792b99d555ebf109c83169228076f7d997e2b37ba1a653850ccd703ac7bab0" -dependencies = [ - "sysctl", - "thiserror", - "uname", - "winapi", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -1244,9 +1232,9 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.25.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" +checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ "log", "mac", @@ -1637,13 +1625,14 @@ dependencies = [ ] [[package]] -name = "kuchiki" -version = "0.8.1" +name = "kuchikiki" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", "html5ever", + "indexmap", "matches", "selectors", ] @@ -1738,13 +1727,13 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "markup5ever" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ "log", - "phf 0.8.0", - "phf_codegen", + "phf 0.10.1", + "phf_codegen 0.10.0", "string_cache", "string_cache_codegen", "tendril", @@ -2309,6 +2298,16 @@ dependencies = [ "phf_shared 0.8.0", ] +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + [[package]] name = "phf_generator" version = "0.8.0" @@ -2893,7 +2892,7 @@ dependencies = [ "log", "matches", "phf 0.8.0", - "phf_codegen", + "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", "smallvec", @@ -3292,19 +3291,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "sysctl" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225e483f02d0ad107168dc57381a8a40c3aeea6abe47f37506931f861643cfa8" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "libc", - "thiserror", - "walkdir", -] - [[package]] name = "tar" version = "0.4.38" @@ -3322,7 +3308,6 @@ version = "1.3.0" dependencies = [ "anyhow", "ar", - "bitness", "dirs-next", "dunce", "glob", @@ -3352,6 +3337,7 @@ dependencies = [ "ureq", "uuid", "walkdir", + "windows-sys 0.48.0", "winreg 0.50.0", "zip", ] @@ -3380,7 +3366,7 @@ dependencies = [ "itertools", "json-patch", "jsonschema", - "kuchiki", + "kuchikiki", "libc", "log", "minisign", @@ -3443,7 +3429,7 @@ dependencies = [ "infer", "json-patch", "json5", - "kuchiki", + "kuchikiki", "memchr", "phf 0.10.1", "schemars", @@ -3770,15 +3756,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" -[[package]] -name = "uname" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" -dependencies = [ - "libc", -] - [[package]] name = "unicode-bidi" version = "0.3.13" From 71a02401664f19c17947b274d5472bddd228dd98 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 12 Jul 2023 14:44:26 +0300 Subject: [PATCH 022/104] chore: remove hotkey.js script and replace var with const (#7343) Co-authored-by: Lucas Nogueira --- core/tauri/scripts/core.js | 10 +++--- core/tauri/scripts/hotkey.js | 6 ---- core/tauri/scripts/toggle-devtools.js | 36 +++++++++++++++++++ core/tauri/src/manager.rs | 25 +------------ examples/api/src/views/Dialog.svelte | 12 +++---- examples/multiwindow/index.html | 28 +++++++-------- examples/parent-window/index.html | 18 +++++----- .../test/jest/fixtures/app/dist/index.html | 6 ++-- tooling/cli/src/helpers/auto-reload.js | 10 +++--- 9 files changed, 79 insertions(+), 72 deletions(-) delete mode 100644 core/tauri/scripts/hotkey.js create mode 100644 core/tauri/scripts/toggle-devtools.js diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index ad2196c17..9424b7504 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -17,8 +17,8 @@ callback, once ) { - var identifier = uid() - var prop = `_${identifier}` + const identifier = uid() + const prop = `_${identifier}` Object.defineProperty(window, prop, { value: (result) => { @@ -50,11 +50,11 @@ window.__TAURI_INVOKE__ = function invoke(cmd, args = {}) { return new Promise(function (resolve, reject) { - var callback = window.__TAURI__.transformCallback(function (r) { + const callback = window.__TAURI__.transformCallback(function (r) { resolve(r) delete window[`_${error}`] }, true) - var error = window.__TAURI__.transformCallback(function (e) { + const error = window.__TAURI__.transformCallback(function (e) { reject(e) delete window[`_${callback}`] }, true) @@ -211,7 +211,7 @@ } window.Notification = function (title, options) { - var opts = options || {} + const opts = options || {} sendNotification( Object.assign(opts, { title: title diff --git a/core/tauri/scripts/hotkey.js b/core/tauri/scripts/hotkey.js deleted file mode 100644 index 0bf6f6d73..000000000 --- a/core/tauri/scripts/hotkey.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/*! hotkeys-js v3.8.7 | MIT (c) 2021 kenny wong | http://jaywcjlove.github.io/hotkeys */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).hotkeys=t()}(this,function(){"use strict";var e="undefined"!=typeof navigator&&0 event.metaKey && event.altKey && event.key === "I" + : (event) => event.ctrlKey && event.shiftKey && event.key === "I"; + + document.addEventListener("keydown", (event) => { + if (isHotkey(event)) { + window.__TAURI_INVOKE__('tauri', { + __tauriModule: 'Window', + message: { + cmd: 'manage', + data: { + cmd: { + type: '__toggleDevtools' + } + } + } + }); + } + }); + } + + if ( + document.readyState === "complete" || + document.readyState === "interactive" + ) { + toggleDevtoolsHotkey(); + } else { + window.addEventListener("DOMContentLoaded", toggleDevtoolsHotkey, true); + } +})(); diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index a57e1cc05..7a574ab00 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -778,30 +778,7 @@ impl WindowManager { }; #[cfg(any(debug_assertions, feature = "devtools"))] - let hotkeys = &format!( - " - {}; - window.hotkeys('{}', () => {{ - window.__TAURI_INVOKE__('tauri', {{ - __tauriModule: 'Window', - message: {{ - cmd: 'manage', - data: {{ - cmd: {{ - type: '__toggleDevtools' - }} - }} - }} - }}); - }}); - ", - include_str!("../scripts/hotkey.js"), - if cfg!(target_os = "macos") { - "command+option+i" - } else { - "ctrl+shift+i" - } - ); + let hotkeys = include_str!("../scripts/toggle-devtools.js"); #[cfg(not(any(debug_assertions, feature = "devtools")))] let hotkeys = ""; diff --git a/examples/api/src/views/Dialog.svelte b/examples/api/src/views/Dialog.svelte index bdeca61ac..38f7e54ff 100644 --- a/examples/api/src/views/Dialog.svelte +++ b/examples/api/src/views/Dialog.svelte @@ -10,12 +10,12 @@ let directory = false function arrayBufferToBase64(buffer, callback) { - var blob = new Blob([buffer], { + const blob = new Blob([buffer], { type: 'application/octet-binary' }) - var reader = new FileReader() + const reader = new FileReader() reader.onload = function (evt) { - var dataurl = evt.target.result + const dataurl = evt.target.result callback(dataurl.substr(dataurl.indexOf(',') + 1)) } reader.readAsDataURL(blob) @@ -40,8 +40,8 @@ if (Array.isArray(res)) { onMessage(res) } else { - var pathToRead = res - var isFile = pathToRead.match(/\S+\.\S+$/g) + const pathToRead = res + const isFile = pathToRead.match(/\S+\.\S+$/g) readBinaryFile(pathToRead) .then(function (response) { if (isFile) { @@ -52,7 +52,7 @@ arrayBufferToBase64( new Uint8Array(response), function (base64) { - var src = 'data:image/png;base64,' + base64 + const src = 'data:image/png;base64,' + base64 insecureRenderHtml('') } ) diff --git a/examples/multiwindow/index.html b/examples/multiwindow/index.html index 3e89ee93a..d415b1ae3 100644 --- a/examples/multiwindow/index.html +++ b/examples/multiwindow/index.html @@ -14,17 +14,17 @@
- diff --git a/tooling/api/.gitignore b/tooling/api/.gitignore index 99b0d35f7..6b41dba26 100644 --- a/tooling/api/.gitignore +++ b/tooling/api/.gitignore @@ -65,4 +65,3 @@ package-lock.json # Documentation output docs/* -!docs/js-api.json diff --git a/tooling/api/src/notification.ts b/tooling/api/src/notification.ts index fdc33a0cf..056936a2b 100644 --- a/tooling/api/src/notification.ts +++ b/tooling/api/src/notification.ts @@ -38,6 +38,31 @@ interface Options { body?: string /** Optional notification icon. */ icon?: string + /** + * Optional notification sound. + * + * #### Platform-specific + * + * Each OS has a different sound name so you will need to conditionally specify an appropriate sound + * based on the OS in use, 'default' represents the default system sound. For a list of sounds see: + * - **Linux**: can be one of the sounds listed in {@link https://0pointer.de/public/sound-naming-spec.html} + * - **Windows**: can be one of the sounds listed in {@link https://learn.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-audio} + * but without the prefix, for example, if `ms-winsoundevent:Notification.Default` you would use `Default` and + * if `ms-winsoundevent:Notification.Looping.Alarm2`, you would use `Alarm2`. + * Windows 7 is not supported, if a sound is provided, it will play the default sound, otherwise it will be silent. + * - **macOS**: you can specify the name of the sound you'd like to play when the notification is shown. + * Any of the default sounds (under System Preferences > Sound) can be used, in addition to custom sound files. + * Be sure that the sound file is copied under the app bundle (e.g., `YourApp.app/Contents/Resources`), or one of the following locations: + * - `~/Library/Sounds` + * - `/Library/Sounds` + * - `/Network/Library/Sounds` + * - `/System/Library/Sounds` + * + * See the {@link https://developer.apple.com/documentation/appkit/nssound | NSSound} docs for more information. + * + * @since 1.5.0 + */ + sound?: 'default' | string } /** Possible permission values. */ From cb1d4164e71e29f071b8438d02a7ec86a9fac67b Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 8 Aug 2023 20:16:00 +0200 Subject: [PATCH 034/104] fix(bundler): sign the exe before the bundler step (#7487) --- .../bundler-windows-earlier-code-signing.md | 7 ++++++ tooling/bundler/src/bundle.rs | 24 +++++++++++++++++++ tooling/bundler/src/bundle/windows/msi/wix.rs | 2 -- tooling/bundler/src/bundle/windows/nsis.rs | 12 ---------- tooling/bundler/src/bundle/windows/sign.rs | 14 +++++++++++ 5 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 .changes/bundler-windows-earlier-code-signing.md diff --git a/.changes/bundler-windows-earlier-code-signing.md b/.changes/bundler-windows-earlier-code-signing.md new file mode 100644 index 000000000..a6978e4d2 --- /dev/null +++ b/.changes/bundler-windows-earlier-code-signing.md @@ -0,0 +1,7 @@ +--- +'tauri-bundler': 'patch:enhance' +--- + +On Windows, code sign the application binaries before trying to create the WiX and NSIS bundles to always sign the executables even if no bundle types are enabled. + +On Windows, code sign the sidecar binaries if they are not signed already. diff --git a/tooling/bundler/src/bundle.rs b/tooling/bundler/src/bundle.rs index c458e2b6c..763ca75b7 100644 --- a/tooling/bundler/src/bundle.rs +++ b/tooling/bundler/src/bundle.rs @@ -63,6 +63,30 @@ pub fn bundle_project(settings: Settings) -> crate::Result> { warn!("Cross-platform compilation is experimental and does not support all features. Please use a matching host system for full compatibility."); } + #[cfg(target_os = "windows")] + { + // Sign windows binaries before the bundling step in case neither wix and nsis bundles are enabled + for bin in settings.binaries() { + let bin_path = settings.binary_path(bin); + windows::sign::try_sign(&bin_path, &settings)?; + } + + // Sign the sidecar binaries + for bin in settings.external_binaries() { + let path = bin?; + let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").map_or(false, |v| v == "true"); + + if !skip && windows::sign::verify(&path)? { + info!( + "sidecar at \"{}\" already signed. Skipping...", + path.display() + ) + } else { + windows::sign::try_sign(&path, &settings)?; + } + } + } + for package_type in &package_types { // bundle was already built! e.g. DMG already built .app if bundles.iter().any(|b| b.package_type == *package_type) { diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 26e6b0b9d..c78b659e3 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -410,8 +410,6 @@ pub fn build_wix_app_installer( .ok_or_else(|| anyhow::anyhow!("Failed to get main binary"))?; let app_exe_source = settings.binary_path(main_binary); - try_sign(&app_exe_source, settings)?; - let output_path = settings.project_out_directory().join("wix").join(arch); if output_path.exists() { diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index ddf5d6075..a3e018edf 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -157,18 +157,6 @@ fn build_nsis_app_installer( info!("Target: {}", arch); - // Code signing is currently only supported on Windows hosts - #[cfg(target_os = "windows")] - { - let main_binary = settings - .binaries() - .iter() - .find(|bin| bin.main()) - .ok_or_else(|| anyhow::anyhow!("Failed to get main binary"))?; - let app_exe_source = settings.binary_path(main_binary); - try_sign(&app_exe_source, settings)?; - } - #[cfg(not(target_os = "windows"))] info!("Code signing is currently only supported on Windows hosts, skipping..."); diff --git a/tooling/bundler/src/bundle/windows/sign.rs b/tooling/bundler/src/bundle/windows/sign.rs index 8a2725a72..95ca5bf62 100644 --- a/tooling/bundler/src/bundle/windows/sign.rs +++ b/tooling/bundler/src/bundle/windows/sign.rs @@ -88,6 +88,20 @@ fn locate_signtool() -> crate::Result { Err(crate::Error::SignToolNotFound) } +/// Check if binary is already signed. +/// Used to skip sidecar binaries that are already signed. +pub fn verify(path: &Path) -> crate::Result { + // Construct SignTool command + let signtool = locate_signtool()?; + + let mut cmd = Command::new(&signtool); + cmd.arg("verify"); + cmd.arg("/pa"); + cmd.arg(path); + + Ok(cmd.status()?.success()) +} + pub fn sign_command(path: &str, params: &SignParams) -> crate::Result<(Command, PathBuf)> { // Construct SignTool command let signtool = locate_signtool()?; From 9edebbba4ec472772b2f6307232e8d256f62c8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= <7822554+AlexTMjugador@users.noreply.github.com> Date: Tue, 8 Aug 2023 20:46:32 +0200 Subject: [PATCH 035/104] fix(driver): bump locked dependencies to fix build issue on Windows (#7475) --- .changes/webdriver-bump-dependencies.md | 5 + .changes/webdriver-bump-msrv.md | 5 + tooling/webdriver/Cargo.lock | 308 +++++++++++++++--------- tooling/webdriver/Cargo.toml | 2 +- 4 files changed, 203 insertions(+), 117 deletions(-) create mode 100644 .changes/webdriver-bump-dependencies.md create mode 100644 .changes/webdriver-bump-msrv.md diff --git a/.changes/webdriver-bump-dependencies.md b/.changes/webdriver-bump-dependencies.md new file mode 100644 index 000000000..c96df8ef9 --- /dev/null +++ b/.changes/webdriver-bump-dependencies.md @@ -0,0 +1,5 @@ +--- +"tauri-driver": patch +--- + +Update locked dependencies to fix a Windows build issue when using them with a recent Rust compiler. diff --git a/.changes/webdriver-bump-msrv.md b/.changes/webdriver-bump-msrv.md new file mode 100644 index 000000000..9a3cebab4 --- /dev/null +++ b/.changes/webdriver-bump-msrv.md @@ -0,0 +1,5 @@ +--- +"tauri-driver": patch +--- + +Bump minimum Rust version to `1.60` to be in line with the rest of the Tauri project. diff --git a/tooling/webdriver/Cargo.lock b/tooling/webdriver/Cargo.lock index d0e96ed47..332f1ecb1 100644 --- a/tooling/webdriver/Cargo.lock +++ b/tooling/webdriver/Cargo.lock @@ -3,10 +3,25 @@ version = 3 [[package]] -name = "anyhow" -version = "1.0.58" +name = "addr2line" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "autocfg" @@ -15,10 +30,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "bytes" -version = "1.1.0" +name = "backtrace" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" @@ -28,9 +64,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "either" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "fnv" @@ -40,9 +76,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "futures" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -55,9 +91,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -65,15 +101,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -82,15 +118,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", @@ -99,21 +135,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -128,10 +164,16 @@ dependencies = [ ] [[package]] -name = "http" -version = "0.2.8" +name = "gimli" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", @@ -151,9 +193,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -163,9 +205,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.19" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -186,30 +228,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "memchr" @@ -218,22 +245,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] -name = "mio" -version = "0.8.4" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi", "windows-sys", ] [[package]] -name = "once_cell" -version = "1.12.0" +name = "object" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "pico-args" @@ -243,9 +287,9 @@ checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -255,42 +299,48 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.20" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] [[package]] -name = "ryu" -version = "1.0.10" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49" dependencies = [ "proc-macro2", "quote", @@ -299,9 +349,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -310,9 +360,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -320,9 +370,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] @@ -341,15 +391,18 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -357,9 +410,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.98" +version = "2.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", "quote", @@ -384,24 +437,25 @@ dependencies = [ [[package]] name = "tokio" -version = "1.20.4" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb78f30e4b41e98ca4cce5acb51168a033839a7af9e42b380355808e14e98ee0" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "libc", "mio", "pin-project-lite", "socket2", "tokio-macros", - "winapi", + "windows-sys", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", @@ -416,9 +470,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.35" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "pin-project-lite", @@ -427,32 +481,31 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "unicode-ident" -version = "1.0.1" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -464,13 +517,13 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "which" -version = "4.2.5" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", - "lazy_static", "libc", + "once_cell", ] [[package]] @@ -497,43 +550,66 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_msvc", "windows_x86_64_gnu", + "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows_aarch64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/tooling/webdriver/Cargo.toml b/tooling/webdriver/Cargo.toml index b7e8c36f6..3b2ada75c 100644 --- a/tooling/webdriver/Cargo.toml +++ b/tooling/webdriver/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/tauri-apps/tauri" description = "Webdriver server for Tauri applications" readme = "README.md" edition = "2021" -rust-version = "1.57" +rust-version = "1.60" [dependencies] anyhow = "1" From a6b52e44f22844009e273fb0250368d7a463f095 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 8 Aug 2023 22:43:19 +0300 Subject: [PATCH 036/104] fix(tauri-utils): include `\n` in `io::read_line`, closes #6388 (#6519) Co-authored-by: Lucas Nogueira fix(tauri-utils): include `\n` in `io::read_line`, closes #6388 --- .changes/tauri-utils-read-line.md | 5 ++ core/tauri-utils/src/io.rs | 6 +- core/tauri/src/api/process/command.rs | 2 +- examples/api/dist/assets/index.js | 89 ++++++++++++++------------- examples/api/src/views/Shell.svelte | 33 ++++++++-- 5 files changed, 82 insertions(+), 53 deletions(-) create mode 100644 .changes/tauri-utils-read-line.md diff --git a/.changes/tauri-utils-read-line.md b/.changes/tauri-utils-read-line.md new file mode 100644 index 000000000..cc6195d9a --- /dev/null +++ b/.changes/tauri-utils-read-line.md @@ -0,0 +1,5 @@ +--- +'tauri-utils': 'patch:bug' +--- + +Fix `io::read_line` not including the new line character `\n`. diff --git a/core/tauri-utils/src/io.rs b/core/tauri-utils/src/io.rs index 85d1e6da8..9dc699fa6 100644 --- a/core/tauri-utils/src/io.rs +++ b/core/tauri-utils/src/io.rs @@ -6,7 +6,7 @@ use std::io::BufRead; -/// Read a line breaking in both \n and \r. +/// Read all bytes until a newline (the `0xA` byte) or a carriage return (`\r`) is reached, and append them to the provided buffer. /// /// Adapted from . pub fn read_line(r: &mut R, buf: &mut Vec) -> std::io::Result { @@ -16,6 +16,7 @@ pub fn read_line(r: &mut R, buf: &mut Vec) -> std::io:: let available = match r.fill_buf() { Ok(n) => n, Err(ref e) if e.kind() == std::io::ErrorKind::Interrupted => continue, + Err(e) => return Err(e), }; match memchr::memchr(b'\n', available) { @@ -40,9 +41,6 @@ pub fn read_line(r: &mut R, buf: &mut Vec) -> std::io:: r.consume(used); read += used; if done || used == 0 { - if buf.ends_with(&[b'\n']) { - buf.pop(); - } return Ok(read); } } diff --git a/core/tauri/src/api/process/command.rs b/core/tauri/src/api/process/command.rs index fe4911e1a..6b3fd73db 100644 --- a/core/tauri/src/api/process/command.rs +++ b/core/tauri/src/api/process/command.rs @@ -468,7 +468,7 @@ mod test { assert_eq!(payload.code, Some(1)); } CommandEvent::Stderr(line) => { - assert_eq!(line, "cat: test/api/: Is a directory".to_string()); + assert_eq!(line, "cat: test/api/: Is a directory\n".to_string()); } _ => {} } diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 19c036dd6..15e9a21a1 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,50 +1,51 @@ -const wo=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}};wo();function G(){}function Os(e){return e()}function is(){return Object.create(null)}function oe(e){e.forEach(Os)}function ko(e){return typeof e=="function"}function pe(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ti;function Mo(e,t){return ti||(ti=document.createElement("a")),ti.href=t,e===ti.href}function Co(e){return Object.keys(e).length===0}function To(e,...t){if(e==null)return G;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Rs(e,t,n){e.$$.on_destroy.push(To(t,n))}function s(e,t){e.appendChild(t)}function h(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function yt(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ai(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function se(e){return e===""?null:+e}function So(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function It(e,t){for(let n=0;n{si.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ui(e){e&&e.c()}function Zt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Ft(()=>{const c=o.map(Os).filter(ko);u?u.push(...c):oe(c),e.$$.on_mount=[]}),d.forEach(Ft)}function xt(e,t){const n=e.$$;n.fragment!==null&&(oe(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Po(e,t){e.$$.dirty[0]===-1&&(Yt.push(e),Eo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const y=v.length?v[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=y)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](y),g&&Po(e,k)),_}):[],f.update(),g=!0,oe(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=So(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Te(e.$$.fragment),Zt(e,t.target,t.anchor,t.customElement),Is()}Kt(c)}class ye{$destroy(){xt(this,1),this.$destroy=G}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!Co(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Nt=[];function Fs(e,t=G){let n;const i=new Set;function l(d){if(pe(e,d)&&(e=d,n)){const c=!Nt.length;for(const f of i)f[1](),Nt.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var Do=Object.defineProperty,ke=(e,t)=>{for(var n in t)Do(e,n,{get:t[n],enumerable:!0})},Oo={};ke(Oo,{convertFileSrc:()=>Hs,invoke:()=>ci,transformCallback:()=>vt});function Ro(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function vt(e,t=!1){let n=Ro(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function ci(e,t={}){return new Promise((n,i)=>{let l=vt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=vt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function Hs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function T(e){return ci("tauri",e)}var No={};ke(No,{Child:()=>js,Command:()=>$i,EventEmitter:()=>oi,open:()=>Ki});async function Io(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),T({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:vt(e)}})}var oi=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,...t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(...t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.prependListener(e,n)}},js=class{constructor(e){this.pid=e}async write(e){return T({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return T({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},$i=class extends oi{constructor(e,t=[],n){super(),this.stdout=new oi,this.stderr=new oi,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static sidecar(e,t=[],n){let i=new $i(e,t,n);return i.options.sidecar=!0,i}async spawn(){return Io(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new js(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:n.join(` +const Co=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}};Co();function J(){}function Is(e){return e()}function is(){return Object.create(null)}function re(e){e.forEach(Is)}function To(e){return typeof e=="function"}function me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ti;function Ao(e,t){return ti||(ti=document.createElement("a")),ti.href=t,e===ti.href}function So(e){return Object.keys(e).length===0}function Lo(e,...t){if(e==null)return J;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Fs(e,t,n){e.$$.on_destroy.push(Lo(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function rt(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ai(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ae(e){return e===""?null:+e}function Eo(e){return Array.from(e.childNodes)}function $(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function It(e,t){for(let n=0;n{si.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ui(e){e&&e.c()}function $t(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Ft(()=>{const c=o.map(Is).filter(To);u?u.push(...c):re(c),e.$$.on_mount=[]}),d.forEach(Ft)}function xt(e,t){const n=e.$$;n.fragment!==null&&(re(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ro(e,t){e.$$.dirty[0]===-1&&(Yt.push(e),Do(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=g.length?g[0]:_;return f.ctx&&l(f.ctx[M],f.ctx[M]=v)&&(!f.skip_bound&&f.bound[M]&&f.bound[M](v),y&&Ro(e,M)),_}):[],f.update(),y=!0,re(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const M=Eo(t.target);f.fragment&&f.fragment.l(M),M.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Te(e.$$.fragment),$t(e,t.target,t.anchor,t.customElement),js()}Qt(c)}class ye{$destroy(){xt(this,1),this.$destroy=J}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!So(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Nt=[];function Us(e,t=J){let n;const i=new Set;function l(d){if(me(e,d)&&(e=d,n)){const c=!Nt.length;for(const f of i)f[1](),Nt.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var No=Object.defineProperty,ke=(e,t)=>{for(var n in t)No(e,n,{get:t[n],enumerable:!0})},Io={};ke(Io,{convertFileSrc:()=>qs,invoke:()=>ci,transformCallback:()=>vt});function Fo(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function vt(e,t=!1){let n=Fo(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function ci(e,t={}){return new Promise((n,i)=>{let l=vt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=vt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function qs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function T(e){return ci("tauri",e)}var Ho={};ke(Ho,{Child:()=>Bs,Command:()=>Ki,EventEmitter:()=>oi,open:()=>Qi});async function jo(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),T({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:vt(e)}})}var oi=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,...t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(...t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.prependListener(e,n)}},Bs=class{constructor(e){this.pid=e}async write(e){return T({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return T({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Ki=class extends oi{constructor(e,t=[],n){super(),this.stdout=new oi,this.stderr=new oi,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static sidecar(e,t=[],n){let i=new Ki(e,t,n);return i.options.sidecar=!0,i}async spawn(){return jo(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new Bs(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:n.join(` `),stderr:i.join(` -`)})}),this.spawn().catch(t)})}};async function Ki(e,t){return T({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var Fo={};ke(Fo,{TauriEvent:()=>Gs,emit:()=>_i,listen:()=>tn,once:()=>Vs});async function Us(e,t){return T({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function qs(e,t,n){await T({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Qi(e,t,n){return T({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:vt(n)}}).then(i=>async()=>Us(e,i))}async function Bs(e,t,n){return Qi(e,t,i=>{n(i),Us(e,i.id).catch(()=>{})})}var Gs=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Gs||{});async function tn(e,t){return Qi(e,null,t)}async function Vs(e,t){return Bs(e,null,t)}async function _i(e,t){return qs(e,void 0,t)}var Ho={};ke(Ho,{CloseRequestedEvent:()=>$s,LogicalPosition:()=>Js,LogicalSize:()=>di,PhysicalPosition:()=>ot,PhysicalSize:()=>gt,UserAttentionType:()=>Zi,WebviewWindow:()=>wt,WebviewWindowHandle:()=>Xs,WindowManager:()=>Ys,appWindow:()=>Ve,availableMonitors:()=>qo,currentMonitor:()=>jo,getAll:()=>Ji,getCurrent:()=>$t,primaryMonitor:()=>Uo});var di=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},gt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new di(this.width/e,this.height/e)}},Js=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},ot=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Js(this.x/e,this.y/e)}},Zi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Zi||{});function $t(){return new wt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ji(){return window.__TAURI_METADATA__.__windows.map(e=>new wt(e.label,{skip:!0}))}var ss=["tauri://created","tauri://error"],Xs=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Qi(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Bs(e,this.label,t)}async emit(e,t){if(ss.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return qs(e,this.label,t)}_handleTauriEvent(e,t){return ss.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Ys=class extends Xs{async scaleFactor(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new ot(e,t))}async outerPosition(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new ot(e,t))}async innerSize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new gt(e,t))}async outerSize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new gt(e,t))}async isFullscreen(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isFocused(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFocused"}}}})}async isDecorated(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isMaximizable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximizable"}}}})}async isMinimizable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimizable"}}}})}async isClosable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isClosable"}}}})}async isVisible(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setMaximizable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaximizable",payload:e}}}})}async setMinimizable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinimizable",payload:e}}}})}async setClosable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setClosable",payload:e}}}})}async setTitle(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=Qs(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=Ks(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new $s(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},$s=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},wt=class extends Ys{constructor(e,t={}){super(e),t!=null&&t.skip||T({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Ji().some(t=>t.label===e)?new wt(e,{skip:!0}):null}static async getFocusedWindow(){for(let e of Ji())if(await e.isFocused())return e;return null}},Ve;"__TAURI_METADATA__"in window?Ve=new wt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Ve=new wt("main",{skip:!0}));function xi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Ks(e.position),size:Qs(e.size)}}function Ks(e){return new ot(e.x,e.y)}function Qs(e){return new gt(e.width,e.height)}async function jo(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(xi)}async function Uo(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(xi)}async function qo(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(xi))}function Bo(){return navigator.appVersion.includes("Win")}var Go={};ke(Go,{EOL:()=>Vo,arch:()=>Yo,locale:()=>Ko,platform:()=>Zs,tempdir:()=>$o,type:()=>Xo,version:()=>Jo});var Vo=Bo()?`\r +`)})}),this.spawn().catch(t)})}};async function Qi(e,t){return T({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var Uo={};ke(Uo,{TauriEvent:()=>Xs,emit:()=>_i,listen:()=>tn,once:()=>Ys});async function Gs(e,t){return T({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Vs(e,t,n){await T({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Zi(e,t,n){return T({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:vt(n)}}).then(i=>async()=>Gs(e,i))}async function Js(e,t,n){return Zi(e,t,i=>{n(i),Gs(e,i.id).catch(()=>{})})}var Xs=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Xs||{});async function tn(e,t){return Zi(e,null,t)}async function Ys(e,t){return Js(e,null,t)}async function _i(e,t){return Vs(e,void 0,t)}var qo={};ke(qo,{CloseRequestedEvent:()=>$s,LogicalPosition:()=>Ks,LogicalSize:()=>di,PhysicalPosition:()=>ot,PhysicalSize:()=>yt,UserAttentionType:()=>$i,WebviewWindow:()=>wt,WebviewWindowHandle:()=>Qs,WindowManager:()=>Zs,appWindow:()=>Ve,availableMonitors:()=>Vo,currentMonitor:()=>Bo,getAll:()=>Ji,getCurrent:()=>Kt,primaryMonitor:()=>Go});var di=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},yt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new di(this.width/e,this.height/e)}},Ks=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},ot=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Ks(this.x/e,this.y/e)}},$i=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))($i||{});function Kt(){return new wt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ji(){return window.__TAURI_METADATA__.__windows.map(e=>new wt(e.label,{skip:!0}))}var ss=["tauri://created","tauri://error"],Qs=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Zi(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Js(e,this.label,t)}async emit(e,t){if(ss.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Vs(e,this.label,t)}_handleTauriEvent(e,t){return ss.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Zs=class extends Qs{async scaleFactor(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new ot(e,t))}async outerPosition(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new ot(e,t))}async innerSize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new yt(e,t))}async outerSize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new yt(e,t))}async isFullscreen(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isFocused(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFocused"}}}})}async isDecorated(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isMaximizable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximizable"}}}})}async isMinimizable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimizable"}}}})}async isClosable(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isClosable"}}}})}async isVisible(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setMaximizable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaximizable",payload:e}}}})}async setMinimizable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinimizable",payload:e}}}})}async setClosable(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setClosable",payload:e}}}})}async setTitle(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=eo(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=xs(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new $s(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},$s=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},wt=class extends Zs{constructor(e,t={}){super(e),t!=null&&t.skip||T({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Ji().some(t=>t.label===e)?new wt(e,{skip:!0}):null}static async getFocusedWindow(){for(let e of Ji())if(await e.isFocused())return e;return null}},Ve;"__TAURI_METADATA__"in window?Ve=new wt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. +Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Ve=new wt("main",{skip:!0}));function xi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:xs(e.position),size:eo(e.size)}}function xs(e){return new ot(e.x,e.y)}function eo(e){return new yt(e.width,e.height)}async function Bo(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(xi)}async function Go(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(xi)}async function Vo(){return T({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(xi))}function Jo(){return navigator.appVersion.includes("Win")}var Xo={};ke(Xo,{EOL:()=>Yo,arch:()=>Zo,locale:()=>xo,platform:()=>to,tempdir:()=>$o,type:()=>Qo,version:()=>Ko});var Yo=Jo()?`\r `:` -`;async function Zs(){return T({__tauriModule:"Os",message:{cmd:"platform"}})}async function Jo(){return T({__tauriModule:"Os",message:{cmd:"version"}})}async function Xo(){return T({__tauriModule:"Os",message:{cmd:"osType"}})}async function Yo(){return T({__tauriModule:"Os",message:{cmd:"arch"}})}async function $o(){return T({__tauriModule:"Os",message:{cmd:"tempdir"}})}async function Ko(){return T({__tauriModule:"Os",message:{cmd:"locale"}})}var Qo={};ke(Qo,{getName:()=>eo,getTauriVersion:()=>to,getVersion:()=>xs,hide:()=>io,show:()=>no});async function xs(){return T({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function eo(){return T({__tauriModule:"App",message:{cmd:"getAppName"}})}async function to(){return T({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function no(){return T({__tauriModule:"App",message:{cmd:"show"}})}async function io(){return T({__tauriModule:"App",message:{cmd:"hide"}})}var Zo={};ke(Zo,{exit:()=>lo,relaunch:()=>el});async function lo(e=0){return T({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function el(){return T({__tauriModule:"Process",message:{cmd:"relaunch"}})}function xo(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,S,D,N,O,j,W,C,A,E,M,H;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +`;async function to(){return T({__tauriModule:"Os",message:{cmd:"platform"}})}async function Ko(){return T({__tauriModule:"Os",message:{cmd:"version"}})}async function Qo(){return T({__tauriModule:"Os",message:{cmd:"osType"}})}async function Zo(){return T({__tauriModule:"Os",message:{cmd:"arch"}})}async function $o(){return T({__tauriModule:"Os",message:{cmd:"tempdir"}})}async function xo(){return T({__tauriModule:"Os",message:{cmd:"locale"}})}var ea={};ke(ea,{getName:()=>io,getTauriVersion:()=>lo,getVersion:()=>no,hide:()=>oo,show:()=>so});async function no(){return T({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function io(){return T({__tauriModule:"App",message:{cmd:"getAppName"}})}async function lo(){return T({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function so(){return T({__tauriModule:"App",message:{cmd:"show"}})}async function oo(){return T({__tauriModule:"App",message:{cmd:"hide"}})}var ta={};ke(ta,{exit:()=>ao,relaunch:()=>el});async function ao(e=0){return T({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function el(){return T({__tauriModule:"Process",message:{cmd:"relaunch"}})}function na(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b,A,D,N,O,U,P,C,S,z,k,j;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration - tests.`,n=m(),i=a("br"),l=m(),o=a("br"),u=m(),d=a("pre"),c=z("App name: "),f=a("code"),g=z(e[2]),k=z(` -App version: `),_=a("code"),v=z(e[0]),y=z(` -Tauri version: `),b=a("code"),S=z(e[1]),D=z(` -`),N=m(),O=a("br"),j=m(),W=a("div"),C=a("button"),C.textContent="Close application",A=m(),E=a("button"),E.textContent="Relaunch application",r(C,"class","btn"),r(E,"class","btn"),r(W,"class","flex flex-wrap gap-1 shadow-")},m(U,J){h(U,t,J),h(U,n,J),h(U,i,J),h(U,l,J),h(U,o,J),h(U,u,J),h(U,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,v),s(d,y),s(d,b),s(b,S),s(d,D),h(U,N,J),h(U,O,J),h(U,j,J),h(U,W,J),s(W,C),s(W,A),s(W,E),M||(H=[L(C,"click",e[3]),L(E,"click",e[4])],M=!0)},p(U,[J]){J&4&&Q(g,U[2]),J&1&&Q(v,U[0]),J&2&&Q(S,U[1])},i:G,o:G,d(U){U&&p(t),U&&p(n),U&&p(i),U&&p(l),U&&p(o),U&&p(u),U&&p(d),U&&p(N),U&&p(O),U&&p(j),U&&p(W),M=!1,oe(H)}}}function ea(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";eo().then(c=>{n(2,o=c)}),xs().then(c=>{n(0,i=c)}),to().then(c=>{n(1,l=c)});async function u(){await lo()}async function d(){await el()}return[i,l,o,u,d]}class ta extends ye{constructor(t){super(),ge(this,t,ea,xo,pe,{})}}var na={};ke(na,{getMatches:()=>so});async function so(){return T({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function ia(e){let t,n,i,l,o,u,d,c,f,g,k,_,v;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: + tests.`,n=h(),i=a("br"),l=h(),o=a("br"),u=h(),d=a("pre"),c=E("App name: "),f=a("code"),y=E(e[2]),M=E(` +App version: `),_=a("code"),g=E(e[0]),v=E(` +Tauri version: `),b=a("code"),A=E(e[1]),D=E(` +`),N=h(),O=a("br"),U=h(),P=a("div"),C=a("button"),C.textContent="Close application",S=h(),z=a("button"),z.textContent="Relaunch application",r(C,"class","btn"),r(z,"class","btn"),r(P,"class","flex flex-wrap gap-1 shadow-")},m(I,X){m(I,t,X),m(I,n,X),m(I,i,X),m(I,l,X),m(I,o,X),m(I,u,X),m(I,d,X),s(d,c),s(d,f),s(f,y),s(d,M),s(d,_),s(_,g),s(d,v),s(d,b),s(b,A),s(d,D),m(I,N,X),m(I,O,X),m(I,U,X),m(I,P,X),s(P,C),s(P,S),s(P,z),k||(j=[L(C,"click",e[3]),L(z,"click",e[4])],k=!0)},p(I,[X]){X&4&&$(y,I[2]),X&1&&$(g,I[0]),X&2&&$(A,I[1])},i:J,o:J,d(I){I&&p(t),I&&p(n),I&&p(i),I&&p(l),I&&p(o),I&&p(u),I&&p(d),I&&p(N),I&&p(O),I&&p(U),I&&p(P),k=!1,re(j)}}}function ia(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";io().then(c=>{n(2,o=c)}),no().then(c=>{n(0,i=c)}),lo().then(c=>{n(1,l=c)});async function u(){await ao()}async function d(){await el()}return[i,l,o,u,d]}class la extends ye{constructor(t){super(),ge(this,t,ia,na,me,{})}}var sa={};ke(sa,{getMatches:()=>ro});async function ro(){return T({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function oa(e){let t,n,i,l,o,u,d,c,f,y,M,_,g;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
   --theme <light|dark|system>
   --verbose
- Additionally, it has a update --background subcommand.`,n=m(),i=a("br"),l=m(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=m(),d=a("br"),c=m(),f=a("br"),g=m(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(y,b){h(y,t,b),h(y,n,b),h(y,i,b),h(y,l,b),h(y,o,b),h(y,u,b),h(y,d,b),h(y,c,b),h(y,f,b),h(y,g,b),h(y,k,b),_||(v=L(k,"click",e[0]),_=!0)},p:G,i:G,o:G,d(y){y&&p(t),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),y&&p(c),y&&p(f),y&&p(g),y&&p(k),_=!1,v()}}}function la(e,t,n){let{onMessage:i}=t;function l(){so().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class sa extends ye{constructor(t){super(),ge(this,t,la,ia,pe,{onMessage:1})}}function oa(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),l=a("button"),l.textContent="Call Request (async) API",o=m(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){h(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:G,i:G,o:G,d(f){f&&p(t),d=!1,oe(c)}}}function aa(e,t,n){let{onMessage:i}=t,l;_t(async()=>{l=await tn("rust-event",i)}),Yi(()=>{l&&l()});function o(){ci("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){ci("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){_i("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class ra extends ye{constructor(t){super(),ge(this,t,aa,oa,pe,{onMessage:3})}}var ua={};ke(ua,{ask:()=>ao,confirm:()=>da,message:()=>ca,open:()=>tl,save:()=>oo});async function tl(e={}){return typeof e=="object"&&Object.freeze(e),T({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function oo(e={}){return typeof e=="object"&&Object.freeze(e),T({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function ca(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return T({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function ao(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return T({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function da(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return T({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}var fa={};ke(fa,{BaseDirectory:()=>en,Dir:()=>en,copyFile:()=>ba,createDir:()=>ha,exists:()=>va,readBinaryFile:()=>nl,readDir:()=>ro,readTextFile:()=>pa,removeDir:()=>_a,removeFile:()=>ga,renameFile:()=>ya,writeBinaryFile:()=>ma,writeFile:()=>Xi,writeTextFile:()=>Xi});var en=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Log=19]="Log",e[e.Temp=20]="Temp",e[e.AppConfig=21]="AppConfig",e[e.AppData=22]="AppData",e[e.AppLocalData=23]="AppLocalData",e[e.AppCache=24]="AppCache",e[e.AppLog=25]="AppLog",e))(en||{});async function pa(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function nl(e,t={}){let n=await T({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Xi(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:""},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),typeof t=="string"?i.contents=t!=null?t:"":l=t,T({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function ma(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:[]},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),t&&"dir"in t?l=t:typeof e=="string"&&(i.contents=t!=null?t:[]),T({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:l}})}async function ro(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function ha(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function _a(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function ba(e,t,n={}){return T({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function ga(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function ya(e,t,n={}){return T({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function va(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function wa(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,S,D,N,O,j,W,C,A,E;return{c(){t=a("div"),n=a("input"),i=m(),l=a("input"),o=m(),u=a("br"),d=m(),c=a("div"),f=a("input"),g=m(),k=a("label"),k.textContent="Multiple",_=m(),v=a("div"),y=a("input"),b=m(),S=a("label"),S.textContent="Directory",D=m(),N=a("br"),O=m(),j=a("button"),j.textContent="Open dialog",W=m(),C=a("button"),C.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(k,"for","dialog-multiple"),r(y,"type","checkbox"),r(y,"id","dialog-directory"),r(S,"for","dialog-directory"),r(j,"class","btn"),r(j,"id","open-dialog"),r(C,"class","btn"),r(C,"id","save-dialog")},m(M,H){h(M,t,H),s(t,n),q(n,e[0]),s(t,i),s(t,l),q(l,e[1]),h(M,o,H),h(M,u,H),h(M,d,H),h(M,c,H),s(c,f),f.checked=e[2],s(c,g),s(c,k),h(M,_,H),h(M,v,H),s(v,y),y.checked=e[3],s(v,b),s(v,S),h(M,D,H),h(M,N,H),h(M,O,H),h(M,j,H),h(M,W,H),h(M,C,H),A||(E=[L(n,"input",e[8]),L(l,"input",e[9]),L(f,"change",e[10]),L(y,"change",e[11]),L(j,"click",e[4]),L(C,"click",e[5])],A=!0)},p(M,[H]){H&1&&n.value!==M[0]&&q(n,M[0]),H&2&&l.value!==M[1]&&q(l,M[1]),H&4&&(f.checked=M[2]),H&8&&(y.checked=M[3])},i:G,o:G,d(M){M&&p(t),M&&p(o),M&&p(u),M&&p(d),M&&p(c),M&&p(_),M&&p(v),M&&p(D),M&&p(N),M&&p(O),M&&p(j),M&&p(W),M&&p(C),A=!1,oe(E)}}}function ka(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){const o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function Ma(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){tl({title:"My wonderful open dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:d,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{const S=b,D=S.match(/\S+\.\S+$/g);nl(S).then(function(N){D&&(S.includes(".png")||S.includes(".jpg"))?ka(new Uint8Array(N),function(O){const j="data:image/png;base64,"+O;l('')}):i(b)}).catch(i(b))}}).catch(i)}function g(){oo({title:"My wonderful save dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function k(){o=this.value,n(0,o)}function _(){u=this.value,n(1,u)}function v(){d=this.checked,n(2,d)}function y(){c=this.checked,n(3,c)}return e.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,l=b.insecureRenderHtml)},[o,u,d,c,f,g,i,l,k,_,v,y]}class Ca extends ye{constructor(t){super(),ge(this,t,Ma,wa,pe,{onMessage:6,insecureRenderHtml:7})}}function os(e,t,n){const i=e.slice();return i[9]=t[n],i}function as(e){let t,n=e[9][0]+"",i;return{c(){t=a("option"),i=z(n),t.__value=e[9][1],t.value=t.__value},m(l,o){h(l,t,o),s(t,i)},p:G,d(l){l&&p(t)}}}function Ta(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,S,D,N,O,j=e[2],W=[];for(let C=0;CisNaN(parseInt(_))).map(_=>[_,en[_]]);function c(){const _=o.match(/\S+\.\S+$/g),v={dir:rs()};(_?nl(o,v):ro(o,v)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))Aa(new Uint8Array(b),function(S){const D="data:image/png;base64,"+S;l('')});else{const S=String.fromCharCode.apply(null,b);l(''),setTimeout(()=>{const D=document.getElementById("file-response");D.value=S,document.getElementById("file-save").addEventListener("click",function(){Xi(o,D.value,{dir:rs()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=Hs(o),u)}function g(){o=this.value,n(0,o)}function k(_){ri[_?"unshift":"push"](()=>{u=_,n(1,u)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,l=_.insecureRenderHtml)},[o,u,d,c,f,i,l,g,k]}class La extends ye{constructor(t){super(),ge(this,t,Sa,Ta,pe,{onMessage:5,insecureRenderHtml:6})}}var za={};ke(za,{Body:()=>at,Client:()=>co,Response:()=>uo,ResponseType:()=>il,fetch:()=>Wa,getClient:()=>fi});var il=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(il||{});async function Ea(e){let t={},n=async(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:Array.from(new Uint8Array(await l.arrayBuffer())),mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)await n(i,l);else for(let[i,l]of Object.entries(e))await n(i,l);return t}var at=class{constructor(e,t){this.type=e,this.payload=t}static form(e){return new at("Form",e)}static json(e){return new at("Json",e)}static text(e){return new at("Text",e)}static bytes(e){return new at("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},uo=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},co=class{constructor(e){this.id=e}async drop(){return T({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){var n;let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),((n=e.body)==null?void 0:n.type)==="Form"&&(e.body.payload=await Ea(e.body.payload)),T({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(i=>{let l=new uo(i);if(t){try{l.data=JSON.parse(l.data)}catch(o){if(l.ok&&l.data==="")l.data={};else if(l.ok)throw Error(`Failed to parse response \`${l.data}\` as JSON: ${o}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return l}return l})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function fi(e){return T({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new co(t))}var Bi=null;async function Wa(e,t){var n;return Bi===null&&(Bi=await fi()),Bi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function us(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function cs(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,S,D,N=e[5],O=[];for(let A=0;AHe(O[A],1,1,()=>{O[A]=null});let W=!e[3]&&ms(),C=!e[3]&&e[8]&&hs();return{c(){t=a("span"),n=a("span"),i=z(e[6]),l=m(),o=a("ul");for(let A=0;A{g[y]=null}),hi(),o=g[l],o?o.p(_,v):(o=g[l]=f[l](_),o.c()),Te(o,1),o.m(t,u))},i(_){d||(Te(o),d=!0)},o(_){He(o),d=!1},d(_){_&&p(t),c&&c.d(),g[l].d()}}}function ms(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function hs(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Oa(e){let t,n,i=e[5].length&&cs(e);return{c(){i&&i.c(),t=pi()},m(l,o){i&&i.m(l,o),h(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Te(i,1)):(i=cs(l),i.c(),Te(i,1),i.m(t.parentNode,t)):i&&(mi(),He(i,1,1,()=>{i=null}),hi())},i(l){n||(Te(i),n=!0)},o(l){He(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const Ra="...";function Na(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=b=>b===null?"null":typeof b;let c,f,g,k,_;const v=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},y=()=>{n(8,_=!_)};return e.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_lvl"in b&&n(2,o=b._lvl),"_last"in b&&n(3,u=b._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,g=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(b,"class","btn"),r(b,"id","make-request"),r(C,"class","input"),r(E,"class","input"),r(W,"class","flex gap-2 children:grow"),r(x,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(P,V){h(P,t,V),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),It(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,v),s(t,y),s(t,b),h(P,S,V),h(P,D,V),h(P,N,V),h(P,O,V),h(P,j,V),h(P,W,V),s(W,C),q(C,e[2]),s(W,A),s(W,E),q(E,e[3]),h(P,M,V),h(P,H,V),h(P,U,V),h(P,J,V),s(J,x),x.checked=e[5],s(J,me),h(P,te,V),h(P,Y,V),h(P,de,V),h(P,Z,V),h(P,I,V),h(P,X,V),h(P,$,V),h(P,ae,V),h(P,ne,V),h(P,he,V),h(P,_e,V),Zt(fe,P,V),re=!0,Ae||(Se=[L(n,"change",e[9]),L(k,"input",e[10]),L(t,"submit",ai(e[6])),L(C,"input",e[11]),L(E,"input",e[12]),L(x,"change",e[13]),L(X,"click",e[7])],Ae=!0)},p(P,[V]){V&1&&It(n,P[0]),V&2&&q(k,P[1]),V&4&&C.value!==P[2]&&q(C,P[2]),V&8&&E.value!==P[3]&&q(E,P[3]),V&32&&(x.checked=P[5]);const Le={};V&16&&(Le.json=P[4]),fe.$set(Le)},i(P){re||(Te(fe.$$.fragment,P),re=!0)},o(P){He(fe.$$.fragment,P),re=!1},d(P){P&&p(t),P&&p(S),P&&p(D),P&&p(N),P&&p(O),P&&p(j),P&&p(W),P&&p(M),P&&p(H),P&&p(U),P&&p(J),P&&p(te),P&&p(Y),P&&p(de),P&&p(Z),P&&p(I),P&&p(X),P&&p($),P&&p(ae),P&&p(ne),P&&p(he),P&&p(_e),xt(fe,P),Ae=!1,oe(Se)}}}function Fa(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const D=await fi().catch(j=>{throw o(j),j}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=at.json(JSON.parse(l)):l!==""&&(O.body=at.text(l)),D.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const D=await fi().catch(N=>{throw o(N),N});n(4,f=await D.request({url:"http://localhost:3003",method:"POST",body:at.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:il.Text}))}function _(){i=Gi(this),n(0,i)}function v(){l=this.value,n(1,l)}function y(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function S(){g=this.checked,n(5,g)}return e.$$set=D=>{"onMessage"in D&&n(8,o=D.onMessage)},[i,l,d,c,f,g,u,k,o,_,v,y,b,S]}class Ha extends ye{constructor(t){super(),ge(this,t,Fa,Ia,pe,{onMessage:8})}}var ja={};ke(ja,{isPermissionGranted:()=>Ua,requestPermission:()=>qa,sendNotification:()=>po});async function Ua(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):T({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function qa(){return window.Notification.requestPermission()}function po(e){typeof e=="string"?new window.Notification(e):new window.Notification(e.title,e)}function Ba(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){h(l,t,o),n||(i=L(t,"click",e[0]),n=!0)},p:G,i:G,o:G,d(l){l&&p(t),n=!1,i()}}}function Ga(e,t,n){let{onMessage:i}=t;async function l(){po({title:"Notification title",body:"This is the notification body",sound:"default"})}function o(){Notification.permission==="default"?Notification.requestPermission().then(function(u){u==="granted"?l():i("Permission is "+u)}).catch(i):Notification.permission==="granted"?l():i("Permission is denied")}return e.$$set=u=>{"onMessage"in u&&n(1,i=u.onMessage)},[o,i]}class Va extends ye{constructor(t){super(),ge(this,t,Ga,Ba,pe,{onMessage:1})}}function _s(e,t,n){const i=e.slice();return i[75]=t[n],i}function bs(e,t,n){const i=e.slice();return i[78]=t[n],i}function gs(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[43].call(i))},m(f,g){h(f,t,g),h(f,n,g),h(f,i,g),s(i,l);for(let k=0;ke[65].call(Ge)),r(nt,"class","input"),r(nt,"type","number"),r(it,"class","input"),r(it,"type","number"),r(Be,"class","flex gap-2"),r(lt,"class","input grow"),r(lt,"id","title"),r(Jt,"class","btn"),r(Jt,"type","submit"),r(mt,"class","flex gap-1"),r(st,"class","input grow"),r(st,"id","url"),r(Xt,"class","btn"),r(Xt,"id","open-url"),r(ht,"class","flex gap-1"),r(pt,"class","flex flex-col gap-1")},m(w,R){h(w,t,R),h(w,n,R),h(w,i,R),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),h(w,v,R),h(w,y,R),h(w,b,R),h(w,S,R),s(S,D),s(D,N),s(D,O),O.checked=e[6],s(S,j),s(S,W),s(W,C),s(W,A),A.checked=e[2],s(S,E),s(S,M),s(M,H),s(M,U),U.checked=e[3],s(S,J),s(S,x),s(x,me),s(x,te),te.checked=e[4],s(S,Y),s(S,de),s(de,Z),s(de,I),I.checked=e[5],s(S,X),s(S,$),s($,ae),s($,ne),ne.checked=e[7],s(S,he),s(S,_e),s(_e,fe),s(_e,re),re.checked=e[8],s(S,Ae),s(S,Se),s(Se,P),s(Se,V),V.checked=e[9],s(S,Le),s(S,ve),s(ve,ue),s(ve,we),we.checked=e[10],h(w,ie,R),h(w,ze,R),h(w,Je,R),h(w,le,R),s(le,ee),s(ee,F),s(F,ce),s(F,B),q(B,e[17]),s(ee,Ie),s(ee,kt),s(kt,nn),s(kt,Pe),q(Pe,e[18]),s(le,ln),s(le,Xe),s(Xe,Mt),s(Mt,sn),s(Mt,De),q(De,e[11]),s(Xe,on),s(Xe,Ct),s(Ct,an),s(Ct,Oe),q(Oe,e[12]),s(le,rn),s(le,Ye),s(Ye,Tt),s(Tt,un),s(Tt,Fe),q(Fe,e[13]),s(Ye,K),s(Ye,rt),s(rt,Ht),s(rt,Re),q(Re,e[14]),s(le,jt),s(le,je),s(je,ut),s(ut,Ut),s(ut,Ee),q(Ee,e[15]),s(je,qt),s(je,ct),s(ct,Bt),s(ct,We),q(We,e[16]),h(w,At,R),h(w,St,R),h(w,Lt,R),h(w,Ce,R),s(Ce,Ue),s(Ue,Ne),s(Ne,dt),s(Ne,Gt),s(Ne,ft),s(ft,cn),s(ft,bi),s(Ne,sl),s(Ne,fn),s(fn,ol),s(fn,gi),s(Ue,al),s(Ue,$e),s($e,mn),s($e,rl),s($e,hn),s(hn,ul),s(hn,yi),s($e,cl),s($e,bn),s(bn,dl),s(bn,vi),s(Ce,fl),s(Ce,zt),s(zt,Ke),s(Ke,yn),s(Ke,pl),s(Ke,vn),s(vn,ml),s(vn,wi),s(Ke,hl),s(Ke,kn),s(kn,_l),s(kn,ki),s(zt,bl),s(zt,Qe),s(Qe,Cn),s(Qe,gl),s(Qe,Tn),s(Tn,yl),s(Tn,Mi),s(Qe,vl),s(Qe,Sn),s(Sn,wl),s(Sn,Ci),s(Ce,kl),s(Ce,Et),s(Et,Ze),s(Ze,zn),s(Ze,Ml),s(Ze,En),s(En,Cl),s(En,Ti),s(Ze,Tl),s(Ze,Pn),s(Pn,Al),s(Pn,Ai),s(Et,Sl),s(Et,xe),s(xe,On),s(xe,Ll),s(xe,Rn),s(Rn,zl),s(Rn,Si),s(xe,El),s(xe,In),s(In,Wl),s(In,Li),s(Ce,Pl),s(Ce,Wt),s(Wt,et),s(et,Hn),s(et,Dl),s(et,jn),s(jn,Ol),s(jn,zi),s(et,Rl),s(et,qn),s(qn,Nl),s(qn,Ei),s(Wt,Il),s(Wt,tt),s(tt,Gn),s(tt,Fl),s(tt,Vn),s(Vn,Hl),s(Vn,Wi),s(tt,jl),s(tt,Xn),s(Xn,Ul),s(Xn,Pi),h(w,Di,R),h(w,Oi,R),h(w,Ri,R),h(w,Vt,R),h(w,Ni,R),h(w,qe,R),s(qe,$n),s($n,Pt),Pt.checked=e[19],s($n,ql),s(qe,Bl),s(qe,Kn),s(Kn,Dt),Dt.checked=e[20],s(Kn,Gl),s(qe,Vl),s(qe,Qn),s(Qn,Ot),Ot.checked=e[24],s(Qn,Jl),h(w,Ii,R),h(w,Be,R),s(Be,Zn),s(Zn,Xl),s(Zn,Ge);for(let be=0;be=1,g,k,_,v=f&&gs(e),y=e[1][e[0]]&&vs(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=m(),o=a("button"),o.textContent="New window",u=m(),d=a("br"),c=m(),v&&v.c(),g=m(),y&&y.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(b,S){h(b,t,S),s(t,n),s(n,i),q(i,e[25]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),v&&v.m(t,null),s(t,g),y&&y.m(t,null),k||(_=[L(i,"input",e[42]),L(o,"click",e[39])],k=!0)},p(b,S){S[0]&33554432&&i.value!==b[25]&&q(i,b[25]),S[0]&2&&(f=Object.keys(b[1]).length>=1),f?v?v.p(b,S):(v=gs(b),v.c(),v.m(t,g)):v&&(v.d(1),v=null),b[1][b[0]]?y?y.p(b,S):(y=vs(b),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i:G,o:G,d(b){b&&p(t),v&&v.d(),y&&y.d(),k=!1,oe(_)}}}function Xa(e,t,n){let i=Ve.label;const l={[Ve.label]:Ve},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,g=!0,k=!0,_=!0,v=!1,y=!0,b=!1,S=!0,D=!1,N=null,O=null,j=null,W=null,C=null,A=null,E=null,M=null,H=1,U=new ot(E,M),J=new ot(E,M),x=new gt(N,O),me=new gt(N,O),te,Y,de=!1,Z=!0,I=null,X=null,$="default",ae=!1,ne="Awesome Tauri Example!";function he(){Ki(c)}function _e(){l[i].setTitle(ne)}function fe(){l[i].hide(),setTimeout(l[i].show,2e3)}function re(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function Ae(){tl({multiple:!1}).then(K=>{typeof K=="string"&&l[i].setIcon(K)})}function Se(){if(!d)return;const K=new wt(d);n(1,l[d]=K,l),K.once("tauri://error",function(){u("Error creating new webview")})}function P(){l[i].innerSize().then(K=>{n(30,x=K),n(11,N=x.width),n(12,O=x.height)}),l[i].outerSize().then(K=>{n(31,me=K)})}function V(){l[i].innerPosition().then(K=>{n(28,U=K)}),l[i].outerPosition().then(K=>{n(29,J=K),n(17,E=J.x),n(18,M=J.y)})}async function Le(K){!K||(te&&te(),Y&&Y(),Y=await K.listen("tauri://move",V),te=await K.listen("tauri://resize",P))}async function ve(){await l[i].minimize(),await l[i].requestUserAttention(Zi.Critical),await new Promise(K=>setTimeout(K,3e3)),await l[i].requestUserAttention(null)}function ue(){d=this.value,n(25,d)}function we(){i=Gi(this),n(0,i),n(1,l)}const ie=()=>l[i].center();function ze(){v=this.checked,n(6,v)}function Je(){f=this.checked,n(2,f)}function le(){g=this.checked,n(3,g)}function ee(){k=this.checked,n(4,k)}function F(){_=this.checked,n(5,_)}function ce(){y=this.checked,n(7,y)}function B(){b=this.checked,n(8,b)}function Ie(){S=this.checked,n(9,S)}function kt(){D=this.checked,n(10,D)}function nn(){E=se(this.value),n(17,E)}function Pe(){M=se(this.value),n(18,M)}function ln(){N=se(this.value),n(11,N)}function Xe(){O=se(this.value),n(12,O)}function Mt(){j=se(this.value),n(13,j)}function sn(){W=se(this.value),n(14,W)}function De(){C=se(this.value),n(15,C)}function on(){A=se(this.value),n(16,A)}function Ct(){de=this.checked,n(19,de)}function an(){Z=this.checked,n(20,Z)}function Oe(){ae=this.checked,n(24,ae)}function rn(){$=Gi(this),n(23,$),n(33,o)}function Ye(){I=se(this.value),n(21,I)}function Tt(){X=se(this.value),n(22,X)}function un(){ne=this.value,n(32,ne)}function Fe(){c=this.value,n(26,c)}return e.$$set=K=>{"onMessage"in K&&n(41,u=K.onMessage)},e.$$.update=()=>{var K,rt,Ht,Re,jt,je,ut,Ut,Ee,qt,ct,Bt,We,At,St,Lt,Ce,Ue,Ne,dt,Gt,ft;e.$$.dirty[0]&3&&(l[i],V(),P()),e.$$.dirty[0]&7&&((K=l[i])==null||K.setResizable(f)),e.$$.dirty[0]&11&&((rt=l[i])==null||rt.setMaximizable(g)),e.$$.dirty[0]&19&&((Ht=l[i])==null||Ht.setMinimizable(k)),e.$$.dirty[0]&35&&((Re=l[i])==null||Re.setClosable(_)),e.$$.dirty[0]&67&&(v?(jt=l[i])==null||jt.maximize():(je=l[i])==null||je.unmaximize()),e.$$.dirty[0]&131&&((ut=l[i])==null||ut.setDecorations(y)),e.$$.dirty[0]&259&&((Ut=l[i])==null||Ut.setAlwaysOnTop(b)),e.$$.dirty[0]&515&&((Ee=l[i])==null||Ee.setContentProtected(S)),e.$$.dirty[0]&1027&&((qt=l[i])==null||qt.setFullscreen(D)),e.$$.dirty[0]&6147&&N&&O&&((ct=l[i])==null||ct.setSize(new gt(N,O))),e.$$.dirty[0]&24579&&(j&&W?(Bt=l[i])==null||Bt.setMinSize(new di(j,W)):(We=l[i])==null||We.setMinSize(null)),e.$$.dirty[0]&98307&&(C>800&&A>400?(At=l[i])==null||At.setMaxSize(new di(C,A)):(St=l[i])==null||St.setMaxSize(null)),e.$$.dirty[0]&393219&&E!==null&&M!==null&&((Lt=l[i])==null||Lt.setPosition(new ot(E,M))),e.$$.dirty[0]&3&&((Ce=l[i])==null||Ce.scaleFactor().then(cn=>n(27,H=cn))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&524291&&((Ue=l[i])==null||Ue.setCursorGrab(de)),e.$$.dirty[0]&1048579&&((Ne=l[i])==null||Ne.setCursorVisible(Z)),e.$$.dirty[0]&8388611&&((dt=l[i])==null||dt.setCursorIcon($)),e.$$.dirty[0]&6291459&&I!==null&&X!==null&&((Gt=l[i])==null||Gt.setCursorPosition(new ot(I,X))),e.$$.dirty[0]&16777219&&((ft=l[i])==null||ft.setIgnoreCursorEvents(ae))},[i,l,f,g,k,_,v,y,b,S,D,N,O,j,W,C,A,E,M,de,Z,I,X,$,ae,d,c,H,U,J,x,me,ne,o,he,_e,fe,re,Ae,Se,ve,u,ue,we,ie,ze,Je,le,ee,F,ce,B,Ie,kt,nn,Pe,ln,Xe,Mt,sn,De,on,Ct,an,Oe,rn,Ye,Tt,un,Fe]}class Ya extends ye{constructor(t){super(),ge(this,t,Xa,Ja,pe,{onMessage:41},null,[-1,-1,-1])}}var $a={};ke($a,{isRegistered:()=>Qa,register:()=>mo,registerAll:()=>Ka,unregister:()=>ho,unregisterAll:()=>_o});async function mo(e,t){return T({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:vt(t)}})}async function Ka(e,t){return T({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:vt(t)}})}async function Qa(e){return T({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function ho(e){return T({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function _o(){return T({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function ks(e,t,n){const i=e.slice();return i[9]=t[n],i}function Ms(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=z(n),l=m(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,g){h(f,t,g),s(t,i),s(t,l),s(t,o),u||(d=L(o,"click",c),u=!0)},p(f,g){e=f,g&2&&n!==(n=e[9]+"")&&Q(i,n)},d(f){f&&p(t),u=!1,d()}}}function Cs(e){let t,n,i,l,o;return{c(){t=a("br"),n=m(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){h(u,t,d),h(u,n,d),h(u,i,d),l||(o=L(i,"click",e[5]),l=!0)},p:G,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function Za(e){let t,n,i,l,o,u,d,c,f,g,k,_=e[1],v=[];for(let b=0;b<_.length;b+=1)v[b]=Ms(ks(e,_,b));let y=e[1].length>1&&Cs(e);return{c(){t=a("div"),n=a("input"),i=m(),l=a("button"),l.textContent="Register",o=m(),u=a("br"),d=m(),c=a("div");for(let b=0;b1?y?y.p(b,S):(y=Cs(b),y.c(),y.m(c,null)):y&&(y.d(1),y=null)},i:G,o:G,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),yt(v,b),y&&y.d(),g=!1,oe(k)}}}function xa(e,t,n){let i,{onMessage:l}=t;const o=Fs([]);Rs(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;mo(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(v=>[...v,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const v=_;ho(v).then(()=>{o.update(y=>y.filter(b=>b!==v)),l(`Shortcut ${v} unregistered`)}).catch(l)}function f(){_o().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function g(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,g,k]}class er extends ye{constructor(t){super(),ge(this,t,xa,Za,pe,{onMessage:6})}}function Ts(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=m(),i=a("input"),l=m(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){h(c,t,f),h(c,n,f),h(c,i,f),q(i,e[4]),h(c,l,f),h(c,o,f),u||(d=[L(i,"input",e[14]),L(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,oe(d)}}}function tr(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,S,D,N,O,j,W,C,A,E,M=e[5]&&Ts(e);return{c(){t=a("div"),n=a("div"),i=z(`Script: - `),l=a("input"),o=m(),u=a("div"),d=z(`Encoding: - `),c=a("input"),f=m(),g=a("div"),k=z(`Working directory: - `),_=a("input"),v=m(),y=a("div"),b=z(`Arguments: - `),S=a("input"),D=m(),N=a("div"),O=a("button"),O.textContent="Run",j=m(),W=a("button"),W.textContent="Kill",C=m(),M&&M.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(_,"class","grow input"),r(_,"placeholder","Working directory"),r(g,"class","flex items-center gap-1"),r(S,"class","grow input"),r(S,"placeholder","Environment variables"),r(y,"class","flex items-center gap-1"),r(O,"class","btn"),r(W,"class","btn"),r(N,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(H,U){h(H,t,U),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,g),s(g,k),s(g,_),q(_,e[1]),s(t,v),s(t,y),s(y,b),s(y,S),q(S,e[2]),s(t,D),s(t,N),s(N,O),s(N,j),s(N,W),s(t,C),M&&M.m(t,null),A||(E=[L(l,"input",e[10]),L(c,"input",e[11]),L(_,"input",e[12]),L(S,"input",e[13]),L(O,"click",e[6]),L(W,"click",e[7])],A=!0)},p(H,[U]){U&1&&l.value!==H[0]&&q(l,H[0]),U&8&&c.value!==H[3]&&q(c,H[3]),U&2&&_.value!==H[1]&&q(_,H[1]),U&4&&S.value!==H[2]&&q(S,H[2]),H[5]?M?M.p(H,U):(M=Ts(H),M.c(),M.m(t,null)):M&&(M.d(1),M=null)},i:G,o:G,d(H){H&&p(t),M&&M.d(),A=!1,oe(E)}}}function nr(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",g="",k="",_;function v(){return f.split(" ").reduce((C,A)=>{let[E,M]=A.split("=");return{...C,[E]:M}},{})}function y(){n(5,_=null);const C=new $i(l,[...o,d],{cwd:c||null,env:v(),encoding:g});C.on("close",A=>{u(`command finished with code ${A.code} and signal ${A.signal}`),n(5,_=null)}),C.on("error",A=>u(`command error: "${A}"`)),C.stdout.on("data",A=>u(`command stdout: "${A}"`)),C.stderr.on("data",A=>u(`command stderr: "${A}"`)),C.spawn().then(A=>{n(5,_=A)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function S(){_.write(k).catch(u)}function D(){d=this.value,n(0,d)}function N(){g=this.value,n(3,g)}function O(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function W(){k=this.value,n(4,k)}return e.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[d,c,f,g,k,_,y,b,S,u,D,N,O,j,W]}class ir extends ye{constructor(t){super(),ge(this,t,nr,tr,pe,{onMessage:9})}}var lr={};ke(lr,{checkUpdate:()=>go,installUpdate:()=>bo,onUpdaterEvent:()=>ll});async function ll(e){return tn("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function bo(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}ll(l).then(o=>{e=o}).catch(o=>{throw t(),o}),_i("tauri://update-install").catch(o=>{throw t(),o})})}async function go(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Vs("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),ll(o).then(u=>{e=u}).catch(u=>{throw t(),u}),_i("tauri://update").catch(u=>{throw t(),u})})}function sr(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){h(n,t,i)},p:G,d(n){n&&p(t)}}}function or(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:G,d(l){l&&p(t),n=!1,i()}}}function ar(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:G,d(l){l&&p(t),n=!1,i()}}}function rr(e){let t;function n(o,u){return!o[0]&&!o[2]?ar:!o[1]&&o[2]?or:sr}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){h(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:G,o:G,d(o){o&&p(t),l.d()}}}function ur(e,t,n){let{onMessage:i}=t,l;_t(async()=>{l=await tn("tauri://update-status",i)}),Yi(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:g,manifest:k}=await go();i(`Should update: ${g}`),i(k),n(2,d=g)}catch(g){i(g)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await bo(),i("Installation complete, restart required."),await el()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[o,u,d,c,f,i]}class cr extends ye{constructor(t){super(),ge(this,t,ur,rr,pe,{onMessage:5})}}var dr={};ke(dr,{readText:()=>vo,writeText:()=>yo});async function yo(e){return T({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function vo(){return T({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function fr(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=m(),l=a("button"),l.textContent="Write",o=m(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,g){h(f,t,g),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"input",e[4]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p(f,[g]){g&1&&n.value!==f[0]&&q(n,f[0])},i:G,o:G,d(f){f&&p(t),d=!1,oe(c)}}}function pr(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){yo(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){vo().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class mr extends ye{constructor(t){super(),ge(this,t,pr,fr,pe,{onMessage:3})}}function hr(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,r(t,"class","flex flex-col gap-2")},m(n,i){h(n,t,i)},p:G,i:G,o:G,d(n){n&&p(t)}}}function _r(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return _t(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Yi(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class br extends ye{constructor(t){super(),ge(this,t,_r,hr,pe,{onMessage:0})}}function gr(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){h(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:G,i:G,o:G,d(d){d&&p(t),o=!1,oe(u)}}}function yr(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{no().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return io().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class vr extends ye{constructor(t){super(),ge(this,t,yr,gr,pe,{onMessage:2})}}function As(e,t,n){const i=e.slice();return i[32]=t[n],i}function Ss(e,t,n){const i=e.slice();return i[35]=t[n],i}function Ls(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b;function S(C,A){return C[3]?kr:wr}let D=S(e),N=D(e);function O(C,A){return C[2]?Cr:Mr}let j=O(e),W=j(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),l=a("span"),o=a("span"),N.c(),d=m(),c=a("span"),c.innerHTML='
',f=m(),g=a("span"),W.c(),_=m(),v=a("span"),v.innerHTML='
',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(v,"title","Close"),r(v,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(C,A){h(C,t,A),s(t,n),s(t,i),s(t,l),s(l,o),N.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),W.m(g,null),s(l,_),s(l,v),y||(b=[L(o,"click",e[12]),L(c,"click",e[9]),L(g,"click",e[10]),L(v,"click",e[11])],y=!0)},p(C,A){D!==(D=S(C))&&(N.d(1),N=D(C),N&&(N.c(),N.m(o,null))),A[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),j!==(j=O(C))&&(W.d(1),W=j(C),W&&(W.c(),W.m(g,null))),A[0]&4&&k!==(k=C[2]?"Restore":"Maximize")&&r(g,"title",k)},d(C){C&&p(t),N.d(),W.d(),y=!1,oe(b)}}}function wr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function kr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Mr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Cr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Tr(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Ar(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function zs(e){let t,n,i,l,o,u,d,c,f;function g(v,y){return v[3]?Lr:Sr}let k=g(e),_=k(e);return{c(){t=a("a"),_.c(),n=m(),i=a("br"),l=m(),o=a("div"),u=m(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(v,y){h(v,t,y),_.m(t,null),h(v,n,y),h(v,i,y),h(v,l,y),h(v,o,y),h(v,u,y),h(v,d,y),c||(f=L(t,"click",e[12]),c=!0)},p(v,y){k!==(k=g(v))&&(_.d(1),_=k(v),_&&(_.c(),_.m(t,null)))},d(v){v&&p(t),_.d(),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),c=!1,f()}}}function Sr(e){let t,n;return{c(){t=z(`Switch to Dark mode - `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Lr(e){let t,n;return{c(){t=z(`Switch to Light mode - `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function zr(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function g(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=m(),l=a("p"),u=z(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(k,_){h(k,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",g),c=!0)},p(k,_){e=k,_[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function Es(e){let t,n=e[35]&&zr(e);return{c(){n&&n.c(),t=pi()},m(i,l){n&&n.m(i,l),h(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function Ws(e){let t,n=e[32].html+"",i;return{c(){t=new Lo(!1),i=pi(),t.a=i},m(l,o){t.m(n,l,o),h(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function Er(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,S,D,N,O,j,W,C,A,E,M,H,U=e[1].label+"",J,x,me,te,Y,de,Z,I,X,$,ae,ne,he,_e,fe,re,Ae,Se,P=e[5]&&Ls(e);function V(F,ce){return F[0]?Ar:Tr}let Le=V(e),ve=Le(e),ue=!e[5]&&zs(e),we=e[7],ie=[];for(let F=0;F`,k=m(),_=a("a"),_.innerHTML=`GitHub - `,v=m(),y=a("a"),y.innerHTML=`Source - `,b=m(),S=a("br"),D=m(),N=a("div"),O=m(),j=a("br"),W=m(),C=a("div");for(let F=0;F',_e=m(),fe=a("div");for(let F=0;F{xt(B,1)}),hi()}ze?(Y=new ze(Je(F)),ui(Y.$$.fragment),Te(Y.$$.fragment,1),Zt(Y,te,null)):Y=null}if(ce[0]&64){le=F[6];let B;for(B=0;B{await confirm("Are you sure?")||I.preventDefault()}),Ve.onFileDropEvent(I=>{D(`File drop: ${JSON.stringify(I.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:ta,icon:"i-ph-hand-waving"},{label:"Communication",component:ra,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:sa,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:Ca,icon:"i-codicon-multiple-windows"},{label:"File system",component:La,icon:"i-codicon-files"},{label:"HTTP",component:Ha,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Va,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:vr,icon:"i-codicon-hubot"},!o&&{label:"Window",component:Ya,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:er,icon:"i-codicon-record-keys"},{label:"Shell",component:ir,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:cr,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:mr,icon:"i-codicon-clippy"},{label:"WebRTC",component:br,icon:"i-ph-broadcast"}];let d=u[0];function c(I){n(1,d=I)}let f;_t(async()=>{const I=$t();n(2,f=await I.isMaximized()),tn("tauri://resize",async()=>{n(2,f=await I.isMaximized())})});function g(){$t().minimize()}async function k(){const I=$t();await I.isMaximized()?I.unmaximize():I.maximize()}let _=!1;async function v(){_||(_=await ao("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&$t().close())}let y;_t(()=>{n(3,y=localStorage&&localStorage.getItem("theme")=="dark"),Ds(y)});function b(){n(3,y=!y),Ds(y)}let S=Fs([]);Rs(e,S,I=>n(6,i=I));function D(I){S.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof I=="string"?I:JSON.stringify(I,null,1))+"
"},...X])}function N(I){S.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+I+"
"},...X])}function O(){S.update(()=>[])}let j,W,C;function A(I){C=I.clientY;const X=window.getComputedStyle(j);W=parseInt(X.height,10);const $=ne=>{const he=ne.clientY-C,_e=W-he;n(4,j.style.height=`${_e{document.removeEventListener("mouseup",ae),document.removeEventListener("mousemove",$)};document.addEventListener("mouseup",ae),document.addEventListener("mousemove",$)}let E;_t(async()=>{n(5,E=await Zs()==="win32")});let M=!1,H,U,J=!1,x=0,me=0;const te=(I,X,$)=>Math.min(Math.max(X,I),$);_t(()=>{n(18,H=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",I=>{U.contains(I.target)?n(0,M=!M):M&&!H.contains(I.target)&&n(0,M=!1)}),document.addEventListener("touchstart",I=>{if(U.contains(I.target))return;const X=I.touches[0].clientX;(0{if(J){const X=I.touches[0].clientX;me=X;const $=(X-x)/10;H.style.setProperty("--translate-x",`-${te(0,M?0-$:18.75-$,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const I=(me-x)/10;n(0,M=M?I>-(18.75/2):I>18.75/2)}J=!1})});const Y=()=>Ki("https://tauri.app/"),de=I=>{c(I),n(0,M=!1)};function Z(I){ri[I?"unshift":"push"](()=>{j=I,n(4,j)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const I=document.querySelector("#sidebar");I&&Wr(I,M)}},[M,d,f,y,j,E,i,u,c,g,k,v,b,S,D,N,O,A,H,Y,de,Z]}class Dr extends ye{constructor(t){super(),ge(this,t,Pr,Er,pe,{},null,[-1,-1])}}new Dr({target:document.querySelector("#app")}); + Additionally, it has a update --background subcommand.`,n=h(),i=a("br"),l=h(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=a("br"),c=h(),f=a("br"),y=h(),M=a("button"),M.textContent="Get matches",r(o,"class","note"),r(M,"class","btn"),r(M,"id","cli-matches")},m(v,b){m(v,t,b),m(v,n,b),m(v,i,b),m(v,l,b),m(v,o,b),m(v,u,b),m(v,d,b),m(v,c,b),m(v,f,b),m(v,y,b),m(v,M,b),_||(g=L(M,"click",e[0]),_=!0)},p:J,i:J,o:J,d(v){v&&p(t),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),v&&p(c),v&&p(f),v&&p(y),v&&p(M),_=!1,g()}}}function aa(e,t,n){let{onMessage:i}=t;function l(){ro().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class ra extends ye{constructor(t){super(),ge(this,t,aa,oa,me,{onMessage:1})}}function ua(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=h(),l=a("button"),l.textContent="Call Request (async) API",o=h(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,y){m(f,t,y),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:J,i:J,o:J,d(f){f&&p(t),d=!1,re(c)}}}function ca(e,t,n){let{onMessage:i}=t,l;bt(async()=>{l=await tn("rust-event",i)}),Yi(()=>{l&&l()});function o(){ci("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){ci("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){_i("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class da extends ye{constructor(t){super(),ge(this,t,ca,ua,me,{onMessage:3})}}var fa={};ke(fa,{ask:()=>co,confirm:()=>ma,message:()=>pa,open:()=>tl,save:()=>uo});async function tl(e={}){return typeof e=="object"&&Object.freeze(e),T({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function uo(e={}){return typeof e=="object"&&Object.freeze(e),T({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function pa(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return T({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function co(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return T({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function ma(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return T({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}var ha={};ke(ha,{BaseDirectory:()=>en,Dir:()=>en,copyFile:()=>va,createDir:()=>ga,exists:()=>Ma,readBinaryFile:()=>nl,readDir:()=>fo,readTextFile:()=>_a,removeDir:()=>ya,removeFile:()=>wa,renameFile:()=>ka,writeBinaryFile:()=>ba,writeFile:()=>Xi,writeTextFile:()=>Xi});var en=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Log=19]="Log",e[e.Temp=20]="Temp",e[e.AppConfig=21]="AppConfig",e[e.AppData=22]="AppData",e[e.AppLocalData=23]="AppLocalData",e[e.AppCache=24]="AppCache",e[e.AppLog=25]="AppLog",e))(en||{});async function _a(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function nl(e,t={}){let n=await T({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Xi(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:""},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),typeof t=="string"?i.contents=t!=null?t:"":l=t,T({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function ba(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:[]},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),t&&"dir"in t?l=t:typeof e=="string"&&(i.contents=t!=null?t:[]),T({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:l}})}async function fo(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function ga(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function ya(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function va(e,t,n={}){return T({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function wa(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function ka(e,t,n={}){return T({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function Ma(e,t={}){return T({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function Ca(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b,A,D,N,O,U,P,C,S,z;return{c(){t=a("div"),n=a("input"),i=h(),l=a("input"),o=h(),u=a("br"),d=h(),c=a("div"),f=a("input"),y=h(),M=a("label"),M.textContent="Multiple",_=h(),g=a("div"),v=a("input"),b=h(),A=a("label"),A.textContent="Directory",D=h(),N=a("br"),O=h(),U=a("button"),U.textContent="Open dialog",P=h(),C=a("button"),C.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(M,"for","dialog-multiple"),r(v,"type","checkbox"),r(v,"id","dialog-directory"),r(A,"for","dialog-directory"),r(U,"class","btn"),r(U,"id","open-dialog"),r(C,"class","btn"),r(C,"id","save-dialog")},m(k,j){m(k,t,j),s(t,n),q(n,e[0]),s(t,i),s(t,l),q(l,e[1]),m(k,o,j),m(k,u,j),m(k,d,j),m(k,c,j),s(c,f),f.checked=e[2],s(c,y),s(c,M),m(k,_,j),m(k,g,j),s(g,v),v.checked=e[3],s(g,b),s(g,A),m(k,D,j),m(k,N,j),m(k,O,j),m(k,U,j),m(k,P,j),m(k,C,j),S||(z=[L(n,"input",e[8]),L(l,"input",e[9]),L(f,"change",e[10]),L(v,"change",e[11]),L(U,"click",e[4]),L(C,"click",e[5])],S=!0)},p(k,[j]){j&1&&n.value!==k[0]&&q(n,k[0]),j&2&&l.value!==k[1]&&q(l,k[1]),j&4&&(f.checked=k[2]),j&8&&(v.checked=k[3])},i:J,o:J,d(k){k&&p(t),k&&p(o),k&&p(u),k&&p(d),k&&p(c),k&&p(_),k&&p(g),k&&p(D),k&&p(N),k&&p(O),k&&p(U),k&&p(P),k&&p(C),S=!1,re(z)}}}function Ta(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){const o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function Aa(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){tl({title:"My wonderful open dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:d,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{const A=b,D=A.match(/\S+\.\S+$/g);nl(A).then(function(N){D&&(A.includes(".png")||A.includes(".jpg"))?Ta(new Uint8Array(N),function(O){const U="data:image/png;base64,"+O;l('')}):i(b)}).catch(i(b))}}).catch(i)}function y(){uo({title:"My wonderful save dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function M(){o=this.value,n(0,o)}function _(){u=this.value,n(1,u)}function g(){d=this.checked,n(2,d)}function v(){c=this.checked,n(3,c)}return e.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,l=b.insecureRenderHtml)},[o,u,d,c,f,y,i,l,M,_,g,v]}class Sa extends ye{constructor(t){super(),ge(this,t,Aa,Ca,me,{onMessage:6,insecureRenderHtml:7})}}function os(e,t,n){const i=e.slice();return i[9]=t[n],i}function as(e){let t,n=e[9][0]+"",i;return{c(){t=a("option"),i=E(n),t.__value=e[9][1],t.value=t.__value},m(l,o){m(l,t,o),s(t,i)},p:J,d(l){l&&p(t)}}}function La(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b,A,D,N,O,U=e[2],P=[];for(let C=0;CisNaN(parseInt(_))).map(_=>[_,en[_]]);function c(){const _=o.match(/\S+\.\S+$/g),g={dir:rs()};(_?nl(o,g):fo(o,g)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))za(new Uint8Array(b),function(A){const D="data:image/png;base64,"+A;l('')});else{const A=String.fromCharCode.apply(null,b);l(''),setTimeout(()=>{const D=document.getElementById("file-response");D.value=A,document.getElementById("file-save").addEventListener("click",function(){Xi(o,D.value,{dir:rs()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=qs(o),u)}function y(){o=this.value,n(0,o)}function M(_){ri[_?"unshift":"push"](()=>{u=_,n(1,u)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,l=_.insecureRenderHtml)},[o,u,d,c,f,i,l,y,M]}class Wa extends ye{constructor(t){super(),ge(this,t,Ea,La,me,{onMessage:5,insecureRenderHtml:6})}}var Pa={};ke(Pa,{Body:()=>at,Client:()=>mo,Response:()=>po,ResponseType:()=>il,fetch:()=>Oa,getClient:()=>fi});var il=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(il||{});async function Da(e){let t={},n=async(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:Array.from(new Uint8Array(await l.arrayBuffer())),mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)await n(i,l);else for(let[i,l]of Object.entries(e))await n(i,l);return t}var at=class{constructor(e,t){this.type=e,this.payload=t}static form(e){return new at("Form",e)}static json(e){return new at("Json",e)}static text(e){return new at("Text",e)}static bytes(e){return new at("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},po=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},mo=class{constructor(e){this.id=e}async drop(){return T({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){var n;let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),((n=e.body)==null?void 0:n.type)==="Form"&&(e.body.payload=await Da(e.body.payload)),T({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(i=>{let l=new po(i);if(t){try{l.data=JSON.parse(l.data)}catch(o){if(l.ok&&l.data==="")l.data={};else if(l.ok)throw Error(`Failed to parse response \`${l.data}\` as JSON: ${o}; + try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return l}return l})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function fi(e){return T({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new mo(t))}var Bi=null;async function Oa(e,t){var n;return Bi===null&&(Bi=await fi()),Bi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function us(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function cs(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b,A,D,N=e[5],O=[];for(let S=0;SHe(O[S],1,1,()=>{O[S]=null});let P=!e[3]&&ms(),C=!e[3]&&e[8]&&hs();return{c(){t=a("span"),n=a("span"),i=E(e[6]),l=h(),o=a("ul");for(let S=0;S{y[v]=null}),hi(),o=y[l],o?o.p(_,g):(o=y[l]=f[l](_),o.c()),Te(o,1),o.m(t,u))},i(_){d||(Te(o),d=!0)},o(_){He(o),d=!1},d(_){_&&p(t),c&&c.d(),y[l].d()}}}function ms(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function hs(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Ia(e){let t,n,i=e[5].length&&cs(e);return{c(){i&&i.c(),t=pi()},m(l,o){i&&i.m(l,o),m(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Te(i,1)):(i=cs(l),i.c(),Te(i,1),i.m(t.parentNode,t)):i&&(mi(),He(i,1,1,()=>{i=null}),hi())},i(l){n||(Te(i),n=!0)},o(l){He(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const Fa="...";function Ha(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=b=>b===null?"null":typeof b;let c,f,y,M,_;const g=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},v=()=>{n(8,_=!_)};return e.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_lvl"in b&&n(2,o=b._lvl),"_last"in b&&n(3,u=b._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,y=f?"[":"{"),n(7,M=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),r(M,"class","input h-auto w-100%"),r(M,"id","request-body"),r(M,"placeholder","Request body"),r(M,"rows","5"),r(b,"class","btn"),r(b,"id","make-request"),r(C,"class","input"),r(z,"class","input"),r(P,"class","flex gap-2 children:grow"),r(K,"type","checkbox"),r(Q,"class","btn"),r(Q,"type","button")},m(W,Y){m(W,t,Y),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),It(n,e[0]),s(t,c),s(t,f),s(t,y),s(t,M),q(M,e[1]),s(t,_),s(t,g),s(t,v),s(t,b),m(W,A,Y),m(W,D,Y),m(W,N,Y),m(W,O,Y),m(W,U,Y),m(W,P,Y),s(P,C),q(C,e[2]),s(P,S),s(P,z),q(z,e[3]),m(W,k,Y),m(W,j,Y),m(W,I,Y),m(W,X,Y),s(X,K),K.checked=e[5],s(X,V),m(W,Z,Y),m(W,B,Y),m(W,ie,Y),m(W,te,Y),m(W,F,Y),m(W,Q,Y),m(W,x,Y),m(W,ue,Y),m(W,le,Y),m(W,he,Y),m(W,_e,Y),$t(pe,W,Y),ce=!0,Ae||(Se=[L(n,"change",e[9]),L(M,"input",e[10]),L(t,"submit",ai(e[6])),L(C,"input",e[11]),L(z,"input",e[12]),L(K,"change",e[13]),L(Q,"click",e[7])],Ae=!0)},p(W,[Y]){Y&1&&It(n,W[0]),Y&2&&q(M,W[1]),Y&4&&C.value!==W[2]&&q(C,W[2]),Y&8&&z.value!==W[3]&&q(z,W[3]),Y&32&&(K.checked=W[5]);const Le={};Y&16&&(Le.json=W[4]),pe.$set(Le)},i(W){ce||(Te(pe.$$.fragment,W),ce=!0)},o(W){He(pe.$$.fragment,W),ce=!1},d(W){W&&p(t),W&&p(A),W&&p(D),W&&p(N),W&&p(O),W&&p(U),W&&p(P),W&&p(k),W&&p(j),W&&p(I),W&&p(X),W&&p(Z),W&&p(B),W&&p(ie),W&&p(te),W&&p(F),W&&p(Q),W&&p(x),W&&p(ue),W&&p(le),W&&p(he),W&&p(_e),xt(pe,W),Ae=!1,re(Se)}}}function Ua(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const D=await fi().catch(U=>{throw o(U),U}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=at.json(JSON.parse(l)):l!==""&&(O.body=at.text(l)),D.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,y=!0;async function M(){const D=await fi().catch(N=>{throw o(N),N});n(4,f=await D.request({url:"http://localhost:3003",method:"POST",body:at.form({foo:d,bar:c}),headers:y?{"Content-Type":"multipart/form-data"}:void 0,responseType:il.Text}))}function _(){i=Gi(this),n(0,i)}function g(){l=this.value,n(1,l)}function v(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function A(){y=this.checked,n(5,y)}return e.$$set=D=>{"onMessage"in D&&n(8,o=D.onMessage)},[i,l,d,c,f,y,u,M,o,_,g,v,b,A]}class qa extends ye{constructor(t){super(),ge(this,t,Ua,ja,me,{onMessage:8})}}var Ba={};ke(Ba,{isPermissionGranted:()=>Ga,requestPermission:()=>Va,sendNotification:()=>_o});async function Ga(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):T({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function Va(){return window.Notification.requestPermission()}function _o(e){typeof e=="string"?new window.Notification(e):new window.Notification(e.title,e)}function Ja(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[0]),n=!0)},p:J,i:J,o:J,d(l){l&&p(t),n=!1,i()}}}function Xa(e,t,n){let{onMessage:i}=t;async function l(){_o({title:"Notification title",body:"This is the notification body",sound:"default"})}function o(){Notification.permission==="default"?Notification.requestPermission().then(function(u){u==="granted"?l():i("Permission is "+u)}).catch(i):Notification.permission==="granted"?l():i("Permission is denied")}return e.$$set=u=>{"onMessage"in u&&n(1,i=u.onMessage)},[o,i]}class Ya extends ye{constructor(t){super(),ge(this,t,Xa,Ja,me,{onMessage:1})}}function _s(e,t,n){const i=e.slice();return i[75]=t[n],i}function bs(e,t,n){const i=e.slice();return i[78]=t[n],i}function gs(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[43].call(i))},m(f,y){m(f,t,y),m(f,n,y),m(f,i,y),s(i,l);for(let M=0;Me[65].call(Ge)),r(nt,"class","input"),r(nt,"type","number"),r(it,"class","input"),r(it,"type","number"),r(Be,"class","flex gap-2"),r(lt,"class","input grow"),r(lt,"id","title"),r(Jt,"class","btn"),r(Jt,"type","submit"),r(ht,"class","flex gap-1"),r(st,"class","input grow"),r(st,"id","url"),r(Xt,"class","btn"),r(Xt,"id","open-url"),r(_t,"class","flex gap-1"),r(mt,"class","flex flex-col gap-1")},m(w,R){m(w,t,R),m(w,n,R),m(w,i,R),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,y),s(i,M),s(i,_),m(w,g,R),m(w,v,R),m(w,b,R),m(w,A,R),s(A,D),s(D,N),s(D,O),O.checked=e[6],s(A,U),s(A,P),s(P,C),s(P,S),S.checked=e[2],s(A,z),s(A,k),s(k,j),s(k,I),I.checked=e[3],s(A,X),s(A,K),s(K,V),s(K,Z),Z.checked=e[4],s(A,B),s(A,ie),s(ie,te),s(ie,F),F.checked=e[5],s(A,Q),s(A,x),s(x,ue),s(x,le),le.checked=e[7],s(A,he),s(A,_e),s(_e,pe),s(_e,ce),ce.checked=e[8],s(A,Ae),s(A,Se),s(Se,W),s(Se,Y),Y.checked=e[9],s(A,Le),s(A,ve),s(ve,de),s(ve,we),we.checked=e[10],m(w,se,R),m(w,ze,R),m(w,Je,R),m(w,oe,R),s(oe,ne),s(ne,H),s(H,fe),s(H,G),q(G,e[17]),s(ne,Ie),s(ne,kt),s(kt,nn),s(kt,Pe),q(Pe,e[18]),s(oe,ln),s(oe,Xe),s(Xe,Mt),s(Mt,sn),s(Mt,De),q(De,e[11]),s(Xe,on),s(Xe,Ct),s(Ct,an),s(Ct,Oe),q(Oe,e[12]),s(oe,rn),s(oe,Ye),s(Ye,Tt),s(Tt,un),s(Tt,Fe),q(Fe,e[13]),s(Ye,ee),s(Ye,ut),s(ut,Ht),s(ut,Re),q(Re,e[14]),s(oe,jt),s(oe,je),s(je,ct),s(ct,Ut),s(ct,Ee),q(Ee,e[15]),s(je,qt),s(je,dt),s(dt,Bt),s(dt,We),q(We,e[16]),m(w,At,R),m(w,St,R),m(w,Lt,R),m(w,Ce,R),s(Ce,Ue),s(Ue,Ne),s(Ne,ft),s(Ne,Gt),s(Ne,pt),s(pt,cn),s(pt,bi),s(Ne,sl),s(Ne,fn),s(fn,ol),s(fn,gi),s(Ue,al),s(Ue,Ke),s(Ke,mn),s(Ke,rl),s(Ke,hn),s(hn,ul),s(hn,yi),s(Ke,cl),s(Ke,bn),s(bn,dl),s(bn,vi),s(Ce,fl),s(Ce,zt),s(zt,Qe),s(Qe,yn),s(Qe,pl),s(Qe,vn),s(vn,ml),s(vn,wi),s(Qe,hl),s(Qe,kn),s(kn,_l),s(kn,ki),s(zt,bl),s(zt,Ze),s(Ze,Cn),s(Ze,gl),s(Ze,Tn),s(Tn,yl),s(Tn,Mi),s(Ze,vl),s(Ze,Sn),s(Sn,wl),s(Sn,Ci),s(Ce,kl),s(Ce,Et),s(Et,$e),s($e,zn),s($e,Ml),s($e,En),s(En,Cl),s(En,Ti),s($e,Tl),s($e,Pn),s(Pn,Al),s(Pn,Ai),s(Et,Sl),s(Et,xe),s(xe,On),s(xe,Ll),s(xe,Rn),s(Rn,zl),s(Rn,Si),s(xe,El),s(xe,In),s(In,Wl),s(In,Li),s(Ce,Pl),s(Ce,Wt),s(Wt,et),s(et,Hn),s(et,Dl),s(et,jn),s(jn,Ol),s(jn,zi),s(et,Rl),s(et,qn),s(qn,Nl),s(qn,Ei),s(Wt,Il),s(Wt,tt),s(tt,Gn),s(tt,Fl),s(tt,Vn),s(Vn,Hl),s(Vn,Wi),s(tt,jl),s(tt,Xn),s(Xn,Ul),s(Xn,Pi),m(w,Di,R),m(w,Oi,R),m(w,Ri,R),m(w,Vt,R),m(w,Ni,R),m(w,qe,R),s(qe,Kn),s(Kn,Pt),Pt.checked=e[19],s(Kn,ql),s(qe,Bl),s(qe,Qn),s(Qn,Dt),Dt.checked=e[20],s(Qn,Gl),s(qe,Vl),s(qe,Zn),s(Zn,Ot),Ot.checked=e[24],s(Zn,Jl),m(w,Ii,R),m(w,Be,R),s(Be,$n),s($n,Xl),s($n,Ge);for(let be=0;be=1,y,M,_,g=f&&gs(e),v=e[1][e[0]]&&vs(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=h(),o=a("button"),o.textContent="New window",u=h(),d=a("br"),c=h(),g&&g.c(),y=h(),v&&v.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(b,A){m(b,t,A),s(t,n),s(n,i),q(i,e[25]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),g&&g.m(t,null),s(t,y),v&&v.m(t,null),M||(_=[L(i,"input",e[42]),L(o,"click",e[39])],M=!0)},p(b,A){A[0]&33554432&&i.value!==b[25]&&q(i,b[25]),A[0]&2&&(f=Object.keys(b[1]).length>=1),f?g?g.p(b,A):(g=gs(b),g.c(),g.m(t,y)):g&&(g.d(1),g=null),b[1][b[0]]?v?v.p(b,A):(v=vs(b),v.c(),v.m(t,null)):v&&(v.d(1),v=null)},i:J,o:J,d(b){b&&p(t),g&&g.d(),v&&v.d(),M=!1,re(_)}}}function Qa(e,t,n){let i=Ve.label;const l={[Ve.label]:Ve},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,y=!0,M=!0,_=!0,g=!1,v=!0,b=!1,A=!0,D=!1,N=null,O=null,U=null,P=null,C=null,S=null,z=null,k=null,j=1,I=new ot(z,k),X=new ot(z,k),K=new yt(N,O),V=new yt(N,O),Z,B,ie=!1,te=!0,F=null,Q=null,x="default",ue=!1,le="Awesome Tauri Example!";function he(){Qi(c)}function _e(){l[i].setTitle(le)}function pe(){l[i].hide(),setTimeout(l[i].show,2e3)}function ce(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function Ae(){tl({multiple:!1}).then(ee=>{typeof ee=="string"&&l[i].setIcon(ee)})}function Se(){if(!d)return;const ee=new wt(d);n(1,l[d]=ee,l),ee.once("tauri://error",function(){u("Error creating new webview")})}function W(){l[i].innerSize().then(ee=>{n(30,K=ee),n(11,N=K.width),n(12,O=K.height)}),l[i].outerSize().then(ee=>{n(31,V=ee)})}function Y(){l[i].innerPosition().then(ee=>{n(28,I=ee)}),l[i].outerPosition().then(ee=>{n(29,X=ee),n(17,z=X.x),n(18,k=X.y)})}async function Le(ee){!ee||(Z&&Z(),B&&B(),B=await ee.listen("tauri://move",Y),Z=await ee.listen("tauri://resize",W))}async function ve(){await l[i].minimize(),await l[i].requestUserAttention($i.Critical),await new Promise(ee=>setTimeout(ee,3e3)),await l[i].requestUserAttention(null)}function de(){d=this.value,n(25,d)}function we(){i=Gi(this),n(0,i),n(1,l)}const se=()=>l[i].center();function ze(){g=this.checked,n(6,g)}function Je(){f=this.checked,n(2,f)}function oe(){y=this.checked,n(3,y)}function ne(){M=this.checked,n(4,M)}function H(){_=this.checked,n(5,_)}function fe(){v=this.checked,n(7,v)}function G(){b=this.checked,n(8,b)}function Ie(){A=this.checked,n(9,A)}function kt(){D=this.checked,n(10,D)}function nn(){z=ae(this.value),n(17,z)}function Pe(){k=ae(this.value),n(18,k)}function ln(){N=ae(this.value),n(11,N)}function Xe(){O=ae(this.value),n(12,O)}function Mt(){U=ae(this.value),n(13,U)}function sn(){P=ae(this.value),n(14,P)}function De(){C=ae(this.value),n(15,C)}function on(){S=ae(this.value),n(16,S)}function Ct(){ie=this.checked,n(19,ie)}function an(){te=this.checked,n(20,te)}function Oe(){ue=this.checked,n(24,ue)}function rn(){x=Gi(this),n(23,x),n(33,o)}function Ye(){F=ae(this.value),n(21,F)}function Tt(){Q=ae(this.value),n(22,Q)}function un(){le=this.value,n(32,le)}function Fe(){c=this.value,n(26,c)}return e.$$set=ee=>{"onMessage"in ee&&n(41,u=ee.onMessage)},e.$$.update=()=>{var ee,ut,Ht,Re,jt,je,ct,Ut,Ee,qt,dt,Bt,We,At,St,Lt,Ce,Ue,Ne,ft,Gt,pt;e.$$.dirty[0]&3&&(l[i],Y(),W()),e.$$.dirty[0]&7&&((ee=l[i])==null||ee.setResizable(f)),e.$$.dirty[0]&11&&((ut=l[i])==null||ut.setMaximizable(y)),e.$$.dirty[0]&19&&((Ht=l[i])==null||Ht.setMinimizable(M)),e.$$.dirty[0]&35&&((Re=l[i])==null||Re.setClosable(_)),e.$$.dirty[0]&67&&(g?(jt=l[i])==null||jt.maximize():(je=l[i])==null||je.unmaximize()),e.$$.dirty[0]&131&&((ct=l[i])==null||ct.setDecorations(v)),e.$$.dirty[0]&259&&((Ut=l[i])==null||Ut.setAlwaysOnTop(b)),e.$$.dirty[0]&515&&((Ee=l[i])==null||Ee.setContentProtected(A)),e.$$.dirty[0]&1027&&((qt=l[i])==null||qt.setFullscreen(D)),e.$$.dirty[0]&6147&&N&&O&&((dt=l[i])==null||dt.setSize(new yt(N,O))),e.$$.dirty[0]&24579&&(U&&P?(Bt=l[i])==null||Bt.setMinSize(new di(U,P)):(We=l[i])==null||We.setMinSize(null)),e.$$.dirty[0]&98307&&(C>800&&S>400?(At=l[i])==null||At.setMaxSize(new di(C,S)):(St=l[i])==null||St.setMaxSize(null)),e.$$.dirty[0]&393219&&z!==null&&k!==null&&((Lt=l[i])==null||Lt.setPosition(new ot(z,k))),e.$$.dirty[0]&3&&((Ce=l[i])==null||Ce.scaleFactor().then(cn=>n(27,j=cn))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&524291&&((Ue=l[i])==null||Ue.setCursorGrab(ie)),e.$$.dirty[0]&1048579&&((Ne=l[i])==null||Ne.setCursorVisible(te)),e.$$.dirty[0]&8388611&&((ft=l[i])==null||ft.setCursorIcon(x)),e.$$.dirty[0]&6291459&&F!==null&&Q!==null&&((Gt=l[i])==null||Gt.setCursorPosition(new ot(F,Q))),e.$$.dirty[0]&16777219&&((pt=l[i])==null||pt.setIgnoreCursorEvents(ue))},[i,l,f,y,M,_,g,v,b,A,D,N,O,U,P,C,S,z,k,ie,te,F,Q,x,ue,d,c,j,I,X,K,V,le,o,he,_e,pe,ce,Ae,Se,ve,u,de,we,se,ze,Je,oe,ne,H,fe,G,Ie,kt,nn,Pe,ln,Xe,Mt,sn,De,on,Ct,an,Oe,rn,Ye,Tt,un,Fe]}class Za extends ye{constructor(t){super(),ge(this,t,Qa,Ka,me,{onMessage:41},null,[-1,-1,-1])}}var $a={};ke($a,{isRegistered:()=>er,register:()=>bo,registerAll:()=>xa,unregister:()=>go,unregisterAll:()=>yo});async function bo(e,t){return T({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:vt(t)}})}async function xa(e,t){return T({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:vt(t)}})}async function er(e){return T({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function go(e){return T({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function yo(){return T({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function ks(e,t,n){const i=e.slice();return i[9]=t[n],i}function Ms(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=E(n),l=h(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,y){m(f,t,y),s(t,i),s(t,l),s(t,o),u||(d=L(o,"click",c),u=!0)},p(f,y){e=f,y&2&&n!==(n=e[9]+"")&&$(i,n)},d(f){f&&p(t),u=!1,d()}}}function Cs(e){let t,n,i,l,o;return{c(){t=a("br"),n=h(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=L(i,"click",e[5]),l=!0)},p:J,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function tr(e){let t,n,i,l,o,u,d,c,f,y,M,_=e[1],g=[];for(let b=0;b<_.length;b+=1)g[b]=Ms(ks(e,_,b));let v=e[1].length>1&&Cs(e);return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Register",o=h(),u=a("br"),d=h(),c=a("div");for(let b=0;b1?v?v.p(b,A):(v=Cs(b),v.c(),v.m(c,null)):v&&(v.d(1),v=null)},i:J,o:J,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),rt(g,b),v&&v.d(),y=!1,re(M)}}}function nr(e,t,n){let i,{onMessage:l}=t;const o=Us([]);Fs(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;bo(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(g=>[...g,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const g=_;go(g).then(()=>{o.update(v=>v.filter(b=>b!==g)),l(`Shortcut ${g} unregistered`)}).catch(l)}function f(){yo().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function y(){u=this.value,n(0,u)}const M=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,y,M]}class ir extends ye{constructor(t){super(),ge(this,t,nr,tr,me,{onMessage:6})}}function Ts(e,t,n){const i=e.slice();return i[20]=t[n],i}function As(e){let t,n,i;return{c(){t=a("button"),t.textContent="Kill",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[8]),n=!0)},p:J,d(l){l&&p(t),n=!1,i()}}}function Ss(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=h(),i=a("input"),l=h(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),q(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[L(i,"input",e[15]),L(o,"click",e[9])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,re(d)}}}function Ls(e){let t,n=e[20]+"",i;return{c(){t=a("p"),i=E(n)},m(l,o){m(l,t,o),s(t,i)},p(l,o){o&64&&n!==(n=l[20]+"")&&$(i,n)},d(l){l&&p(t)}}}function lr(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b,A,D,N,O,U,P,C,S,z,k,j=e[5]&&As(e),I=e[5]&&Ss(e),X=e[6],K=[];for(let V=0;V{let[k,j]=z.split("=");return{...S,[k]:j}},{})}function b(){n(5,_=null),n(6,g=[]);const S=new Ki(l,[...o,d],{cwd:c||null,env:v(),encoding:y||null});S.on("close",k=>{u(`command finished with code ${k.code} and signal ${k.signal}`),n(5,_=null)}),S.on("error",k=>u(`command error: "${k}"`));function z(k,j){u(`command ${j}: "${k}"`),k.endsWith(` +`)&&(k=k.substring(0,k.length-1));const I=g[g.length-1];I&&I.endsWith("\r")?n(6,g=[...g.slice(0,g.length-1),k]):n(6,g=[...g,k])}S.stdout.on("data",k=>z(k,"stdout")),S.stderr.on("data",k=>z(k,"stderr")),S.spawn().then(k=>{n(5,_=k)}).catch(u)}function A(){_.kill().then(()=>u("killed child process")).catch(u)}function D(){_.write(M).catch(u)}function N(){d=this.value,n(0,d)}function O(){y=this.value,n(3,y)}function U(){c=this.value,n(1,c)}function P(){f=this.value,n(2,f)}function C(){M=this.value,n(4,M)}return e.$$set=S=>{"onMessage"in S&&n(10,u=S.onMessage)},[d,c,f,y,M,_,g,b,A,D,u,N,O,U,P,C]}class or extends ye{constructor(t){super(),ge(this,t,sr,lr,me,{onMessage:10})}}var ar={};ke(ar,{checkUpdate:()=>wo,installUpdate:()=>vo,onUpdaterEvent:()=>ll});async function ll(e){return tn("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function vo(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}ll(l).then(o=>{e=o}).catch(o=>{throw t(),o}),_i("tauri://update-install").catch(o=>{throw t(),o})})}async function wo(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Ys("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),ll(o).then(u=>{e=u}).catch(u=>{throw t(),u}),_i("tauri://update").catch(u=>{throw t(),u})})}function rr(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:J,d(n){n&&p(t)}}}function ur(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:J,d(l){l&&p(t),n=!1,i()}}}function cr(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:J,d(l){l&&p(t),n=!1,i()}}}function dr(e){let t;function n(o,u){return!o[0]&&!o[2]?cr:!o[1]&&o[2]?ur:rr}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:J,o:J,d(o){o&&p(t),l.d()}}}function fr(e,t,n){let{onMessage:i}=t,l;bt(async()=>{l=await tn("tauri://update-status",i)}),Yi(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:y,manifest:M}=await wo();i(`Should update: ${y}`),i(M),n(2,d=y)}catch(y){i(y)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await vo(),i("Installation complete, restart required."),await el()}catch(y){i(y)}finally{n(1,u=!1)}}return e.$$set=y=>{"onMessage"in y&&n(5,i=y.onMessage)},[o,u,d,c,f,i]}class pr extends ye{constructor(t){super(),ge(this,t,fr,dr,me,{onMessage:5})}}var mr={};ke(mr,{readText:()=>Mo,writeText:()=>ko});async function ko(e){return T({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function Mo(){return T({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function hr(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Write",o=h(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,y){m(f,t,y),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"input",e[4]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p(f,[y]){y&1&&n.value!==f[0]&&q(n,f[0])},i:J,o:J,d(f){f&&p(t),d=!1,re(c)}}}function _r(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){ko(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){Mo().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class br extends ye{constructor(t){super(),ge(this,t,_r,hr,me,{onMessage:3})}}function gr(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
+ `,r(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:J,i:J,o:J,d(n){n&&p(t)}}}function yr(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return bt(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Yi(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class vr extends ye{constructor(t){super(),ge(this,t,yr,gr,me,{onMessage:0})}}function wr(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=h(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:J,i:J,o:J,d(d){d&&p(t),o=!1,re(u)}}}function kr(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{so().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return oo().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Mr extends ye{constructor(t){super(),ge(this,t,kr,wr,me,{onMessage:2})}}function zs(e,t,n){const i=e.slice();return i[32]=t[n],i}function Es(e,t,n){const i=e.slice();return i[35]=t[n],i}function Ws(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b;function A(C,S){return C[3]?Tr:Cr}let D=A(e),N=D(e);function O(C,S){return C[2]?Sr:Ar}let U=O(e),P=U(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=h(),l=a("span"),o=a("span"),N.c(),d=h(),c=a("span"),c.innerHTML='
',f=h(),y=a("span"),P.c(),_=h(),g=a("span"),g.innerHTML='
',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(y,"title",M=e[2]?"Restore":"Maximize"),r(y,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title","Close"),r(g,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(C,S){m(C,t,S),s(t,n),s(t,i),s(t,l),s(l,o),N.m(o,null),s(l,d),s(l,c),s(l,f),s(l,y),P.m(y,null),s(l,_),s(l,g),v||(b=[L(o,"click",e[12]),L(c,"click",e[9]),L(y,"click",e[10]),L(g,"click",e[11])],v=!0)},p(C,S){D!==(D=A(C))&&(N.d(1),N=D(C),N&&(N.c(),N.m(o,null))),S[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),U!==(U=O(C))&&(P.d(1),P=U(C),P&&(P.c(),P.m(y,null))),S[0]&4&&M!==(M=C[2]?"Restore":"Maximize")&&r(y,"title",M)},d(C){C&&p(t),N.d(),P.d(),v=!1,re(b)}}}function Cr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Tr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Ar(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Sr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Lr(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function zr(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Ps(e){let t,n,i,l,o,u,d,c,f;function y(g,v){return g[3]?Wr:Er}let M=y(e),_=M(e);return{c(){t=a("a"),_.c(),n=h(),i=a("br"),l=h(),o=a("div"),u=h(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(g,v){m(g,t,v),_.m(t,null),m(g,n,v),m(g,i,v),m(g,l,v),m(g,o,v),m(g,u,v),m(g,d,v),c||(f=L(t,"click",e[12]),c=!0)},p(g,v){M!==(M=y(g))&&(_.d(1),_=M(g),_&&(_.c(),_.m(t,null)))},d(g){g&&p(t),_.d(),g&&p(n),g&&p(i),g&&p(l),g&&p(o),g&&p(u),g&&p(d),c=!1,f()}}}function Er(e){let t,n;return{c(){t=E(`Switch to Dark mode + `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Wr(e){let t,n;return{c(){t=E(`Switch to Light mode + `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Pr(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function y(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=h(),l=a("p"),u=E(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(M,_){m(M,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",y),c=!0)},p(M,_){e=M,_[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(M){M&&p(t),c=!1,f()}}}function Ds(e){let t,n=e[35]&&Pr(e);return{c(){n&&n.c(),t=pi()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function Os(e){let t,n=e[32].html+"",i;return{c(){t=new Wo(!1),i=pi(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function Dr(e){let t,n,i,l,o,u,d,c,f,y,M,_,g,v,b,A,D,N,O,U,P,C,S,z,k,j,I=e[1].label+"",X,K,V,Z,B,ie,te,F,Q,x,ue,le,he,_e,pe,ce,Ae,Se,W=e[5]&&Ws(e);function Y(H,fe){return H[0]?zr:Lr}let Le=Y(e),ve=Le(e),de=!e[5]&&Ps(e),we=e[7],se=[];for(let H=0;H`,M=h(),_=a("a"),_.innerHTML=`GitHub + `,g=h(),v=a("a"),v.innerHTML=`Source + `,b=h(),A=a("br"),D=h(),N=a("div"),O=h(),U=a("br"),P=h(),C=a("div");for(let H=0;H',_e=h(),pe=a("div");for(let H=0;H{xt(G,1)}),hi()}ze?(B=new ze(Je(H)),ui(B.$$.fragment),Te(B.$$.fragment,1),$t(B,Z,null)):B=null}if(fe[0]&64){oe=H[6];let G;for(G=0;G{await confirm("Are you sure?")||F.preventDefault()}),Ve.onFileDropEvent(F=>{D(`File drop: ${JSON.stringify(F.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:la,icon:"i-ph-hand-waving"},{label:"Communication",component:da,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:ra,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:Sa,icon:"i-codicon-multiple-windows"},{label:"File system",component:Wa,icon:"i-codicon-files"},{label:"HTTP",component:qa,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Ya,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:Mr,icon:"i-codicon-hubot"},!o&&{label:"Window",component:Za,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:ir,icon:"i-codicon-record-keys"},{label:"Shell",component:or,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:pr,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:br,icon:"i-codicon-clippy"},{label:"WebRTC",component:vr,icon:"i-ph-broadcast"}];let d=u[0];function c(F){n(1,d=F)}let f;bt(async()=>{const F=Kt();n(2,f=await F.isMaximized()),tn("tauri://resize",async()=>{n(2,f=await F.isMaximized())})});function y(){Kt().minimize()}async function M(){const F=Kt();await F.isMaximized()?F.unmaximize():F.maximize()}let _=!1;async function g(){_||(_=await co("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&Kt().close())}let v;bt(()=>{n(3,v=localStorage&&localStorage.getItem("theme")=="dark"),Ns(v)});function b(){n(3,v=!v),Ns(v)}let A=Us([]);Fs(e,A,F=>n(6,i=F));function D(F){A.update(Q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof F=="string"?F:JSON.stringify(F,null,1))+"
"},...Q])}function N(F){A.update(Q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+F+"
"},...Q])}function O(){A.update(()=>[])}let U,P,C;function S(F){C=F.clientY;const Q=window.getComputedStyle(U);P=parseInt(Q.height,10);const x=le=>{const he=le.clientY-C,_e=P-he;n(4,U.style.height=`${_e{document.removeEventListener("mouseup",ue),document.removeEventListener("mousemove",x)};document.addEventListener("mouseup",ue),document.addEventListener("mousemove",x)}let z;bt(async()=>{n(5,z=await to()==="win32")});let k=!1,j,I,X=!1,K=0,V=0;const Z=(F,Q,x)=>Math.min(Math.max(Q,F),x);bt(()=>{n(18,j=document.querySelector("#sidebar")),I=document.querySelector("#sidebarToggle"),document.addEventListener("click",F=>{I.contains(F.target)?n(0,k=!k):k&&!j.contains(F.target)&&n(0,k=!1)}),document.addEventListener("touchstart",F=>{if(I.contains(F.target))return;const Q=F.touches[0].clientX;(0{if(X){const Q=F.touches[0].clientX;V=Q;const x=(Q-K)/10;j.style.setProperty("--translate-x",`-${Z(0,k?0-x:18.75-x,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(X){const F=(V-K)/10;n(0,k=k?F>-(18.75/2):F>18.75/2)}X=!1})});const B=()=>Qi("https://tauri.app/"),ie=F=>{c(F),n(0,k=!1)};function te(F){ri[F?"unshift":"push"](()=>{U=F,n(4,U)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const F=document.querySelector("#sidebar");F&&Or(F,k)}},[k,d,f,v,U,z,i,u,c,y,M,g,b,A,D,N,O,S,j,B,ie,te]}class Nr extends ye{constructor(t){super(),ge(this,t,Rr,Dr,me,{},null,[-1,-1])}}new Nr({target:document.querySelector("#app")}); diff --git a/examples/api/src/views/Shell.svelte b/examples/api/src/views/Shell.svelte index 197d87e39..125cf6c34 100644 --- a/examples/api/src/views/Shell.svelte +++ b/examples/api/src/views/Shell.svelte @@ -13,6 +13,7 @@ let encoding = '' let stdin = '' let child + let output = [] function _getEnv() { return env.split(' ').reduce((env, clause) => { @@ -26,10 +27,11 @@ function spawn() { child = null + output = [] const command = new Command(cmd, [...args, script], { cwd: cwd || null, env: _getEnv(), - encoding, + encoding: encoding || null }) command.on('close', (data) => { @@ -40,8 +42,23 @@ }) command.on('error', (error) => onMessage(`command error: "${error}"`)) - command.stdout.on('data', (line) => onMessage(`command stdout: "${line}"`)) - command.stderr.on('data', (line) => onMessage(`command stderr: "${line}"`)) + function onOutput(line, kind) { + onMessage(`command ${kind}: "${line}"`) + + if (line.endsWith('\n')) { + line = line.substring(0, line.length - 1) + } + + const last = output[output.length - 1] + if (last && last.endsWith('\r')) { + output = [...output.slice(0, output.length - 1), line] + } else { + output = [...output, line] + } + } + + command.stdout.on('data', (line) => onOutput(line, 'stdout')) + command.stderr.on('data', (line) => onOutput(line, 'stderr')) command .spawn() @@ -90,11 +107,19 @@
- + {#if child} + + {/if}
{#if child}
{/if} + +
+ {#each output as l} +

{l}

+ {/each} +
From eeb6be54228f3e5463a28c68956abb06a694c010 Mon Sep 17 00:00:00 2001 From: Isaac Cambron Date: Tue, 8 Aug 2023 15:57:30 -0400 Subject: [PATCH 037/104] feat(core): Manager::emit_filter and optimize serialization (#7512) Co-authored-by: Lucas Nogueira --- .changes/add-manager-emit-filter.md | 5 +++++ core/tauri/src/lib.rs | 22 ++++++++++++++++++- core/tauri/src/manager.rs | 10 ++++++--- core/tauri/src/window.rs | 33 +++++++++++++++++++++-------- 4 files changed, 57 insertions(+), 13 deletions(-) create mode 100644 .changes/add-manager-emit-filter.md diff --git a/.changes/add-manager-emit-filter.md b/.changes/add-manager-emit-filter.md new file mode 100644 index 000000000..67aa32aef --- /dev/null +++ b/.changes/add-manager-emit-filter.md @@ -0,0 +1,5 @@ +--- +'tauri': 'minor:feat' +--- + +Add `tauri::Manager::emit_filter` and only serialize once when emitting to multiple windows. diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 7be4034ca..e1290bf97 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -610,7 +610,7 @@ pub trait Manager: sealed::ManagerBase { self.manager().config() } - /// Emits a event to all windows. + /// Emits an event to all windows. /// /// Only the webviews receives this event. /// To trigger Rust listeners, use [`Self::trigger_global`], [`Window::trigger`] or [`Window::emit_and_trigger`]. @@ -629,6 +629,26 @@ pub trait Manager: sealed::ManagerBase { self.manager().emit_filter(event, None, payload, |_| true) } + /// Emits an event to windows matching the filter critera. + /// + /// # Examples + /// ``` + /// use tauri::Manager; + /// + /// #[tauri::command] + /// fn synchronize(app: tauri::AppHandle) { + /// // emits the synchronized event to all windows + /// app.emit_filter("synchronized", (), |w| w.label().starts_with("foo-")); + /// } + /// ``` + fn emit_filter(&self, event: &str, payload: S, filter: F) -> Result<()> + where + S: Serialize + Clone, + F: Fn(&Window) -> bool, + { + self.manager().emit_filter(event, None, payload, filter) + } + /// Emits an event to the window with the specified label. /// /// # Examples diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index f41581bbe..d6891bac3 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -25,7 +25,6 @@ use tauri_utils::{ html::{SCRIPT_NONCE_TOKEN, STYLE_NONCE_TOKEN}, }; -use crate::app::{GlobalMenuEventListener, WindowMenuEvent}; use crate::hooks::IpcJavascript; #[cfg(feature = "isolation")] use crate::hooks::IsolationJavascript; @@ -51,6 +50,10 @@ use crate::{ Context, EventLoopMessage, Icon, Invoke, Manager, Pattern, Runtime, Scopes, StateManager, Window, WindowEvent, }; +use crate::{ + app::{GlobalMenuEventListener, WindowMenuEvent}, + window::WindowEmitArgs, +}; #[cfg(any(target_os = "linux", target_os = "windows"))] use crate::api::path::{resolve_path, BaseDirectory}; @@ -1102,12 +1105,13 @@ impl WindowManager { S: Serialize + Clone, F: Fn(&Window) -> bool, { + let emit_args = WindowEmitArgs::from(event, source_window_label, payload)?; assert_event_name_is_valid(event); self - .windows_lock() + .windows() .values() .filter(|&w| filter(w)) - .try_for_each(|window| window.emit_internal(event, source_window_label, payload.clone())) + .try_for_each(|window| window.emit_internal(&emit_args)) } pub fn eval_script_all>(&self, script: S) -> crate::Result<()> { diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 974a2ba43..3eb231bb2 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -56,6 +56,26 @@ struct WindowCreatedEvent { label: String, } +pub(crate) struct WindowEmitArgs { + pub event: String, + pub source_window_label: String, + pub payload: String, +} + +impl WindowEmitArgs { + pub fn from( + event: &str, + source_window_label: Option<&str>, + payload: S, + ) -> crate::Result { + Ok(WindowEmitArgs { + event: serde_json::to_string(event)?, + source_window_label: serde_json::to_string(&source_window_label)?, + payload: serde_json::to_string(&payload)?, + }) + } +} + /// Monitor descriptor. #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] @@ -1764,18 +1784,13 @@ impl Window { self.emit(event, payload) } - pub(crate) fn emit_internal( - &self, - event: &str, - source_window_label: Option<&str>, - payload: S, - ) -> crate::Result<()> { + pub(crate) fn emit_internal(&self, emit_args: &WindowEmitArgs) -> crate::Result<()> { self.eval(&format!( "(function () {{ const fn = window['{}']; fn && fn({{event: {}, windowLabel: {}, payload: {}}}) }})()", self.manager.event_emit_function_name(), - serde_json::to_string(event)?, - serde_json::to_string(&source_window_label)?, - serde_json::to_value(payload)?, + emit_args.event, + emit_args.source_window_label, + emit_args.payload ))?; Ok(()) } From cca5301b88c916b43d640d3ccc6c576a1d3f4b6d Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 9 Aug 2023 13:39:27 -0700 Subject: [PATCH 038/104] added missing futures-util (#7260) (#7565) Co-authored-by: Simon Hyll --- tooling/webdriver/Cargo.lock | 1 + tooling/webdriver/Cargo.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/tooling/webdriver/Cargo.lock b/tooling/webdriver/Cargo.lock index 332f1ecb1..56a17956d 100644 --- a/tooling/webdriver/Cargo.lock +++ b/tooling/webdriver/Cargo.lock @@ -425,6 +425,7 @@ version = "0.1.2" dependencies = [ "anyhow", "futures", + "futures-util", "hyper", "pico-args", "serde", diff --git a/tooling/webdriver/Cargo.toml b/tooling/webdriver/Cargo.toml index 3b2ada75c..6a61f293e 100644 --- a/tooling/webdriver/Cargo.toml +++ b/tooling/webdriver/Cargo.toml @@ -17,6 +17,7 @@ rust-version = "1.60" anyhow = "1" hyper = { version = "0.14", features = [ "client", "http1", "runtime", "server", "stream", "tcp" ] } futures = "0.3" +futures-util = "0.3" pico-args = "0.4" serde = { version = "1", features = [ "derive" ] } serde_json = "1" From b4209623770d8cea2d318f639f4ec8cb3384c971 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 07:22:45 -0300 Subject: [PATCH 039/104] chore(deps) Update Tauri API Definitions (1.x) (#7577) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- tooling/api/package.json | 12 +- tooling/api/yarn.lock | 475 +++++++++++++++++++++++++++++---------- 2 files changed, 357 insertions(+), 130 deletions(-) diff --git a/tooling/api/package.json b/tooling/api/package.json index b62b1ec01..0473a0531 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -40,19 +40,19 @@ "yarn": ">= 1.19.1" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "5.59.11", - "@typescript-eslint/parser": "5.59.11", - "eslint": "8.42.0", - "eslint-config-prettier": "8.8.0", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", + "eslint": "8.46.0", + "eslint-config-prettier": "8.10.0", "eslint-config-standard-with-typescript": "34.0.1", - "eslint-plugin-import": "2.27.5", + "eslint-plugin-import": "2.28.0", "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.8", "tsup": "6.7.0", - "typescript": "5.1.3" + "typescript": "5.1.6" }, "resolutions": { "semver": ">=7.5.2", diff --git a/tooling/api/yarn.lock b/tooling/api/yarn.lock index 214f34aa2..39e363cdf 100644 --- a/tooling/api/yarn.lock +++ b/tooling/api/yarn.lock @@ -129,14 +129,19 @@ 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.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.3.tgz#4910db5505f4d503f27774bf356e3704818a0331" - integrity sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ== +"@eslint-community/regexpp@^4.6.1": + version "4.6.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" + integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== + +"@eslint/eslintrc@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.1.tgz#18d635e24ad35f7276e8a49d135c7d3ca6a46f93" + integrity sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.5.2" + espree "^9.6.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -144,10 +149,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.42.0": - version "8.42.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.42.0.tgz#484a1d638de2911e6f5a30c12f49c7e4a3270fb6" - integrity sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw== +"@eslint/js@^8.46.0": + version "8.46.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.46.0.tgz#3f7802972e8b6fe3f88ed1aabc74ec596c456db6" + integrity sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA== "@humanwhocodes/config-array@^0.11.10": version "0.11.10" @@ -204,30 +209,30 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.12.tgz#920447fdd78d76b19de0438b7f60df3c4a80bf1c" integrity sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A== -"@typescript-eslint/eslint-plugin@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.11.tgz#8d466aa21abea4c3f37129997b198d141f09e76f" - integrity sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg== +"@typescript-eslint/eslint-plugin@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.59.11" - "@typescript-eslint/type-utils" "5.59.11" - "@typescript-eslint/utils" "5.59.11" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" natural-compare-lite "^1.4.0" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.11.tgz#af7d4b7110e3068ce0b97550736de455e4250103" - integrity sha512-s9ZF3M+Nym6CAZEkJJeO2TFHHDsKAM3ecNkLuH4i4s8/RCPnF5JRip2GyviYkeEAcwGMJxkqG9h2dAsnA1nZpA== +"@typescript-eslint/parser@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.59.11" - "@typescript-eslint/types" "5.59.11" - "@typescript-eslint/typescript-estree" "5.59.11" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" "@typescript-eslint/parser@^5.43.0": @@ -248,21 +253,21 @@ "@typescript-eslint/types" "5.57.1" "@typescript-eslint/visitor-keys" "5.57.1" -"@typescript-eslint/scope-manager@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.11.tgz#5d131a67a19189c42598af9fb2ea1165252001ce" - integrity sha512-dHFOsxoLFtrIcSj5h0QoBT/89hxQONwmn3FOQ0GOQcLOOXm+MIrS8zEAhs4tWl5MraxCY3ZJpaXQQdFMc2Tu+Q== +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== dependencies: - "@typescript-eslint/types" "5.59.11" - "@typescript-eslint/visitor-keys" "5.59.11" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.11.tgz#5eb67121808a84cb57d65a15f48f5bdda25f2346" - integrity sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g== +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/typescript-estree" "5.59.11" - "@typescript-eslint/utils" "5.59.11" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" tsutils "^3.21.0" @@ -271,10 +276,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.1.tgz#d9989c7a9025897ea6f0550b7036027f69e8a603" integrity sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA== -"@typescript-eslint/types@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.11.tgz#1a9018fe3c565ba6969561f2a49f330cf1fe8db1" - integrity sha512-epoN6R6tkvBYSc+cllrz+c2sOFWkbisJZWkOE+y3xHtvYaOE6Wk6B8e114McRJwFRjGvYdJwLXQH5c9osME/AA== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== "@typescript-eslint/typescript-estree@5.57.1": version "5.57.1" @@ -289,30 +294,30 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.11.tgz#b2caaa31725e17c33970c1197bcd54e3c5f42b9f" - integrity sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA== +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.59.11" - "@typescript-eslint/visitor-keys" "5.59.11" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.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.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.11.tgz#9dbff49dc80bfdd9289f9f33548f2e8db3c59ba1" - integrity sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg== +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.59.11" - "@typescript-eslint/types" "5.59.11" - "@typescript-eslint/typescript-estree" "5.59.11" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" eslint-scope "^5.1.1" semver "^7.3.7" @@ -324,12 +329,12 @@ "@typescript-eslint/types" "5.57.1" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@5.59.11": - version "5.59.11" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.11.tgz#dca561ddad169dc27d62396d64f45b2d2c3ecc56" - integrity sha512-KGYniTGG3AMTuKF9QBD7EIrvufkB6O6uX3knP73xbKLMpH+QRPcgnCxjWXSHjMRuOxFLovljqQgQpR0c7GvjoA== +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "5.59.11" + "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: @@ -337,12 +342,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== +acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -382,6 +387,14 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + array-includes@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" @@ -398,6 +411,17 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.findlastindex@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz#bc229aef98f6bd0533a2bc61ff95209875526c9b" + integrity sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.1.3" + array.prototype.flat@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" @@ -418,6 +442,18 @@ array.prototype.flatmap@^1.3.1: es-abstract "^1.20.4" es-shim-unscopables "^1.0.0" +arraybuffer.prototype.slice@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz#9b5ea3868a6eebc30273da577eb888381c0044bb" + integrity sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -561,6 +597,14 @@ define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -650,6 +694,51 @@ es-abstract@^1.20.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.9" +es-abstract@^1.21.2: + version "1.22.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" + integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.1" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.2.1" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.10" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.0" + safe-array-concat "^1.0.0" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.7" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.10" + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -708,10 +797,10 @@ 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.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-prettier@8.10.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-config-standard-with-typescript@34.0.1: version "34.0.1" @@ -735,10 +824,10 @@ eslint-import-resolver-node@^0.3.7: is-core-module "^2.11.0" resolve "^1.22.1" -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== +eslint-module-utils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== dependencies: debug "^3.2.7" @@ -758,26 +847,29 @@ eslint-plugin-es@^4.1.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@2.27.5: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== +eslint-plugin-import@2.28.0: + version "2.28.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz#8d66d6925117b06c4018d491ae84469eb3cb1005" + integrity sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q== dependencies: array-includes "^3.1.6" + array.prototype.findlastindex "^1.2.2" array.prototype.flat "^1.3.1" array.prototype.flatmap "^1.3.1" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" + eslint-module-utils "^2.8.0" has "^1.0.3" - is-core-module "^2.11.0" + is-core-module "^2.12.1" is-glob "^4.0.3" minimatch "^3.1.2" + object.fromentries "^2.0.6" + object.groupby "^1.0.0" object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" + resolve "^1.22.3" + semver "^6.3.1" + tsconfig-paths "^3.14.2" eslint-plugin-n@15.7.0: version "15.7.0" @@ -825,10 +917,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -867,27 +959,32 @@ eslint-visitor-keys@^3.4.1: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== -eslint@8.42.0: - version "8.42.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.42.0.tgz#7bebdc3a55f9ed7167251fe7259f75219cade291" - integrity sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A== +eslint-visitor-keys@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz#8c2095440eca8c933bedcadf16fefa44dbe9ba5f" + integrity sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw== + +eslint@8.46.0: + version "8.46.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.46.0.tgz#a06a0ff6974e53e643acc42d1dcf2e7f797b3552" + integrity sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.0.3" - "@eslint/js" "8.42.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.1" + "@eslint/js" "^8.46.0" "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.0" - eslint-visitor-keys "^3.4.1" - espree "^9.5.2" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.2" + espree "^9.6.1" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -897,7 +994,6 @@ eslint@8.42.0: globals "^13.19.0" graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" @@ -907,17 +1003,16 @@ eslint@8.42.0: lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.5.2: - version "9.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" - integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.8.0" + acorn "^8.9.0" acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" @@ -1065,7 +1160,7 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" -functions-have-names@^1.2.2: +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -1088,6 +1183,16 @@ get-intrinsic@^1.1.3: has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -1172,11 +1277,6 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - graphemer@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" @@ -1233,7 +1333,7 @@ ignore@^5.1.1, ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -1277,6 +1377,15 @@ internal-slot@^1.0.4: has "^1.0.3" side-channel "^1.0.4" +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + is-array-buffer@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a" @@ -1286,6 +1395,15 @@ is-array-buffer@^3.0.1: get-intrinsic "^1.1.3" is-typed-array "^1.1.10" +is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -1325,6 +1443,13 @@ is-core-module@^2.11.0: dependencies: has "^1.0.3" +is-core-module@^2.12.1, is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + is-core-module@^2.8.1: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" @@ -1439,6 +1564,11 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -1466,7 +1596,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^1.0.1: +json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== @@ -1606,7 +1736,7 @@ object-inspect@^1.12.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-inspect@^1.12.2: +object-inspect@^1.12.2, object-inspect@^1.12.3: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== @@ -1641,6 +1771,25 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.fromentries@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" + integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +object.groupby@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.0.tgz#cb29259cf90f37e7bac6437686c1ea8c916d12a9" + integrity sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.21.2" + get-intrinsic "^1.2.1" + object.values@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" @@ -1664,7 +1813,7 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -optionator@>=0.9.3, optionator@^0.9.1: +optionator@>=0.9.3, optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== @@ -1781,6 +1930,15 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexp.prototype.flags@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" + integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + functions-have-names "^1.2.3" + regexpp@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -1814,6 +1972,15 @@ resolve@^1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.22.3: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -1840,6 +2007,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +safe-array-concat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" + integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -1856,7 +2033,7 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -semver@>=7.5.2, semver@^6.1.0, semver@^6.3.0, semver@^7.0.0, semver@^7.3.7, semver@^7.3.8: +semver@>=7.5.2, semver@^6.1.0, semver@^6.3.1, semver@^7.0.0, semver@^7.3.7, semver@^7.3.8: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -1901,6 +2078,15 @@ source-map@0.8.0-beta.0: dependencies: whatwg-url "^7.0.0" +string.prototype.trim@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + string.prototype.trimend@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" @@ -1954,7 +2140,7 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -2026,13 +2212,13 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -tsconfig-paths@^3.14.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" - integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== +tsconfig-paths@^3.14.2: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== dependencies: "@types/json5" "^0.0.29" - json5 "^1.0.1" + json5 "^1.0.2" minimist "^1.2.6" strip-bom "^3.0.0" @@ -2080,6 +2266,36 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" @@ -2089,10 +2305,10 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typescript@5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826" - integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw== +typescript@5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" + integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== unbox-primitive@^1.0.2: version "1.0.2" @@ -2136,6 +2352,17 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-typed-array@^1.1.10: + version "1.1.11" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" + integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" From 10e362d098c9bed48f832bad471fb2fab83ab0bb Mon Sep 17 00:00:00 2001 From: Graeme McHale <54558682+gmchale79@users.noreply.github.com> Date: Thu, 10 Aug 2023 03:23:52 -0700 Subject: [PATCH 040/104] feat: allow more flexible http requests in updater closes #7422 (#7432) Co-authored-by: Lucas Nogueira --- .changes/updater-endpoints.md | 5 ++++ .changes/updater-header.md | 5 ++++ core/tauri/src/updater/core.rs | 49 +++++++++++++++++++++++----------- core/tauri/src/updater/mod.rs | 41 +++++++++++++++++++++++----- 4 files changed, 78 insertions(+), 22 deletions(-) create mode 100644 .changes/updater-endpoints.md create mode 100644 .changes/updater-header.md diff --git a/.changes/updater-endpoints.md b/.changes/updater-endpoints.md new file mode 100644 index 000000000..ee9a10d2e --- /dev/null +++ b/.changes/updater-endpoints.md @@ -0,0 +1,5 @@ +--- +"tauri": minor:feat +--- + +Added `UpdateBuilder::endpoints` to add request endpoints at runtime. diff --git a/.changes/updater-header.md b/.changes/updater-header.md new file mode 100644 index 000000000..7a14aff06 --- /dev/null +++ b/.changes/updater-header.md @@ -0,0 +1,5 @@ +--- +"tauri": minor:feat +--- + +Added `UpdateResponse::header` and `UpdateResponse::remove_header` to modify the update download request headers. diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index 98936e707..e487aab37 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -199,7 +199,7 @@ impl RemoteRelease { } } -pub struct UpdateBuilder { +pub(crate) struct UpdateBuilder { /// Application handle. pub app: AppHandle, /// Current version we are running to compare with announced version @@ -255,17 +255,13 @@ impl UpdateBuilder { self } - /// Add multiple URLS at once inside a Vec for future reference + /// Add multiple URLs at once inside a Vec for future reference pub fn urls(mut self, urls: &[String]) -> Self { - let mut formatted_vec: Vec = Vec::new(); - for url in urls { - formatted_vec.push( - percent_encoding::percent_decode(url.as_bytes()) - .decode_utf8_lossy() - .to_string(), - ); - } - self.urls = formatted_vec; + self.urls.extend(urls.iter().map(|url| { + percent_encoding::percent_decode(url.as_bytes()) + .decode_utf8_lossy() + .to_string() + })); self } @@ -447,12 +443,12 @@ impl UpdateBuilder { } } -pub fn builder(app: AppHandle) -> UpdateBuilder { +pub(crate) fn builder(app: AppHandle) -> UpdateBuilder { UpdateBuilder::new(app) } #[derive(Debug)] -pub struct Update { +pub(crate) struct Update { /// Application handle. pub app: AppHandle, /// Update description @@ -506,9 +502,32 @@ impl Clone for Update { } impl Update { + pub fn header(mut self, key: K, value: V) -> Result + where + HeaderName: TryFrom, + >::Error: Into, + HeaderValue: TryFrom, + >::Error: Into, + { + let key: std::result::Result = key.try_into().map_err(Into::into); + let value: std::result::Result = value.try_into().map_err(Into::into); + self.headers.insert(key?, value?); + Ok(self) + } + + pub fn remove_header(mut self, key: K) -> Result + where + HeaderName: TryFrom, + >::Error: Into, + { + let key: std::result::Result = key.try_into().map_err(Into::into); + self.headers.remove(key?); + Ok(self) + } + // Download and install our update // @todo(lemarier): Split into download and install (two step) but need to be thread safe - pub(crate) async fn download_and_install), D: FnOnce()>( + pub async fn download_and_install), D: FnOnce()>( &self, pub_key: String, on_chunk: C, @@ -1324,7 +1343,7 @@ mod test { let app = crate::test::mock_app(); let check_update = block!(builder(app.handle()) - .urls(&["http://badurl.www.tld/1".into(), mockito::server_url(),]) + .urls(&["http://badurl.www.tld/1".into(), mockito::server_url()]) .current_version("0.0.1".parse().unwrap()) .build()); diff --git a/core/tauri/src/updater/mod.rs b/core/tauri/src/updater/mod.rs index 549eda478..e5a631f34 100644 --- a/core/tauri/src/updater/mod.rs +++ b/core/tauri/src/updater/mod.rs @@ -263,7 +263,7 @@ impl UpdateBuilder { self } - /// Add a `Header` to the request. + /// Adds a header for the requests to the updater endpoints. pub fn header(mut self, key: K, value: V) -> Result where HeaderName: TryFrom, @@ -275,6 +275,12 @@ impl UpdateBuilder { Ok(self) } + /// Adds a list of endpoints to fetch the update. + pub fn endpoints(mut self, urls: &[String]) -> Self { + self.inner = self.inner.urls(urls); + self + } + /// Check if an update is available. /// /// # Examples @@ -302,6 +308,7 @@ impl UpdateBuilder { /// If ther server responds with status code `204`, this method will return [`Error::UpToDate`] pub async fn check(self) -> Result> { let handle = self.inner.app.clone(); + // check updates match self.inner.build().await { Ok(update) => { @@ -395,6 +402,28 @@ impl UpdateResponse { self.update.body.as_ref() } + /// Add a header to the download request. + pub fn header(mut self, key: K, value: V) -> Result + where + HeaderName: TryFrom, + >::Error: Into, + HeaderValue: TryFrom, + >::Error: Into, + { + self.update = self.update.header(key, value)?; + Ok(self) + } + + /// Removes a header from the download request. + pub fn remove_header(mut self, key: K) -> Result + where + HeaderName: TryFrom, + >::Error: Into, + { + self.update = self.update.remove_header(key)?; + Ok(self) + } + /// Downloads and installs the update. pub async fn download_and_install(self) -> Result<()> { download_and_install(self.update).await @@ -405,7 +434,7 @@ impl UpdateResponse { pub(crate) async fn check_update_with_dialog(handle: AppHandle) { let updater_config = handle.config().tauri.updater.clone(); let package_info = handle.package_info().clone(); - if let Some(endpoints) = updater_config.endpoints.clone() { + if let Some(endpoints) = &updater_config.endpoints { let endpoints = endpoints .iter() .map(|e| e.to_string()) @@ -502,13 +531,11 @@ pub fn builder(handle: AppHandle) -> UpdateBuilder { let package_info = handle.package_info().clone(); // prepare our endpoints - let endpoints = updater_config + let endpoints: Vec = updater_config .endpoints .as_ref() - .expect("Something wrong with endpoints") - .iter() - .map(|e| e.to_string()) - .collect::>(); + .map(|endpoints| endpoints.iter().map(|e| e.to_string()).collect()) + .unwrap_or_default(); let mut builder = self::core::builder(handle.clone()) .urls(&endpoints[..]) From 9308dee0a1cf59790b1ef36b769540c429e76379 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 15 Aug 2023 15:56:05 +0200 Subject: [PATCH 041/104] docs: Be more specific about plugin names in ipc scope (#7605) --- core/tauri-config-schema/schema.json | 2 +- core/tauri-utils/src/config.rs | 1 + tooling/cli/schema.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index dae07693f..01b7c87a4 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -2782,7 +2782,7 @@ } }, "plugins": { - "description": "The list of plugins that are allowed in this scope.", + "description": "The list of plugins that are allowed in this scope. The names should be without the `tauri-plugin-` prefix, for example `\"store\"` for `tauri-plugin-store`.", "default": [], "type": "array", "items": { diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 9650182e0..69e55b0f3 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -1248,6 +1248,7 @@ pub struct RemoteDomainAccessScope { /// The list of window labels this scope applies to. pub windows: Vec, /// The list of plugins that are allowed in this scope. + /// The names should be without the `tauri-plugin-` prefix, for example `"store"` for `tauri-plugin-store`. #[serde(default)] pub plugins: Vec, /// Enables access to the Tauri API. diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index dae07693f..01b7c87a4 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -2782,7 +2782,7 @@ } }, "plugins": { - "description": "The list of plugins that are allowed in this scope.", + "description": "The list of plugins that are allowed in this scope. The names should be without the `tauri-plugin-` prefix, for example `\"store\"` for `tauri-plugin-store`.", "default": [], "type": "array", "items": { From ca977f4b87c66808b4eac31a6d1925842b4c1570 Mon Sep 17 00:00:00 2001 From: Jet Li Date: Tue, 15 Aug 2023 23:59:44 +0800 Subject: [PATCH 042/104] fix(bundler/nsis): revert shell context change before deleting appdata, closes #7588 (#7591) * fix(bundler/nsis): delete app data of current user when uninstall, closes #7588 * fix(bundler/nsis): delete app data of current user when uninstall, closes #7588 * Update .changes/fix-nsis-uninstall-delete-app-data.md --------- --- .changes/fix-nsis-uninstall-delete-app-data.md | 5 +++++ .../src/bundle/windows/templates/installer.nsi | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .changes/fix-nsis-uninstall-delete-app-data.md diff --git a/.changes/fix-nsis-uninstall-delete-app-data.md b/.changes/fix-nsis-uninstall-delete-app-data.md new file mode 100644 index 000000000..4bc116c25 --- /dev/null +++ b/.changes/fix-nsis-uninstall-delete-app-data.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +On Windows, Fix NSIS uninstaller deleting the wrong application data if the delete the application data checkbox is checked. diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index 83f6ce504..356fdcde1 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -645,12 +645,6 @@ Section Uninstall ; Remove desktop shortcuts Delete "$DESKTOP\${MAINBINARYNAME}.lnk" - ; Delete app data - ${If} $DeleteAppDataCheckboxState == 1 - RmDir /r "$APPDATA\${BUNDLEID}" - RmDir /r "$LOCALAPPDATA\${BUNDLEID}" - ${EndIf} - ; Remove registry information for add/remove programs !if "${INSTALLMODE}" == "both" DeleteRegKey SHCTX "${UNINSTKEY}" @@ -662,6 +656,13 @@ Section Uninstall DeleteRegValue HKCU "${MANUPRODUCTKEY}" "Installer Language" + ; Delete app data + ${If} $DeleteAppDataCheckboxState == 1 + SetShellVarContext current + RmDir /r "$APPDATA\${BUNDLEID}" + RmDir /r "$LOCALAPPDATA\${BUNDLEID}" + ${EndIf} + ${GetOptions} $CMDLINE "/P" $R0 IfErrors +2 0 SetAutoClose true From 72a3d75e8f9dce65cb2d194212686c712c792067 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 15 Aug 2023 23:23:26 +0300 Subject: [PATCH 043/104] chore(deps): update nsis_tuari_utils to 0.2 (#7625) --- tooling/bundler/src/bundle/windows/nsis.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index a3e018edf..38166e98e 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -37,8 +37,8 @@ const NSIS_URL: &str = 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"; const NSIS_TAURI_UTILS: &str = - "https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.1.1/nsis_tauri_utils.dll"; -const NSIS_TAURI_UTILS_SHA1: &str = "A21C67CF5AB6D4274AFFF0D68CFCE680D213DDC7"; + "https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.2.0/nsis_tauri_utils.dll"; +const NSIS_TAURI_UTILS_SHA1: &str = "463555D6A0D48782754C98CD95A3C9C68F171698"; #[cfg(target_os = "windows")] const NSIS_REQUIRED_FILES: &[&str] = &[ From a7777ff485b725f177d08bbc00af607cd8ee8d6d Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 16 Aug 2023 05:09:45 +0300 Subject: [PATCH 044/104] feat(bundler/NSIS): Add Bulgarian to supported NSIS languages. (#7624) (#7626) * Create Bulgarian.nsh * Update nsis.rs * Create nsis-bulgarian.md Co-authored-by: Angelo II <62988428+AngeloCore@users.noreply.github.com> --- .changes/nsis-bulgarian.md | 5 ++++ tooling/bundler/src/bundle/windows/nsis.rs | 1 + .../templates/nsis-languages/Bulgarian.nsh | 27 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .changes/nsis-bulgarian.md create mode 100644 tooling/bundler/src/bundle/windows/templates/nsis-languages/Bulgarian.nsh diff --git a/.changes/nsis-bulgarian.md b/.changes/nsis-bulgarian.md new file mode 100644 index 000000000..8fdc2e3a8 --- /dev/null +++ b/.changes/nsis-bulgarian.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:enhance' +--- + +Added Bulgarian language support to the NSIS bundler. diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 38166e98e..964e57b7a 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -554,6 +554,7 @@ fn get_lang_data( let lang_path = PathBuf::from(format!("{lang}.nsh")); let lang_content = match lang.to_lowercase().as_str() { "arabic" => Some(include_str!("./templates/nsis-languages/Arabic.nsh")), + "bulgarian" => Some(include_str!("./templates/nsis-languages/Bulgarian.nsh")), "dutch" => Some(include_str!("./templates/nsis-languages/Dutch.nsh")), "english" => Some(include_str!("./templates/nsis-languages/English.nsh")), "japanese" => Some(include_str!("./templates/nsis-languages/Japanese.nsh")), diff --git a/tooling/bundler/src/bundle/windows/templates/nsis-languages/Bulgarian.nsh b/tooling/bundler/src/bundle/windows/templates/nsis-languages/Bulgarian.nsh new file mode 100644 index 000000000..ea3f20665 --- /dev/null +++ b/tooling/bundler/src/bundle/windows/templates/nsis-languages/Bulgarian.nsh @@ -0,0 +1,27 @@ +LangString addOrReinstall ${LANG_BULGARIAN} "Добавяне/Преинсталиране на компоненти" +LangString alreadyInstalled ${LANG_BULGARIAN} "Вече инсталиран" +LangString alreadyInstalledLong ${LANG_BULGARIAN} "${PRODUCTNAME} ${VERSION} е вече е инсталиран. Изберете операцията, която искате да извършите и натиснете Напред, за да продължите." +LangString appRunning ${LANG_BULGARIAN} "${PRODUCTNAME} е отворен! Моля, затворете го първо и опитайте отново." +LangString appRunningOkKill ${LANG_BULGARIAN} "${PRODUCTNAME} е отворен!$\nНатиснете ОК, за да го затворите." +LangString chooseMaintenanceOption ${LANG_BULGARIAN} "Изберете опция за поддръжка." +LangString choowHowToInstall ${LANG_BULGARIAN} "Изберете как искате да инсталирате ${PRODUCTNAME}." +LangString createDesktop ${LANG_BULGARIAN} "Създайте пряк път на работния плот" +LangString dontUninstall ${LANG_BULGARIAN} "Не деинсталирайте" +LangString dontUninstallDowngrade ${LANG_BULGARIAN} "Не деинсталирайте (Понижаването без деинсталация е забранено за този инсталатор)" +LangString failedToKillApp ${LANG_BULGARIAN} "Неуспешно прекратяване на ${PRODUCTNAME}. Моля, затворете го първо и опитайте отново." +LangString installingWebview2 ${LANG_BULGARIAN} "Инсталиране на WebView2..." +LangString newerVersionInstalled ${LANG_BULGARIAN} "Вече е инсталирана по-нова версия на ${PRODUCTNAME}! Не се препоръчва да инсталирате по-стара версия. Ако наистина желаете да инсталирате тази по-стара версия, по-добре е да деинсталирате текущата версия първо. Изберете операцията, която искате да извършите и натиснете Напред, за да продължите." +LangString older ${LANG_BULGARIAN} "по-стара" +LangString olderOrUnknownVersionInstalled ${LANG_BULGARIAN} "На вашата система е инсталирана $R4 версия на ${PRODUCTNAME}. Препоръчително е да деинсталирате текущата версия преди да инсталирате нова. Изберете операцията, която искате да извършите и натиснете Напред, за да продължите." +LangString silentDowngrades ${LANG_BULGARIAN} "Понижаванията не са позволени за този инсталатор. Не е възможно да продължите с безшумен инсталатор. Моля, използвайте графичния интерфейсен инсталатор." +LangString unableToUninstall ${LANG_BULGARIAN} "Неуспешна деинсталация!" +LangString uninstallApp ${LANG_BULGARIAN} "Деинсталиране на ${PRODUCTNAME}" +LangString uninstallBeforeInstalling ${LANG_BULGARIAN} "Деинсталирай преди инсталиране" +LangString unknown ${LANG_BULGARIAN} "неизвестно" +LangString webview2AbortError ${LANG_BULGARIAN} "Неуспешно инсталиране на WebView2! Приложението не може да работи без него. Опитайте да рестартирате инсталатора." +LangString webview2DownloadError ${LANG_BULGARIAN} "Грешка: Неуспешно изтегляне на WebView2 - $0" +LangString webview2DownloadSuccess ${LANG_BULGARIAN} "Стартиращият файл на WebView2 е изтеглен успешно" +LangString webview2Downloading ${LANG_BULGARIAN} "Изтегляне на стартиращят файл на WebView2..." +LangString webview2InstallError ${LANG_BULGARIAN} "Грешка: Инсталирането на WebView2 неуспешно с код на изход $1" +LangString webview2InstallSuccess ${LANG_BULGARIAN} "WebView2 инсталиран успешно" +LangString deleteAppData ${LANG_BULGARIAN} "Изтриване на данните на приложението" From 964d81ff01a076516d323546c169b2ba8156e55a Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 15 Aug 2023 19:10:02 -0700 Subject: [PATCH 045/104] refactor(bundler): switch to notarytool, closes #4300 (#7616) --- .changes/config.json | 3 +- .changes/notarytool.md | 5 + tooling/bundler/src/bundle/macos/app.rs | 8 +- tooling/bundler/src/bundle/macos/sign.rs | 193 +++++++++++------------ tooling/cli/ENVIRONMENT_VARIABLES.md | 1 + 5 files changed, 102 insertions(+), 108 deletions(-) create mode 100644 .changes/notarytool.md diff --git a/.changes/config.json b/.changes/config.json index 78a03db4c..7a46ae633 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -8,7 +8,8 @@ "pref": "Performance Improvements", "changes": "What's Changed", "sec": "Security fixes", - "deps": "Dependencies" + "deps": "Dependencies", + "breaking": "Breaking Changes" }, "defaultChangeTag": "changes", "pkgManagers": { diff --git a/.changes/notarytool.md b/.changes/notarytool.md new file mode 100644 index 000000000..16c46f5ef --- /dev/null +++ b/.changes/notarytool.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": minor:breaking +--- + +The macOS notarization now uses `notarytool` as `altool` will be discontinued on November 2023. When authenticating with an API key, the key `.p8` file path must be provided in the `APPLE_API_KEY_PATH` environment variable. diff --git a/tooling/bundler/src/bundle/macos/app.rs b/tooling/bundler/src/bundle/macos/app.rs index 628a0fd9f..809825e54 100644 --- a/tooling/bundler/src/bundle/macos/app.rs +++ b/tooling/bundler/src/bundle/macos/app.rs @@ -25,7 +25,7 @@ use super::{ super::common, icon::create_icns_file, - sign::{notarize, notarize_auth_args, sign}, + sign::{notarize, notarize_auth, sign}, }; use crate::Settings; @@ -87,9 +87,9 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { // sign application sign(app_bundle_path.clone(), identity, settings, true)?; // notarization is required for distribution - match notarize_auth_args() { - Ok(args) => { - notarize(app_bundle_path.clone(), args, settings)?; + match notarize_auth() { + Ok(auth) => { + notarize(app_bundle_path.clone(), auth, settings)?; } Err(e) => { warn!("skipping app notarization, {}", e.to_string()); diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index 1fde21ec3..e06c401bb 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -3,13 +3,19 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::ffi::OsString; -use std::{fs::File, io::prelude::*, path::PathBuf, process::Command}; +use std::{ + env::{var, var_os}, + ffi::OsString, + fs::File, + io::prelude::*, + path::PathBuf, + process::Command, +}; use crate::{bundle::common::CommandExt, Settings}; use anyhow::Context; use log::info; -use regex::Regex; +use serde::Deserialize; const KEYCHAIN_ID: &str = "tauri-build.keychain"; const KEYCHAIN_PWD: &str = "tauri-build"; @@ -147,8 +153,8 @@ pub fn sign( info!(action = "Signing"; "{} with identity \"{}\"", path_to_sign.display(), identity); let setup_keychain = if let (Some(certificate_encoded), Some(certificate_password)) = ( - std::env::var_os("APPLE_CERTIFICATE"), - std::env::var_os("APPLE_CERTIFICATE_PASSWORD"), + var_os("APPLE_CERTIFICATE"), + var_os("APPLE_CERTIFICATE_PASSWORD"), ) { // setup keychain allow you to import your certificate // for CI build @@ -212,13 +218,18 @@ fn try_sign( Ok(()) } +#[derive(Deserialize)] +struct NotarytoolSubmitOutput { + id: String, + status: String, + message: String, +} + pub fn notarize( app_bundle_path: PathBuf, - auth_args: Vec, + auth: NotarizeAuth, settings: &Settings, ) -> crate::Result<()> { - let identifier = settings.bundle_identifier(); - let bundle_stem = app_bundle_path .file_stem() .expect("failed to get bundle filename"); @@ -252,55 +263,47 @@ pub fn notarize( sign(zip_path.clone(), identity, settings, false)?; }; - let mut notarize_args = vec![ - "altool", - "--notarize-app", - "-f", + let notarize_args = vec![ + "notarytool", + "submit", zip_path .to_str() .expect("failed to convert zip_path to string"), - "--primary-bundle-id", - identifier, + "--wait", + "--output-format", + "json", ]; - if let Some(provider_short_name) = &settings.macos().provider_short_name { - notarize_args.push("--asc-provider"); - notarize_args.push(provider_short_name); - } - info!(action = "Notarizing"; "{}", app_bundle_path.display()); let output = Command::new("xcrun") .args(notarize_args) - .args(auth_args.clone()) + .notarytool_args(&auth) .output_ok() .context("failed to upload app to Apple's notarization servers.")?; - // combine both stdout and stderr to support macOS below 10.15 - let mut notarize_response = std::str::from_utf8(&output.stdout)?.to_string(); - notarize_response.push('\n'); - notarize_response.push_str(std::str::from_utf8(&output.stderr)?); - notarize_response.push('\n'); - if let Some(uuid) = Regex::new(r"\nRequestUUID = (.+?)\n")? - .captures_iter(¬arize_response) - .next() - { - info!("notarization started; waiting for Apple response..."); - - let uuid = uuid[1].to_string(); - get_notarization_status(uuid, auth_args)?; - staple_app(app_bundle_path.clone())?; - } else { - return Err( - anyhow::anyhow!( - "failed to parse RequestUUID from upload output. {}", - notarize_response - ) - .into(), - ); + if !output.status.success() { + return Err(anyhow::anyhow!("failed to notarize app").into()); } - Ok(()) + let output_str = String::from_utf8_lossy(&output.stdout); + if let Ok(submit_output) = serde_json::from_str::(&output_str) { + let log_message = format!( + "Finished with status {} for id {} ({})", + submit_output.status, submit_output.id, submit_output.message + ); + if submit_output.status == "Accepted" { + log::info!(action = "Notarizing"; "{}", log_message); + staple_app(app_bundle_path)?; + Ok(()) + } else { + Err(anyhow::anyhow!("{log_message}").into()) + } + } else { + return Err( + anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into(), + ); + } } fn staple_app(mut app_bundle_path: PathBuf) -> crate::Result<()> { @@ -322,82 +325,66 @@ fn staple_app(mut app_bundle_path: PathBuf) -> crate::Result<()> { Ok(()) } -fn get_notarization_status(uuid: String, auth_args: Vec) -> crate::Result<()> { - std::thread::sleep(std::time::Duration::from_secs(10)); - let result = Command::new("xcrun") - .args(vec!["altool", "--notarization-info", &uuid]) - .args(auth_args.clone()) - .output_ok(); +pub enum NotarizeAuth { + AppleId { + apple_id: String, + password: String, + }, + ApiKey { + key: String, + key_path: PathBuf, + issuer: String, + }, +} - if let Ok(output) = result { - // combine both stdout and stderr to support macOS below 10.15 - let mut notarize_status = std::str::from_utf8(&output.stdout)?.to_string(); - notarize_status.push('\n'); - notarize_status.push_str(std::str::from_utf8(&output.stderr)?); - notarize_status.push('\n'); - if let Some(status) = Regex::new(r"\n *Status: (.+?)\n")? - .captures_iter(¬arize_status) - .next() - { - let status = status[1].to_string(); - if status == "in progress" { - get_notarization_status(uuid, auth_args) - } else if status == "invalid" { - Err( - anyhow::anyhow!(format!( - "Apple failed to notarize your app. {}", - notarize_status - )) - .into(), - ) - } else if status != "success" { - Err( - anyhow::anyhow!(format!( - "Unknown notarize status {}. {}", - status, notarize_status - )) - .into(), - ) - } else { - Ok(()) - } - } else { - get_notarization_status(uuid, auth_args) +pub trait NotarytoolCmdExt { + fn notarytool_args(&mut self, auth: &NotarizeAuth) -> &mut Self; +} + +impl NotarytoolCmdExt for Command { + fn notarytool_args(&mut self, auth: &NotarizeAuth) -> &mut Self { + match auth { + NotarizeAuth::AppleId { apple_id, password } => self + .arg("--apple-id") + .arg(apple_id) + .arg("--password") + .arg(password), + NotarizeAuth::ApiKey { + key, + key_path, + issuer, + } => self + .arg("--key-id") + .arg(key) + .arg("--key") + .arg(key_path) + .arg("--issuer") + .arg(issuer), } - } else { - get_notarization_status(uuid, auth_args) } } -pub fn notarize_auth_args() -> crate::Result> { - match ( - std::env::var_os("APPLE_ID"), - std::env::var_os("APPLE_PASSWORD"), - ) { +pub fn notarize_auth() -> crate::Result { + match (var_os("APPLE_ID"), var_os("APPLE_PASSWORD")) { (Some(apple_id), Some(apple_password)) => { let apple_id = apple_id .to_str() .expect("failed to convert APPLE_ID to string") .to_string(); - let apple_password = apple_password + let password = apple_password .to_str() .expect("failed to convert APPLE_PASSWORD to string") .to_string(); - Ok(vec![ - "-u".to_string(), - apple_id, - "-p".to_string(), - apple_password, - ]) + Ok(NotarizeAuth::AppleId { apple_id, password }) } _ => { - match (std::env::var_os("APPLE_API_KEY"), std::env::var_os("APPLE_API_ISSUER")) { - (Some(api_key), Some(api_issuer)) => { - let api_key = api_key.to_str().expect("failed to convert APPLE_API_KEY to string").to_string(); - let api_issuer = api_issuer.to_str().expect("failed to convert APPLE_API_ISSUER to string").to_string(); - Ok(vec!["--apiKey".to_string(), api_key, "--apiIssuer".to_string(), api_issuer]) + match (var_os("APPLE_API_KEY"), var_os("APPLE_API_ISSUER"), var("APPLE_API_KEY_PATH")) { + (Some(api_key), Some(api_issuer), Ok(key_path)) => { + let key = api_key.to_str().expect("failed to convert APPLE_API_KEY to string").to_string(); + let issuer = api_issuer.to_str().expect("failed to convert APPLE_API_ISSUER to string").to_string(); + Ok(NotarizeAuth::ApiKey { key, key_path: key_path.into(), issuer }) }, - _ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD or APPLE_API_KEY & APPLE_API_ISSUER environment variables found").into()) + _ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into()) } } } diff --git a/tooling/cli/ENVIRONMENT_VARIABLES.md b/tooling/cli/ENVIRONMENT_VARIABLES.md index 8416b62b9..78f04462b 100644 --- a/tooling/cli/ENVIRONMENT_VARIABLES.md +++ b/tooling/cli/ENVIRONMENT_VARIABLES.md @@ -29,6 +29,7 @@ These environment variables are inputs to the CLI which may have an equivalent C - This option will search the following directories in sequence for a private key file with the name of 'AuthKey_.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'. Additionally, you can set environment variable $API_PRIVATE_KEYS_DIR or a user default API_PRIVATE_KEYS_DIR to specify the directory where your AuthKey file is located. - See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information. - `APPLE_API_ISSUER` — Issuer ID. Required if `APPLE_API_KEY` is specified. +- `APPLE_API_KEY_PATH` - path to the API key `.p8` file. - `APPLE_SIGNING_IDENTITY` — The identity used to code sign. Overwrites `tauri.conf.json > tauri > bundle > macOS > signingIdentity`. - `APPLE_PROVIDER_SHORT_NAME` — If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. Overwrites `tauri.conf.json > tauri > bundle > macOS > providerShortName`. - `CI` — If set, the CLI will run in CI mode and won't require any user interaction. From 58d6b899e21d37bb42810890d289deb57f2273bd Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 16 Aug 2023 18:09:05 +0200 Subject: [PATCH 046/104] feat(api): Add `append` option to writeFile apis (#7636) * feat(api): Add `append` option to writeFile apis. * wording * fmt * Update .changes/fs-append-file.md * clippeeeyyyy --- .changes/fs-append-file.md | 6 ++++++ core/tauri/src/endpoints/file_system.rs | 20 ++++++++++++++++++-- tooling/api/src/fs.ts | 6 ++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .changes/fs-append-file.md diff --git a/.changes/fs-append-file.md b/.changes/fs-append-file.md new file mode 100644 index 000000000..a55e0dcbb --- /dev/null +++ b/.changes/fs-append-file.md @@ -0,0 +1,6 @@ +--- +'@tauri-apps/api': 'patch:enhance' +'tauri': 'patch:enhance' +--- + +Add `append` option to `FsOptions` in the `fs` JS module, used in `writeTextFile` and `writeBinaryFile`, to be able to append to existing files instead of overwriting it. diff --git a/core/tauri/src/endpoints/file_system.rs b/core/tauri/src/endpoints/file_system.rs index 0acea50db..48e62f9bc 100644 --- a/core/tauri/src/endpoints/file_system.rs +++ b/core/tauri/src/endpoints/file_system.rs @@ -23,7 +23,10 @@ use serde::{ }; use tauri_macros::{command_enum, module_command_handler, CommandModule}; -use std::fmt::{Debug, Formatter}; +use std::{ + fmt::{Debug, Formatter}, + fs::OpenOptions, +}; use std::{ fs, fs::File, @@ -49,6 +52,8 @@ pub struct FileOperationOptions { /// The base directory of the operation. /// The directory path of the BaseDirectory will be the prefix of the defined file path. pub dir: Option, + /// Whether writeFile should append to a file or truncate it. + pub append: Option, } /// The API descriptor. @@ -166,6 +171,11 @@ impl Cmd { contents: Vec, options: Option, ) -> super::Result<()> { + let append = options + .as_ref() + .and_then(|opt| opt.append) + .unwrap_or_default(); + let resolved_path = resolve_path( &context.config, &context.package_info, @@ -173,7 +183,12 @@ impl Cmd { path, options.and_then(|o| o.dir), )?; - File::create(&resolved_path) + + OpenOptions::new() + .append(append) + .write(true) + .create(true) + .open(&resolved_path) .with_context(|| format!("path: {}", resolved_path.display())) .map_err(Into::into) .and_then(|mut f| f.write_all(&contents).map_err(|err| err.into())) @@ -409,6 +424,7 @@ mod tests { fn arbitrary(g: &mut Gen) -> Self { Self { dir: Option::arbitrary(g), + append: Option::arbitrary(g), } } } diff --git a/tooling/api/src/fs.ts b/tooling/api/src/fs.ts index 9d47b8a19..956073e01 100644 --- a/tooling/api/src/fs.ts +++ b/tooling/api/src/fs.ts @@ -110,6 +110,12 @@ export enum BaseDirectory { */ interface FsOptions { dir?: BaseDirectory + /** + * Whether the content should overwrite the content of the file or append to it. + * + * @since 1.5.0 + */ + append?: boolean // note that adding fields here needs a change in the writeBinaryFile check } From 8c5fcf41e3f5f62206d06871a188b9e9b2e1f932 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Fri, 18 Aug 2023 02:14:38 +0200 Subject: [PATCH 047/104] ci: Downgrade tokio to 1.29 and flate2 to 1.0.26 (#7646) * ci: Downgrade tokio to 1.29 * downgrade flate2 too --- .github/workflows/test-core.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 4fa44f07b..35e63f63b 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -100,6 +100,8 @@ jobs: cargo update -p colored --precise 2.0.2 cargo update -p tempfile --precise 3.6.0 cargo update -p serde_with:3.2.0 --precise 3.0.0 + cargo update -p tokio --precise 1.29.0 + cargo update -p flate2 --precise 1.0.26 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} From f19c7fc5c37efeb88f521f8ab693551216b3e80c Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 30 Aug 2023 02:44:05 +0200 Subject: [PATCH 048/104] ci: Update serde_with downgrade to match 3.3.0 (#7654) --- .github/workflows/test-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 35e63f63b..f64479ce0 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -99,7 +99,7 @@ jobs: cargo update -p is-terminal --precise 0.4.7 cargo update -p colored --precise 2.0.2 cargo update -p tempfile --precise 3.6.0 - cargo update -p serde_with:3.2.0 --precise 3.0.0 + cargo update -p serde_with:3.3.0 --precise 3.0.0 cargo update -p tokio --precise 1.29.0 cargo update -p flate2 --precise 1.0.26 From 09f7f57eeadbf94d8e9e14f3ab2b115a4c4aa473 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 30 Aug 2023 15:49:47 +0300 Subject: [PATCH 049/104] chore(deps): update nsis_tuari_utils to 0.2.1 (#7711) * chore(deps): update nsis_tuari_utils to 0.2.1 * Update .changes/nsis-kill-own-process.md --- .changes/nsis-kill-own-process.md | 5 +++++ tooling/bundler/src/bundle/windows/nsis.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/nsis-kill-own-process.md diff --git a/.changes/nsis-kill-own-process.md b/.changes/nsis-kill-own-process.md new file mode 100644 index 000000000..5813c18e2 --- /dev/null +++ b/.changes/nsis-kill-own-process.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +On Windows, fix NSIS installer trying to kill itself if the installer file name and the app `productName` are the same. diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 964e57b7a..3e56045da 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -37,8 +37,8 @@ const NSIS_URL: &str = 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"; const NSIS_TAURI_UTILS: &str = - "https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.2.0/nsis_tauri_utils.dll"; -const NSIS_TAURI_UTILS_SHA1: &str = "463555D6A0D48782754C98CD95A3C9C68F171698"; + "https://github.com/tauri-apps/nsis-tauri-utils/releases/download/nsis_tauri_utils-v0.2.1/nsis_tauri_utils.dll"; +const NSIS_TAURI_UTILS_SHA1: &str = "53A7CFAEB6A4A9653D6D5FBFF02A3C3B8720130A"; #[cfg(target_os = "windows")] const NSIS_REQUIRED_FILES: &[&str] = &[ From 85112e7f8fc2f7bf8ceddf8ed9c034c50816b01c Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 30 Aug 2023 19:43:01 +0200 Subject: [PATCH 050/104] ci: downgrade h2 and reqwest (#7717) * ci: downgrade h2 to 0.3.20 * reqwest * Update test-core.yml --------- Co-authored-by: Amr Bashir --- .github/workflows/test-core.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index f64479ce0..6d49a8395 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -102,6 +102,8 @@ jobs: cargo update -p serde_with:3.3.0 --precise 3.0.0 cargo update -p tokio --precise 1.29.0 cargo update -p flate2 --precise 1.0.26 + cargo update -p h2 --precise 0.3.20 + cargo update -p reqwest --precise 0.11.18 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} From 13279917d4cae071d0ce3a686184d48af079f58a Mon Sep 17 00:00:00 2001 From: i-c-b <133848861+i-c-b@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:53:37 -0500 Subject: [PATCH 051/104] enhance(cli): Add Cargo Tauri CLI version to `tauri info` output (#7713) * enhance(cli): Add Cargo Tauri CLI version to `tauri info` output * Create enhance-cli-cargo-tauri-cli-version-info.md --- ...nhance-cli-cargo-tauri-cli-version-info.md | 6 ++ tooling/cli/src/info/packages_rust.rs | 67 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .changes/enhance-cli-cargo-tauri-cli-version-info.md diff --git a/.changes/enhance-cli-cargo-tauri-cli-version-info.md b/.changes/enhance-cli-cargo-tauri-cli-version-info.md new file mode 100644 index 000000000..e107e66c3 --- /dev/null +++ b/.changes/enhance-cli-cargo-tauri-cli-version-info.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": minor:enhance +"@tauri-apps/cli": minor:enhance +--- + +Add version of Rust Tauri CLI installed with Cargo to `tauri info` command. diff --git a/tooling/cli/src/info/packages_rust.rs b/tooling/cli/src/info/packages_rust.rs index 7cb89422c..30359c043 100644 --- a/tooling/cli/src/info/packages_rust.rs +++ b/tooling/cli/src/info/packages_rust.rs @@ -195,6 +195,7 @@ fn crate_version( pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option) -> Vec { let mut items = Vec::new(); + if tauri_dir.is_some() || app_dir.is_some() { if let Some(tauri_dir) = tauri_dir { let manifest: Option = @@ -236,5 +237,71 @@ pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option) -> Vec { + let version = semver::Version::parse(&version_string).unwrap(); + let target_version = semver::Version::parse(&target_version).unwrap(); + if version < target_version { + Some(format!( + " ({}, latest: {})", + "outdated".yellow(), + target_version.to_string().green() + )) + } else { + None + } + } + None => None, + }; + + items.push(SectionItem::new( + move || { + Some(( + format!( + "{} {}: {}{}", + dep, + "[RUST]".dimmed(), + version_string, + version_suffix + .clone() + .map(|s| format!(", {s}")) + .unwrap_or_else(|| "".into()) + ), + Status::Neutral, + )) + }, + || None, + false, + )); + } else { + items.push(SectionItem::new( + move || { + Some(( + format!("tauri-cli {}: not installed!", "[RUST]".dimmed()), + Status::Neutral, + )) + }, + || None, + false, + )); + } + } + items } From e152662687ece7a62d383923a50751cc0dd34331 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 30 Aug 2023 16:48:36 -0700 Subject: [PATCH 052/104] feat: support Bun package manager (#7723) * Support bun * clippy --- .changes/support-bun.md | 6 +++++ tooling/cli/node/README.md | 2 +- tooling/cli/node/tauri.js | 10 ++++---- tooling/cli/src/completions.rs | 6 +++-- tooling/cli/src/info/env_nodejs.rs | 22 ++++++++++++++++ tooling/cli/src/info/packages_nodejs.rs | 34 ++++++++++++++++++++++++- 6 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 .changes/support-bun.md diff --git a/.changes/support-bun.md b/.changes/support-bun.md new file mode 100644 index 000000000..729fd2425 --- /dev/null +++ b/.changes/support-bun.md @@ -0,0 +1,6 @@ +--- +'tauri-cli': 'patch:feat' +'@tauri-apps/cli': 'patch:feat' +--- + +Support Bun package manager in CLI diff --git a/tooling/cli/node/README.md b/tooling/cli/node/README.md index bf961aa46..7cf8ea03b 100644 --- a/tooling/cli/node/README.md +++ b/tooling/cli/node/README.md @@ -19,7 +19,7 @@ Tauri is a polyglot and generic system that is very composable and allows engine Tauri apps can have custom menus and have tray-type interfaces. They can be updated, and are managed by the user's operating system as expected. They are very small, because they use the system's webview. They do not ship a runtime, since the final binary is compiled from rust. This makes the reversing of Tauri apps not a trivial task. ## This module -Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, and `yarn`, this library provides a node.js runner for common tasks when using Tauri, like `yarn tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli). +Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, `yarn`, and `bun`, this library provides a node.js runner for common tasks when using Tauri, like `yarn tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli). To learn more about the details of how all of these pieces fit together, please consult this [ARCHITECTURE.md](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md) document. diff --git a/tooling/cli/node/tauri.js b/tooling/cli/node/tauri.js index 1516306df..8ee5b93cd 100755 --- a/tooling/cli/node/tauri.js +++ b/tooling/cli/node/tauri.js @@ -7,7 +7,7 @@ const cli = require('./main') const path = require('path') -const [bin, script, ...arguments] = process.argv +const [bin, script, ...args] = process.argv const binStem = path.parse(bin).name.toLowerCase() // We want to make a helpful binary name for the underlying CLI helper, if we @@ -20,7 +20,7 @@ if (bin === '@tauri-apps/cli') { } // Even if started by a package manager, the binary will be NodeJS. // Some distribution still use "nodejs" as the binary name. -else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) { +else if (binStem.match(/(nodejs|node|bun)\-?([0-9]*)*$/g)) { const managerStem = process.env.npm_execpath ? path.parse(process.env.npm_execpath).name.toLowerCase() : null @@ -32,7 +32,7 @@ else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) { manager = 'npm' break - // Yarn and pnpm have the same stem name as their bin. + // Yarn, pnpm, and bun have the same stem name as their bin. // We assume all unknown package managers do as well. default: manager = managerStem @@ -48,10 +48,10 @@ else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) { } } else { // We don't know what started it, assume it's already stripped. - arguments.unshift(bin) + args.unshift(bin) } -cli.run(arguments, binName).catch((err) => { +cli.run(args, binName).catch((err) => { cli.logError(err.message) process.exit(1) }) diff --git a/tooling/cli/src/completions.rs b/tooling/cli/src/completions.rs index 874e5d2a0..585ee6f50 100644 --- a/tooling/cli/src/completions.rs +++ b/tooling/cli/src/completions.rs @@ -10,7 +10,7 @@ use log::info; use std::{fs::write, path::PathBuf}; -const PKG_MANAGERS: &[&str] = &["cargo", "pnpm", "npm", "yarn"]; +const PKG_MANAGERS: &[&str] = &["cargo", "pnpm", "npm", "yarn", "bun"]; #[derive(Debug, Clone, Parser)] #[clap(about = "Shell completions")] @@ -25,7 +25,7 @@ pub struct Options { fn completions_for(shell: Shell, manager: &'static str, cmd: Command) -> Vec { let tauri = cmd.name("tauri"); - let mut command = if manager == "npm" { + let mut command = if manager == "npm" || manager == "bun" { Command::new(manager) .bin_name(manager) .subcommand(Command::new("run").subcommand(tauri)) @@ -47,6 +47,8 @@ fn get_completions(shell: Shell, cmd: Command) -> Result { "complete -F _cargo -o bashdefault -o default {} tauri\n", if manager == &"npm" { "npm run" + } else if manager == &"bun" { + "bun run" } else { manager } diff --git a/tooling/cli/src/info/env_nodejs.rs b/tooling/cli/src/info/env_nodejs.rs index fa8c77fd4..22ef3fd83 100644 --- a/tooling/cli/src/info/env_nodejs.rs +++ b/tooling/cli/src/info/env_nodejs.rs @@ -88,6 +88,28 @@ pub fn items(metadata: &VersionMetadata) -> (Vec, Option) { || None, false, ), + SectionItem::new( + || { + cross_command("bun") + .arg("-v") + .output() + .map(|o| { + if o.status.success() { + let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string(); + Some(( + format!("bun: {}", v.split('\n').next().unwrap()), + Status::Neutral, + )) + } else { + None + } + }) + .ok() + .unwrap_or_default() + }, + || None, + false, + ), SectionItem::new( move || { yarn_version_c diff --git a/tooling/cli/src/info/packages_nodejs.rs b/tooling/cli/src/info/packages_nodejs.rs index 247c5909d..217ce34e2 100644 --- a/tooling/cli/src/info/packages_nodejs.rs +++ b/tooling/cli/src/info/packages_nodejs.rs @@ -20,6 +20,7 @@ enum PackageManager { Pnpm, Yarn, YarnBerry, + Bun, } impl Display for PackageManager { @@ -32,6 +33,7 @@ impl Display for PackageManager { PackageManager::Pnpm => "pnpm", PackageManager::Yarn => "yarn", PackageManager::YarnBerry => "yarn berry", + PackageManager::Bun => "bun", } ) } @@ -94,6 +96,18 @@ fn npm_latest_version(pm: &PackageManager, name: &str) -> crate::Result { + let mut cmd = cross_command("npm"); + + let output = cmd.arg("show").arg(name).arg("version").output()?; + if output.status.success() { + let stdout = String::from_utf8_lossy(&output.stdout); + Ok(Some(stdout.replace('\n', ""))) + } else { + Ok(None) + } + } } } @@ -139,6 +153,16 @@ fn npm_package_version>( .output()?, None, ), + // Bun doesn't support `list` command + PackageManager::Bun => ( + cross_command("npm") + .arg("list") + .arg(name) + .args(["version", "--depth", "0"]) + .current_dir(app_dir) + .output()?, + None, + ), }; if output.status.success() { let stdout = String::from_utf8_lossy(&output.stdout); @@ -158,6 +182,7 @@ fn get_package_manager>(app_dir_entries: &[T]) -> PackageManager { let mut use_npm = false; let mut use_pnpm = false; let mut use_yarn = false; + let mut use_bun = false; for name in app_dir_entries { if name.as_ref() == "package-lock.json" { @@ -166,10 +191,12 @@ fn get_package_manager>(app_dir_entries: &[T]) -> PackageManager { use_pnpm = true; } else if name.as_ref() == "yarn.lock" { use_yarn = true; + } else if name.as_ref() == "bun.lockb" { + use_bun = true; } } - if !use_npm && !use_pnpm && !use_yarn { + if !use_npm && !use_pnpm && !use_yarn && !use_bun { println!( "{}: no lock files found, defaulting to npm", "WARNING".yellow() @@ -188,6 +215,9 @@ fn get_package_manager>(app_dir_entries: &[T]) -> PackageManager { if use_yarn { found.push(PackageManager::Yarn); } + if use_bun { + found.push(PackageManager::Bun); + } if found.len() > 1 { let pkg_manger = found[0]; @@ -204,6 +234,8 @@ fn get_package_manager>(app_dir_entries: &[T]) -> PackageManager { PackageManager::Npm } else if use_pnpm { PackageManager::Pnpm + } else if use_bun { + PackageManager::Bun } else { PackageManager::Yarn } From 49beb67dab48dcc6af2b8522b806e7c4a226f4df Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 31 Aug 2023 13:53:15 +0300 Subject: [PATCH 053/104] ci: fix clippy lints (#7721) * ci: fix clippy lints * more lints --- core/tauri-build/src/lib.rs | 9 ----- core/tauri-runtime-wry/src/lib.rs | 49 ++++++++++++----------- core/tauri-runtime-wry/src/system_tray.rs | 8 ++-- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 2901f5d29..f5326c071 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -406,15 +406,6 @@ pub fn try_build(attributes: Attributes) -> Result<()> { res.set_manifest(include_str!("window-app-manifest.xml")); } - if let Some(sdk_dir) = &attributes.windows_attributes.sdk_dir { - if let Some(sdk_dir_str) = sdk_dir.to_str() { - res.set_toolkit_path(sdk_dir_str); - } else { - return Err(anyhow!( - "sdk_dir path is not valid; only UTF-8 characters are allowed" - )); - } - } if let Some(version_str) = &config.package.version { if let Ok(v) = Version::parse(version_str) { let version = v.major << 48 | v.minor << 32 | v.patch << 16; diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index e26f8f8f1..83eff15ea 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -5,6 +5,7 @@ //! The [`wry`] Tauri [`Runtime`]. use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle, RawDisplayHandle}; +use std::rc::Rc; use tauri_runtime::{ http::{header::CONTENT_TYPE, Request as HttpRequest, RequestParts, Response as HttpResponse}, menu::{AboutMetadata, CustomMenuItem, Menu, MenuEntry, MenuHash, MenuId, MenuItem, MenuUpdate}, @@ -251,7 +252,7 @@ pub struct DispatcherMainThreadContext { pub global_shortcut_manager: Arc>, #[cfg(feature = "clipboard")] pub clipboard_manager: Arc>, - pub windows: Arc>>, + pub windows: Rc>>, #[cfg(all(desktop, feature = "system-tray"))] system_tray_manager: SystemTrayManager, } @@ -1671,7 +1672,7 @@ impl Dispatch for WryDispatcher { #[derive(Clone)] enum WindowHandle { Webview { - inner: Arc, + inner: Rc, context_store: WebContextStore, // the key of the WebContext if it's not shared context_key: Option, @@ -1687,7 +1688,7 @@ impl Drop for WindowHandle { context_key, } = self { - if Arc::get_mut(inner).is_some() { + if Rc::get_mut(inner).is_some() { context_store.lock().unwrap().remove(context_key); } } @@ -1941,7 +1942,7 @@ impl Wry { #[cfg(feature = "clipboard")] let clipboard_manager = Arc::new(Mutex::new(Clipboard::new())); - let windows = Arc::new(RefCell::new(HashMap::default())); + let windows = Rc::new(RefCell::new(HashMap::default())); let webview_id_map = WebviewIdStore::default(); #[cfg(all(desktop, feature = "system-tray"))] @@ -2088,7 +2089,7 @@ impl Runtime for Wry { let id = system_tray.id; let mut listeners = Vec::new(); if let Some(l) = system_tray.on_event.take() { - listeners.push(Arc::new(l)); + listeners.push(Rc::new(l)); } let (tray, items) = create_tray(WryTrayId(id), system_tray, &self.event_loop)?; self @@ -2101,9 +2102,9 @@ impl Runtime for Wry { .insert( id, TrayContext { - tray: Arc::new(Mutex::new(Some(tray))), - listeners: Arc::new(Mutex::new(listeners)), - items: Arc::new(Mutex::new(items)), + tray: Rc::new(Mutex::new(Some(tray))), + listeners: Rc::new(RefCell::new(listeners)), + items: Rc::new(RefCell::new(items)), }, ); @@ -2304,7 +2305,7 @@ impl Runtime for Wry { pub struct EventLoopIterationContext<'a, T: UserEvent> { pub callback: &'a mut (dyn FnMut(RunEvent) + 'static), pub webview_id_map: WebviewIdStore, - pub windows: Arc>>, + pub windows: Rc>>, #[cfg(all(desktop, feature = "global-shortcut"))] pub global_shortcut_manager: Arc>, #[cfg(all(desktop, feature = "global-shortcut"))] @@ -2316,7 +2317,7 @@ pub struct EventLoopIterationContext<'a, T: UserEvent> { } struct UserMessageContext { - windows: Arc>>, + windows: Rc>>, webview_id_map: WebviewIdStore, #[cfg(all(desktop, feature = "global-shortcut"))] global_shortcut_manager: Arc>, @@ -2645,16 +2646,16 @@ fn handle_user_message( if let TrayMessage::Create(mut tray, tx) = tray_message { let mut listeners = Vec::new(); if let Some(l) = tray.on_event.take() { - listeners.push(Arc::new(l)); + listeners.push(Rc::new(l)); } match create_tray(WryTrayId(tray_id), tray, event_loop) { Ok((tray, items)) => { trays.insert( tray_id, TrayContext { - tray: Arc::new(Mutex::new(Some(tray))), - listeners: Arc::new(Mutex::new(listeners)), - items: Arc::new(Mutex::new(items)), + tray: Rc::new(Mutex::new(Some(tray))), + listeners: Rc::new(RefCell::new(listeners)), + items: Rc::new(RefCell::new(items)), }, ); @@ -2668,7 +2669,7 @@ fn handle_user_message( } else if let Some(tray_context) = trays.get(&tray_id) { match tray_message { TrayMessage::UpdateItem(menu_id, update) => { - let mut tray = tray_context.items.as_ref().lock().unwrap(); + let mut tray = tray_context.items.as_ref().borrow_mut(); let item = tray.get_mut(&menu_id).expect("menu item not found"); match update { MenuUpdate::SetEnabled(enabled) => item.set_enabled(enabled), @@ -2684,7 +2685,7 @@ fn handle_user_message( if let Some(tray) = &mut *tray_context.tray.lock().unwrap() { let mut items = HashMap::new(); tray.set_menu(&to_wry_context_menu(&mut items, menu)); - *tray_context.items.lock().unwrap() = items; + *tray_context.items.borrow_mut() = items; } } TrayMessage::UpdateIcon(icon) => { @@ -2716,8 +2717,8 @@ fn handle_user_message( } TrayMessage::Destroy(tx) => { *tray_context.tray.lock().unwrap() = None; - tray_context.listeners.lock().unwrap().clear(); - tray_context.items.lock().unwrap().clear(); + tray_context.listeners.borrow_mut().clear(); + tray_context.items.borrow_mut().clear(); tx.send(Ok(())).unwrap(); } } @@ -2843,11 +2844,11 @@ fn handle_event_loop( let (mut listeners, mut tray_id) = (None, 0); for (id, tray_context) in trays_iter { let has_menu = { - let items = tray_context.items.lock().unwrap(); + let items = tray_context.items.borrow(); items.contains_key(&menu_id.0) }; if has_menu { - listeners.replace(tray_context.listeners.lock().unwrap().clone()); + listeners.replace(tray_context.listeners.borrow().clone()); tray_id = *id; break; } @@ -2886,7 +2887,7 @@ fn handle_event_loop( }; let trays = system_tray_manager.trays.lock().unwrap(); if let Some(tray_context) = trays.get(&id.0) { - let listeners = tray_context.listeners.lock().unwrap(); + let listeners = tray_context.listeners.borrow(); let iter = listeners.iter(); for handler in iter { handler(&event); @@ -3016,7 +3017,7 @@ fn handle_event_loop( fn on_close_requested<'a, T: UserEvent>( callback: &'a mut (dyn FnMut(RunEvent) + 'static), window_id: WebviewId, - windows: Arc>>, + windows: Rc>>, ) { let (tx, rx) = channel(); let windows_ref = windows.borrow(); @@ -3044,7 +3045,7 @@ fn on_close_requested<'a, T: UserEvent>( } } -fn on_window_close(window_id: WebviewId, windows: Arc>>) { +fn on_window_close(window_id: WebviewId, windows: Rc>>) { if let Some(window_wrapper) = windows.borrow_mut().get_mut(&window_id) { window_wrapper.inner = None; } @@ -3289,7 +3290,7 @@ fn create_webview( Ok(WindowWrapper { label, inner: Some(WindowHandle::Webview { - inner: Arc::new(webview), + inner: Rc::new(webview), context_store: web_context_store.clone(), context_key: if automation_enabled { None diff --git a/core/tauri-runtime-wry/src/system_tray.rs b/core/tauri-runtime-wry/src/system_tray.rs index 594e13cc4..eab2e7b06 100644 --- a/core/tauri-runtime-wry/src/system_tray.rs +++ b/core/tauri-runtime-wry/src/system_tray.rs @@ -32,8 +32,10 @@ use crate::{send_user_message, Context, Error, Message, Result, TrayId, TrayMess use tauri_runtime::{menu::MenuHash, SystemTray, UserEvent}; use std::{ + cell::RefCell, collections::HashMap, fmt, + rc::Rc, sync::{Arc, Mutex}, }; @@ -41,12 +43,12 @@ pub type GlobalSystemTrayEventHandler = Box>>>; pub type SystemTrayEventHandler = Box; -pub type SystemTrayEventListeners = Arc>>>; -pub type SystemTrayItems = Arc>>; +pub type SystemTrayEventListeners = Rc>>>; +pub type SystemTrayItems = Rc>>; #[derive(Clone, Default)] pub struct TrayContext { - pub tray: Arc>>, + pub tray: Rc>>, pub listeners: SystemTrayEventListeners, pub items: SystemTrayItems, } From 50878901bad87011c88ae7783a7555d3ba5e8d24 Mon Sep 17 00:00:00 2001 From: martin frances Date: Tue, 5 Sep 2023 12:28:33 +0100 Subject: [PATCH 054/104] chore: resolves a warning seen while running cargo update (#7753) * chore: resolves a warning seen while running cargo update warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"` note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest * Now using resolver 2. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index af5d14713..356d8c6c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ # core "core/tauri", From 53ab2042fd812b0d82f084b249633f4c4f05c516 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 7 Sep 2023 15:09:59 +0300 Subject: [PATCH 055/104] refactor: remove unnecessary mutex (#7728) --- core/tauri-runtime-wry/src/lib.rs | 16 ++++++++-------- core/tauri-runtime-wry/src/system_tray.rs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 83eff15ea..ad99920a4 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -2102,7 +2102,7 @@ impl Runtime for Wry { .insert( id, TrayContext { - tray: Rc::new(Mutex::new(Some(tray))), + tray: Rc::new(RefCell::new(Some(tray))), listeners: Rc::new(RefCell::new(listeners)), items: Rc::new(RefCell::new(items)), }, @@ -2653,7 +2653,7 @@ fn handle_user_message( trays.insert( tray_id, TrayContext { - tray: Rc::new(Mutex::new(Some(tray))), + tray: Rc::new(RefCell::new(Some(tray))), listeners: Rc::new(RefCell::new(listeners)), items: Rc::new(RefCell::new(items)), }, @@ -2682,14 +2682,14 @@ fn handle_user_message( } } TrayMessage::UpdateMenu(menu) => { - if let Some(tray) = &mut *tray_context.tray.lock().unwrap() { + if let Some(tray) = &mut *tray_context.tray.borrow_mut() { let mut items = HashMap::new(); tray.set_menu(&to_wry_context_menu(&mut items, menu)); *tray_context.items.borrow_mut() = items; } } TrayMessage::UpdateIcon(icon) => { - if let Some(tray) = &mut *tray_context.tray.lock().unwrap() { + if let Some(tray) = &mut *tray_context.tray.borrow_mut() { if let Ok(icon) = TrayIcon::try_from(icon) { tray.set_icon(icon.0); } @@ -2697,18 +2697,18 @@ fn handle_user_message( } #[cfg(target_os = "macos")] TrayMessage::UpdateIconAsTemplate(is_template) => { - if let Some(tray) = &mut *tray_context.tray.lock().unwrap() { + if let Some(tray) = &mut *tray_context.tray.borrow_mut() { tray.set_icon_as_template(is_template); } } #[cfg(target_os = "macos")] TrayMessage::UpdateTitle(title) => { - if let Some(tray) = &mut *tray_context.tray.lock().unwrap() { + if let Some(tray) = &mut *tray_context.tray.borrow_mut() { tray.set_title(&title); } } TrayMessage::UpdateTooltip(tooltip) => { - if let Some(tray) = &mut *tray_context.tray.lock().unwrap() { + if let Some(tray) = &mut *tray_context.tray.borrow_mut() { tray.set_tooltip(&tooltip); } } @@ -2716,7 +2716,7 @@ fn handle_user_message( // already handled } TrayMessage::Destroy(tx) => { - *tray_context.tray.lock().unwrap() = None; + *tray_context.tray.borrow_mut() = None; tray_context.listeners.borrow_mut().clear(); tray_context.items.borrow_mut().clear(); tx.send(Ok(())).unwrap(); diff --git a/core/tauri-runtime-wry/src/system_tray.rs b/core/tauri-runtime-wry/src/system_tray.rs index eab2e7b06..fb5511d43 100644 --- a/core/tauri-runtime-wry/src/system_tray.rs +++ b/core/tauri-runtime-wry/src/system_tray.rs @@ -48,7 +48,7 @@ pub type SystemTrayItems = Rc>>; #[derive(Clone, Default)] pub struct TrayContext { - pub tray: Rc>>, + pub tray: Rc>>, pub listeners: SystemTrayEventListeners, pub items: SystemTrayItems, } From 0797a002caad29cd8bedccf01f64bf3b45a5e528 Mon Sep 17 00:00:00 2001 From: Jason Tsai Date: Thu, 7 Sep 2023 20:55:47 +0800 Subject: [PATCH 056/104] fix: use `button` property for `data-tauri-drag-region` mouse button detection, closes #7694 (#7746) --- .changes/tauri-tap-drag-region-detection.md | 5 +++++ core/tauri/scripts/core.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/tauri-tap-drag-region-detection.md diff --git a/.changes/tauri-tap-drag-region-detection.md b/.changes/tauri-tap-drag-region-detection.md new file mode 100644 index 000000000..f28c23f4f --- /dev/null +++ b/.changes/tauri-tap-drag-region-detection.md @@ -0,0 +1,5 @@ +--- +'tauri': 'patch:bug' +--- + +On macOS, fixed tapping on custom title bar doesn't maximize the window. diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index 9424b7504..5eaefba47 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -134,7 +134,7 @@ // drag region document.addEventListener('mousedown', (e) => { - if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) { + if (e.target.hasAttribute('data-tauri-drag-region') && e.button === 0) { // prevents text cursor e.preventDefault() // fix #2549: double click on drag region edge causes content to maximize without window sizing change From dfbbca423b82320bfa0b5181acba98642e441eb7 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 7 Sep 2023 10:01:12 -0300 Subject: [PATCH 057/104] feat(bundler): try to find API key file for notarization, ref #7616 (#7771) --- .changes/notarytool.md | 2 +- tooling/bundler/src/bundle/macos/sign.rs | 36 ++++++++++++++++++++++++ tooling/cli/ENVIRONMENT_VARIABLES.md | 3 +- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.changes/notarytool.md b/.changes/notarytool.md index 16c46f5ef..59a8a8245 100644 --- a/.changes/notarytool.md +++ b/.changes/notarytool.md @@ -2,4 +2,4 @@ "tauri-bundler": minor:breaking --- -The macOS notarization now uses `notarytool` as `altool` will be discontinued on November 2023. When authenticating with an API key, the key `.p8` file path must be provided in the `APPLE_API_KEY_PATH` environment variable. +The macOS notarization now uses `notarytool` as `altool` will be discontinued on November 2023. When authenticating with an API key, the key `.p8` file path must be provided in the `APPLE_API_KEY_PATH` environment variable. To prevent a breaking change, we will try to find the key path in the `altool` default search paths. diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index e06c401bb..7b9e8ce5b 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -384,8 +384,44 @@ pub fn notarize_auth() -> crate::Result { let issuer = api_issuer.to_str().expect("failed to convert APPLE_API_ISSUER to string").to_string(); Ok(NotarizeAuth::ApiKey { key, key_path: key_path.into(), issuer }) }, + (Some(api_key), Some(api_issuer), Err(_)) => { + let key = api_key.to_str().expect("failed to convert APPLE_API_KEY to string").to_string(); + let issuer = api_issuer.to_str().expect("failed to convert APPLE_API_ISSUER to string").to_string(); + + let api_key_file_name = format!("AuthKey_{key}.p8"); + let mut key_path = None; + + let mut search_paths = vec!["./private_keys".into()]; + if let Some(home_dir) = dirs_next::home_dir() { + search_paths.push(home_dir.join("private_keys")); + search_paths.push(home_dir.join(".private_keys")); + search_paths.push(home_dir.join(".appstoreconnect").join("private_keys")); + } + + for folder in search_paths { + if let Some(path) = find_api_key(folder, &api_key_file_name) { + key_path = Some(path); + break; + } + } + + if let Some(key_path) = key_path { + Ok(NotarizeAuth::ApiKey { key, key_path, issuer }) + } else { + Err(anyhow::anyhow!("could not find API key file. Please set the APPLE_API_KEY_PATH environment variables to the path to the {api_key_file_name} file").into()) + } + } _ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into()) } } } } + +fn find_api_key(folder: PathBuf, file_name: &str) -> Option { + let path = folder.join(file_name); + if path.exists() { + Some(path) + } else { + None + } +} diff --git a/tooling/cli/ENVIRONMENT_VARIABLES.md b/tooling/cli/ENVIRONMENT_VARIABLES.md index 78f04462b..66f44d888 100644 --- a/tooling/cli/ENVIRONMENT_VARIABLES.md +++ b/tooling/cli/ENVIRONMENT_VARIABLES.md @@ -26,10 +26,9 @@ These environment variables are inputs to the CLI which may have an equivalent C - `APPLE_ID` — The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate. - `APPLE_PASSWORD` — The Apple password used to authenticate for application notarization. Required if `APPLE_ID` is specified. An app-specific password can be used. Alternatively to entering the password in plaintext, it may also be specified using a '@keychain:' or '@env:' prefix followed by a keychain password item name or environment variable name. - `APPLE_API_KEY` — Alternative to `APPLE_ID` and `APPLE_PASSWORD` for notarization authentication using JWT. - - This option will search the following directories in sequence for a private key file with the name of 'AuthKey_.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'. Additionally, you can set environment variable $API_PRIVATE_KEYS_DIR or a user default API_PRIVATE_KEYS_DIR to specify the directory where your AuthKey file is located. - See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information. - `APPLE_API_ISSUER` — Issuer ID. Required if `APPLE_API_KEY` is specified. -- `APPLE_API_KEY_PATH` - path to the API key `.p8` file. +- `APPLE_API_KEY_PATH` - path to the API key `.p8` file. If not specified, the bundler searches the following directories in sequence for a private key file with the name of 'AuthKey_.p8': './private_keys', '~/private_keys', '~/.private_keys', and '~/.appstoreconnect/private_keys'. - `APPLE_SIGNING_IDENTITY` — The identity used to code sign. Overwrites `tauri.conf.json > tauri > bundle > macOS > signingIdentity`. - `APPLE_PROVIDER_SHORT_NAME` — If your Apple ID is connected to multiple teams, you have to specify the provider short name of the team you want to use to notarize your app. Overwrites `tauri.conf.json > tauri > bundle > macOS > providerShortName`. - `CI` — If set, the CLI will run in CI mode and won't require any user interaction. From e3bfb01411c3cc5e602c8f961f6cb5c9dd9524e1 Mon Sep 17 00:00:00 2001 From: Jason Tsai Date: Thu, 7 Sep 2023 23:45:15 +0800 Subject: [PATCH 058/104] feat(nsis): support choosing compression algorithms, closes #7685 (#7776) --- .changes/nsis-set-compressor.md | 5 +++ core/tauri-config-schema/schema.json | 37 +++++++++++++++++++ core/tauri-utils/src/config.rs | 19 ++++++++++ tooling/bundler/src/bundle/settings.rs | 4 +- tooling/bundler/src/bundle/windows/nsis.rs | 11 +++++- .../bundle/windows/templates/installer.nsi | 7 +++- tooling/cli/schema.json | 37 +++++++++++++++++++ tooling/cli/src/helpers/config.rs | 1 + 8 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 .changes/nsis-set-compressor.md diff --git a/.changes/nsis-set-compressor.md b/.changes/nsis-set-compressor.md new file mode 100644 index 000000000..34256f5d5 --- /dev/null +++ b/.changes/nsis-set-compressor.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:enhance' +--- + +Add `compression` configuration option under `tauri > bundle > windows > nsis`. diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index 01b7c87a4..46306d0ac 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -1777,6 +1777,17 @@ "description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.", "default": false, "type": "boolean" + }, + "compression": { + "description": "Set the compression algorithm used to compress files in the installer.\n\nSee ", + "anyOf": [ + { + "$ref": "#/definitions/NsisCompression" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1807,6 +1818,32 @@ } ] }, + "NsisCompression": { + "description": "Compression algorithms used in the NSIS installer.\n\nSee ", + "oneOf": [ + { + "description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.", + "type": "string", + "enum": [ + "zlib" + ] + }, + { + "description": "BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.", + "type": "string", + "enum": [ + "bzip2" + ] + }, + { + "description": "LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.", + "type": "string", + "enum": [ + "lzma" + ] + } + ] + }, "AllowlistConfig": { "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.", "type": "object", diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 69e55b0f3..e435f7eea 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -438,6 +438,21 @@ pub struct WixConfig { pub dialog_image_path: Option, } +/// Compression algorithms used in the NSIS installer. +/// +/// See +#[derive(Debug, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)] +#[cfg_attr(feature = "schema", derive(JsonSchema))] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub enum NsisCompression { + /// ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory. + Zlib, + /// BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory. + Bzip2, + /// LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB. + Lzma, +} + /// Configuration for the Installer bundle using NSIS. #[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] @@ -480,6 +495,10 @@ pub struct NsisConfig { /// By default the OS language is selected, with a fallback to the first language in the `languages` array. #[serde(default, alias = "display-language-selector")] pub display_language_selector: bool, + /// Set the compression algorithm used to compress files in the installer. + /// + /// See + pub compression: Option, } /// Install Modes for the NSIS installer. diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index eba98ef8b..46d67d8be 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -7,7 +7,7 @@ use super::category::AppCategory; use crate::bundle::{common, platform::target_triple}; pub use tauri_utils::config::WebviewInstallMode; use tauri_utils::{ - config::{BundleType, NSISInstallerMode}, + config::{BundleType, NSISInstallerMode, NsisCompression}, resources::{external_binaries, ResourcePaths}, }; @@ -313,6 +313,8 @@ pub struct NsisSettings { /// Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. /// By default the OS language is selected, with a fallback to the first language in the `languages` array. pub display_language_selector: bool, + /// Set compression algorithm used to compress files in the installer. + pub compression: Option, } /// The Windows bundle settings. diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 3e56045da..efb7b49b6 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -20,7 +20,7 @@ use tauri_utils::display_path; use anyhow::Context; use handlebars::{to_json, Handlebars}; use log::{info, warn}; -use tauri_utils::config::{NSISInstallerMode, WebviewInstallMode}; +use tauri_utils::config::{NSISInstallerMode, NsisCompression, WebviewInstallMode}; use std::{ collections::{BTreeMap, HashMap}, @@ -242,6 +242,15 @@ fn build_nsis_app_installer( ); } + data.insert( + "compression", + to_json(match &nsis.compression.unwrap_or(NsisCompression::Lzma) { + NsisCompression::Zlib => "zlib", + NsisCompression::Bzip2 => "bzip2", + NsisCompression::Lzma => "lzma", + }), + ); + data.insert( "display_language_selector", to_json(nsis.display_language_selector && languages.len() > 1), diff --git a/tooling/bundler/src/bundle/windows/templates/installer.nsi b/tooling/bundler/src/bundle/windows/templates/installer.nsi index 356fdcde1..45e63acc0 100644 --- a/tooling/bundler/src/bundle/windows/templates/installer.nsi +++ b/tooling/bundler/src/bundle/windows/templates/installer.nsi @@ -1,5 +1,10 @@ Unicode true -SetCompressor /SOLID lzma +; Set the compression algorithm. Default is LZMA. +!if "{{compression}}" == "" + SetCompressor /SOLID lzma +!else + SetCompressor /SOLID "{{compression}}" +!endif !include MUI2.nsh !include FileFunc.nsh diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 01b7c87a4..46306d0ac 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -1777,6 +1777,17 @@ "description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.", "default": false, "type": "boolean" + }, + "compression": { + "description": "Set the compression algorithm used to compress files in the installer.\n\nSee ", + "anyOf": [ + { + "$ref": "#/definitions/NsisCompression" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1807,6 +1818,32 @@ } ] }, + "NsisCompression": { + "description": "Compression algorithms used in the NSIS installer.\n\nSee ", + "oneOf": [ + { + "description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.", + "type": "string", + "enum": [ + "zlib" + ] + }, + { + "description": "BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.", + "type": "string", + "enum": [ + "bzip2" + ] + }, + { + "description": "LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.", + "type": "string", + "enum": [ + "lzma" + ] + } + ] + }, "AllowlistConfig": { "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.", "type": "object", diff --git a/tooling/cli/src/helpers/config.rs b/tooling/cli/src/helpers/config.rs index 4ae8dad59..48ad9364b 100644 --- a/tooling/cli/src/helpers/config.rs +++ b/tooling/cli/src/helpers/config.rs @@ -108,6 +108,7 @@ pub fn nsis_settings(config: NsisConfig) -> tauri_bundler::NsisSettings { languages: config.languages, custom_language_files: config.custom_language_files, display_language_selector: config.display_language_selector, + compression: config.compression, } } From 1945dec81fe8397483f49909c31defc05e308c69 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 11 Sep 2023 15:30:37 -0300 Subject: [PATCH 059/104] fix(ci): adjust downgrade crates step (#7812) --- .github/workflows/test-core.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 6d49a8395..bad28680e 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -85,7 +85,7 @@ jobs: - name: Downgrade crates with MSRV conflict # The --precise flag can only be used once per invocation. run: | - cargo update -p toml:0.7.6 --precise 0.7.3 + cargo update -p toml:0.7.8 --precise 0.7.3 cargo update -p toml_edit --precise 0.19.8 cargo update -p toml_datetime --precise 0.6.1 cargo update -p serde_spanned --precise 0.6.1 @@ -104,6 +104,8 @@ jobs: cargo update -p flate2 --precise 1.0.26 cargo update -p h2 --precise 0.3.20 cargo update -p reqwest --precise 0.11.18 + cargo update -p cfg-expr:0.15.5 --precise 0.15.4 + cargo update -p memchr --precise 2.6.2 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} From 0b0bc81710affc5d2c664589ecec53da313936d8 Mon Sep 17 00:00:00 2001 From: Davis Silverman Date: Mon, 11 Sep 2023 15:59:30 -0400 Subject: [PATCH 060/104] Extend context.rs to dynamically find the OUT_DIR for certain assets (#7534) Co-authored-by: Lucas Fernandes Nogueira --- core/tauri-codegen/src/context.rs | 41 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/core/tauri-codegen/src/context.rs b/core/tauri-codegen/src/context.rs index 778a7fc29..0ccd8cf72 100644 --- a/core/tauri-codegen/src/context.rs +++ b/core/tauri-codegen/src/context.rs @@ -350,14 +350,11 @@ pub fn context_codegen(data: ContextData) -> Result>( let width = entry.width(); let height = entry.height(); - let out_path = out_dir.join(path.file_name().unwrap()); + let icon_file_name = path.file_name().unwrap(); + let out_path = out_dir.join(icon_file_name); write_if_changed(&out_path, &rgba).map_err(|error| EmbeddedAssetsError::AssetWrite { path: path.to_owned(), error, })?; - let out_path = out_path.display().to_string(); - - let icon = quote!(Some(#root::Icon::Rgba { rgba: include_bytes!(#out_path).to_vec(), width: #width, height: #height })); + let icon_file_name = icon_file_name.to_str().unwrap(); + let icon = quote!(Some( + #root::Icon::Rgba { + rgba: include_bytes!(concat!(std::env!("OUT_DIR"), "/", #icon_file_name)).to_vec(), + width: #width, + height: #height + })); Ok(icon) } @@ -497,9 +499,10 @@ fn raw_icon>(out_dir: &Path, path: P) -> Result>( let width = reader.info().width; let height = reader.info().height; - let out_path = out_dir.join(path.file_name().unwrap()); + let icon_file_name = path.file_name().unwrap(); + let out_path = out_dir.join(icon_file_name); write_if_changed(&out_path, &buffer).map_err(|error| EmbeddedAssetsError::AssetWrite { path: path.to_owned(), error, })?; - let out_path = out_path.display().to_string(); - - let icon = quote!(Some(#root::Icon::Rgba { rgba: include_bytes!(#out_path).to_vec(), width: #width, height: #height })); + let icon_file_name = icon_file_name.to_str().unwrap(); + let icon = quote!(Some( + #root::Icon::Rgba { + rgba: include_bytes!(concat!(std::env!("OUT_DIR"), "/", #icon_file_name)).to_vec(), + width: #width, + height: #height, + } + )); Ok(icon) } From 4bf1e85e6bf85a7ec92d50c8465bc0588a6399d8 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 11 Sep 2023 23:00:06 +0300 Subject: [PATCH 061/104] fix(windows): respect `focused: false` for webview, closes #7519 (#7722) Co-authored-by: Lucas Nogueira fix(windows): respect `focused: false` for webview, closes #7519 --- .changes/tauri-focused-windows.md | 6 ++++++ core/tauri-runtime-wry/Cargo.toml | 2 +- core/tauri-runtime-wry/src/lib.rs | 2 ++ examples/api/src-tauri/Cargo.lock | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changes/tauri-focused-windows.md diff --git a/.changes/tauri-focused-windows.md b/.changes/tauri-focused-windows.md new file mode 100644 index 000000000..0bc7cc7b5 --- /dev/null +++ b/.changes/tauri-focused-windows.md @@ -0,0 +1,6 @@ +--- +'tauri': 'patch:bug' +'tauri-runtime-wry': 'patch:bug' +--- + +Properly respect the `focused` option when creating the webview. diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index 843a95ff3..30aa3b2a4 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -13,7 +13,7 @@ exclude = [ "CHANGELOG.md", "/target" ] readme = "README.md" [dependencies] -wry = { version = "0.24.1", default-features = false, features = [ "file-drop", "protocol" ] } +wry = { version = "0.24.4", default-features = false, features = [ "file-drop", "protocol" ] } tauri-runtime = { version = "0.14.0", path = "../tauri-runtime" } tauri-utils = { version = "1.4.0", path = "../tauri-utils" } uuid = { version = "1", features = [ "v4" ] } diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index ad99920a4..2683c74c0 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -3154,6 +3154,7 @@ fn create_webview( } else { None }; + let focused = window_builder.inner.window.focused; let window = window_builder.inner.build(event_loop).unwrap(); webview_id_map.insert(window.id(), window_id); @@ -3163,6 +3164,7 @@ fn create_webview( } let mut webview_builder = WebViewBuilder::new(window) .map_err(|e| Error::CreateWebview(Box::new(e)))? + .with_focused(focused) .with_url(&url) .unwrap() // safe to unwrap because we validate the URL beforehand .with_transparent(is_window_transparent) diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index c30d606b3..1d214dab1 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -4734,9 +4734,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.24.3" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" +checksum = "88ef04bdad49eba2e01f06e53688c8413bd6a87b0bc14b72284465cf96e3578e" dependencies = [ "base64 0.13.1", "block", From b3ebe4de3ce9083cc25bf628a9bcaeab154d061f Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 12 Sep 2023 17:55:27 -0300 Subject: [PATCH 062/104] chore(config-schema): remove unused deps (#7824) --- core/tauri-config-schema/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/core/tauri-config-schema/Cargo.toml b/core/tauri-config-schema/Cargo.toml index 7c5fbbd90..8cb62fb38 100644 --- a/core/tauri-config-schema/Cargo.toml +++ b/core/tauri-config-schema/Cargo.toml @@ -11,5 +11,4 @@ tauri-utils = { version = "1.0.0", features = [ 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"] } From 995ffc629bac52cad5af5f4354e5540541cd749e Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 13 Sep 2023 21:55:47 -0300 Subject: [PATCH 063/104] fix(ci): recreate symlink so the integration tests works (#7833) --- .changes/config.json | 1 - core/tests/app-updater/frameworks/test.framework/test | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/test diff --git a/.changes/config.json b/.changes/config.json index 7a46ae633..4bf07c0bf 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -1,6 +1,5 @@ { "gitSiteUrl": "https://www.github.com/tauri-apps/tauri/", - "timeout": 3600000, "changeTags": { "feat": "New Features", "enhance": "Enhancements", diff --git a/core/tests/app-updater/frameworks/test.framework/test b/core/tests/app-updater/frameworks/test.framework/test deleted file mode 100644 index 2e6ce0ecf..000000000 --- a/core/tests/app-updater/frameworks/test.framework/test +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/test \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/test b/core/tests/app-updater/frameworks/test.framework/test new file mode 120000 index 000000000..0ffb41cb9 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/test @@ -0,0 +1 @@ +Versions/Current \ No newline at end of file From 2f8881c010fa3493c092ddf3a343df08d7a79fc9 Mon Sep 17 00:00:00 2001 From: Trey Smith Date: Fri, 15 Sep 2023 07:30:27 -0400 Subject: [PATCH 064/104] feat: add team_id option for apple notarization (#7775) Co-authored-by: Lucas Nogueira --- .changes/bundler-team-id.md | 5 ++ tooling/bundler/src/bundle/macos/sign.rs | 72 +++++++++++++----------- tooling/cli/ENVIRONMENT_VARIABLES.md | 1 + 3 files changed, 44 insertions(+), 34 deletions(-) create mode 100644 .changes/bundler-team-id.md diff --git a/.changes/bundler-team-id.md b/.changes/bundler-team-id.md new file mode 100644 index 000000000..9cccd0a7c --- /dev/null +++ b/.changes/bundler-team-id.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": minor:enhance +--- + +Read the `APPLE_TEAM_ID` environment variable for macOS notarization arguments. diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index 7b9e8ce5b..a4e5ec9c0 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -300,9 +300,7 @@ pub fn notarize( Err(anyhow::anyhow!("{log_message}").into()) } } else { - return Err( - anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into(), - ); + Err(anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into()) } } @@ -327,13 +325,14 @@ fn staple_app(mut app_bundle_path: PathBuf) -> crate::Result<()> { pub enum NotarizeAuth { AppleId { - apple_id: String, - password: String, + apple_id: OsString, + password: OsString, + team_id: Option, }, ApiKey { - key: String, + key: OsString, key_path: PathBuf, - issuer: String, + issuer: OsString, }, } @@ -344,11 +343,21 @@ pub trait NotarytoolCmdExt { impl NotarytoolCmdExt for Command { fn notarytool_args(&mut self, auth: &NotarizeAuth) -> &mut Self { match auth { - NotarizeAuth::AppleId { apple_id, password } => self - .arg("--apple-id") - .arg(apple_id) - .arg("--password") - .arg(password), + NotarizeAuth::AppleId { + apple_id, + password, + team_id, + } => { + self + .arg("--username") + .arg(apple_id) + .arg("--password") + .arg(password); + if let Some(team_id) = team_id { + self.arg("--team-id").arg(team_id); + } + self + } NotarizeAuth::ApiKey { key, key_path, @@ -365,30 +374,25 @@ impl NotarytoolCmdExt for Command { } pub fn notarize_auth() -> crate::Result { - match (var_os("APPLE_ID"), var_os("APPLE_PASSWORD")) { - (Some(apple_id), Some(apple_password)) => { - let apple_id = apple_id - .to_str() - .expect("failed to convert APPLE_ID to string") - .to_string(); - let password = apple_password - .to_str() - .expect("failed to convert APPLE_PASSWORD to string") - .to_string(); - Ok(NotarizeAuth::AppleId { apple_id, password }) - } + match ( + var_os("APPLE_ID"), + var_os("APPLE_PASSWORD"), + var_os("APPLE_TEAM_ID"), + ) { + (Some(apple_id), Some(password), team_id) => Ok(NotarizeAuth::AppleId { + apple_id, + password, + team_id, + }), _ => { match (var_os("APPLE_API_KEY"), var_os("APPLE_API_ISSUER"), var("APPLE_API_KEY_PATH")) { - (Some(api_key), Some(api_issuer), Ok(key_path)) => { - let key = api_key.to_str().expect("failed to convert APPLE_API_KEY to string").to_string(); - let issuer = api_issuer.to_str().expect("failed to convert APPLE_API_ISSUER to string").to_string(); + (Some(key), Some(issuer), Ok(key_path)) => { Ok(NotarizeAuth::ApiKey { key, key_path: key_path.into(), issuer }) }, - (Some(api_key), Some(api_issuer), Err(_)) => { - let key = api_key.to_str().expect("failed to convert APPLE_API_KEY to string").to_string(); - let issuer = api_issuer.to_str().expect("failed to convert APPLE_API_ISSUER to string").to_string(); - - let api_key_file_name = format!("AuthKey_{key}.p8"); + (Some(key), Some(issuer), Err(_)) => { + let mut api_key_file_name = OsString::from("AuthKey_"); + api_key_file_name.push(&key); + api_key_file_name.push(".p8"); let mut key_path = None; let mut search_paths = vec!["./private_keys".into()]; @@ -408,7 +412,7 @@ pub fn notarize_auth() -> crate::Result { if let Some(key_path) = key_path { Ok(NotarizeAuth::ApiKey { key, key_path, issuer }) } else { - Err(anyhow::anyhow!("could not find API key file. Please set the APPLE_API_KEY_PATH environment variables to the path to the {api_key_file_name} file").into()) + Err(anyhow::anyhow!("could not find API key file. Please set the APPLE_API_KEY_PATH environment variables to the path to the {api_key_file_name:?} file").into()) } } _ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into()) @@ -417,7 +421,7 @@ pub fn notarize_auth() -> crate::Result { } } -fn find_api_key(folder: PathBuf, file_name: &str) -> Option { +fn find_api_key(folder: PathBuf, file_name: &OsString) -> Option { let path = folder.join(file_name); if path.exists() { Some(path) diff --git a/tooling/cli/ENVIRONMENT_VARIABLES.md b/tooling/cli/ENVIRONMENT_VARIABLES.md index 66f44d888..80469612d 100644 --- a/tooling/cli/ENVIRONMENT_VARIABLES.md +++ b/tooling/cli/ENVIRONMENT_VARIABLES.md @@ -25,6 +25,7 @@ These environment variables are inputs to the CLI which may have an equivalent C - `APPLE_CERTIFICATE_PASSWORD` — The password you used to export the certificate. - `APPLE_ID` — The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate. - `APPLE_PASSWORD` — The Apple password used to authenticate for application notarization. Required if `APPLE_ID` is specified. An app-specific password can be used. Alternatively to entering the password in plaintext, it may also be specified using a '@keychain:' or '@env:' prefix followed by a keychain password item name or environment variable name. +- `APPLE_TEAM_ID`: Developer team ID. If your Apple ID only belongs to one team then you don’t need to supply a Team ID. However, it’s best practice to include it regardless. That way, joining another team at some point in the future won’t break your notarization workflow. To find your Team ID, go to the [Account](https://developer.apple.com/account) page on the Apple Developer website. - `APPLE_API_KEY` — Alternative to `APPLE_ID` and `APPLE_PASSWORD` for notarization authentication using JWT. - See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information. - `APPLE_API_ISSUER` — Issuer ID. Required if `APPLE_API_KEY` is specified. From dcdbe3eb6cc7d8a43caef98dfce71a11a4597644 Mon Sep 17 00:00:00 2001 From: Trey Smith Date: Fri, 15 Sep 2023 11:09:10 -0400 Subject: [PATCH 065/104] fix: codesign doesn't sign frameworks or sidecar, closes #7690 (#7774) Co-authored-by: Lucas Nogueira --- .changes/bundler-xattr.md | 5 + .changes/codesign-additional-files.md | 5 + .../frameworks/test.framework/Headers | 0 .../frameworks/test.framework/Modules | 1 + .../frameworks/test.framework/Resources | 0 .../test.framework/Versions/A/Headers/test.h | 19 ++- .../Versions/A/Modules/module.modulemap | 6 + .../Versions/A/Resources/Info.plist | 32 ++-- .../Versions/A/Resources/LICENSE | 1 - .../Versions/A/_CodeSignature/CodeResources | 142 ++++++++++++++++++ .../frameworks/test.framework/Versions/A/test | Bin 32 -> 35664 bytes .../test.framework/Versions/Current | 0 .../frameworks/test.framework/test | 1 - core/tests/app-updater/tests/update.rs | 6 +- tooling/bundler/src/bundle/macos/app.rs | 87 +++++++++-- tooling/bundler/src/bundle/macos/dmg.rs | 9 +- tooling/bundler/src/bundle/macos/sign.rs | 51 ++++--- tooling/bundler/src/bundle/settings.rs | 11 +- 18 files changed, 322 insertions(+), 54 deletions(-) create mode 100644 .changes/bundler-xattr.md create mode 100644 .changes/codesign-additional-files.md mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/Headers create mode 120000 core/tests/app-updater/frameworks/test.framework/Modules mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/Resources create mode 100644 core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap delete mode 100644 core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE create mode 100644 core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources mode change 100644 => 100755 core/tests/app-updater/frameworks/test.framework/Versions/A/test mode change 100644 => 120000 core/tests/app-updater/frameworks/test.framework/Versions/Current delete mode 120000 core/tests/app-updater/frameworks/test.framework/test diff --git a/.changes/bundler-xattr.md b/.changes/bundler-xattr.md new file mode 100644 index 000000000..561bb20e7 --- /dev/null +++ b/.changes/bundler-xattr.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch:bug +--- + +Remove extended attributes on the macOS app bundle using `xattr -cr $PATH`. diff --git a/.changes/codesign-additional-files.md b/.changes/codesign-additional-files.md new file mode 100644 index 000000000..17a972c80 --- /dev/null +++ b/.changes/codesign-additional-files.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch:bug +--- + +Code sign sidecars and frameworks on macOS. diff --git a/core/tests/app-updater/frameworks/test.framework/Headers b/core/tests/app-updater/frameworks/test.framework/Headers deleted file mode 100644 index a177d2a6b..000000000 --- a/core/tests/app-updater/frameworks/test.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Headers b/core/tests/app-updater/frameworks/test.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Modules b/core/tests/app-updater/frameworks/test.framework/Modules new file mode 120000 index 000000000..5736f3186 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Resources b/core/tests/app-updater/frameworks/test.framework/Resources deleted file mode 100644 index 953ee36f3..000000000 --- a/core/tests/app-updater/frameworks/test.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Resources \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Resources b/core/tests/app-updater/frameworks/test.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h b/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h index fed3381b2..3539143d0 100644 --- a/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h @@ -1 +1,18 @@ -// Testing that a header can be included +// +// test.h +// test +// +// Created by Trey Smith on 9/15/23. +// + +#import + +//! Project version number for test. +FOUNDATION_EXPORT double testVersionNumber; + +//! Project version string for test. +FOUNDATION_EXPORT const unsigned char testVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap b/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000..f1545257a --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module test { + umbrella header "test.h" + + export * + module * { export * } +} diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist index 593ddefdb..6f736f0a2 100644 --- a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist @@ -2,12 +2,14 @@ + BuildMachineOSBuild + 22D68 CFBundleDevelopmentRegion en CFBundleExecutable test CFBundleIdentifier - com.tauri.test.framework + com.tauri.test CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,18 +17,30 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.0 - CFBundleVersion - 1.0.0 - CFBundleSignature - ???? - LSMinimumSystemVersion - 10.15 + 1.0 CFBundleSupportedPlatforms MacOSX - NSPrincipalClass + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + DTPlatformName + macosx + DTPlatformVersion + 13.3 + DTSDKBuild + 22E245 + DTSDKName + macosx13.3 + DTXcode + 1431 + DTXcodeBuild + 14E300c + LSMinimumSystemVersion + 13.2 diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE deleted file mode 100644 index eb609b5b8..000000000 --- a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/LICENSE +++ /dev/null @@ -1 +0,0 @@ -Test that a LICENSE file can be included diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources b/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000..82d206327 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,142 @@ + + + + + files + + Resources/Info.plist + + /aPV7Q20g0elr7OiZJoUNggTOcg= + + + files2 + + Headers/test.h + + hash2 + + 5RA6Mnq5sNoaC4wKcFe6zymVmEL5Vb44G4BGqFjgZMM= + + + Modules/module.modulemap + + hash2 + + C6uLLSnQu9M2qLElVCkeo2JpnvWMxtArinQzmlh3v2A= + + + Resources/Info.plist + + hash2 + + nPMotNIMgvMfHtkRdpeehzfBiCZLnksfiD3nldUPzTE= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/test b/core/tests/app-updater/frameworks/test.framework/Versions/A/test old mode 100644 new mode 100755 index 5b0be073cc733e2548a8ad6af5f5d60cceadbdd2..687eb01d82bd2fcc1a41f20ed97a7a791ed1e9b9 GIT binary patch literal 35664 zcmeHQ2UJtb)=om`T@g@P07aCNlY}BjFDg<*0YyY0BnJp3fh05qg`ikKx%L7gMFg>4 z8;V^~K~zwR1w|21Kt%+lC>Q=Y0W^5M&;NhxfA_t&)|s`2nLV?oeP?FRo_%tLsxR+{ zq%asP1~?Jm<&cOF2D5e~hM5e=HsJmJJsrJ0k<1^Q&Ch9Jkc@cTXtuvU7mnk8=l!w1 zYU}TLNbE-%gU2KZa`^kxSWM3M3jeA;XtWSg9~jnOI%J&lfcN)zadLBZbZ{CQtIcSU zq|tDcc6T135#adXjb=-O&<1#A;78I&IBeLFRBi~73v;-JL2POS9Lr*d5f{U34g-vX zXv@z5WsESGB>po1l^}hmjMC63jo^vY9Rg@^5cY%c1ZYAM#NB~Moam@WcoCj|#;Jfp zNIUv=&KB-wq@e6#%0N+pmjW525rF594F^UmB+ZZWvBfSGnhEmw{Rbi9z}&*j0v@Rg z>5mY7I+zw%3^AI+CWbQt5$_St;ldGyc82tLKmjJ;RKd8B@gwDJ;5e8T&7}s0!~T2} z4GoEN#xUd{+#~$DAmsChv#4~KJ;M6~qYmIf`WIk>!H9uy#wd;8i8wXjk^B>O7)%Z_ zAy9`RfFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh* zfFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh*fFgh* zfFgh*fFgh*fFgh*fFgh*@J}LOqpLl`ebIusi)>xZk&n#@1VGJqwD;sw1|*4b^>*>U zx+j1%{ZWr(^S|vzBETWvY>#tT@F72kJNn@|W|9!5e>LE8i;f6{*%&zwE}Ov&#!MH& zRD)yzhtx?Is2KTHn=X)l`vqq)63;y);M~J~p8l}hX z6(C>)$1&P{!KBfV5WP6y8+{^|O^N43Fu)i5E{s4nl^suXfMeirRwT?Odec~R7|?7+ z3`}>Ra;f}p`3(Z$5EdK}PGtlKFok0bd z8Zuc7CLN9&xg#Ku&)@(DMhA~i;J4zzie}Sb4iSSq3;!6^Nc2mi)Kv^-+C>l@yUt-Mh=V7M%^sO9 zI5)t9&?_)F{#64Y8}k(S0N{}_Akppw0mr{80FZpg8jJinwE3PSJ<=qN6=BGwMza}) z2>cjN2RE{ptCyYKe2kK{@8g|=N=r{-A8TY)zlltr*Dna{Sn)`&eE=y0^;kqk6t4H_rLn&U5hWZovm|fZHOs}oian5$u zSa11eN1g0F(!{A6{WibtG->`)U$rMNY&j>X!C3vI+lJC@uJu+$6T6SDK628Vb*nw- zD*n-f2VuAc-onEPrxRAJeR?Tv-Uj``U**r*<(P&ktLjj&5~=E1uGOjh@Iue?3cjz`#2Y_k8jDMB#iJfIPAgPXLdE2wVyv z4Fs4h;E^=sk`ZKa%KU&LNaE+oj)pQIMEE6Urp`<4qtQihNXZe0#E^W%eapupS8t3s zRXD3!yLX@GcmD~KnglOu$~;&2M9Ph+g_?Q&XCnc}+jz{WVv^)<`wkxE9Z z#!7-p0!fmPxQLJ!USuN9%Y!r#l1B)Mi4wMvk>N1GiAggg=|EGFM9GP2BZ>Afo687d z(5PH+SqQ;4nj6AmGq~|2MMweR6PhSJ!ncUU;u7p_A$28bG6^yxlS#9TjY*J?k~9U7 zBvXj*d>}uP0i?$-DK+(*93wb65dNy6(Jo6$;pURRby-TV%YuV~cvvmLVFT=hcvx8s zNSDCzuvkou{*Dk$&n+9Tz){zg-FojyH*L|4ek4@7L!)NGo<$CgNppe+XQW})uHOi) zb9G_PKYhCu*Zhd)Qhc}LU4tEQOX9S4{{zl5Jy}Xep#3v+jSj5NXpL)Lu02z8PW6Tx z{{5l5_C={E7oC)<5Rx!Hi7PbteCnA>%FXGTHtd6MOk+rIE{I&=p6rc0;&Q~`UWK1y zTGdyv*MW65JIANmxw$hJ4J+_eUPQJ-GCXX^U`}8$ z*Z#1VSbF8-?lFedTH=Q9LP=bG1@^9-nh& z6c^s#x%0ZjZR5~t*8Po)l)#AjW}k;rTp#7tuGe_K{;F*M07d<@T*-A`c~b{d{D}h& z`_e5;Ne=Ig(6$rF~Zk54b4P1DrIv9>MqS(5w6G2+GDzSaBv8*aa+7qT3PELY38 zIElrlXFoD8*Msx6bu@T)Y_2_Db`=^VPjM~XDmB$?H_tq0Pve`GmWwhM*B{~t9 za98dIkRTU;1j!$fAXuCrM#6uexIpF**_cc+f+!}4xG;vuKz@vne~ZZamB?t>a!6cb zON07c_qW3D{o>acyfw*N;^Or#ZSsc30q5|~qKCC0T${30zq@$NYTKgS0}t*5Wlar} zug<^FqB8S_#*XY2QU~UyEvr>DrBs&5y53h{JgAt={=8hKZnb}A_cWnWuMF4a(jV!@ z+LN3oEmb?Uy{|VbyUM-vnzws!hS+IBU*!>f0xR;YH5N)Qv9FTdXW66Yq&ua2=>D1W zGEe+e>nknKm>>NlD}&i8`Mai~A-B##x*<^UaDLR*xgK8EjuUN9^?z-Sy!Sfa#c`E} zOPKpk+YM#hKuNh2+jW$U$-hJ1?|ks&^pH~-YK<^wIM@%q==3;dKScq~jon^hFd{N| z*cCvC#{6li$s$XSFGPePA+Q1kmg-OC$1ep84~uL|Y6LtFD+XG`1CJTq$7pn6ER@_0 z%^Z_CIIN;NA~-le=)}gx3P=vVu%S_jQ1Xp$%s43d?3CnFi{Nkul}UpMU_;}EFgOI- zw>=If1jZAn%y>d1mCXe)4ktPS<`Aef8XUyK+Fk_E~ljRDSY?IU|^B%4a(GC=o0o#1XNn91cB z{;)Lp;>*`$kBdQE$@}!oXFai*-7ybip#|48)~2jg*<(4^wEIw|&1U`D-+!C%`0^)C zX6Hk?Y-RicqsMtx198J)<)ZHr%~H}l2sN|He!sGJfkfD_-r&+gVetedo5k|#+?tX! z?b&nl>sV7?y?sy;`9jvQY5JXy5pnO|oKaFLdbUc-_|CMtC$jZnwRuyu<@<7vWN?xL zZmBF2CvH92?=Y_`U{>~|&z3sDgpHKYK51T6$jJ6MLYnwM$pxe-kg|w`_*R__+q(7XSge%9cYToL2-$;Kj~9}%7^fB4 zj!ZFR8krO3M2FMZ(Gdh&8Y`Luriebl#l@bW`@NPKV+xYwxVqILRithSsYySrVVqV7 zR@*;Tpl;q?U9zF`=9N14M#%*2(xM^1n-A{B%v#ZWe8S<6x2i5ixVE;H7=7@ljrdpq z_f9w&|14*5+Y`Bco$(n@3qobzx_2F&eljj&yJw!m8?w^bbuQC)nH20j0+YQ@oEDC= zCRKf$vn9MJu0Oi?va;1S{S~kNsB5^mCOA{Z&-`_&S>NP`jFt^Pb}=@k2^ZE1 zwYJq#-`)rxUeV+;h3aHc)NHqOVeTDbY12jJJ`rBToAO*u_bEqtEbWp-DcW)kFO;vo zQ{K_8ef{uj`{3u-gNYX~idzO77OJ>b7ey`YntfPLC@rg_(81+Ot9#DDqRyRH?nt>_ z5w~G#wstoe_l`+J+#HC9vxB6*Nk1GkUU~Ydp28lJML>B9g6KdE8datsT&mWX1_Y!5 zM?jL%;TQ%zm~05Hm4nFN__3)v|4`W)Ed`Ol163cBr;`975B%7X*SJ3SCTfN_04hytQR0$V+sgNp?@$=Sp?#%YQ_BDI2otrDQFf+by!!J6E^(QD6RoB?;SD zh0o8XXq)e5g(nyP(JyDXKgNraup{SaUdr)1*QW0=*;`#EDRxZnL;G@tqRSUQ&h9R+ zxuHBYyzf$bH`kGRO?p+`2}h^12h&m~*7vSiSwOAqx@2Y6gsnOLI^he!WaWMM@->Rs z?6TdmJ@)t0qC1`{Pe?6Wd{KCNFZNaT;_mL@TbKIJBuVZF{KLaavfujdaK9Gig2c+WUe;$%Z3re39XuTf?k-Lqo&-<_k?82AMHrJ>w!;Lfj$@j<=%GL#Uh(m}5aiD3C~H zv#Cf#+=32_oJhoZsdv;0JMw}k8rv;!1(QzpFbj%Y6m1*mW@L%*5l0y$EuF6TNFrFBd$NU7QTsNm*tw@Y&e5A7+2=14Xdznb** zeP?n|+8gN}ZY*wQBeA`>SA6%vX^a#?S7>i!)s3?HzKmie zhfi58w`rXwYYMhDo-c9Pecn3BY~pN}W&3p=Hw+DOCZ3jfLSHbXVkeq$%&vTf({aBi z+nz~vt`1$|rd+wJO*e_u@<$!-!{TN`y=Iwtmv@(WHe8uRYaYJ2QfDCG)>=Q6;m*yL z(~KksC&+Ehb1YKp%&dQ|ipk~4RYN?vyCRaKW+QPqoD7L42abtyCEsQ;FjMj5ia^o< z92P7FU{Vs+lM%vA0ZP_Nfs$B!PB=ak3IVHFM0lnUURVTdM&r#|ctYtyj~6!_-bmf4 zm8?HwRr_lb)rh7ziwqpagp8QT$iPMhQ4o@3<^$Q1)F2f^VH1*4_}(uMMlcg* z6I^ZoKdfNwD{<+Ay2>OY)!f9Ux7MM%&b^-Jxqrv(yp+5up2~C8EAgL9<>Zf^I&)-k z_|ah8%iyUAg;KGSMSY#SWv2|~R7D%rDi^27=O#Pl%cNy$;mW^MUJB7qocDR(-D`nS z0c(977ey<)PQPN2=uD9H(NVWa-ICv6s-ABVV%nEHdHLMpB?NB$y@by#taZ4pOXVE~ z4>i1%v{g*5p*F2D6khL+R{9fUix;v-Pr966AYs*Y$#)fu&Kn0CkjT*y26nI?PN)B+n%B=2C^3kFC{`MHeP|}6o1>F6 z^}CKc&dSFfTYNv5`X)19Z5&GXICms9Zj;i4;ya#^F`NISb&ct=K%p8l?1gtLFECK% zDiT-kf3}FL_Jw7hoU$dVE8DE}(EG%UWeS^$BxDjax}1%^E{R-r*=${mUpIHsa;s1K ztQKty=(rEPw^}C>O?A_oK z)Psekd7Z`UEVmajZ+X{UYIhUH=PNtew+CAj>+>$W394^7INf8d9Mh8Csh{?=q_=5Z zo22TObutUHtp^(%YAKn`MqJg%`krp)46*lF_fN5HiD$fS5~dAr$~mRAW`ct;I2DV6 z)5(WXDVXT8gtot@tK>&1_&2={Adw*>$Qb-38yO+8&QyT>H%sDQopozsm2>;{$OZd8 zG|WDip&e{BX!lAyQDWmc1nOzS&s`g&)1O)Pid3;ur@4q< zS1Ff?Tfga=*11y6iJ5mgH)cOyxokMU{Xu^6s-fZ6=}s-PB?jaUvMCqz%jWyACCuEp z&vlvc{;LX$6si`VS{z=`-c@#Npo6ek`L-_im6+=W9lLnH-hgID@7%8oo&2`WcRl~1 zmUHGQer5Bb{gwHXmmdk+9iIK_9oN9Y>Lt}m)Nz$jw9amu%;@ZL=)Lom*o@Ja1qY$z ze1XHzPle*2%z(eN^Zj360gSitr;fAni~rS8%H-ka#wZWb3hl>nnefG)x@GO>R;y^= z&Z|0oNVmQJdE|Ocvz`V@)(y6Oy`|m4U8P6WHgA0xopxh+*5}IfXQ83y&)<3`zE=qA zskhoz90ZCPqrl?T*F0FR%NqTd_;dHMSWQPs%yw8(buHBvTze)hr9y z8MPm)!PXQ$x8p=7EVN&{H$d*$vFQ)Pf-5MFtcu<0IeS;T%5Q6848L=B>~XuJC9~v_ zmT0Ti>2>W{HI9``>(g<_`vN}q7^Hja|I!@4ajyV&f4t^~ma2l5)sY2j20tA>p1$Njd4Gmlm|E*WK@|`D^Z~JHT)31G(EFuv)`SZ_*_sJcVvo&SaTL3R8S>a{_T$#=LwSu`de_Z3 zVsWK+>gDgFzh6qE6CJYq*(G?wu@QqI6DT9AF_YA zS8<6C)3-`G{*2FFSVMDoyNh-p-Q>45`2q93L}T})2XE(G5ZlVTbv|=L+D^UcEQx`} zQeAHaQO$_t`C+j`*Jf|1P}1^MT2@%^qaP5-nAc&f-P-c7M{4PwE%}T0k!@|$QUZ%# zoeL4|Q`CU6L_$i!&ewU`{ImarhX11-^bd*viU5iLiU5iLiU5iLiU5iLiU5iLiU5iL wiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5iLiU5kh--p2e04Qyu?f?J) literal 32 ncmY#Z)GsYA(of3F(@)JSQz*{h;z~`<$X8IxNX^N~SK crate::Result> { let resources_dir = bundle_directory.join("Resources"); let bin_dir = bundle_directory.join("MacOS"); + let mut sign_paths = Vec::new(); let bundle_icon_file: Option = { create_icns_file(&resources_dir, settings).with_context(|| "Failed to create app icon")? }; @@ -72,20 +75,52 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { create_info_plist(&bundle_directory, bundle_icon_file, settings) .with_context(|| "Failed to create Info.plist")?; - copy_frameworks_to_bundle(&bundle_directory, settings) + let framework_paths = copy_frameworks_to_bundle(&bundle_directory, settings) .with_context(|| "Failed to bundle frameworks")?; + sign_paths.extend( + framework_paths + .into_iter() + .filter(|p| { + let ext = p.extension(); + ext == Some(OsStr::new("framework")) || ext == Some(OsStr::new("dylib")) + }) + .map(|path| SignTarget { + path, + is_an_executable: false, + }), + ); settings.copy_resources(&resources_dir)?; - settings + let bin_paths = settings .copy_binaries(&bin_dir) .with_context(|| "Failed to copy external binaries")?; + sign_paths.extend(bin_paths.into_iter().map(|path| SignTarget { + path, + is_an_executable: true, + })); - copy_binaries_to_bundle(&bundle_directory, settings)?; + let bin_paths = copy_binaries_to_bundle(&bundle_directory, settings)?; + sign_paths.extend(bin_paths.into_iter().map(|path| SignTarget { + path, + is_an_executable: true, + })); if let Some(identity) = &settings.macos().signing_identity { + // Sign frameworks and sidecar binaries first, per apple, signing must be done inside out + // https://developer.apple.com/forums/thread/701514 + sign_paths.push(SignTarget { + path: app_bundle_path.clone(), + is_an_executable: true, + }); + + // Remove extra attributes, which could cause codesign to fail + // https://developer.apple.com/library/archive/qa/qa1940/_index.html + remove_extra_attr(&app_bundle_path)?; + // sign application - sign(app_bundle_path.clone(), identity, settings, true)?; + sign(sign_paths, identity, settings)?; + // notarization is required for distribution match notarize_auth() { Ok(auth) => { @@ -100,15 +135,30 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { Ok(vec![app_bundle_path]) } +fn remove_extra_attr(app_bundle_path: &Path) -> crate::Result<()> { + Command::new("xattr") + .arg("-cr") + .arg(app_bundle_path) + .output_ok() + .context("failed to remove extra attributes from app bundle")?; + Ok(()) +} + // Copies the app's binaries to the bundle. -fn copy_binaries_to_bundle(bundle_directory: &Path, settings: &Settings) -> crate::Result<()> { +fn copy_binaries_to_bundle( + bundle_directory: &Path, + settings: &Settings, +) -> crate::Result> { + let mut paths = Vec::new(); let dest_dir = bundle_directory.join("MacOS"); for bin in settings.binaries() { let bin_path = settings.binary_path(bin); - common::copy_file(&bin_path, &dest_dir.join(bin.name())) + let dest_path = dest_dir.join(bin.name()); + common::copy_file(&bin_path, &dest_path) .with_context(|| format!("Failed to copy binary from {:?}", bin_path))?; + paths.push(dest_path); } - Ok(()) + Ok(paths) } // Creates the Info.plist file. @@ -208,7 +258,12 @@ fn copy_framework_from(dest_dir: &Path, framework: &str, src_dir: &Path) -> crat } // Copies the macOS application bundle frameworks to the .app -fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> crate::Result<()> { +fn copy_frameworks_to_bundle( + bundle_directory: &Path, + settings: &Settings, +) -> crate::Result> { + let mut paths = Vec::new(); + let frameworks = settings .macos() .frameworks @@ -216,7 +271,7 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr .cloned() .unwrap_or_default(); if frameworks.is_empty() { - return Ok(()); + return Ok(paths); } let dest_dir = bundle_directory.join("Frameworks"); fs::create_dir_all(bundle_directory) @@ -227,7 +282,9 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr let src_name = src_path .file_name() .expect("Couldn't get framework filename"); - common::copy_dir(&src_path, &dest_dir.join(src_name))?; + let dest_path = dest_dir.join(src_name); + common::copy_dir(&src_path, &dest_path)?; + paths.push(dest_path); continue; } else if framework.ends_with(".dylib") { let src_path = PathBuf::from(framework); @@ -238,7 +295,9 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr ))); } let src_name = src_path.file_name().expect("Couldn't get library filename"); - common::copy_file(&src_path, &dest_dir.join(src_name))?; + let dest_path = dest_dir.join(src_name); + common::copy_file(&src_path, &dest_path)?; + paths.push(dest_path); continue; } else if framework.contains('/') { return Err(crate::Error::GenericError(format!( @@ -265,5 +324,5 @@ fn copy_frameworks_to_bundle(bundle_directory: &Path, settings: &Settings) -> cr framework ))); } - Ok(()) + Ok(paths) } diff --git a/tooling/bundler/src/bundle/macos/dmg.rs b/tooling/bundler/src/bundle/macos/dmg.rs index ba98c4e65..3748a5cfe 100644 --- a/tooling/bundler/src/bundle/macos/dmg.rs +++ b/tooling/bundler/src/bundle/macos/dmg.rs @@ -153,7 +153,14 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result< // Sign DMG if needed if let Some(identity) = &settings.macos().signing_identity { - super::sign::sign(dmg_path.clone(), identity, settings, false)?; + super::sign::sign( + vec![super::sign::SignTarget { + path: dmg_path.clone(), + is_an_executable: false, + }], + identity, + settings, + )?; } Ok(Bundled { diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index a4e5ec9c0..b2ab2f79d 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -144,13 +144,13 @@ pub fn delete_keychain() { .output_ok(); } -pub fn sign( - path_to_sign: PathBuf, - identity: &str, - settings: &Settings, - is_an_executable: bool, -) -> crate::Result<()> { - info!(action = "Signing"; "{} with identity \"{}\"", path_to_sign.display(), identity); +pub struct SignTarget { + pub path: PathBuf, + pub is_an_executable: bool, +} + +pub fn sign(targets: Vec, identity: &str, settings: &Settings) -> crate::Result<()> { + info!(action = "Signing"; "with identity \"{}\"", identity); let setup_keychain = if let (Some(certificate_encoded), Some(certificate_password)) = ( var_os("APPLE_CERTIFICATE"), @@ -164,20 +164,24 @@ pub fn sign( false }; - let res = try_sign( - path_to_sign, - identity, - settings, - is_an_executable, - setup_keychain, - ); + info!("Signing app bundle..."); + + for target in targets { + try_sign( + target.path, + identity, + settings, + target.is_an_executable, + setup_keychain, + )?; + } if setup_keychain { // delete the keychain again after signing delete_keychain(); } - res + Ok(()) } fn try_sign( @@ -187,6 +191,8 @@ fn try_sign( is_an_executable: bool, tauri_keychain: bool, ) -> crate::Result<()> { + info!(action = "Signing"; "{}", path_to_sign.display()); + let mut args = vec!["--force", "-s", identity]; if tauri_keychain { @@ -205,13 +211,9 @@ fn try_sign( args.push("runtime"); } - if path_to_sign.is_dir() { - args.push("--deep"); - } - Command::new("codesign") .args(args) - .arg(path_to_sign.to_string_lossy().to_string()) + .arg(path_to_sign) .output_ok() .context("failed to sign app")?; @@ -260,7 +262,14 @@ pub fn notarize( // sign the zip file if let Some(identity) = &settings.macos().signing_identity { - sign(zip_path.clone(), identity, settings, false)?; + sign( + vec![SignTarget { + path: zip_path.clone(), + is_an_executable: false, + }], + identity, + settings, + )?; }; let notarize_args = vec![ diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index 46d67d8be..09936a74f 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -761,7 +761,11 @@ impl Settings { } /// Copies external binaries to a path. - pub fn copy_binaries(&self, path: &Path) -> crate::Result<()> { + /// + /// Returns the list of destination paths. + pub fn copy_binaries(&self, path: &Path) -> crate::Result> { + let mut paths = Vec::new(); + for src in self.external_binaries() { let src = src?; let dest = path.join( @@ -771,9 +775,10 @@ impl Settings { .to_string_lossy() .replace(&format!("-{}", self.target), ""), ); - common::copy_file(&src, dest)?; + common::copy_file(&src, &dest)?; + paths.push(dest); } - Ok(()) + Ok(paths) } /// Copies resources to a path. From 5ecb46b3410afd1b5c82494c1e0a91d5a358c41a Mon Sep 17 00:00:00 2001 From: Trey Smith Date: Sun, 24 Sep 2023 18:11:20 -0400 Subject: [PATCH 066/104] fix: rpath missing from app, closes #7710 (#7773) Co-authored-by: Lucas Nogueira Co-authored-by: Lucas Fernandes Nogueira fix: codesign doesn't sign frameworks or sidecar, closes #7690 (#7774) --- .changes/rpath.md | 5 ++ core/tauri-build/Cargo.toml | 2 + core/tauri-build/src/lib.rs | 123 +++++++++++++++++++++++++++++- core/tauri-codegen/src/context.rs | 2 +- 4 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 .changes/rpath.md diff --git a/.changes/rpath.md b/.changes/rpath.md new file mode 100644 index 000000000..1d041bfad --- /dev/null +++ b/.changes/rpath.md @@ -0,0 +1,5 @@ +--- +"tauri-build": patch:bug +--- + +Automatically set rpath on macOS if frameworks are bundled and copy frameworks to `src-tauri/target/Frameworks` for usage in development. diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 4f92f8a46..9319920ff 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -28,6 +28,8 @@ heck = "0.4" json-patch = "1.0" tauri-winres = "0.1" semver = "1" +walkdir = "2" +dirs-next = "2" [features] codegen = [ "tauri-codegen", "quote" ] diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index f5326c071..045011dfe 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -4,6 +4,7 @@ #![cfg_attr(doc_cfg, feature(doc_cfg))] +use anyhow::Context; pub use anyhow::Result; use cargo_toml::Manifest; use heck::AsShoutySnakeCase; @@ -80,6 +81,113 @@ fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> { Ok(()) } +#[cfg(unix)] +fn symlink_dir(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::unix::fs::symlink(src, dst) +} + +/// Makes a symbolic link to a directory. +#[cfg(windows)] +fn symlink_dir(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::windows::fs::symlink_dir(src, dst) +} + +/// Makes a symbolic link to a file. +#[cfg(unix)] +fn symlink_file(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::unix::fs::symlink(src, dst) +} + +/// Makes a symbolic link to a file. +#[cfg(windows)] +fn symlink_file(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::windows::fs::symlink_file(src, dst) +} + +fn copy_dir(from: &Path, to: &Path) -> Result<()> { + for entry in walkdir::WalkDir::new(from) { + let entry = entry?; + debug_assert!(entry.path().starts_with(from)); + let rel_path = entry.path().strip_prefix(from)?; + let dest_path = to.join(rel_path); + if entry.file_type().is_symlink() { + let target = std::fs::read_link(entry.path())?; + if entry.path().is_dir() { + symlink_dir(&target, &dest_path)?; + } else { + symlink_file(&target, &dest_path)?; + } + } else if entry.file_type().is_dir() { + std::fs::create_dir(dest_path)?; + } else { + std::fs::copy(entry.path(), dest_path)?; + } + } + Ok(()) +} + +// Copies the framework under `{src_dir}/{framework}.framework` to `{dest_dir}/{framework}.framework`. +fn copy_framework_from(src_dir: &Path, framework: &str, dest_dir: &Path) -> Result { + let src_name = format!("{}.framework", framework); + let src_path = src_dir.join(&src_name); + if src_path.exists() { + copy_dir(&src_path, &dest_dir.join(&src_name))?; + Ok(true) + } else { + Ok(false) + } +} + +// Copies the macOS application bundle frameworks to the target folder +fn copy_frameworks(dest_dir: &Path, frameworks: &[String]) -> Result<()> { + std::fs::create_dir_all(dest_dir).with_context(|| { + format!( + "Failed to create frameworks output directory at {:?}", + dest_dir + ) + })?; + for framework in frameworks.iter() { + if framework.ends_with(".framework") { + let src_path = PathBuf::from(framework); + let src_name = src_path + .file_name() + .expect("Couldn't get framework filename"); + let dest_path = dest_dir.join(src_name); + copy_dir(&src_path, &dest_path)?; + continue; + } else if framework.ends_with(".dylib") { + let src_path = PathBuf::from(framework); + if !src_path.exists() { + return Err(anyhow::anyhow!("Library not found: {}", framework)); + } + let src_name = src_path.file_name().expect("Couldn't get library filename"); + let dest_path = dest_dir.join(src_name); + copy_file(&src_path, &dest_path)?; + continue; + } else if framework.contains('/') { + return Err(anyhow::anyhow!( + "Framework path should have .framework extension: {}", + framework + )); + } + if let Some(home_dir) = dirs_next::home_dir() { + if copy_framework_from(&home_dir.join("Library/Frameworks/"), framework, dest_dir)? { + continue; + } + } + if copy_framework_from(&PathBuf::from("/Library/Frameworks/"), framework, dest_dir)? + || copy_framework_from( + &PathBuf::from("/Network/Library/Frameworks/"), + framework, + dest_dir, + )? + { + continue; + } + } + Ok(()) +} + // checks if the given Cargo feature is enabled. fn has_feature(feature: &str) -> bool { // when a feature is enabled, Cargo sets the `CARGO_FEATURE_ Result<()> { } if target_triple.contains("darwin") { + if let Some(frameworks) = &config.tauri.bundle.macos.frameworks { + if !frameworks.is_empty() { + let frameworks_dir = target_dir.parent().unwrap().join("Frameworks"); + let _ = std::fs::remove_dir_all(&frameworks_dir); + // copy frameworks to the root `target` folder (instead of `target/debug` for instance) + // because the rpath is set to `@executable_path/../Frameworks`. + copy_frameworks(&frameworks_dir, frameworks)?; + + // If we have frameworks, we need to set the @rpath + // https://github.com/tauri-apps/tauri/issues/7710 + println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/../Frameworks"); + } + } + if let Some(version) = &config.tauri.bundle.macos.minimum_system_version { println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={version}"); } } if target_triple.contains("windows") { - use anyhow::Context; use semver::Version; use tauri_winres::{VersionInfo, WindowsResource}; diff --git a/core/tauri-codegen/src/context.rs b/core/tauri-codegen/src/context.rs index 0ccd8cf72..2e95b0f25 100644 --- a/core/tauri-codegen/src/context.rs +++ b/core/tauri-codegen/src/context.rs @@ -351,7 +351,7 @@ pub fn context_codegen(data: ContextData) -> Result Date: Mon, 25 Sep 2023 13:44:27 +0200 Subject: [PATCH 067/104] docs: change `icon` help output to ask for 1024px source icons, closes #7886 (#7896) --- tooling/cli/src/icon.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tooling/cli/src/icon.rs b/tooling/cli/src/icon.rs index 7e38e0e37..c91e7e313 100644 --- a/tooling/cli/src/icon.rs +++ b/tooling/cli/src/icon.rs @@ -47,8 +47,7 @@ impl PngTarget { #[derive(Debug, Parser)] #[clap(about = "Generates various icons for all major platforms")] pub struct Options { - // TODO: Confirm 1240px - /// Path to the source icon (png, 1240x1240px with transparency). + /// Path to the source icon (png, 1024x1024px with transparency). #[clap(default_value = "./app-icon.png")] input: PathBuf, /// Output directory. From 9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 26 Sep 2023 19:40:38 +0200 Subject: [PATCH 068/104] feat(core): Allow http origin on Windows, fixes: #3007 (#7645) Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com> Co-authored-by: Lucas Nogueira --- .changes/windows-http-scheme.md | 8 +++++ core/tauri-config-schema/schema.json | 7 +++++ core/tauri-runtime-wry/src/lib.rs | 5 ++++ core/tauri-runtime/src/window.rs | 5 ++++ core/tauri-utils/src/config.rs | 10 ++++++- core/tauri/scripts/bundle.global.js | 10 +++---- core/tauri/scripts/core.js | 10 +++++++ core/tauri/src/app.rs | 11 +++---- core/tauri/src/manager.rs | 45 +++++++++++++++++++++++----- core/tauri/src/pattern.rs | 5 ++-- core/tauri/src/window.rs | 6 ++++ tooling/api/src/tauri.ts | 8 ++--- tooling/cli/schema.json | 7 +++++ 13 files changed, 112 insertions(+), 25 deletions(-) create mode 100644 .changes/windows-http-scheme.md diff --git a/.changes/windows-http-scheme.md b/.changes/windows-http-scheme.md new file mode 100644 index 000000000..c907f5262 --- /dev/null +++ b/.changes/windows-http-scheme.md @@ -0,0 +1,8 @@ +--- +'tauri': 'patch:enhance' +'tauri-runtime': 'patch:enhance' +'tauri-runtime-wry': 'patch:enhance' +'tauri-utils': 'patch:enhance' +--- + +Add setting to switch to `http://.localhost/` for custom protocols on Windows. diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index 46306d0ac..af0ca7635 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -167,6 +167,7 @@ "security": { "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], + "dangerousUseHttpScheme": false, "freezePrototype": false }, "updater": { @@ -423,6 +424,7 @@ "default": { "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], + "dangerousUseHttpScheme": false, "freezePrototype": false }, "allOf": [ @@ -2740,6 +2742,11 @@ "items": { "$ref": "#/definitions/RemoteDomainAccessScope" } + }, + "dangerousUseHttpScheme": { + "description": "Sets whether the custom protocols should use `http://.localhost` instead of the default `https://.localhost` on Windows.\n\n**WARNING:** Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints and is therefore less secure but will match the behavior of the `://localhost` protocols used on macOS and Linux.", + "default": false, + "type": "boolean" } }, "additionalProperties": false diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 2683c74c0..1fb9410a3 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -3196,6 +3196,11 @@ fn create_webview( }); } + #[cfg(windows)] + { + webview_builder = webview_builder.with_https_scheme(!pending.http_scheme); + } + if let Some(handler) = ipc_handler { webview_builder = webview_builder.with_ipc_handler(create_ipc_handler( context, diff --git a/core/tauri-runtime/src/window.rs b/core/tauri-runtime/src/window.rs index 7c154cdea..34a5f5118 100644 --- a/core/tauri-runtime/src/window.rs +++ b/core/tauri-runtime/src/window.rs @@ -224,6 +224,9 @@ pub struct PendingWindow> { pub uri_scheme_protocols: HashMap>, + // Whether custom protocols on windows should use http://.localhost/ instead of https://.localhost/ + pub http_scheme: bool, + /// How to handle IPC calls on the webview window. pub ipc_handler: Option>, @@ -281,6 +284,7 @@ impl> PendingWindow { navigation_handler: Default::default(), web_resource_request_handler: Default::default(), url: "tauri://localhost".to_string(), + http_scheme: false, }) } } @@ -312,6 +316,7 @@ impl> PendingWindow { navigation_handler: Default::default(), web_resource_request_handler: Default::default(), url: "tauri://localhost".to_string(), + http_scheme: false, }) } } diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index e435f7eea..0a1e06f7a 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -1326,6 +1326,11 @@ pub struct SecurityConfig { /// vulnerable to dangerous Tauri command related attacks otherwise. #[serde(default, alias = "dangerous-remote-domain-ipc-access")] pub dangerous_remote_domain_ipc_access: Vec, + /// Sets whether the custom protocols should use `http://.localhost` instead of the default `https://.localhost` on Windows. + /// + /// **WARNING:** Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints and is therefore less secure but will match the behavior of the `://localhost` protocols used on macOS and Linux. + #[serde(default, alias = "dangerous-use-http-scheme")] + pub dangerous_use_http_scheme: bool, } /// Defines an allowlist type. @@ -3736,6 +3741,7 @@ mod build { 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_use_http_scheme = &self.dangerous_use_http_scheme; let dangerous_remote_domain_ipc_access = vec_lit(&self.dangerous_remote_domain_ipc_access, identity); @@ -3746,7 +3752,8 @@ mod build { dev_csp, freeze_prototype, dangerous_disable_asset_csp_modification, - dangerous_remote_domain_ipc_access + dangerous_remote_domain_ipc_access, + dangerous_use_http_scheme ); } } @@ -4013,6 +4020,7 @@ mod test { freeze_prototype: false, dangerous_disable_asset_csp_modification: DisabledCspModificationKind::Flag(false), dangerous_remote_domain_ipc_access: Vec::new(), + dangerous_use_http_scheme: false, }, allowlist: AllowlistConfig::default(), system_tray: None, diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 9aa74ce68..dea0ba44d 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,8 +1,8 @@ -"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var ye=Object.prototype.hasOwnProperty;var d=(i,e)=>{for(var t in e)L(i,t,{get:e[t],enumerable:!0})},he=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ge(e))!ye.call(i,s)&&s!==t&&L(i,s,{get:()=>e[s],enumerable:!(r=pe(e,s))||r.enumerable});return i};var fe=i=>he(L({},"__esModule",{value:!0}),i);var Zt={};d(Zt,{app:()=>k,cli:()=>U,clipboard:()=>z,dialog:()=>I,event:()=>V,fs:()=>j,globalShortcut:()=>q,http:()=>$,invoke:()=>Yt,notification:()=>J,os:()=>ne,path:()=>K,process:()=>Q,shell:()=>Y,tauri:()=>R,updater:()=>X,window:()=>ie});var k={};d(k,{getName:()=>we,getTauriVersion:()=>ve,getVersion:()=>Pe,hide:()=>Te,show:()=>Me});var R={};d(R,{convertFileSrc:()=>_e,invoke:()=>f,transformCallback:()=>c});function be(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function c(i,e=!1){let t=be(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),i?.(s)),writable:!1,configurable:!0}),t}async function f(i,e={}){return new Promise((t,r)=>{let s=c(l=>{t(l),Reflect.deleteProperty(window,`_${o}`)},!0),o=c(l=>{r(l),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:i,callback:s,error:o,...e})})}function _e(i,e="asset"){let t=encodeURIComponent(i);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function n(i){return f("tauri",i)}async function Pe(){return n({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function we(){return n({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ve(){return n({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Me(){return n({__tauriModule:"App",message:{cmd:"show"}})}async function Te(){return n({__tauriModule:"App",message:{cmd:"hide"}})}var U={};d(U,{getMatches:()=>Fe});async function Fe(){return n({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}var z={};d(z,{readText:()=>Ce,writeText:()=>Oe});async function Oe(i){return n({__tauriModule:"Clipboard",message:{cmd:"writeText",data:i}})}async function Ce(){return n({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}var I={};d(I,{ask:()=>De,confirm:()=>Se,message:()=>We,open:()=>Ee,save:()=>Ae});async function Ee(i={}){return typeof i=="object"&&Object.freeze(i),n({__tauriModule:"Dialog",message:{cmd:"openDialog",options:i}})}async function Ae(i={}){return typeof i=="object"&&Object.freeze(i),n({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:i}})}async function We(i,e){let t=typeof e=="string"?{title:e}:e;return n({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:i.toString(),title:t?.title?.toString(),type:t?.type,buttonLabel:t?.okLabel?.toString()}})}async function De(i,e){let t=typeof e=="string"?{title:e}:e;return n({__tauriModule:"Dialog",message:{cmd:"askDialog",message:i.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Yes",t?.cancelLabel?.toString()??"No"]}})}async function Se(i,e){let t=typeof e=="string"?{title:e}:e;return n({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:i.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Ok",t?.cancelLabel?.toString()??"Cancel"]}})}var V={};d(V,{TauriEvent:()=>M,emit:()=>T,listen:()=>N,once:()=>H});async function re(i,e){return n({__tauriModule:"Event",message:{cmd:"unlisten",event:i,eventId:e}})}async function w(i,e,t){await n({__tauriModule:"Event",message:{cmd:"emit",event:i,windowLabel:e,payload:t}})}async function b(i,e,t){return n({__tauriModule:"Event",message:{cmd:"listen",event:i,windowLabel:e,handler:c(t)}}).then(r=>async()=>re(i,r))}async function v(i,e,t){return b(i,e,r=>{t(r),re(i,r.id).catch(()=>{})})}var M=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.CHECK_UPDATE="tauri://update",u.UPDATE_AVAILABLE="tauri://update-available",u.INSTALL_UPDATE="tauri://update-install",u.STATUS_UPDATE="tauri://update-status",u.DOWNLOAD_PROGRESS="tauri://update-download-progress",u))(M||{});async function N(i,e){return b(i,null,e)}async function H(i,e){return v(i,null,e)}async function T(i,e){return w(i,void 0,e)}var j={};d(j,{BaseDirectory:()=>F,Dir:()=>F,copyFile:()=>He,createDir:()=>Ie,exists:()=>qe,readBinaryFile:()=>Re,readDir:()=>ze,readTextFile:()=>Le,removeDir:()=>Ne,removeFile:()=>Ve,renameFile:()=>je,writeBinaryFile:()=>Ue,writeFile:()=>ke,writeTextFile:()=>ke});var F=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Desktop=6]="Desktop",a[a.Document=7]="Document",a[a.Download=8]="Download",a[a.Executable=9]="Executable",a[a.Font=10]="Font",a[a.Home=11]="Home",a[a.Picture=12]="Picture",a[a.Public=13]="Public",a[a.Runtime=14]="Runtime",a[a.Template=15]="Template",a[a.Video=16]="Video",a[a.Resource=17]="Resource",a[a.App=18]="App",a[a.Log=19]="Log",a[a.Temp=20]="Temp",a[a.AppConfig=21]="AppConfig",a[a.AppData=22]="AppData",a[a.AppLocalData=23]="AppLocalData",a[a.AppCache=24]="AppCache",a[a.AppLog=25]="AppLog",a))(F||{});async function Le(i,e={}){return n({__tauriModule:"Fs",message:{cmd:"readTextFile",path:i,options:e}})}async function Re(i,e={}){let t=await n({__tauriModule:"Fs",message:{cmd:"readFile",path:i,options:e}});return Uint8Array.from(t)}async function ke(i,e,t){typeof t=="object"&&Object.freeze(t),typeof i=="object"&&Object.freeze(i);let r={path:"",contents:""},s=t;return typeof i=="string"?r.path=i:(r.path=i.path,r.contents=i.contents),typeof e=="string"?r.contents=e??"":s=e,n({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(new TextEncoder().encode(r.contents)),options:s}})}async function Ue(i,e,t){typeof t=="object"&&Object.freeze(t),typeof i=="object"&&Object.freeze(i);let r={path:"",contents:[]},s=t;return typeof i=="string"?r.path=i:(r.path=i.path,r.contents=i.contents),e&&"dir"in e?s=e:typeof i=="string"&&(r.contents=e??[]),n({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:s}})}async function ze(i,e={}){return n({__tauriModule:"Fs",message:{cmd:"readDir",path:i,options:e}})}async function Ie(i,e={}){return n({__tauriModule:"Fs",message:{cmd:"createDir",path:i,options:e}})}async function Ne(i,e={}){return n({__tauriModule:"Fs",message:{cmd:"removeDir",path:i,options:e}})}async function He(i,e,t={}){return n({__tauriModule:"Fs",message:{cmd:"copyFile",source:i,destination:e,options:t}})}async function Ve(i,e={}){return n({__tauriModule:"Fs",message:{cmd:"removeFile",path:i,options:e}})}async function je(i,e,t={}){return n({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:i,newPath:e,options:t}})}async function qe(i,e={}){return n({__tauriModule:"Fs",message:{cmd:"exists",path:i,options:e}})}var q={};d(q,{isRegistered:()=>Je,register:()=>Ge,registerAll:()=>$e,unregister:()=>Ke,unregisterAll:()=>Qe});async function Ge(i,e){return n({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:i,handler:c(e)}})}async function $e(i,e){return n({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:i,handler:c(e)}})}async function Je(i){return n({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:i}})}async function Ke(i){return n({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:i}})}async function Qe(){return n({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}var $={};d($,{Body:()=>p,Client:()=>C,Response:()=>O,ResponseType:()=>se,fetch:()=>Ze,getClient:()=>ae});var se=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(se||{});async function Ye(i){let e={},t=async(r,s)=>{if(s!==null){let o;typeof s=="string"?o=s:s instanceof Uint8Array||Array.isArray(s)?o=Array.from(s):s instanceof File?o={file:Array.from(new Uint8Array(await s.arrayBuffer())),mime:s.type,fileName:s.name}:typeof s.file=="string"?o={file:s.file,mime:s.mime,fileName:s.fileName}:o={file:Array.from(s.file),mime:s.mime,fileName:s.fileName},e[String(r)]=o}};if(i instanceof FormData)for(let[r,s]of i)await t(r,s);else for(let[r,s]of Object.entries(i))await t(r,s);return e}var p=class{constructor(e,t){this.type=e,this.payload=t}static form(e){return new p("Form",e)}static json(e){return new p("Json",e)}static text(e){return new p("Text",e)}static bytes(e){return new p("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},O=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},C=class{constructor(e){this.id=e}async drop(){return n({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),e.body?.type==="Form"&&(e.body.payload=await Ye(e.body.payload)),n({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new O(r);if(t){try{s.data=JSON.parse(s.data)}catch(o){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${o}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ae(i){return n({__tauriModule:"Http",message:{cmd:"createClient",options:i}}).then(e=>new C(e))}var G=null;async function Ze(i,e){return G===null&&(G=await ae()),G.request({url:i,method:e?.method??"GET",...e})}var J={};d(J,{isPermissionGranted:()=>Xe,requestPermission:()=>Be,sendNotification:()=>et});async function Xe(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):n({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function Be(){return window.Notification.requestPermission()}function et(i){typeof i=="string"?new window.Notification(i):new window.Notification(i.title,i)}var K={};d(K,{BaseDirectory:()=>F,appCacheDir:()=>rt,appConfigDir:()=>oe,appDataDir:()=>it,appDir:()=>tt,appLocalDataDir:()=>nt,appLogDir:()=>le,audioDir:()=>st,basename:()=>Dt,cacheDir:()=>at,configDir:()=>ot,dataDir:()=>lt,delimiter:()=>Ft,desktopDir:()=>ut,dirname:()=>At,documentDir:()=>dt,downloadDir:()=>ct,executableDir:()=>mt,extname:()=>Wt,fontDir:()=>pt,homeDir:()=>gt,isAbsolute:()=>St,join:()=>Et,localDataDir:()=>yt,logDir:()=>Mt,normalize:()=>Ct,pictureDir:()=>ht,publicDir:()=>ft,resolve:()=>Ot,resolveResource:()=>_t,resourceDir:()=>bt,runtimeDir:()=>Pt,sep:()=>Tt,templateDir:()=>wt,videoDir:()=>vt});function _(){return navigator.appVersion.includes("Win")}async function tt(){return oe()}async function oe(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:21}})}async function it(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:22}})}async function nt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:23}})}async function rt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:24}})}async function st(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:1}})}async function at(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:2}})}async function ot(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:3}})}async function lt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:4}})}async function ut(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:6}})}async function dt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:7}})}async function ct(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:8}})}async function mt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:9}})}async function pt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:10}})}async function gt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:11}})}async function yt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:5}})}async function ht(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:12}})}async function ft(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:13}})}async function bt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:17}})}async function _t(i){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:i,directory:17}})}async function Pt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:14}})}async function wt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:15}})}async function vt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:16}})}async function Mt(){return le()}async function le(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:25}})}var Tt=_()?"\\":"/",Ft=_()?";":":";async function Ot(...i){return n({__tauriModule:"Path",message:{cmd:"resolve",paths:i}})}async function Ct(i){return n({__tauriModule:"Path",message:{cmd:"normalize",path:i}})}async function Et(...i){return n({__tauriModule:"Path",message:{cmd:"join",paths:i}})}async function At(i){return n({__tauriModule:"Path",message:{cmd:"dirname",path:i}})}async function Wt(i){return n({__tauriModule:"Path",message:{cmd:"extname",path:i}})}async function Dt(i,e){return n({__tauriModule:"Path",message:{cmd:"basename",path:i,ext:e}})}async function St(i){return n({__tauriModule:"Path",message:{cmd:"isAbsolute",path:i}})}var Q={};d(Q,{exit:()=>xt,relaunch:()=>Lt});async function xt(i=0){return n({__tauriModule:"Process",message:{cmd:"exit",exitCode:i}})}async function Lt(){return n({__tauriModule:"Process",message:{cmd:"relaunch"}})}var Y={};d(Y,{Child:()=>E,Command:()=>P,EventEmitter:()=>g,open:()=>kt});async function Rt(i,e,t=[],r){return typeof t=="object"&&Object.freeze(t),n({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:c(i)}})}var g=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=(...s)=>{this.removeListener(e,r),t(...s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,...t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(...t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=(...s)=>{this.removeListener(e,r),t(...s)};return this.prependListener(e,r)}},E=class{constructor(e){this.pid=e}async write(e){return n({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return n({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},P=class extends g{constructor(t,r=[],s){super();this.stdout=new g;this.stderr=new g;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static sidecar(t,r=[],s){let o=new P(t,r,s);return o.options.sidecar=!0,o}async spawn(){return Rt(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new E(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],o=[];this.stdout.on("data",l=>{s.push(l)}),this.stderr.on("data",l=>{o.push(l)}),this.on("close",l=>{t({code:l.code,signal:l.signal,stdout:s.join(` +"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var ye=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var i in e)L(t,i,{get:e[i],enumerable:!0})},he=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ge(e))!ye.call(t,s)&&s!==i&&L(t,s,{get:()=>e[s],enumerable:!(r=pe(e,s))||r.enumerable});return t};var fe=t=>he(L({},"__esModule",{value:!0}),t);var Zt={};d(Zt,{app:()=>k,cli:()=>U,clipboard:()=>I,dialog:()=>z,event:()=>V,fs:()=>j,globalShortcut:()=>q,http:()=>J,invoke:()=>Yt,notification:()=>$,os:()=>ne,path:()=>K,process:()=>Q,shell:()=>Y,tauri:()=>R,updater:()=>X,window:()=>ie});var k={};d(k,{getName:()=>we,getTauriVersion:()=>ve,getVersion:()=>Pe,hide:()=>Te,show:()=>Me});var R={};d(R,{convertFileSrc:()=>_e,invoke:()=>f,transformCallback:()=>c});function be(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function c(t,e=!1){let i=be(),r=`_${i}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),t?.(s)),writable:!1,configurable:!0}),i}async function f(t,e={}){return new Promise((i,r)=>{let s=c(l=>{i(l),Reflect.deleteProperty(window,`_${o}`)},!0),o=c(l=>{r(l),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:t,callback:s,error:o,...e})})}function _e(t,e="asset"){return window.__TAURI__.convertFileSrc(t,e)}async function n(t){return f("tauri",t)}async function Pe(){return n({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function we(){return n({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ve(){return n({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Me(){return n({__tauriModule:"App",message:{cmd:"show"}})}async function Te(){return n({__tauriModule:"App",message:{cmd:"hide"}})}var U={};d(U,{getMatches:()=>Fe});async function Fe(){return n({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}var I={};d(I,{readText:()=>Ee,writeText:()=>Oe});async function Oe(t){return n({__tauriModule:"Clipboard",message:{cmd:"writeText",data:t}})}async function Ee(){return n({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}var z={};d(z,{ask:()=>De,confirm:()=>Se,message:()=>We,open:()=>Ce,save:()=>Ae});async function Ce(t={}){return typeof t=="object"&&Object.freeze(t),n({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})}async function Ae(t={}){return typeof t=="object"&&Object.freeze(t),n({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})}async function We(t,e){let i=typeof e=="string"?{title:e}:e;return n({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t.toString(),title:i?.title?.toString(),type:i?.type,buttonLabel:i?.okLabel?.toString()}})}async function De(t,e){let i=typeof e=="string"?{title:e}:e;return n({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t.toString(),title:i?.title?.toString(),type:i?.type,buttonLabels:[i?.okLabel?.toString()??"Yes",i?.cancelLabel?.toString()??"No"]}})}async function Se(t,e){let i=typeof e=="string"?{title:e}:e;return n({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t.toString(),title:i?.title?.toString(),type:i?.type,buttonLabels:[i?.okLabel?.toString()??"Ok",i?.cancelLabel?.toString()??"Cancel"]}})}var V={};d(V,{TauriEvent:()=>M,emit:()=>T,listen:()=>N,once:()=>H});async function re(t,e){return n({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})}async function w(t,e,i){await n({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:i}})}async function b(t,e,i){return n({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:c(i)}}).then(r=>async()=>re(t,r))}async function v(t,e,i){return b(t,e,r=>{i(r),re(t,r.id).catch(()=>{})})}var M=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.CHECK_UPDATE="tauri://update",u.UPDATE_AVAILABLE="tauri://update-available",u.INSTALL_UPDATE="tauri://update-install",u.STATUS_UPDATE="tauri://update-status",u.DOWNLOAD_PROGRESS="tauri://update-download-progress",u))(M||{});async function N(t,e){return b(t,null,e)}async function H(t,e){return v(t,null,e)}async function T(t,e){return w(t,void 0,e)}var j={};d(j,{BaseDirectory:()=>F,Dir:()=>F,copyFile:()=>He,createDir:()=>ze,exists:()=>qe,readBinaryFile:()=>Re,readDir:()=>Ie,readTextFile:()=>Le,removeDir:()=>Ne,removeFile:()=>Ve,renameFile:()=>je,writeBinaryFile:()=>Ue,writeFile:()=>ke,writeTextFile:()=>ke});var F=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Desktop=6]="Desktop",a[a.Document=7]="Document",a[a.Download=8]="Download",a[a.Executable=9]="Executable",a[a.Font=10]="Font",a[a.Home=11]="Home",a[a.Picture=12]="Picture",a[a.Public=13]="Public",a[a.Runtime=14]="Runtime",a[a.Template=15]="Template",a[a.Video=16]="Video",a[a.Resource=17]="Resource",a[a.App=18]="App",a[a.Log=19]="Log",a[a.Temp=20]="Temp",a[a.AppConfig=21]="AppConfig",a[a.AppData=22]="AppData",a[a.AppLocalData=23]="AppLocalData",a[a.AppCache=24]="AppCache",a[a.AppLog=25]="AppLog",a))(F||{});async function Le(t,e={}){return n({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})}async function Re(t,e={}){let i=await n({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}});return Uint8Array.from(i)}async function ke(t,e,i){typeof i=="object"&&Object.freeze(i),typeof t=="object"&&Object.freeze(t);let r={path:"",contents:""},s=i;return typeof t=="string"?r.path=t:(r.path=t.path,r.contents=t.contents),typeof e=="string"?r.contents=e??"":s=e,n({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(new TextEncoder().encode(r.contents)),options:s}})}async function Ue(t,e,i){typeof i=="object"&&Object.freeze(i),typeof t=="object"&&Object.freeze(t);let r={path:"",contents:[]},s=i;return typeof t=="string"?r.path=t:(r.path=t.path,r.contents=t.contents),e&&"dir"in e?s=e:typeof t=="string"&&(r.contents=e??[]),n({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:s}})}async function Ie(t,e={}){return n({__tauriModule:"Fs",message:{cmd:"readDir",path:t,options:e}})}async function ze(t,e={}){return n({__tauriModule:"Fs",message:{cmd:"createDir",path:t,options:e}})}async function Ne(t,e={}){return n({__tauriModule:"Fs",message:{cmd:"removeDir",path:t,options:e}})}async function He(t,e,i={}){return n({__tauriModule:"Fs",message:{cmd:"copyFile",source:t,destination:e,options:i}})}async function Ve(t,e={}){return n({__tauriModule:"Fs",message:{cmd:"removeFile",path:t,options:e}})}async function je(t,e,i={}){return n({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:t,newPath:e,options:i}})}async function qe(t,e={}){return n({__tauriModule:"Fs",message:{cmd:"exists",path:t,options:e}})}var q={};d(q,{isRegistered:()=>$e,register:()=>Ge,registerAll:()=>Je,unregister:()=>Ke,unregisterAll:()=>Qe});async function Ge(t,e){return n({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:c(e)}})}async function Je(t,e){return n({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:c(e)}})}async function $e(t){return n({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})}async function Ke(t){return n({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})}async function Qe(){return n({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}var J={};d(J,{Body:()=>p,Client:()=>E,Response:()=>O,ResponseType:()=>se,fetch:()=>Ze,getClient:()=>ae});var se=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(se||{});async function Ye(t){let e={},i=async(r,s)=>{if(s!==null){let o;typeof s=="string"?o=s:s instanceof Uint8Array||Array.isArray(s)?o=Array.from(s):s instanceof File?o={file:Array.from(new Uint8Array(await s.arrayBuffer())),mime:s.type,fileName:s.name}:typeof s.file=="string"?o={file:s.file,mime:s.mime,fileName:s.fileName}:o={file:Array.from(s.file),mime:s.mime,fileName:s.fileName},e[String(r)]=o}};if(t instanceof FormData)for(let[r,s]of t)await i(r,s);else for(let[r,s]of Object.entries(t))await i(r,s);return e}var p=class{constructor(e,i){this.type=e,this.payload=i}static form(e){return new p("Form",e)}static json(e){return new p("Json",e)}static text(e){return new p("Text",e)}static bytes(e){return new p("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},O=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},E=class{constructor(e){this.id=e}async drop(){return n({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let i=!e.responseType||e.responseType===1;return i&&(e.responseType=2),e.body?.type==="Form"&&(e.body.payload=await Ye(e.body.payload)),n({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new O(r);if(i){try{s.data=JSON.parse(s.data)}catch(o){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${o}; + try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,i){return this.request({method:"GET",url:e,...i})}async post(e,i,r){return this.request({method:"POST",url:e,body:i,...r})}async put(e,i,r){return this.request({method:"PUT",url:e,body:i,...r})}async patch(e,i){return this.request({method:"PATCH",url:e,...i})}async delete(e,i){return this.request({method:"DELETE",url:e,...i})}};async function ae(t){return n({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then(e=>new E(e))}var G=null;async function Ze(t,e){return G===null&&(G=await ae()),G.request({url:t,method:e?.method??"GET",...e})}var $={};d($,{isPermissionGranted:()=>Xe,requestPermission:()=>Be,sendNotification:()=>et});async function Xe(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):n({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function Be(){return window.Notification.requestPermission()}function et(t){typeof t=="string"?new window.Notification(t):new window.Notification(t.title,t)}var K={};d(K,{BaseDirectory:()=>F,appCacheDir:()=>rt,appConfigDir:()=>oe,appDataDir:()=>it,appDir:()=>tt,appLocalDataDir:()=>nt,appLogDir:()=>le,audioDir:()=>st,basename:()=>Dt,cacheDir:()=>at,configDir:()=>ot,dataDir:()=>lt,delimiter:()=>Ft,desktopDir:()=>ut,dirname:()=>At,documentDir:()=>dt,downloadDir:()=>ct,executableDir:()=>mt,extname:()=>Wt,fontDir:()=>pt,homeDir:()=>gt,isAbsolute:()=>St,join:()=>Ct,localDataDir:()=>yt,logDir:()=>Mt,normalize:()=>Et,pictureDir:()=>ht,publicDir:()=>ft,resolve:()=>Ot,resolveResource:()=>_t,resourceDir:()=>bt,runtimeDir:()=>Pt,sep:()=>Tt,templateDir:()=>wt,videoDir:()=>vt});function _(){return navigator.appVersion.includes("Win")}async function tt(){return oe()}async function oe(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:21}})}async function it(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:22}})}async function nt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:23}})}async function rt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:24}})}async function st(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:1}})}async function at(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:2}})}async function ot(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:3}})}async function lt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:4}})}async function ut(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:6}})}async function dt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:7}})}async function ct(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:8}})}async function mt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:9}})}async function pt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:10}})}async function gt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:11}})}async function yt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:5}})}async function ht(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:12}})}async function ft(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:13}})}async function bt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:17}})}async function _t(t){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:t,directory:17}})}async function Pt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:14}})}async function wt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:15}})}async function vt(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:16}})}async function Mt(){return le()}async function le(){return n({__tauriModule:"Path",message:{cmd:"resolvePath",path:"",directory:25}})}var Tt=_()?"\\":"/",Ft=_()?";":":";async function Ot(...t){return n({__tauriModule:"Path",message:{cmd:"resolve",paths:t}})}async function Et(t){return n({__tauriModule:"Path",message:{cmd:"normalize",path:t}})}async function Ct(...t){return n({__tauriModule:"Path",message:{cmd:"join",paths:t}})}async function At(t){return n({__tauriModule:"Path",message:{cmd:"dirname",path:t}})}async function Wt(t){return n({__tauriModule:"Path",message:{cmd:"extname",path:t}})}async function Dt(t,e){return n({__tauriModule:"Path",message:{cmd:"basename",path:t,ext:e}})}async function St(t){return n({__tauriModule:"Path",message:{cmd:"isAbsolute",path:t}})}var Q={};d(Q,{exit:()=>xt,relaunch:()=>Lt});async function xt(t=0){return n({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})}async function Lt(){return n({__tauriModule:"Process",message:{cmd:"relaunch"}})}var Y={};d(Y,{Child:()=>C,Command:()=>P,EventEmitter:()=>g,open:()=>kt});async function Rt(t,e,i=[],r){return typeof i=="object"&&Object.freeze(i),n({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:i,options:r,onEventFn:c(t)}})}var g=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,i){return this.on(e,i)}removeListener(e,i){return this.off(e,i)}on(e,i){return e in this.eventListeners?this.eventListeners[e].push(i):this.eventListeners[e]=[i],this}once(e,i){let r=(...s)=>{this.removeListener(e,r),i(...s)};return this.addListener(e,r)}off(e,i){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==i)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,...i){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(...i);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,i){return e in this.eventListeners?this.eventListeners[e].unshift(i):this.eventListeners[e]=[i],this}prependOnceListener(e,i){let r=(...s)=>{this.removeListener(e,r),i(...s)};return this.prependListener(e,r)}},C=class{constructor(e){this.pid=e}async write(e){return n({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return n({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},P=class extends g{constructor(i,r=[],s){super();this.stdout=new g;this.stderr=new g;this.program=i,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static sidecar(i,r=[],s){let o=new P(i,r,s);return o.options.sidecar=!0,o}async spawn(){return Rt(i=>{switch(i.event){case"Error":this.emit("error",i.payload);break;case"Terminated":this.emit("close",i.payload);break;case"Stdout":this.stdout.emit("data",i.payload);break;case"Stderr":this.stderr.emit("data",i.payload);break}},this.program,this.args,this.options).then(i=>new C(i))}async execute(){return new Promise((i,r)=>{this.on("error",r);let s=[],o=[];this.stdout.on("data",l=>{s.push(l)}),this.stderr.on("data",l=>{o.push(l)}),this.on("close",l=>{i({code:l.code,signal:l.signal,stdout:s.join(` `),stderr:o.join(` -`)})}),this.spawn().catch(r)})}};async function kt(i,e){return n({__tauriModule:"Shell",message:{cmd:"open",path:i,with:e}})}var X={};d(X,{checkUpdate:()=>zt,installUpdate:()=>Ut,onUpdaterEvent:()=>Z});async function Z(i){return N("tauri://update-status",e=>{i(e?.payload)})}async function Ut(){let i;function e(){i&&i(),i=void 0}return new Promise((t,r)=>{function s(o){if(o.error){e(),r(o.error);return}o.status==="DONE"&&(e(),t())}Z(s).then(o=>{i=o}).catch(o=>{throw e(),o}),T("tauri://update-install").catch(o=>{throw e(),o})})}async function zt(){let i;function e(){i&&i(),i=void 0}return new Promise((t,r)=>{function s(l){e(),t({manifest:l,shouldUpdate:!0})}function o(l){if(l.error){e(),r(l.error);return}l.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}H("tauri://update-available",l=>{s(l?.payload)}).catch(l=>{throw e(),l}),Z(o).then(l=>{i=l}).catch(l=>{throw e(),l}),T("tauri://update").catch(l=>{throw e(),l})})}var ie={};d(ie,{CloseRequestedEvent:()=>x,LogicalPosition:()=>W,LogicalSize:()=>A,PhysicalPosition:()=>h,PhysicalSize:()=>y,UserAttentionType:()=>de,WebviewWindow:()=>m,WebviewWindowHandle:()=>D,WindowManager:()=>S,appWindow:()=>ee,availableMonitors:()=>Vt,currentMonitor:()=>Nt,getAll:()=>B,getCurrent:()=>It,primaryMonitor:()=>Ht});var A=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},y=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new A(this.width/e,this.height/e)}},W=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},h=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new W(this.x/e,this.y/e)}},de=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(de||{});function It(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function B(){return window.__TAURI_METADATA__.__windows.map(i=>new m(i.label,{skip:!0}))}var ue=["tauri://created","tauri://error"],D=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):b(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):v(e,this.label,t)}async emit(e,t){if(ue.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return w(e,this.label,t)}_handleTauriEvent(e,t){return ue.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},S=class extends D{async scaleFactor(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new h(e,t))}async outerPosition(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new h(e,t))}async innerSize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new y(e,t))}async outerSize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new y(e,t))}async isFullscreen(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isFocused(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFocused"}}}})}async isDecorated(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isMaximizable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximizable"}}}})}async isMinimizable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimizable"}}}})}async isClosable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isClosable"}}}})}async isVisible(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setMaximizable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaximizable",payload:e}}}})}async setMinimizable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinimizable",payload:e}}}})}async setClosable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setClosable",payload:e}}}})}async setTitle(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=me(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=ce(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new x(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",o=>{e({...o,payload:{type:"drop",paths:o.payload}})}),r=await this.listen("tauri://file-drop-hover",o=>{e({...o,payload:{type:"hover",paths:o.payload}})}),s=await this.listen("tauri://file-drop-cancelled",o=>{e({...o,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},x=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},m=class extends S{constructor(e,t={}){super(e),t?.skip||n({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return B().some(t=>t.label===e)?new m(e,{skip:!0}):null}static async getFocusedWindow(){for(let e of B())if(await e.isFocused())return e;return null}},ee;"__TAURI_METADATA__"in window?ee=new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),ee=new m("main",{skip:!0}));function te(i){return i===null?null:{name:i.name,scaleFactor:i.scaleFactor,position:ce(i.position),size:me(i.size)}}function ce(i){return new h(i.x,i.y)}function me(i){return new y(i.width,i.height)}async function Nt(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(te)}async function Ht(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(te)}async function Vt(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(i=>i.map(te))}var ne={};d(ne,{EOL:()=>jt,arch:()=>Jt,locale:()=>Qt,platform:()=>qt,tempdir:()=>Kt,type:()=>$t,version:()=>Gt});var jt=_()?`\r +`)})}),this.spawn().catch(r)})}};async function kt(t,e){return n({__tauriModule:"Shell",message:{cmd:"open",path:t,with:e}})}var X={};d(X,{checkUpdate:()=>It,installUpdate:()=>Ut,onUpdaterEvent:()=>Z});async function Z(t){return N("tauri://update-status",e=>{t(e?.payload)})}async function Ut(){let t;function e(){t&&t(),t=void 0}return new Promise((i,r)=>{function s(o){if(o.error){e(),r(o.error);return}o.status==="DONE"&&(e(),i())}Z(s).then(o=>{t=o}).catch(o=>{throw e(),o}),T("tauri://update-install").catch(o=>{throw e(),o})})}async function It(){let t;function e(){t&&t(),t=void 0}return new Promise((i,r)=>{function s(l){e(),i({manifest:l,shouldUpdate:!0})}function o(l){if(l.error){e(),r(l.error);return}l.status==="UPTODATE"&&(e(),i({shouldUpdate:!1}))}H("tauri://update-available",l=>{s(l?.payload)}).catch(l=>{throw e(),l}),Z(o).then(l=>{t=l}).catch(l=>{throw e(),l}),T("tauri://update").catch(l=>{throw e(),l})})}var ie={};d(ie,{CloseRequestedEvent:()=>x,LogicalPosition:()=>W,LogicalSize:()=>A,PhysicalPosition:()=>h,PhysicalSize:()=>y,UserAttentionType:()=>de,WebviewWindow:()=>m,WebviewWindowHandle:()=>D,WindowManager:()=>S,appWindow:()=>ee,availableMonitors:()=>Vt,currentMonitor:()=>Nt,getAll:()=>B,getCurrent:()=>zt,primaryMonitor:()=>Ht});var A=class{constructor(e,i){this.type="Logical";this.width=e,this.height=i}},y=class{constructor(e,i){this.type="Physical";this.width=e,this.height=i}toLogical(e){return new A(this.width/e,this.height/e)}},W=class{constructor(e,i){this.type="Logical";this.x=e,this.y=i}},h=class{constructor(e,i){this.type="Physical";this.x=e,this.y=i}toLogical(e){return new W(this.x/e,this.y/e)}},de=(i=>(i[i.Critical=1]="Critical",i[i.Informational=2]="Informational",i))(de||{});function zt(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function B(){return window.__TAURI_METADATA__.__windows.map(t=>new m(t.label,{skip:!0}))}var ue=["tauri://created","tauri://error"],D=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,i){return this._handleTauriEvent(e,i)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(i),1)}):b(e,this.label,i)}async once(e,i){return this._handleTauriEvent(e,i)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(i),1)}):v(e,this.label,i)}async emit(e,i){if(ue.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:i});return Promise.resolve()}return w(e,this.label,i)}_handleTauriEvent(e,i){return ue.includes(e)?(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0):!1}},S=class extends D{async scaleFactor(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:i})=>new h(e,i))}async outerPosition(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:i})=>new h(e,i))}async innerSize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:i})=>new y(e,i))}async outerSize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:i})=>new y(e,i))}async isFullscreen(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isFocused(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFocused"}}}})}async isDecorated(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isMaximizable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximizable"}}}})}async isMinimizable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimizable"}}}})}async isClosable(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isClosable"}}}})}async isVisible(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let i=null;return e&&(e===1?i={type:"Critical"}:i={type:"Informational"}),n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:i}}}})}async setResizable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setMaximizable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaximizable",payload:e}}}})}async setMinimizable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinimizable",payload:e}}}})}async setClosable(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setClosable",payload:e}}}})}async setTitle(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",i=>{i.payload=me(i.payload),e(i)})}async onMoved(e){return this.listen("tauri://move",i=>{i.payload=ce(i.payload),e(i)})}async onCloseRequested(e){return this.listen("tauri://close-requested",i=>{let r=new x(i);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let i=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{i(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let i=await this.listen("tauri://file-drop",o=>{e({...o,payload:{type:"drop",paths:o.payload}})}),r=await this.listen("tauri://file-drop-hover",o=>{e({...o,payload:{type:"hover",paths:o.payload}})}),s=await this.listen("tauri://file-drop-cancelled",o=>{e({...o,payload:{type:"cancel"}})});return()=>{i(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},x=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},m=class extends S{constructor(e,i={}){super(e),i?.skip||n({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...i}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return B().some(i=>i.label===e)?new m(e,{skip:!0}):null}static async getFocusedWindow(){for(let e of B())if(await e.isFocused())return e;return null}},ee;"__TAURI_METADATA__"in window?ee=new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. +Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),ee=new m("main",{skip:!0}));function te(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:ce(t.position),size:me(t.size)}}function ce(t){return new h(t.x,t.y)}function me(t){return new y(t.width,t.height)}async function Nt(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(te)}async function Ht(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(te)}async function Vt(){return n({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(t=>t.map(te))}var ne={};d(ne,{EOL:()=>jt,arch:()=>$t,locale:()=>Qt,platform:()=>qt,tempdir:()=>Kt,type:()=>Jt,version:()=>Gt});var jt=_()?`\r `:` -`;async function qt(){return n({__tauriModule:"Os",message:{cmd:"platform"}})}async function Gt(){return n({__tauriModule:"Os",message:{cmd:"version"}})}async function $t(){return n({__tauriModule:"Os",message:{cmd:"osType"}})}async function Jt(){return n({__tauriModule:"Os",message:{cmd:"arch"}})}async function Kt(){return n({__tauriModule:"Os",message:{cmd:"tempdir"}})}async function Qt(){return n({__tauriModule:"Os",message:{cmd:"locale"}})}var Yt=f;return fe(Zt);})(); +`;async function qt(){return n({__tauriModule:"Os",message:{cmd:"platform"}})}async function Gt(){return n({__tauriModule:"Os",message:{cmd:"version"}})}async function Jt(){return n({__tauriModule:"Os",message:{cmd:"osType"}})}async function $t(){return n({__tauriModule:"Os",message:{cmd:"arch"}})}async function Kt(){return n({__tauriModule:"Os",message:{cmd:"tempdir"}})}async function Qt(){return n({__tauriModule:"Os",message:{cmd:"locale"}})}var Yt=f;return fe(Zt);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index 5eaefba47..95acf595b 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -13,6 +13,16 @@ }) } + const osName = __TEMPLATE_os_name__ + const protocolScheme = __TEMPLATE_protocol_scheme__ + + window.__TAURI__.convertFileSrc = function convertFileSrc(filePath, protocol = 'asset') { + const path = encodeURIComponent(filePath) + return osName === 'windows' + ? `${protocolScheme}://${protocol}.localhost/${path}` + : `${protocol}://localhost/${path}` + } + window.__TAURI__.transformCallback = function transformCallback( callback, once diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 7bc7bd497..d9bd7635a 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -1573,16 +1573,17 @@ impl Builder { (self.invoke_responder, self.invoke_initialization_script), ); + let http_scheme = manager.config().tauri.security.dangerous_use_http_scheme; + // set up all the windows defined in the config for config in manager.config().tauri.windows.clone() { let label = config.label.clone(); let webview_attributes = WebviewAttributes::from(&config); - self.pending_windows.push(PendingWindow::with_config( - config, - webview_attributes, - label, - )?); + let mut pending = PendingWindow::with_config(config, webview_attributes, label)?; + pending.http_scheme = http_scheme; + + self.pending_windows.push(pending); } #[cfg(any(windows, target_os = "linux"))] diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index d6891bac3..4e66be645 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -142,7 +142,10 @@ fn set_csp( let default_src = csp .entry("default-src".into()) .or_insert_with(Default::default); - default_src.push(crate::pattern::format_real_schema(schema)); + default_src.push(crate::pattern::format_real_schema( + schema, + manager.config().tauri.security.dangerous_use_http_scheme, + )); } Csp::DirectiveMap(csp).to_string() @@ -388,7 +391,14 @@ impl WindowManager { match self.base_path() { AppUrl::Url(WindowUrl::External(url)) => Cow::Borrowed(url), #[cfg(windows)] - _ => Cow::Owned(Url::parse("https://tauri.localhost").unwrap()), + _ => { + let scheme = if self.inner.config.tauri.security.dangerous_use_http_scheme { + "http" + } else { + "https" + }; + Cow::Owned(Url::parse(&format!("{scheme}://tauri.localhost")).unwrap()) + } #[cfg(not(windows))] _ => Cow::Owned(Url::parse("tauri://localhost").unwrap()), } @@ -429,17 +439,19 @@ impl WindowManager { } .render_default(&Default::default())?; + let mut webview_attributes = pending.webview_attributes; + let ipc_init = IpcJavascript { isolation_origin: &match self.pattern() { #[cfg(feature = "isolation")] - Pattern::Isolation { schema, .. } => crate::pattern::format_real_schema(schema), + Pattern::Isolation { schema, .. } => { + crate::pattern::format_real_schema(schema, pending.http_scheme) + } _ => "".to_string(), }, } .render_default(&Default::default())?; - let mut webview_attributes = pending.webview_attributes; - let mut window_labels = window_labels.to_vec(); let l = label.to_string(); if !window_labels.contains(&l) { @@ -466,7 +478,7 @@ impl WindowManager { if let Pattern::Isolation { schema, .. } = self.pattern() { webview_attributes = webview_attributes.initialization_script( &IsolationJavascript { - isolation_src: &crate::pattern::format_real_schema(schema), + isolation_src: &crate::pattern::format_real_schema(schema, pending.http_scheme), style: tauri_utils::pattern::isolation::IFRAME_STYLE, } .render_default(&Default::default())? @@ -491,7 +503,8 @@ impl WindowManager { let window_origin = if window_url.scheme() == "data" { "null".into() } else if cfg!(windows) && window_url.scheme() != "http" && window_url.scheme() != "https" { - format!("https://{}.localhost", window_url.scheme()) + let scheme = if pending.http_scheme { "http" } else { "https" }; + format!("{scheme}://{}.localhost", window_url.scheme()) } else { format!( "{}://{}{}", @@ -782,6 +795,13 @@ impl WindowManager { hotkeys: &'a str, } + #[derive(Template)] + #[default_template("../scripts/core.js")] + struct CoreJavascript<'a> { + os_name: &'a str, + protocol_scheme: &'a str, + } + let bundle_script = if with_global_tauri { include_str!("../scripts/bundle.global.js") } else { @@ -813,7 +833,16 @@ impl WindowManager { "window['_' + window.__TAURI__.transformCallback(cb) ]".into() ) ), - core_script: include_str!("../scripts/core.js"), + core_script: &CoreJavascript { + os_name: std::env::consts::OS, + protocol_scheme: if self.inner.config.tauri.security.dangerous_use_http_scheme { + "http" + } else { + "https" + }, + } + .render_default(&Default::default())? + .into_string(), event_initialization_script: &self.event_initialization_script(), plugin_initialization_script, freeze_prototype, diff --git a/core/tauri/src/pattern.rs b/core/tauri/src/pattern.rs index 8bf953871..6a66f1ade 100644 --- a/core/tauri/src/pattern.rs +++ b/core/tauri/src/pattern.rs @@ -108,9 +108,10 @@ pub(crate) struct PatternJavascript { } #[allow(dead_code)] -pub(crate) fn format_real_schema(schema: &str) -> String { +pub(crate) fn format_real_schema(schema: &str, _http: bool) -> String { if cfg!(windows) { - format!("https://{schema}.{ISOLATION_IFRAME_SRC_DOMAIN}") + let http = if _http { "http" } else { "https" }; + format!("{http}://{schema}.{ISOLATION_IFRAME_SRC_DOMAIN}") } else { format!("{schema}://{ISOLATION_IFRAME_SRC_DOMAIN}") } diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 3eb231bb2..212f21047 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -329,6 +329,12 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { )?; pending.navigation_handler = self.navigation_handler.take(); pending.web_resource_request_handler = self.web_resource_request_handler.take(); + pending.http_scheme = self + .manager + .config() + .tauri + .security + .dangerous_use_http_scheme; let labels = self.manager.labels().into_iter().collect::>(); let pending = self diff --git a/tooling/api/src/tauri.ts b/tooling/api/src/tauri.ts index 40c27aa55..ebfd06d0f 100644 --- a/tooling/api/src/tauri.ts +++ b/tooling/api/src/tauri.ts @@ -17,6 +17,9 @@ declare global { ipc: { postMessage: (args: string) => void } + __TAURI__: { + convertFileSrc: (src: string, protocol: string) => string + } } } @@ -127,10 +130,7 @@ async function invoke(cmd: string, args: InvokeArgs = {}): Promise { * @since 1.0.0 */ function convertFileSrc(filePath: string, protocol = 'asset'): string { - const path = encodeURIComponent(filePath) - return navigator.userAgent.includes('Windows') - ? `https://${protocol}.localhost/${path}` - : `${protocol}://localhost/${path}` + return window.__TAURI__.convertFileSrc(filePath, protocol) } export type { InvokeArgs } diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 46306d0ac..af0ca7635 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -167,6 +167,7 @@ "security": { "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], + "dangerousUseHttpScheme": false, "freezePrototype": false }, "updater": { @@ -423,6 +424,7 @@ "default": { "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], + "dangerousUseHttpScheme": false, "freezePrototype": false }, "allOf": [ @@ -2740,6 +2742,11 @@ "items": { "$ref": "#/definitions/RemoteDomainAccessScope" } + }, + "dangerousUseHttpScheme": { + "description": "Sets whether the custom protocols should use `http://.localhost` instead of the default `https://.localhost` on Windows.\n\n**WARNING:** Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints and is therefore less secure but will match the behavior of the `://localhost` protocols used on macOS and Linux.", + "default": false, + "type": "boolean" } }, "additionalProperties": false From d1858de7a00b093eb02cb4f75362800ecea0c464 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 26 Sep 2023 19:41:32 +0200 Subject: [PATCH 069/104] fix(cli): help output mixed up for private-key and private-key-path (#7901) --- tooling/cli/src/signer/sign.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tooling/cli/src/signer/sign.rs b/tooling/cli/src/signer/sign.rs index eaefa40af..66422b8aa 100644 --- a/tooling/cli/src/signer/sign.rs +++ b/tooling/cli/src/signer/sign.rs @@ -16,10 +16,10 @@ use tauri_utils::display_path; #[derive(Debug, Parser)] #[clap(about = "Sign a file")] pub struct Options { - /// Load the private key from a file + /// Load the private key from a string #[clap(short = 'k', long, conflicts_with("private_key_path"))] private_key: Option, - /// Load the private key from a string + /// Load the private key from a file #[clap(short = 'f', long, conflicts_with("private_key"))] private_key_path: Option, /// Set private key password when signing From c68fbfcb2d7a5b81e04c90edbb8fc43d1a895ab1 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Sep 2023 10:46:17 -0300 Subject: [PATCH 070/104] fix: Returns a warning instead of panicking if an AppImage is not mounted, closes #7736 (#7912) Co-authored-by: Benjamin Demetz <50681275+Benji377@users.noreply.github.com> --- .changes/validate-appimage.md | 5 +++++ core/tauri-utils/Cargo.toml | 1 + core/tauri-utils/src/lib.rs | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changes/validate-appimage.md diff --git a/.changes/validate-appimage.md b/.changes/validate-appimage.md new file mode 100644 index 000000000..9a6367a82 --- /dev/null +++ b/.changes/validate-appimage.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Fix the validation of `std::env::current_exe` warn the user if AppImage is not mounted instead of panicking diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index bbd672fc5..d2a08666f 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -37,6 +37,7 @@ memchr = "2" semver = "1" infer = "0.12" dunce = "1" +log = "0.4.20" [target."cfg(target_os = \"linux\")".dependencies] heck = "0.4" diff --git a/core/tauri-utils/src/lib.rs b/core/tauri-utils/src/lib.rs index ca36e83ca..1e9627e18 100644 --- a/core/tauri-utils/src/lib.rs +++ b/core/tauri-utils/src/lib.rs @@ -13,6 +13,8 @@ use std::{ use semver::Version; use serde::{Deserialize, Deserializer, Serialize, Serializer}; +use log::warn; + pub mod assets; pub mod config; pub mod html; @@ -202,7 +204,7 @@ impl Default for Env { .unwrap_or(true); if !is_temp { - panic!("`APPDIR` or `APPIMAGE` environment variable found but this application was not detected as an AppImage; this might be a security issue."); + warn!("`APPDIR` or `APPIMAGE` environment variable found but this application was not detected as an AppImage; this might be a security issue."); } } env From e9e68abb33f8bf0027d87c0611200d05deda4a49 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Sep 2023 10:48:52 -0300 Subject: [PATCH 071/104] fix(ci): downgrade async-executor to 1.5.2 (#7911) --- .github/workflows/test-core.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index bad28680e..b4b9c24b1 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -106,6 +106,7 @@ jobs: cargo update -p reqwest --precise 0.11.18 cargo update -p cfg-expr:0.15.5 --precise 0.15.4 cargo update -p memchr --precise 2.6.2 + cargo update -p async-executor --precise 1.5.1 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} From 0af553da72a2b2fcb951ee83963e9463496f1a82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:01:19 -0300 Subject: [PATCH 072/104] Apply Version Updates From Current Changes (v1) (#7261) Co-authored-by: lucasfernog --- .changes/add-manager-emit-filter.md | 5 --- .changes/api-formAsync.md | 5 --- .changes/bundler-bundle-order.md | 5 --- .../bundler-macos-updater-dmg-only-fix.md | 5 --- .changes/bundler-nsis-sign-uninstaller.md | 5 --- .changes/bundler-team-id.md | 5 --- .../bundler-windows-earlier-code-signing.md | 7 ---- .changes/bundler-xattr.md | 5 --- .changes/cli-disable-version-check.md | 6 --- .changes/codesign-additional-files.md | 5 --- .changes/core-base-links-target.md | 5 --- ...nhance-cli-cargo-tauri-cli-version-info.md | 6 --- .changes/enhance-read-dir-error.md | 5 --- .changes/fix-nsis-legal-copyright.md | 5 --- .../fix-nsis-previous-installation-method.md | 5 --- .../fix-nsis-uninstall-delete-app-data.md | 5 --- .../fix-nsis-uninstall-previous-version.md | 5 --- ...fix-nsis-webview2-installer-use-tempdir.md | 5 --- .changes/fs-append-file.md | 6 --- .changes/kuchikiki.md | 5 --- .changes/notarytool.md | 5 --- .changes/notification-sound.md | 6 --- .changes/nsis-bulgarian.md | 5 --- .changes/nsis-kill-own-process.md | 5 --- .changes/nsis-set-compressor.md | 5 --- .changes/nsis-start-menu-shortcut.md | 5 --- .changes/plugin-custom-protocol.md | 5 --- .changes/remove-bitness.md | 5 --- .changes/resources-map-bundler.md | 5 --- .changes/resources-map.md | 5 --- .changes/rpath.md | 5 --- .changes/support-bun.md | 6 --- .changes/tauri-build-copy-webview2-runtime.md | 5 --- .changes/tauri-focused-windows.md | 6 --- .changes/tauri-tap-drag-region-detection.md | 5 --- .changes/tauri-utils-read-line.md | 5 --- .changes/updater-admin-launch-fix.md | 5 --- .changes/updater-endpoints.md | 5 --- .changes/updater-header.md | 5 --- .changes/updater-redirect.md | 5 --- .changes/validate-appimage.md | 5 --- .changes/webdriver-bump-dependencies.md | 5 --- .changes/webdriver-bump-msrv.md | 5 --- .changes/windows-http-scheme.md | 8 ---- core/tauri-build/CHANGELOG.md | 12 ++++++ core/tauri-build/Cargo.toml | 6 +-- core/tauri-codegen/CHANGELOG.md | 6 +++ core/tauri-codegen/Cargo.toml | 4 +- core/tauri-macros/CHANGELOG.md | 7 ++++ core/tauri-macros/Cargo.toml | 6 +-- core/tauri-runtime-wry/CHANGELOG.md | 15 +++++++ core/tauri-runtime-wry/Cargo.toml | 6 +-- core/tauri-runtime/CHANGELOG.md | 10 +++++ core/tauri-runtime/Cargo.toml | 4 +- core/tauri-utils/CHANGELOG.md | 18 +++++++++ core/tauri-utils/Cargo.toml | 2 +- core/tauri/CHANGELOG.md | 32 +++++++++++++++ core/tauri/Cargo.toml | 10 ++--- tooling/api/CHANGELOG.md | 14 +++++++ tooling/api/package.json | 2 +- tooling/bundler/CHANGELOG.md | 39 +++++++++++++++++++ tooling/bundler/Cargo.toml | 10 ++--- tooling/cli/CHANGELOG.md | 19 +++++++++ tooling/cli/Cargo.lock | 11 +++--- tooling/cli/Cargo.toml | 6 +-- tooling/cli/metadata.json | 6 +-- tooling/cli/node/CHANGELOG.md | 18 +++++++++ tooling/cli/node/package.json | 2 +- tooling/webdriver/CHANGELOG.md | 7 ++++ tooling/webdriver/Cargo.toml | 2 +- 70 files changed, 236 insertions(+), 269 deletions(-) delete mode 100644 .changes/add-manager-emit-filter.md delete mode 100644 .changes/api-formAsync.md delete mode 100644 .changes/bundler-bundle-order.md delete mode 100644 .changes/bundler-macos-updater-dmg-only-fix.md delete mode 100644 .changes/bundler-nsis-sign-uninstaller.md delete mode 100644 .changes/bundler-team-id.md delete mode 100644 .changes/bundler-windows-earlier-code-signing.md delete mode 100644 .changes/bundler-xattr.md delete mode 100644 .changes/cli-disable-version-check.md delete mode 100644 .changes/codesign-additional-files.md delete mode 100644 .changes/core-base-links-target.md delete mode 100644 .changes/enhance-cli-cargo-tauri-cli-version-info.md delete mode 100644 .changes/enhance-read-dir-error.md delete mode 100644 .changes/fix-nsis-legal-copyright.md delete mode 100644 .changes/fix-nsis-previous-installation-method.md delete mode 100644 .changes/fix-nsis-uninstall-delete-app-data.md delete mode 100644 .changes/fix-nsis-uninstall-previous-version.md delete mode 100644 .changes/fix-nsis-webview2-installer-use-tempdir.md delete mode 100644 .changes/fs-append-file.md delete mode 100644 .changes/kuchikiki.md delete mode 100644 .changes/notarytool.md delete mode 100644 .changes/notification-sound.md delete mode 100644 .changes/nsis-bulgarian.md delete mode 100644 .changes/nsis-kill-own-process.md delete mode 100644 .changes/nsis-set-compressor.md delete mode 100644 .changes/nsis-start-menu-shortcut.md delete mode 100644 .changes/plugin-custom-protocol.md delete mode 100644 .changes/remove-bitness.md delete mode 100644 .changes/resources-map-bundler.md delete mode 100644 .changes/resources-map.md delete mode 100644 .changes/rpath.md delete mode 100644 .changes/support-bun.md delete mode 100644 .changes/tauri-build-copy-webview2-runtime.md delete mode 100644 .changes/tauri-focused-windows.md delete mode 100644 .changes/tauri-tap-drag-region-detection.md delete mode 100644 .changes/tauri-utils-read-line.md delete mode 100644 .changes/updater-admin-launch-fix.md delete mode 100644 .changes/updater-endpoints.md delete mode 100644 .changes/updater-header.md delete mode 100644 .changes/updater-redirect.md delete mode 100644 .changes/validate-appimage.md delete mode 100644 .changes/webdriver-bump-dependencies.md delete mode 100644 .changes/webdriver-bump-msrv.md delete mode 100644 .changes/windows-http-scheme.md diff --git a/.changes/add-manager-emit-filter.md b/.changes/add-manager-emit-filter.md deleted file mode 100644 index 67aa32aef..000000000 --- a/.changes/add-manager-emit-filter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri': 'minor:feat' ---- - -Add `tauri::Manager::emit_filter` and only serialize once when emitting to multiple windows. diff --git a/.changes/api-formAsync.md b/.changes/api-formAsync.md deleted file mode 100644 index 8a73317f3..000000000 --- a/.changes/api-formAsync.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tauri-apps/api': 'patch:bug' ---- - -Fix `Body.form` static not reading and sending entries of type `Blob` (including subclasses such as `File`) diff --git a/.changes/bundler-bundle-order.md b/.changes/bundler-bundle-order.md deleted file mode 100644 index 35f5443f0..000000000 --- a/.changes/bundler-bundle-order.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -Fix bundler skipping updater artifacts if `updater` target shows before other updater-enabled targets in the list, see [#7349](https://github.com/tauri-apps/tauri/issues/7349). diff --git a/.changes/bundler-macos-updater-dmg-only-fix.md b/.changes/bundler-macos-updater-dmg-only-fix.md deleted file mode 100644 index 16f136fe7..000000000 --- a/.changes/bundler-macos-updater-dmg-only-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -Fix bundler skipping updater artifacts if only a macOS DMG bundle target is specified. diff --git a/.changes/bundler-nsis-sign-uninstaller.md b/.changes/bundler-nsis-sign-uninstaller.md deleted file mode 100644 index 73721da13..000000000 --- a/.changes/bundler-nsis-sign-uninstaller.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'minor:enhance' ---- - -Sign NSIS uninstaller as well. diff --git a/.changes/bundler-team-id.md b/.changes/bundler-team-id.md deleted file mode 100644 index 9cccd0a7c..000000000 --- a/.changes/bundler-team-id.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": minor:enhance ---- - -Read the `APPLE_TEAM_ID` environment variable for macOS notarization arguments. diff --git a/.changes/bundler-windows-earlier-code-signing.md b/.changes/bundler-windows-earlier-code-signing.md deleted file mode 100644 index a6978e4d2..000000000 --- a/.changes/bundler-windows-earlier-code-signing.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'tauri-bundler': 'patch:enhance' ---- - -On Windows, code sign the application binaries before trying to create the WiX and NSIS bundles to always sign the executables even if no bundle types are enabled. - -On Windows, code sign the sidecar binaries if they are not signed already. diff --git a/.changes/bundler-xattr.md b/.changes/bundler-xattr.md deleted file mode 100644 index 561bb20e7..000000000 --- a/.changes/bundler-xattr.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": patch:bug ---- - -Remove extended attributes on the macOS app bundle using `xattr -cr $PATH`. diff --git a/.changes/cli-disable-version-check.md b/.changes/cli-disable-version-check.md deleted file mode 100644 index d30f5bb37..000000000 --- a/.changes/cli-disable-version-check.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri-cli': 'patch:bug' -'@tauri-apps/cli': 'patch:bug' ---- - -Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues. diff --git a/.changes/codesign-additional-files.md b/.changes/codesign-additional-files.md deleted file mode 100644 index 17a972c80..000000000 --- a/.changes/codesign-additional-files.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": patch:bug ---- - -Code sign sidecars and frameworks on macOS. diff --git a/.changes/core-base-links-target.md b/.changes/core-base-links-target.md deleted file mode 100644 index 231383077..000000000 --- a/.changes/core-base-links-target.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri': 'minor:enhance' ---- - -Open links externally when `` exists diff --git a/.changes/enhance-cli-cargo-tauri-cli-version-info.md b/.changes/enhance-cli-cargo-tauri-cli-version-info.md deleted file mode 100644 index e107e66c3..000000000 --- a/.changes/enhance-cli-cargo-tauri-cli-version-info.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-cli": minor:enhance -"@tauri-apps/cli": minor:enhance ---- - -Add version of Rust Tauri CLI installed with Cargo to `tauri info` command. diff --git a/.changes/enhance-read-dir-error.md b/.changes/enhance-read-dir-error.md deleted file mode 100644 index 0a71670eb..000000000 --- a/.changes/enhance-read-dir-error.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": patch:enhance ---- - -Enhance `readDir` API error with path information. diff --git a/.changes/fix-nsis-legal-copyright.md b/.changes/fix-nsis-legal-copyright.md deleted file mode 100644 index f865f5d54..000000000 --- a/.changes/fix-nsis-legal-copyright.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -On Windows, fix installation packages not showing correct copyright information. diff --git a/.changes/fix-nsis-previous-installation-method.md b/.changes/fix-nsis-previous-installation-method.md deleted file mode 100644 index 452d4f5e8..000000000 --- a/.changes/fix-nsis-previous-installation-method.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -On Windows, fix NSIS installer identifying a previous NSIS-installed app as WiX-installed app and then fails to uninstall it. diff --git a/.changes/fix-nsis-uninstall-delete-app-data.md b/.changes/fix-nsis-uninstall-delete-app-data.md deleted file mode 100644 index 4bc116c25..000000000 --- a/.changes/fix-nsis-uninstall-delete-app-data.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -On Windows, Fix NSIS uninstaller deleting the wrong application data if the delete the application data checkbox is checked. diff --git a/.changes/fix-nsis-uninstall-previous-version.md b/.changes/fix-nsis-uninstall-previous-version.md deleted file mode 100644 index 29a6ffc8a..000000000 --- a/.changes/fix-nsis-uninstall-previous-version.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -On Windows, fix NSIS installer showing an error dialog even when the previous version was uninstalled sucessfully. diff --git a/.changes/fix-nsis-webview2-installer-use-tempdir.md b/.changes/fix-nsis-webview2-installer-use-tempdir.md deleted file mode 100644 index 1a4abaad6..000000000 --- a/.changes/fix-nsis-webview2-installer-use-tempdir.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:enhance' ---- - -On Windows, NSIS installer will write webview2 installer file to the well-known temp dir instead of the install dir, so we don't pollute the install dir. diff --git a/.changes/fs-append-file.md b/.changes/fs-append-file.md deleted file mode 100644 index a55e0dcbb..000000000 --- a/.changes/fs-append-file.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@tauri-apps/api': 'patch:enhance' -'tauri': 'patch:enhance' ---- - -Add `append` option to `FsOptions` in the `fs` JS module, used in `writeTextFile` and `writeBinaryFile`, to be able to append to existing files instead of overwriting it. diff --git a/.changes/kuchikiki.md b/.changes/kuchikiki.md deleted file mode 100644 index b57057901..000000000 --- a/.changes/kuchikiki.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-utils": patch:sec ---- - -Changed HTML implementation from unmaintained `kuchiki` to `kuchikiki`. diff --git a/.changes/notarytool.md b/.changes/notarytool.md deleted file mode 100644 index 59a8a8245..000000000 --- a/.changes/notarytool.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": minor:breaking ---- - -The macOS notarization now uses `notarytool` as `altool` will be discontinued on November 2023. When authenticating with an API key, the key `.p8` file path must be provided in the `APPLE_API_KEY_PATH` environment variable. To prevent a breaking change, we will try to find the key path in the `altool` default search paths. diff --git a/.changes/notification-sound.md b/.changes/notification-sound.md deleted file mode 100644 index 69c12ef55..000000000 --- a/.changes/notification-sound.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri': 'minor:feat' -'@tauri-apps/api': 'minor:feat' ---- - -Add option to specify notification sound. diff --git a/.changes/nsis-bulgarian.md b/.changes/nsis-bulgarian.md deleted file mode 100644 index 8fdc2e3a8..000000000 --- a/.changes/nsis-bulgarian.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:enhance' ---- - -Added Bulgarian language support to the NSIS bundler. diff --git a/.changes/nsis-kill-own-process.md b/.changes/nsis-kill-own-process.md deleted file mode 100644 index 5813c18e2..000000000 --- a/.changes/nsis-kill-own-process.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -On Windows, fix NSIS installer trying to kill itself if the installer file name and the app `productName` are the same. diff --git a/.changes/nsis-set-compressor.md b/.changes/nsis-set-compressor.md deleted file mode 100644 index 34256f5d5..000000000 --- a/.changes/nsis-set-compressor.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:enhance' ---- - -Add `compression` configuration option under `tauri > bundle > windows > nsis`. diff --git a/.changes/nsis-start-menu-shortcut.md b/.changes/nsis-start-menu-shortcut.md deleted file mode 100644 index eea0d9b22..000000000 --- a/.changes/nsis-start-menu-shortcut.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -On Windows, fix NSIS uninstaller failing to remove Start Menu shortcut if `perMachine` mode is used. diff --git a/.changes/plugin-custom-protocol.md b/.changes/plugin-custom-protocol.md deleted file mode 100644 index 8841c6730..000000000 --- a/.changes/plugin-custom-protocol.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri': 'minor:feat' ---- - -Add `tauri::plugin::Builder::register_uri_scheme_protocol` diff --git a/.changes/remove-bitness.md b/.changes/remove-bitness.md deleted file mode 100644 index d875dc28d..000000000 --- a/.changes/remove-bitness.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:deps' ---- - -Removed the `bitness` dependency to speed up compile time. diff --git a/.changes/resources-map-bundler.md b/.changes/resources-map-bundler.md deleted file mode 100644 index ccb61bbd9..000000000 --- a/.changes/resources-map-bundler.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": minor:feat ---- - -Allow using a resource map instead of a simple array in `BundleSettings::resources_map`. diff --git a/.changes/resources-map.md b/.changes/resources-map.md deleted file mode 100644 index 7a8e44427..000000000 --- a/.changes/resources-map.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-utils": minor:feat ---- - -Allow specifying resources as a map specifying source and target paths. diff --git a/.changes/rpath.md b/.changes/rpath.md deleted file mode 100644 index 1d041bfad..000000000 --- a/.changes/rpath.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-build": patch:bug ---- - -Automatically set rpath on macOS if frameworks are bundled and copy frameworks to `src-tauri/target/Frameworks` for usage in development. diff --git a/.changes/support-bun.md b/.changes/support-bun.md deleted file mode 100644 index 729fd2425..000000000 --- a/.changes/support-bun.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri-cli': 'patch:feat' -'@tauri-apps/cli': 'patch:feat' ---- - -Support Bun package manager in CLI diff --git a/.changes/tauri-build-copy-webview2-runtime.md b/.changes/tauri-build-copy-webview2-runtime.md deleted file mode 100644 index 5ab5a117c..000000000 --- a/.changes/tauri-build-copy-webview2-runtime.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-build': 'patch:bug' ---- - -Correctly copy the WebView2 runtime in development when `webviewInstallMode` is used instead of `webviewFixedRuntimePath`. diff --git a/.changes/tauri-focused-windows.md b/.changes/tauri-focused-windows.md deleted file mode 100644 index 0bc7cc7b5..000000000 --- a/.changes/tauri-focused-windows.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri': 'patch:bug' -'tauri-runtime-wry': 'patch:bug' ---- - -Properly respect the `focused` option when creating the webview. diff --git a/.changes/tauri-tap-drag-region-detection.md b/.changes/tauri-tap-drag-region-detection.md deleted file mode 100644 index f28c23f4f..000000000 --- a/.changes/tauri-tap-drag-region-detection.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri': 'patch:bug' ---- - -On macOS, fixed tapping on custom title bar doesn't maximize the window. diff --git a/.changes/tauri-utils-read-line.md b/.changes/tauri-utils-read-line.md deleted file mode 100644 index cc6195d9a..000000000 --- a/.changes/tauri-utils-read-line.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-utils': 'patch:bug' ---- - -Fix `io::read_line` not including the new line character `\n`. diff --git a/.changes/updater-admin-launch-fix.md b/.changes/updater-admin-launch-fix.md deleted file mode 100644 index 06783c496..000000000 --- a/.changes/updater-admin-launch-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri': 'patch:bug' ---- - -On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater. diff --git a/.changes/updater-endpoints.md b/.changes/updater-endpoints.md deleted file mode 100644 index ee9a10d2e..000000000 --- a/.changes/updater-endpoints.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": minor:feat ---- - -Added `UpdateBuilder::endpoints` to add request endpoints at runtime. diff --git a/.changes/updater-header.md b/.changes/updater-header.md deleted file mode 100644 index 7a14aff06..000000000 --- a/.changes/updater-header.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": minor:feat ---- - -Added `UpdateResponse::header` and `UpdateResponse::remove_header` to modify the update download request headers. diff --git a/.changes/updater-redirect.md b/.changes/updater-redirect.md deleted file mode 100644 index 1b7dee940..000000000 --- a/.changes/updater-redirect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri': 'patch:bug' ---- - -Fix updater not following endpoint redirects. diff --git a/.changes/validate-appimage.md b/.changes/validate-appimage.md deleted file mode 100644 index 9a6367a82..000000000 --- a/.changes/validate-appimage.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": patch:bug ---- - -Fix the validation of `std::env::current_exe` warn the user if AppImage is not mounted instead of panicking diff --git a/.changes/webdriver-bump-dependencies.md b/.changes/webdriver-bump-dependencies.md deleted file mode 100644 index c96df8ef9..000000000 --- a/.changes/webdriver-bump-dependencies.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-driver": patch ---- - -Update locked dependencies to fix a Windows build issue when using them with a recent Rust compiler. diff --git a/.changes/webdriver-bump-msrv.md b/.changes/webdriver-bump-msrv.md deleted file mode 100644 index 9a3cebab4..000000000 --- a/.changes/webdriver-bump-msrv.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-driver": patch ---- - -Bump minimum Rust version to `1.60` to be in line with the rest of the Tauri project. diff --git a/.changes/windows-http-scheme.md b/.changes/windows-http-scheme.md deleted file mode 100644 index c907f5262..000000000 --- a/.changes/windows-http-scheme.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'tauri': 'patch:enhance' -'tauri-runtime': 'patch:enhance' -'tauri-runtime-wry': 'patch:enhance' -'tauri-utils': 'patch:enhance' ---- - -Add setting to switch to `http://.localhost/` for custom protocols on Windows. diff --git a/core/tauri-build/CHANGELOG.md b/core/tauri-build/CHANGELOG.md index ccf6cebbc..f266e89f9 100644 --- a/core/tauri-build/CHANGELOG.md +++ b/core/tauri-build/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## \[1.4.1] + +### Bug Fixes + +- [`5ecb46b3`](https://www.github.com/tauri-apps/tauri/commit/5ecb46b3410afd1b5c82494c1e0a91d5a358c41a)([#7773](https://www.github.com/tauri-apps/tauri/pull/7773)) Automatically set rpath on macOS if frameworks are bundled and copy frameworks to `src-tauri/target/Frameworks` for usage in development. +- [`290e366a`](https://www.github.com/tauri-apps/tauri/commit/290e366ae98e9a52b1b43bfd3e285150427ebffa)([#7419](https://www.github.com/tauri-apps/tauri/pull/7419)) Correctly copy the WebView2 runtime in development when `webviewInstallMode` is used instead of `webviewFixedRuntimePath`. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-codegen@1.4.1` + ## \[1.4.0] ### Enhancements diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 9319920ff..10d05c15f 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-build" -version = "1.4.0" +version = "1.4.1" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" @@ -19,8 +19,8 @@ rustdoc-args = [ "--cfg", "doc_cfg" ] [dependencies] anyhow = "1" quote = { version = "1", optional = true } -tauri-codegen = { version = "1.4.0", path = "../tauri-codegen", optional = true } -tauri-utils = { version = "1.4.0", path = "../tauri-utils", features = [ "build", "resources" ] } +tauri-codegen = { version = "1.4.1", path = "../tauri-codegen", optional = true } +tauri-utils = { version = "1.5.0", path = "../tauri-utils", features = [ "build", "resources" ] } cargo_toml = "0.15" serde = "1" serde_json = "1" diff --git a/core/tauri-codegen/CHANGELOG.md b/core/tauri-codegen/CHANGELOG.md index 6081cbc7b..0101dc000 100644 --- a/core/tauri-codegen/CHANGELOG.md +++ b/core/tauri-codegen/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.4.1] + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` + ## \[1.4.0] ### Enhancements diff --git a/core/tauri-codegen/Cargo.toml b/core/tauri-codegen/Cargo.toml index 16d201e50..b8b6750d5 100644 --- a/core/tauri-codegen/Cargo.toml +++ b/core/tauri-codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-codegen" -version = "1.4.0" +version = "1.4.1" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" @@ -19,7 +19,7 @@ proc-macro2 = "1" quote = "1" serde = { version = "1", features = [ "derive" ] } serde_json = "1" -tauri-utils = { version = "1.4.0", path = "../tauri-utils", features = [ "build" ] } +tauri-utils = { version = "1.5.0", path = "../tauri-utils", features = [ "build" ] } thiserror = "1" walkdir = "2" brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] } diff --git a/core/tauri-macros/CHANGELOG.md b/core/tauri-macros/CHANGELOG.md index f3a4f4b78..4c0029591 100644 --- a/core/tauri-macros/CHANGELOG.md +++ b/core/tauri-macros/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## \[1.4.1] + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-codegen@1.4.1` + ## \[1.4.0] ### Enhancements diff --git a/core/tauri-macros/Cargo.toml b/core/tauri-macros/Cargo.toml index 2381ebfab..4085f1286 100644 --- a/core/tauri-macros/Cargo.toml +++ b/core/tauri-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-macros" -version = "1.4.0" +version = "1.4.1" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "os", "filesystem", "web-programming" ] license = "Apache-2.0 OR MIT" @@ -20,8 +20,8 @@ proc-macro2 = "1" quote = "1" syn = { version = "1", features = [ "full" ] } heck = "0.4" -tauri-codegen = { version = "1.4.0", default-features = false, path = "../tauri-codegen" } -tauri-utils = { version = "1.4.0", path = "../tauri-utils" } +tauri-codegen = { version = "1.4.1", default-features = false, path = "../tauri-codegen" } +tauri-utils = { version = "1.5.0", path = "../tauri-utils" } [features] custom-protocol = [ ] diff --git a/core/tauri-runtime-wry/CHANGELOG.md b/core/tauri-runtime-wry/CHANGELOG.md index 2840b148f..fb26af9b6 100644 --- a/core/tauri-runtime-wry/CHANGELOG.md +++ b/core/tauri-runtime-wry/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## \[0.14.1] + +### Enhancements + +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Bug Fixes + +- [`4bf1e85e`](https://www.github.com/tauri-apps/tauri/commit/4bf1e85e6bf85a7ec92d50c8465bc0588a6399d8)([#7722](https://www.github.com/tauri-apps/tauri/pull/7722)) Properly respect the `focused` option when creating the webview. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-runtime@0.14.1` + ## \[0.14.0] ### New Features diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index 30aa3b2a4..d13484dd5 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-runtime-wry" -version = "0.14.0" +version = "0.14.1" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" @@ -14,8 +14,8 @@ readme = "README.md" [dependencies] wry = { version = "0.24.4", default-features = false, features = [ "file-drop", "protocol" ] } -tauri-runtime = { version = "0.14.0", path = "../tauri-runtime" } -tauri-utils = { version = "1.4.0", path = "../tauri-utils" } +tauri-runtime = { version = "0.14.1", path = "../tauri-runtime" } +tauri-utils = { version = "1.5.0", path = "../tauri-utils" } uuid = { version = "1", features = [ "v4" ] } rand = "0.8" raw-window-handle = "0.5" diff --git a/core/tauri-runtime/CHANGELOG.md b/core/tauri-runtime/CHANGELOG.md index 2a411df2b..31945fcbc 100644 --- a/core/tauri-runtime/CHANGELOG.md +++ b/core/tauri-runtime/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[0.14.1] + +### Enhancements + +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` + ## \[0.14.0] ### New Features diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index 1c255a94a..264348c79 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-runtime" -version = "0.14.0" +version = "0.14.1" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" @@ -26,7 +26,7 @@ targets = [ serde = { version = "1.0", features = [ "derive" ] } serde_json = "1.0" thiserror = "1.0" -tauri-utils = { version = "1.4.0", path = "../tauri-utils" } +tauri-utils = { version = "1.5.0", path = "../tauri-utils" } uuid = { version = "1", features = [ "v4" ] } http = "0.2.4" http-range = "0.1.4" diff --git a/core/tauri-utils/CHANGELOG.md b/core/tauri-utils/CHANGELOG.md index 835f3ed36..086917cc7 100644 --- a/core/tauri-utils/CHANGELOG.md +++ b/core/tauri-utils/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## \[1.5.0] + +### New Features + +- [`4dd4893d`](https://www.github.com/tauri-apps/tauri/commit/4dd4893d7d166ac3a3b6dc2e3bd2540326352a78)([#5950](https://www.github.com/tauri-apps/tauri/pull/5950)) Allow specifying resources as a map specifying source and target paths. + +### Enhancements + +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Bug Fixes + +- [`a6b52e44`](https://www.github.com/tauri-apps/tauri/commit/a6b52e44f22844009e273fb0250368d7a463f095)([#6519](https://www.github.com/tauri-apps/tauri/pull/6519)) Fix `io::read_line` not including the new line character `\n`. + +### Security fixes + +- [`eeff1784`](https://www.github.com/tauri-apps/tauri/commit/eeff1784e1ffa568e4ba024e17dd611f8e086784)([#7367](https://www.github.com/tauri-apps/tauri/pull/7367)) Changed HTML implementation from unmaintained `kuchiki` to `kuchikiki`. + ## \[1.4.0] ### New Features diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index d2a08666f..81433e9c9 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-utils" -version = "1.4.0" +version = "1.5.0" authors = [ "Tauri Programme within The Commons Conservancy" ] license = "Apache-2.0 OR MIT" homepage = "https://tauri.app" diff --git a/core/tauri/CHANGELOG.md b/core/tauri/CHANGELOG.md index e87175be2..d59643f97 100644 --- a/core/tauri/CHANGELOG.md +++ b/core/tauri/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## \[1.5.0] + +### New Features + +- [`eeb6be54`](https://www.github.com/tauri-apps/tauri/commit/eeb6be54228f3e5463a28c68956abb06a694c010)([#7512](https://www.github.com/tauri-apps/tauri/pull/7512)) Add `tauri::Manager::emit_filter` and only serialize once when emitting to multiple windows. +- [`6c408b73`](https://www.github.com/tauri-apps/tauri/commit/6c408b736c7aa2a0a91f0a40d45a2b7a7dedfe78)([#7269](https://www.github.com/tauri-apps/tauri/pull/7269)) Add option to specify notification sound. +- [`fdaee9a5`](https://www.github.com/tauri-apps/tauri/commit/fdaee9a5ce988c448dd035c2050c339d275e8d15)([#7350](https://www.github.com/tauri-apps/tauri/pull/7350)) Add `tauri::plugin::Builder::register_uri_scheme_protocol` +- [`10e362d0`](https://www.github.com/tauri-apps/tauri/commit/10e362d098c9bed48f832bad471fb2fab83ab0bb)([#7432](https://www.github.com/tauri-apps/tauri/pull/7432)) Added `UpdateBuilder::endpoints` to add request endpoints at runtime. +- [`10e362d0`](https://www.github.com/tauri-apps/tauri/commit/10e362d098c9bed48f832bad471fb2fab83ab0bb)([#7432](https://www.github.com/tauri-apps/tauri/pull/7432)) Added `UpdateResponse::header` and `UpdateResponse::remove_header` to modify the update download request headers. + +### Enhancements + +- [`757e959e`](https://www.github.com/tauri-apps/tauri/commit/757e959eb276ed535cfddb0dea8897c56441c644)([#7344](https://www.github.com/tauri-apps/tauri/pull/7344)) Open links externally when `` exists +- [`c9827338`](https://www.github.com/tauri-apps/tauri/commit/c98273387c0ffbb8d0de78ce17006411a1f503ee)([#7416](https://www.github.com/tauri-apps/tauri/pull/7416)) Enhance `readDir` API error with path information. +- [`58d6b899`](https://www.github.com/tauri-apps/tauri/commit/58d6b899e21d37bb42810890d289deb57f2273bd)([#7636](https://www.github.com/tauri-apps/tauri/pull/7636)) Add `append` option to `FsOptions` in the `fs` JS module, used in `writeTextFile` and `writeBinaryFile`, to be able to append to existing files instead of overwriting it. +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Bug Fixes + +- [`4bf1e85e`](https://www.github.com/tauri-apps/tauri/commit/4bf1e85e6bf85a7ec92d50c8465bc0588a6399d8)([#7722](https://www.github.com/tauri-apps/tauri/pull/7722)) Properly respect the `focused` option when creating the webview. +- [`0797a002`](https://www.github.com/tauri-apps/tauri/commit/0797a002caad29cd8bedccf01f64bf3b45a5e528)([#7746](https://www.github.com/tauri-apps/tauri/pull/7746)) On macOS, fixed tapping on custom title bar doesn't maximize the window. +- [`1a3dcdb8`](https://www.github.com/tauri-apps/tauri/commit/1a3dcdb8302fad511f2c1cd418fbc4cff0bd62ac)([#7185](https://www.github.com/tauri-apps/tauri/pull/7185)) On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater. +- [`fa7f9b77`](https://www.github.com/tauri-apps/tauri/commit/fa7f9b77ab8f0c890e9d7b120901610e0d3e4c46)([#7341](https://www.github.com/tauri-apps/tauri/pull/7341)) Fix updater not following endpoint redirects. +- [`6fbd6dba`](https://www.github.com/tauri-apps/tauri/commit/6fbd6dba5290dc017ab0ba5a44cf4358b022836f)([#17](https://www.github.com/tauri-apps/tauri/pull/17)) Fix the validation of `std::env::current_exe` warn the user if AppImage is not mounted instead of panicking + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-runtime-wry@0.14.1` +- Upgraded to `tauri-runtime@0.14.1` +- Upgraded to `tauri-macros@1.4.1` + ## \[1.4.1] ### Bug Fixes diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 4faf157c6..405f7171e 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -10,7 +10,7 @@ license = "Apache-2.0 OR MIT" name = "tauri" readme = "README.md" repository = "https://github.com/tauri-apps/tauri" -version = "1.4.1" +version = "1.5.0" [package.metadata.docs.rs] no-default-features = true @@ -50,10 +50,10 @@ url = { version = "2.3" } anyhow = "1.0" thiserror = "1.0" once_cell = "1" -tauri-runtime = { version = "0.14.0", path = "../tauri-runtime" } -tauri-macros = { version = "1.4.0", path = "../tauri-macros" } -tauri-utils = { version = "1.4.0", features = [ "resources" ], path = "../tauri-utils" } -tauri-runtime-wry = { version = "0.14.0", path = "../tauri-runtime-wry", optional = true } +tauri-runtime = { version = "0.14.1", path = "../tauri-runtime" } +tauri-macros = { version = "1.4.1", path = "../tauri-macros" } +tauri-utils = { version = "1.5.0", features = [ "resources" ], path = "../tauri-utils" } +tauri-runtime-wry = { version = "0.14.1", path = "../tauri-runtime-wry", optional = true } rand = "0.8" semver = { version = "1.0", features = [ "serde" ] } serde_repr = "0.1" diff --git a/tooling/api/CHANGELOG.md b/tooling/api/CHANGELOG.md index 0cb6561ec..f6af6db11 100644 --- a/tooling/api/CHANGELOG.md +++ b/tooling/api/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## \[1.5.0] + +### New Features + +- [`6c408b73`](https://www.github.com/tauri-apps/tauri/commit/6c408b736c7aa2a0a91f0a40d45a2b7a7dedfe78)([#7269](https://www.github.com/tauri-apps/tauri/pull/7269)) Add option to specify notification sound. + +### Enhancements + +- [`58d6b899`](https://www.github.com/tauri-apps/tauri/commit/58d6b899e21d37bb42810890d289deb57f2273bd)([#7636](https://www.github.com/tauri-apps/tauri/pull/7636)) Add `append` option to `FsOptions` in the `fs` JS module, used in `writeTextFile` and `writeBinaryFile`, to be able to append to existing files instead of overwriting it. + +### Bug Fixes + +- [`2eab1505`](https://www.github.com/tauri-apps/tauri/commit/2eab1505632ff71431d4c31c49b5afc78fa5b9dd)([#7394](https://www.github.com/tauri-apps/tauri/pull/7394)) Fix `Body.form` static not reading and sending entries of type `Blob` (including subclasses such as `File`) + ## \[1.4.0] ### New Features diff --git a/tooling/api/package.json b/tooling/api/package.json index 0473a0531..4b0e21556 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/api", - "version": "1.4.0", + "version": "1.5.0", "description": "Tauri API definitions", "type": "module", "funding": { diff --git a/tooling/bundler/CHANGELOG.md b/tooling/bundler/CHANGELOG.md index edfe89192..e969af377 100644 --- a/tooling/bundler/CHANGELOG.md +++ b/tooling/bundler/CHANGELOG.md @@ -1,5 +1,44 @@ # Changelog +## \[1.4.0] + +### New Features + +- [`4dd4893d`](https://www.github.com/tauri-apps/tauri/commit/4dd4893d7d166ac3a3b6dc2e3bd2540326352a78)([#5950](https://www.github.com/tauri-apps/tauri/pull/5950)) Allow using a resource map instead of a simple array in `BundleSettings::resources_map`. + +### Enhancements + +- [`764968ab`](https://www.github.com/tauri-apps/tauri/commit/764968ab383ec639e061986bc2411dd44e71b612)([#7398](https://www.github.com/tauri-apps/tauri/pull/7398)) Sign NSIS uninstaller as well. +- [`2f8881c0`](https://www.github.com/tauri-apps/tauri/commit/2f8881c010fa3493c092ddf3a343df08d7a79fc9)([#7775](https://www.github.com/tauri-apps/tauri/pull/7775)) Read the `APPLE_TEAM_ID` environment variable for macOS notarization arguments. +- [`cb1d4164`](https://www.github.com/tauri-apps/tauri/commit/cb1d4164e71e29f071b8438d02a7ec86a9fac67b)([#7487](https://www.github.com/tauri-apps/tauri/pull/7487)) On Windows, code sign the application binaries before trying to create the WiX and NSIS bundles to always sign the executables even if no bundle types are enabled. + + On Windows, code sign the sidecar binaries if they are not signed already. +- [`57f73f1b`](https://www.github.com/tauri-apps/tauri/commit/57f73f1b6a07e690d122d7534a0b3531c8c12c03)([#7486](https://www.github.com/tauri-apps/tauri/pull/7486)) On Windows, NSIS installer will write webview2 installer file to the well-known temp dir instead of the install dir, so we don't pollute the install dir. +- [`a7777ff4`](https://www.github.com/tauri-apps/tauri/commit/a7777ff485b725f177d08bbc00af607cd8ee8d6d)([#7626](https://www.github.com/tauri-apps/tauri/pull/7626)) Added Bulgarian language support to the NSIS bundler. +- [`e3bfb014`](https://www.github.com/tauri-apps/tauri/commit/e3bfb01411c3cc5e602c8f961f6cb5c9dd9524e1)([#7776](https://www.github.com/tauri-apps/tauri/pull/7776)) Add `compression` configuration option under `tauri > bundle > windows > nsis`. + +### Bug Fixes + +- [`46df2c9b`](https://www.github.com/tauri-apps/tauri/commit/46df2c9b917096388695f72ca4c56791fe652ef6)([#7360](https://www.github.com/tauri-apps/tauri/pull/7360)) Fix bundler skipping updater artifacts if `updater` target shows before other updater-enabled targets in the list, see [#7349](https://github.com/tauri-apps/tauri/issues/7349). +- [`2d35f937`](https://www.github.com/tauri-apps/tauri/commit/2d35f937de59272d26556310155c0b15d849953c)([#7481](https://www.github.com/tauri-apps/tauri/pull/7481)) Fix bundler skipping updater artifacts if only a macOS DMG bundle target is specified. +- [`dcdbe3eb`](https://www.github.com/tauri-apps/tauri/commit/dcdbe3eb6cc7d8a43caef98dfce71a11a4597644)([#7774](https://www.github.com/tauri-apps/tauri/pull/7774)) Remove extended attributes on the macOS app bundle using `xattr -cr $PATH`. +- [`dcdbe3eb`](https://www.github.com/tauri-apps/tauri/commit/dcdbe3eb6cc7d8a43caef98dfce71a11a4597644)([#7774](https://www.github.com/tauri-apps/tauri/pull/7774)) Code sign sidecars and frameworks on macOS. +- [`eba8e131`](https://www.github.com/tauri-apps/tauri/commit/eba8e1315ed7078eb9a9479f9e0072b061067341)([#7386](https://www.github.com/tauri-apps/tauri/pull/7386)) On Windows, fix installation packages not showing correct copyright information. +- [`32218a6f`](https://www.github.com/tauri-apps/tauri/commit/32218a6f8c1d90c2503e7cbc4523e4ab464ba032)([#7326](https://www.github.com/tauri-apps/tauri/pull/7326)) On Windows, fix NSIS installer identifying a previous NSIS-installed app as WiX-installed app and then fails to uninstall it. +- [`ca977f4b`](https://www.github.com/tauri-apps/tauri/commit/ca977f4b87c66808b4eac31a6d1925842b4c1570)([#7591](https://www.github.com/tauri-apps/tauri/pull/7591)) On Windows, Fix NSIS uninstaller deleting the wrong application data if the delete the application data checkbox is checked. +- [`0ae53f41`](https://www.github.com/tauri-apps/tauri/commit/0ae53f413948c7b955e595aa9c6c9e777caa8666)([#7361](https://www.github.com/tauri-apps/tauri/pull/7361)) On Windows, fix NSIS installer showing an error dialog even when the previous version was uninstalled sucessfully. +- [`09f7f57e`](https://www.github.com/tauri-apps/tauri/commit/09f7f57eeadbf94d8e9e14f3ab2b115a4c4aa473)([#7711](https://www.github.com/tauri-apps/tauri/pull/7711)) On Windows, fix NSIS installer trying to kill itself if the installer file name and the app `productName` are the same. +- [`6e36ebbf`](https://www.github.com/tauri-apps/tauri/commit/6e36ebbf84dee11a98d8df916c316c7d6f67b2a8)([#7342](https://www.github.com/tauri-apps/tauri/pull/7342)) On Windows, fix NSIS uninstaller failing to remove Start Menu shortcut if `perMachine` mode is used. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- [`a2be88a2`](https://www.github.com/tauri-apps/tauri/commit/a2be88a21db76e9fa063c527031f3849f066eecd)([#7405](https://www.github.com/tauri-apps/tauri/pull/7405)) Removed the `bitness` dependency to speed up compile time. + +### Breaking Changes + +- [`964d81ff`](https://www.github.com/tauri-apps/tauri/commit/964d81ff01a076516d323546c169b2ba8156e55a)([#7616](https://www.github.com/tauri-apps/tauri/pull/7616)) The macOS notarization now uses `notarytool` as `altool` will be discontinued on November 2023. When authenticating with an API key, the key `.p8` file path must be provided in the `APPLE_API_KEY_PATH` environment variable. To prevent a breaking change, we will try to find the key path in the `altool` default search paths. + ## \[1.3.0] ### New Features diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index 13abfa040..2e18df563 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-bundler" -version = "1.3.0" +version = "1.4.0" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy" @@ -17,7 +17,7 @@ rust-version = "1.60" exclude = [ "CHANGELOG.md", "/target", "rustfmt.toml" ] [dependencies] -tauri-utils = { version = "1.4.0", path = "../../core/tauri-utils", features = [ "resources" ] } +tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "resources" ] } image = "0.24.6" libflate = "1.4" anyhow = "1.0" @@ -46,9 +46,9 @@ uuid = { version = "1", features = [ "v4", "v5" ] } winreg = "0.50" glob = "0.3" -[target."cfg(target_os = \"windows\")".dependencies.windows-sys] -version = "0.48" -features = [ + [target."cfg(target_os = \"windows\")".dependencies.windows-sys] + version = "0.48" + features = [ "Win32_System_SystemInformation", "Win32_System_Diagnostics_Debug" ] diff --git a/tooling/cli/CHANGELOG.md b/tooling/cli/CHANGELOG.md index 10dcca122..a93c7b496 100644 --- a/tooling/cli/CHANGELOG.md +++ b/tooling/cli/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## \[1.5.0] + +### New Features + +- [`e1526626`](https://www.github.com/tauri-apps/tauri/commit/e152662687ece7a62d383923a50751cc0dd34331)([#7723](https://www.github.com/tauri-apps/tauri/pull/7723)) Support Bun package manager in CLI + +### Enhancements + +- [`13279917`](https://www.github.com/tauri-apps/tauri/commit/13279917d4cae071d0ce3a686184d48af079f58a)([#7713](https://www.github.com/tauri-apps/tauri/pull/7713)) Add version of Rust Tauri CLI installed with Cargo to `tauri info` command. + +### Bug Fixes + +- [`dad4f54e`](https://www.github.com/tauri-apps/tauri/commit/dad4f54eec9773d2ea6233a7d9fd218741173823)([#7277](https://www.github.com/tauri-apps/tauri/pull/7277)) Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues. + +### Dependencies + +- Upgraded to `tauri-bundler@1.4.0` +- Upgraded to `tauri-utils@1.5.0` + ## \[1.4.0] ### New Features diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 28090c49d..7f9bc2f7b 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -1712,9 +1712,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ "value-bag", ] @@ -3304,7 +3304,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "1.3.0" +version = "1.4.0" dependencies = [ "anyhow", "ar", @@ -3344,7 +3344,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "1.4.0" +version = "1.5.0" dependencies = [ "anyhow", "axum", @@ -3417,7 +3417,7 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.4.0" +version = "1.5.0" dependencies = [ "aes-gcm", "ctor 0.1.26", @@ -3430,6 +3430,7 @@ dependencies = [ "json-patch", "json5", "kuchikiki", + "log", "memchr", "phf 0.10.1", "schemars", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 49d3b8038..e76b13a32 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -3,7 +3,7 @@ members = [ "node" ] [package] name = "tauri-cli" -version = "1.4.0" +version = "1.5.0" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" rust-version = "1.60" @@ -42,7 +42,7 @@ path = "src/main.rs" clap_complete = "4" clap = { version = "4.0", features = [ "derive" ] } anyhow = "1.0" -tauri-bundler = { version = "1.3.0", path = "../bundler", default-features = false } +tauri-bundler = { version = "1.4.0", path = "../bundler", default-features = false } colored = "2.0" once_cell = "1" serde = { version = "1.0", features = [ "derive" ] } @@ -52,7 +52,7 @@ notify-debouncer-mini = "0.3" shared_child = "1.0" toml_edit = "0.14" json-patch = "1.0" -tauri-utils = { version = "1.4.0", path = "../../core/tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] } +tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] } toml = "0.5" jsonschema = "0.16" handlebars = "4.3" diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index 085637ef2..5cfad1175 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -1,8 +1,8 @@ { "cli.js": { - "version": "1.4.0", + "version": "1.5.0", "node": ">= 10.0.0" }, - "tauri": "1.4.1", - "tauri-build": "1.4.0" + "tauri": "1.5.0", + "tauri-build": "1.4.1" } diff --git a/tooling/cli/node/CHANGELOG.md b/tooling/cli/node/CHANGELOG.md index 2edb05edd..2bdd5e14c 100644 --- a/tooling/cli/node/CHANGELOG.md +++ b/tooling/cli/node/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## \[1.5.0] + +### New Features + +- [`e1526626`](https://www.github.com/tauri-apps/tauri/commit/e152662687ece7a62d383923a50751cc0dd34331)([#7723](https://www.github.com/tauri-apps/tauri/pull/7723)) Support Bun package manager in CLI + +### Enhancements + +- [`13279917`](https://www.github.com/tauri-apps/tauri/commit/13279917d4cae071d0ce3a686184d48af079f58a)([#7713](https://www.github.com/tauri-apps/tauri/pull/7713)) Add version of Rust Tauri CLI installed with Cargo to `tauri info` command. + +### Bug Fixes + +- [`dad4f54e`](https://www.github.com/tauri-apps/tauri/commit/dad4f54eec9773d2ea6233a7d9fd218741173823)([#7277](https://www.github.com/tauri-apps/tauri/pull/7277)) Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues. + +### Dependencies + +- Upgraded to `tauri-cli@1.5.0` + ## \[1.4.0] ### New Features diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 58f1c9426..6108156e5 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "1.4.0", + "version": "1.5.0", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", diff --git a/tooling/webdriver/CHANGELOG.md b/tooling/webdriver/CHANGELOG.md index b8d66ecaf..8d9e57336 100644 --- a/tooling/webdriver/CHANGELOG.md +++ b/tooling/webdriver/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## \[0.1.3] + +### What's Changed + +- [`9edebbba`](https://www.github.com/tauri-apps/tauri/commit/9edebbba4ec472772b2f6307232e8d256f62c8ba)([#7475](https://www.github.com/tauri-apps/tauri/pull/7475)) Update locked dependencies to fix a Windows build issue when using them with a recent Rust compiler. +- [`9edebbba`](https://www.github.com/tauri-apps/tauri/commit/9edebbba4ec472772b2f6307232e8d256f62c8ba)([#7475](https://www.github.com/tauri-apps/tauri/pull/7475)) Bump minimum Rust version to `1.60` to be in line with the rest of the Tauri project. + ## \[0.1.2] - Expose `native-host` option in tauri-driver and set default to `127.0.0.1`. diff --git a/tooling/webdriver/Cargo.toml b/tooling/webdriver/Cargo.toml index 6a61f293e..922053a99 100644 --- a/tooling/webdriver/Cargo.toml +++ b/tooling/webdriver/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-driver" -version = "0.1.2" +version = "0.1.3" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" From c001a91d15fa363dad2a231cfe06d77e82b6460d Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 28 Sep 2023 15:29:53 -0300 Subject: [PATCH 073/104] fix(ci): update tauri-driver's Cargo.lock file on version bump (#7915) --- .changes/config.json | 3 ++- tooling/webdriver/Cargo.lock | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.changes/config.json b/.changes/config.json index 4bf07c0bf..870c62356 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -271,7 +271,8 @@ }, "tauri-driver": { "path": "./tooling/webdriver", - "manager": "rust" + "manager": "rust", + "postversion": "cargo check" } } } diff --git a/tooling/webdriver/Cargo.lock b/tooling/webdriver/Cargo.lock index 56a17956d..9fcf9c9d1 100644 --- a/tooling/webdriver/Cargo.lock +++ b/tooling/webdriver/Cargo.lock @@ -421,7 +421,7 @@ dependencies = [ [[package]] name = "tauri-driver" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "futures", From d1e09da084b849b9e384fc27ed250dd17e72c7a3 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 29 Sep 2023 20:20:27 -0300 Subject: [PATCH 074/104] hotfix(build): bump tauri-build to 1.5 (#7918) --- .changes/bump-tauri-build-1.5.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/bump-tauri-build-1.5.md diff --git a/.changes/bump-tauri-build-1.5.md b/.changes/bump-tauri-build-1.5.md new file mode 100644 index 000000000..200ebe890 --- /dev/null +++ b/.changes/bump-tauri-build-1.5.md @@ -0,0 +1,5 @@ +--- +"tauri-build": minor:changes +--- + +Bump to 1.5 due to tauri-utils dependency bump. From a3277a245c191a28b3062156d09c0916fe232025 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Sep 2023 04:41:23 +0300 Subject: [PATCH 075/104] Apply Version Updates From Current Changes (v1) (#7924) Co-authored-by: amrbashir --- .changes/bump-tauri-build-1.5.md | 5 ----- core/tauri-build/CHANGELOG.md | 6 ++++++ core/tauri-build/Cargo.toml | 2 +- tooling/cli/metadata.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 .changes/bump-tauri-build-1.5.md diff --git a/.changes/bump-tauri-build-1.5.md b/.changes/bump-tauri-build-1.5.md deleted file mode 100644 index 200ebe890..000000000 --- a/.changes/bump-tauri-build-1.5.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-build": minor:changes ---- - -Bump to 1.5 due to tauri-utils dependency bump. diff --git a/core/tauri-build/CHANGELOG.md b/core/tauri-build/CHANGELOG.md index f266e89f9..940834687 100644 --- a/core/tauri-build/CHANGELOG.md +++ b/core/tauri-build/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.0] + +### What's Changed + +- [`d1e09da0`](https://www.github.com/tauri-apps/tauri/commit/d1e09da084b849b9e384fc27ed250dd17e72c7a3)([#7918](https://www.github.com/tauri-apps/tauri/pull/7918)) Bump to 1.5 due to tauri-utils dependency bump. + ## \[1.4.1] ### Bug Fixes diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 10d05c15f..3fd900466 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-build" -version = "1.4.1" +version = "1.5.0" authors = [ "Tauri Programme within The Commons Conservancy" ] categories = [ "gui", "web-programming" ] license = "Apache-2.0 OR MIT" diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index 5cfad1175..e28b6fb71 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -4,5 +4,5 @@ "node": ">= 10.0.0" }, "tauri": "1.5.0", - "tauri-build": "1.4.1" + "tauri-build": "1.5.0" } From 3671edbcff37447c95382ab4c9fd1c36a460a037 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 2 Oct 2023 11:19:01 -0300 Subject: [PATCH 076/104] fix(core): toggle devtools via global shortcut (#7937) * fix(core): toggle devtools via global shortcut * Update .changes/fix-toggle-devtools.md --- .changes/fix-toggle-devtools.md | 5 +++++ core/tauri/scripts/toggle-devtools.js | 8 +++++--- core/tauri/src/manager.rs | 16 +++++++++++++--- examples/api/src-tauri/Cargo.lock | 21 ++++++++++++--------- 4 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 .changes/fix-toggle-devtools.md diff --git a/.changes/fix-toggle-devtools.md b/.changes/fix-toggle-devtools.md new file mode 100644 index 000000000..95b89b71b --- /dev/null +++ b/.changes/fix-toggle-devtools.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Fix devtools not toggling on `ctrl+shift+i` or `cmd+alt+i` shortcuts. diff --git a/core/tauri/scripts/toggle-devtools.js b/core/tauri/scripts/toggle-devtools.js index f7e521ce5..854bff4c8 100644 --- a/core/tauri/scripts/toggle-devtools.js +++ b/core/tauri/scripts/toggle-devtools.js @@ -3,10 +3,12 @@ // SPDX-License-Identifier: MIT (function () { + const osName = __TEMPLATE_os_name__ + function toggleDevtoolsHotkey() { - const isHotkey = navigator.appVersion.includes("Mac") - ? (event) => event.metaKey && event.altKey && event.key === "I" - : (event) => event.ctrlKey && event.shiftKey && event.key === "I"; + const isHotkey = osName === 'macos' ? + (event) => event.metaKey && event.altKey && event.code === "KeyI" : + (event) => event.ctrlKey && event.shiftKey && event.code === "KeyI"; document.addEventListener("keydown", (event) => { if (isHotkey(event)) { diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 4e66be645..5c9a3490d 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -802,6 +802,12 @@ impl WindowManager { protocol_scheme: &'a str, } + #[derive(Template)] + #[default_template("../scripts/toggle-devtools.js")] + struct ToggleDevtoolsScript<'a> { + os_name: &'a str, + } + let bundle_script = if with_global_tauri { include_str!("../scripts/bundle.global.js") } else { @@ -815,9 +821,13 @@ impl WindowManager { }; #[cfg(any(debug_assertions, feature = "devtools"))] - let hotkeys = include_str!("../scripts/toggle-devtools.js"); + let hotkeys = ToggleDevtoolsScript { + os_name: std::env::consts::OS, + } + .render_default(&Default::default())? + .into_string(); #[cfg(not(any(debug_assertions, feature = "devtools")))] - let hotkeys = ""; + let hotkeys = String::default(); InitJavascript { pattern_script, @@ -846,7 +856,7 @@ impl WindowManager { event_initialization_script: &self.event_initialization_script(), plugin_initialization_script, freeze_prototype, - hotkeys, + hotkeys: &hotkeys, } .render_default(&Default::default()) .map(|s| s.into_string()) diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 1d214dab1..8a4a03fc4 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -1954,9 +1954,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "loom" @@ -3529,7 +3529,7 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tauri" -version = "1.4.1" +version = "1.5.0" dependencies = [ "anyhow", "base64 0.21.2", @@ -3591,10 +3591,11 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.4.0" +version = "1.5.0" dependencies = [ "anyhow", "cargo_toml", + "dirs-next", "heck 0.4.1", "json-patch", "quote", @@ -3604,11 +3605,12 @@ dependencies = [ "tauri-codegen", "tauri-utils", "tauri-winres", + "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64 0.21.2", "brotli", @@ -3632,7 +3634,7 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.4.0" +version = "1.4.1" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3644,7 +3646,7 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.14.0" +version = "0.14.1" dependencies = [ "gtk", "http", @@ -3663,7 +3665,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.14.0" +version = "0.14.1" dependencies = [ "cocoa", "gtk", @@ -3681,7 +3683,7 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.4.0" +version = "1.5.0" dependencies = [ "aes-gcm", "brotli", @@ -3694,6 +3696,7 @@ dependencies = [ "infer 0.12.0", "json-patch", "kuchikiki", + "log", "memchr", "phf 0.10.1", "proc-macro2", From d6eb46cf1116d147121f6b6db9d390b5e2fb238d Mon Sep 17 00:00:00 2001 From: Jason Tsai Date: Mon, 2 Oct 2023 22:30:39 +0800 Subject: [PATCH 077/104] fix(macos): fix notraytool's apple-id option name, close #7917 (#7934) Co-authored-by: Lucas Fernandes Nogueira --- .changes/fix-notarytool-args-apple-id.md | 6 ++++++ tooling/bundler/src/bundle/macos/sign.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/fix-notarytool-args-apple-id.md diff --git a/.changes/fix-notarytool-args-apple-id.md b/.changes/fix-notarytool-args-apple-id.md new file mode 100644 index 000000000..b0e6b02d9 --- /dev/null +++ b/.changes/fix-notarytool-args-apple-id.md @@ -0,0 +1,6 @@ +--- +'tauri-cli': 'patch:bug' +'@tauri-apps/cli': 'patch:bug' +--- + +On macOS, fix the `apple-id` option name when using `notarytools submit`. \ No newline at end of file diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index b2ab2f79d..a08866ed9 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -358,7 +358,7 @@ impl NotarytoolCmdExt for Command { team_id, } => { self - .arg("--username") + .arg("--apple-id") .arg(apple_id) .arg("--password") .arg(password); From 19249d78fb3c8c44a2c735848dcc2cf2e7d6f517 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:16:57 -0300 Subject: [PATCH 078/104] Apply Version Updates From Current Changes (v1) (#7938) Co-authored-by: lucasfernog --- .changes/fix-notarytool-args-apple-id.md | 6 ------ .changes/fix-toggle-devtools.md | 5 ----- core/tauri/CHANGELOG.md | 6 ++++++ core/tauri/Cargo.toml | 2 +- tooling/cli/CHANGELOG.md | 6 ++++++ tooling/cli/Cargo.lock | 2 +- tooling/cli/Cargo.toml | 2 +- tooling/cli/metadata.json | 4 ++-- tooling/cli/node/CHANGELOG.md | 10 ++++++++++ tooling/cli/node/package.json | 2 +- 10 files changed, 28 insertions(+), 17 deletions(-) delete mode 100644 .changes/fix-notarytool-args-apple-id.md delete mode 100644 .changes/fix-toggle-devtools.md diff --git a/.changes/fix-notarytool-args-apple-id.md b/.changes/fix-notarytool-args-apple-id.md deleted file mode 100644 index b0e6b02d9..000000000 --- a/.changes/fix-notarytool-args-apple-id.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri-cli': 'patch:bug' -'@tauri-apps/cli': 'patch:bug' ---- - -On macOS, fix the `apple-id` option name when using `notarytools submit`. \ No newline at end of file diff --git a/.changes/fix-toggle-devtools.md b/.changes/fix-toggle-devtools.md deleted file mode 100644 index 95b89b71b..000000000 --- a/.changes/fix-toggle-devtools.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": patch:bug ---- - -Fix devtools not toggling on `ctrl+shift+i` or `cmd+alt+i` shortcuts. diff --git a/core/tauri/CHANGELOG.md b/core/tauri/CHANGELOG.md index d59643f97..9df3f851a 100644 --- a/core/tauri/CHANGELOG.md +++ b/core/tauri/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.1] + +### Bug Fixes + +- [`3671edbc`](https://www.github.com/tauri-apps/tauri/commit/3671edbcff37447c95382ab4c9fd1c36a460a037)([#7937](https://www.github.com/tauri-apps/tauri/pull/7937)) Fix devtools not toggling on `ctrl+shift+i` or `cmd+alt+i` shortcuts. + ## \[1.5.0] ### New Features diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 405f7171e..ac4a891e0 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -10,7 +10,7 @@ license = "Apache-2.0 OR MIT" name = "tauri" readme = "README.md" repository = "https://github.com/tauri-apps/tauri" -version = "1.5.0" +version = "1.5.1" [package.metadata.docs.rs] no-default-features = true diff --git a/tooling/cli/CHANGELOG.md b/tooling/cli/CHANGELOG.md index a93c7b496..4b97e6376 100644 --- a/tooling/cli/CHANGELOG.md +++ b/tooling/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.1] + +### Bug Fixes + +- [`d6eb46cf`](https://www.github.com/tauri-apps/tauri/commit/d6eb46cf1116d147121f6b6db9d390b5e2fb238d)([#7934](https://www.github.com/tauri-apps/tauri/pull/7934)) On macOS, fix the `apple-id` option name when using `notarytools submit`. + ## \[1.5.0] ### New Features diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 7f9bc2f7b..65c81ea7c 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -3344,7 +3344,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "1.5.0" +version = "1.5.1" dependencies = [ "anyhow", "axum", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index e76b13a32..c7ec794bb 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -3,7 +3,7 @@ members = [ "node" ] [package] name = "tauri-cli" -version = "1.5.0" +version = "1.5.1" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" rust-version = "1.60" diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index e28b6fb71..cdba3ccc4 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -1,8 +1,8 @@ { "cli.js": { - "version": "1.5.0", + "version": "1.5.1", "node": ">= 10.0.0" }, - "tauri": "1.5.0", + "tauri": "1.5.1", "tauri-build": "1.5.0" } diff --git a/tooling/cli/node/CHANGELOG.md b/tooling/cli/node/CHANGELOG.md index 2bdd5e14c..81ac6ea30 100644 --- a/tooling/cli/node/CHANGELOG.md +++ b/tooling/cli/node/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[1.5.1] + +### Bug Fixes + +- [`d6eb46cf`](https://www.github.com/tauri-apps/tauri/commit/d6eb46cf1116d147121f6b6db9d390b5e2fb238d)([#7934](https://www.github.com/tauri-apps/tauri/pull/7934)) On macOS, fix the `apple-id` option name when using `notarytools submit`. + +### Dependencies + +- Upgraded to `tauri-cli@1.5.1` + ## \[1.5.0] ### New Features diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 6108156e5..39f7053c4 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "1.5.0", + "version": "1.5.1", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", From cdd5516f339ad4345623a1e785c6e2c3a77477f8 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 4 Oct 2023 23:45:43 +0200 Subject: [PATCH 079/104] fix(bundler): Use escaped installer path when starting the updater setup, fixes #7931 (#7956) * fix(bundler): Use escaped installer path when starting the updater setup, fixes #7931 * fun ci stuff * who needs lockfiles anyway * stahp * please let it be the last one. i want to leave --- .changes/updater-launch-setup.md | 5 +++++ .github/workflows/test-core.yml | 4 +++- core/tauri/src/updater/core.rs | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changes/updater-launch-setup.md diff --git a/.changes/updater-launch-setup.md b/.changes/updater-launch-setup.md new file mode 100644 index 000000000..09b821be6 --- /dev/null +++ b/.changes/updater-launch-setup.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +Fixes an app crash on app updates when the product name contained spaces. \ No newline at end of file diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index b4b9c24b1..0d9bd59da 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -85,8 +85,9 @@ jobs: - name: Downgrade crates with MSRV conflict # The --precise flag can only be used once per invocation. run: | + cargo update -p system-deps:6.1.2 --precise 6.1.1 cargo update -p toml:0.7.8 --precise 0.7.3 - cargo update -p toml_edit --precise 0.19.8 + cargo update -p toml_edit:0.19.15 --precise 0.19.8 cargo update -p toml_datetime --precise 0.6.1 cargo update -p serde_spanned --precise 0.6.1 cargo update -p winnow --precise 0.4.1 @@ -107,6 +108,7 @@ jobs: cargo update -p cfg-expr:0.15.5 --precise 0.15.4 cargo update -p memchr --precise 2.6.2 cargo update -p async-executor --precise 1.5.1 + cargo update -p proptest --precise 1.2.0 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index e487aab37..4d488d3e7 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -749,7 +749,7 @@ fn copy_files_and_run( Command::new(powershell_path) .args(["-NoProfile", "-WindowStyle", "Hidden"]) .args(["Start-Process"]) - .arg(found_path) + .arg(installer_arg) .arg("-ArgumentList") .arg( [ From 40d340021c0eab65aa1713807f7564e0698a321e Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 6 Oct 2023 14:33:49 -0300 Subject: [PATCH 080/104] fix(bundler): team ID is now required for notarytool via app password (#7972) --- .changes/notarytool-team-id-required.md | 5 +++ core/tauri-runtime-wry/src/global_shortcut.rs | 3 +- core/tauri-runtime-wry/src/lib.rs | 8 ++-- core/tauri/src/manager.rs | 2 +- core/tauri/src/window.rs | 2 +- examples/api/src-tauri/Cargo.lock | 2 +- tooling/bundler/src/bundle/common.rs | 10 ++--- tooling/bundler/src/bundle/macos/app.rs | 8 +++- tooling/bundler/src/bundle/macos/sign.rs | 37 +++++++++++-------- tooling/cli/ENVIRONMENT_VARIABLES.md | 4 +- tooling/cli/src/interface/rust/desktop.rs | 5 +-- tooling/cli/src/lib.rs | 10 ++--- 12 files changed, 54 insertions(+), 42 deletions(-) create mode 100644 .changes/notarytool-team-id-required.md diff --git a/.changes/notarytool-team-id-required.md b/.changes/notarytool-team-id-required.md new file mode 100644 index 000000000..f72f4135e --- /dev/null +++ b/.changes/notarytool-team-id-required.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch:bug +--- + +The `APPLE_TEAM_ID` environment variable is now required for notarization authentication via Apple ID and app-specific password. diff --git a/core/tauri-runtime-wry/src/global_shortcut.rs b/core/tauri-runtime-wry/src/global_shortcut.rs index 4b3bbb61c..88cc10e23 100644 --- a/core/tauri-runtime-wry/src/global_shortcut.rs +++ b/core/tauri-runtime-wry/src/global_shortcut.rs @@ -8,6 +8,7 @@ use std::{ collections::HashMap, error::Error as StdError, fmt, + rc::Rc, sync::{ mpsc::{channel, Sender}, Arc, Mutex, @@ -138,7 +139,7 @@ impl GlobalShortcutManager for GlobalShortcutManagerHandle { pub fn handle_global_shortcut_message( message: GlobalShortcutMessage, - global_shortcut_manager: &Arc>, + global_shortcut_manager: &Rc>, ) { match message { GlobalShortcutMessage::IsRegistered(accelerator, tx) => tx diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 1fb9410a3..9a222c5cf 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -249,7 +249,7 @@ pub struct DispatcherMainThreadContext { pub window_target: EventLoopWindowTarget>, pub web_context: WebContextStore, #[cfg(all(desktop, feature = "global-shortcut"))] - pub global_shortcut_manager: Arc>, + pub global_shortcut_manager: Rc>, #[cfg(feature = "clipboard")] pub clipboard_manager: Arc>, pub windows: Rc>>, @@ -1937,7 +1937,7 @@ impl Wry { let web_context = WebContextStore::default(); #[cfg(all(desktop, feature = "global-shortcut"))] - let global_shortcut_manager = Arc::new(Mutex::new(WryShortcutManager::new(&event_loop))); + let global_shortcut_manager = Rc::new(Mutex::new(WryShortcutManager::new(&event_loop))); #[cfg(feature = "clipboard")] let clipboard_manager = Arc::new(Mutex::new(Clipboard::new())); @@ -2307,7 +2307,7 @@ pub struct EventLoopIterationContext<'a, T: UserEvent> { pub webview_id_map: WebviewIdStore, pub windows: Rc>>, #[cfg(all(desktop, feature = "global-shortcut"))] - pub global_shortcut_manager: Arc>, + pub global_shortcut_manager: Rc>, #[cfg(all(desktop, feature = "global-shortcut"))] pub global_shortcut_manager_handle: &'a GlobalShortcutManagerHandle, #[cfg(feature = "clipboard")] @@ -2320,7 +2320,7 @@ struct UserMessageContext { windows: Rc>>, webview_id_map: WebviewIdStore, #[cfg(all(desktop, feature = "global-shortcut"))] - global_shortcut_manager: Arc>, + global_shortcut_manager: Rc>, #[cfg(feature = "clipboard")] clipboard_manager: Arc>, #[cfg(all(desktop, feature = "system-tray"))] diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 5c9a3490d..a6948afd3 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -192,7 +192,7 @@ fn replace_csp_nonce( .into_iter() .map(|n| format!("'nonce-{n}'")) .collect::>(); - let sources = csp.entry(directive.into()).or_insert_with(Default::default); + let sources = csp.entry(directive.into()).or_default(); let self_source = "'self'".to_string(); if !sources.contains(&self_source) { sources.push(self_source); diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 212f21047..594ff2de6 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -1630,7 +1630,7 @@ impl Window { window_label, event, }) - .or_insert_with(Default::default) + .or_default() .insert(id); } diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 8a4a03fc4..80d411a36 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3529,7 +3529,7 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tauri" -version = "1.5.0" +version = "1.5.1" dependencies = [ "anyhow", "base64 0.21.2", diff --git a/tooling/bundler/src/bundle/common.rs b/tooling/bundler/src/bundle/common.rs index 456d37b59..4269825df 100644 --- a/tooling/bundler/src/bundle/common.rs +++ b/tooling/bundler/src/bundle/common.rs @@ -169,9 +169,8 @@ impl CommandExt for Command { let mut lines = stdout_lines_.lock().unwrap(); loop { buf.clear(); - match tauri_utils::io::read_line(&mut stdout, &mut buf) { - Ok(s) if s == 0 => break, - _ => (), + if let Ok(0) = tauri_utils::io::read_line(&mut stdout, &mut buf) { + break; } debug!(action = "stdout"; "{}", String::from_utf8_lossy(&buf)); lines.extend(buf.clone()); @@ -187,9 +186,8 @@ impl CommandExt for Command { let mut lines = stderr_lines_.lock().unwrap(); loop { buf.clear(); - match tauri_utils::io::read_line(&mut stderr, &mut buf) { - Ok(s) if s == 0 => break, - _ => (), + if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) { + break; } debug!(action = "stderr"; "{}", String::from_utf8_lossy(&buf)); lines.extend(buf.clone()); diff --git a/tooling/bundler/src/bundle/macos/app.rs b/tooling/bundler/src/bundle/macos/app.rs index cae46785d..f931d0ece 100644 --- a/tooling/bundler/src/bundle/macos/app.rs +++ b/tooling/bundler/src/bundle/macos/app.rs @@ -25,7 +25,7 @@ use super::{ super::common::{self, CommandExt}, icon::create_icns_file, - sign::{notarize, notarize_auth, sign, SignTarget}, + sign::{notarize, notarize_auth, sign, NotarizeAuthError, SignTarget}, }; use crate::Settings; @@ -127,7 +127,11 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { notarize(app_bundle_path.clone(), auth, settings)?; } Err(e) => { - warn!("skipping app notarization, {}", e.to_string()); + if matches!(e, NotarizeAuthError::MissingTeamId) { + return Err(anyhow::anyhow!("{e}").into()); + } else { + warn!("skipping app notarization, {}", e.to_string()); + } } } } diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index a08866ed9..b9bdee49d 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -336,7 +336,7 @@ pub enum NotarizeAuth { AppleId { apple_id: OsString, password: OsString, - team_id: Option, + team_id: OsString, }, ApiKey { key: OsString, @@ -356,17 +356,13 @@ impl NotarytoolCmdExt for Command { apple_id, password, team_id, - } => { - self - .arg("--apple-id") - .arg(apple_id) - .arg("--password") - .arg(password); - if let Some(team_id) = team_id { - self.arg("--team-id").arg(team_id); - } - self - } + } => self + .arg("--apple-id") + .arg(apple_id) + .arg("--password") + .arg(password) + .arg("--team-id") + .arg(team_id), NotarizeAuth::ApiKey { key, key_path, @@ -382,17 +378,28 @@ impl NotarytoolCmdExt for Command { } } -pub fn notarize_auth() -> crate::Result { +#[derive(Debug, thiserror::Error)] +pub enum NotarizeAuthError { + #[error( + "The team ID is now required for notarization with app-specific password as authentication. Please set the `APPLE_TEAM_ID` environment variable. You can find the team ID in https://developer.apple.com/account#MembershipDetailsCard." + )] + MissingTeamId, + #[error(transparent)] + Anyhow(#[from] anyhow::Error), +} + +pub fn notarize_auth() -> Result { match ( var_os("APPLE_ID"), var_os("APPLE_PASSWORD"), var_os("APPLE_TEAM_ID"), ) { - (Some(apple_id), Some(password), team_id) => Ok(NotarizeAuth::AppleId { + (Some(apple_id), Some(password), Some(team_id)) => Ok(NotarizeAuth::AppleId { apple_id, password, team_id, }), + (Some(_apple_id), Some(_password), None) => Err(NotarizeAuthError::MissingTeamId), _ => { match (var_os("APPLE_API_KEY"), var_os("APPLE_API_ISSUER"), var("APPLE_API_KEY_PATH")) { (Some(key), Some(issuer), Ok(key_path)) => { @@ -424,7 +431,7 @@ pub fn notarize_auth() -> crate::Result { Err(anyhow::anyhow!("could not find API key file. Please set the APPLE_API_KEY_PATH environment variables to the path to the {api_key_file_name:?} file").into()) } } - _ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into()) + _ => Err(anyhow::anyhow!("no APPLE_ID & APPLE_PASSWORD & APPLE_TEAM_ID or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found").into()) } } } diff --git a/tooling/cli/ENVIRONMENT_VARIABLES.md b/tooling/cli/ENVIRONMENT_VARIABLES.md index 80469612d..f065e79d8 100644 --- a/tooling/cli/ENVIRONMENT_VARIABLES.md +++ b/tooling/cli/ENVIRONMENT_VARIABLES.md @@ -23,9 +23,9 @@ These environment variables are inputs to the CLI which may have an equivalent C - `TAURI_KEY_PASSWORD` — The private key password, see `TAURI_PRIVATE_KEY` - `APPLE_CERTIFICATE` — Base64 encoded of the `.p12` certificate for code signing. To get this value, run `openssl base64 -in MyCertificate.p12 -out MyCertificate-base64.txt`. - `APPLE_CERTIFICATE_PASSWORD` — The password you used to export the certificate. -- `APPLE_ID` — The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate. +- `APPLE_ID` — The Apple ID used to notarize the application. If this environment variable is provided, `APPLE_PASSWORD` and `APPLE_TEAM_ID` must also be set. Alternatively, `APPLE_API_KEY` and `APPLE_API_ISSUER` can be used to authenticate. - `APPLE_PASSWORD` — The Apple password used to authenticate for application notarization. Required if `APPLE_ID` is specified. An app-specific password can be used. Alternatively to entering the password in plaintext, it may also be specified using a '@keychain:' or '@env:' prefix followed by a keychain password item name or environment variable name. -- `APPLE_TEAM_ID`: Developer team ID. If your Apple ID only belongs to one team then you don’t need to supply a Team ID. However, it’s best practice to include it regardless. That way, joining another team at some point in the future won’t break your notarization workflow. To find your Team ID, go to the [Account](https://developer.apple.com/account) page on the Apple Developer website. +- `APPLE_TEAM_ID`: Developer team ID. To find your Team ID, go to the [Account](https://developer.apple.com/account) page on the Apple Developer website, and check your membership details. - `APPLE_API_KEY` — Alternative to `APPLE_ID` and `APPLE_PASSWORD` for notarization authentication using JWT. - See [creating API keys](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api) for more information. - `APPLE_API_ISSUER` — Issuer ID. Required if `APPLE_API_KEY` is specified. diff --git a/tooling/cli/src/interface/rust/desktop.rs b/tooling/cli/src/interface/rust/desktop.rs index a09cc6479..dc6771e6b 100644 --- a/tooling/cli/src/interface/rust/desktop.rs +++ b/tooling/cli/src/interface/rust/desktop.rs @@ -203,9 +203,8 @@ fn build_dev_app( let mut io_stderr = std::io::stderr(); loop { buf.clear(); - match tauri_utils::io::read_line(&mut stderr, &mut buf) { - Ok(s) if s == 0 => break, - _ => (), + if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) { + break; } let _ = io_stderr.write_all(&buf); if !buf.ends_with(&[b'\r']) { diff --git a/tooling/cli/src/lib.rs b/tooling/cli/src/lib.rs index de520f85d..faf416d2d 100644 --- a/tooling/cli/src/lib.rs +++ b/tooling/cli/src/lib.rs @@ -230,9 +230,8 @@ impl CommandExt for Command { let mut lines = stdout_lines_.lock().unwrap(); loop { buf.clear(); - match tauri_utils::io::read_line(&mut stdout, &mut buf) { - Ok(s) if s == 0 => break, - _ => (), + if let Ok(0) = tauri_utils::io::read_line(&mut stdout, &mut buf) { + break; } debug!(action = "stdout"; "{}", String::from_utf8_lossy(&buf)); lines.extend(buf.clone()); @@ -248,9 +247,8 @@ impl CommandExt for Command { let mut lines = stderr_lines_.lock().unwrap(); loop { buf.clear(); - match tauri_utils::io::read_line(&mut stderr, &mut buf) { - Ok(s) if s == 0 => break, - _ => (), + if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) { + break; } debug!(action = "stderr"; "{}", String::from_utf8_lossy(&buf)); lines.extend(buf.clone()); From 1241014a467633adea31f16cff3bdbe017dcd14b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 8 Oct 2023 11:12:42 +0000 Subject: [PATCH 081/104] Apply Version Updates From Current Changes (v1) (#7960) Co-authored-by: Lucas Fernandes Nogueira Co-authored-by: lucasfernog fix(bundler): team ID is now required for notarytool via app password (#7972) fix(bundler): team ID is now required for notarytool via app password (#7972)" --- .changes/notarytool-team-id-required.md | 5 ----- .changes/updater-launch-setup.md | 5 ----- tooling/bundler/CHANGELOG.md | 7 +++++++ tooling/bundler/Cargo.toml | 2 +- tooling/cli/CHANGELOG.md | 6 ++++++ tooling/cli/Cargo.lock | 4 ++-- tooling/cli/Cargo.toml | 4 ++-- tooling/cli/metadata.json | 2 +- tooling/cli/node/CHANGELOG.md | 6 ++++++ tooling/cli/node/package.json | 2 +- 10 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 .changes/notarytool-team-id-required.md delete mode 100644 .changes/updater-launch-setup.md diff --git a/.changes/notarytool-team-id-required.md b/.changes/notarytool-team-id-required.md deleted file mode 100644 index f72f4135e..000000000 --- a/.changes/notarytool-team-id-required.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": patch:bug ---- - -The `APPLE_TEAM_ID` environment variable is now required for notarization authentication via Apple ID and app-specific password. diff --git a/.changes/updater-launch-setup.md b/.changes/updater-launch-setup.md deleted file mode 100644 index 09b821be6..000000000 --- a/.changes/updater-launch-setup.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -Fixes an app crash on app updates when the product name contained spaces. \ No newline at end of file diff --git a/tooling/bundler/CHANGELOG.md b/tooling/bundler/CHANGELOG.md index e969af377..76cee2c1f 100644 --- a/tooling/bundler/CHANGELOG.md +++ b/tooling/bundler/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## \[1.4.1] + +### Bug Fixes + +- [`40d34002`](https://www.github.com/tauri-apps/tauri/commit/40d340021c0eab65aa1713807f7564e0698a321e)([#7972](https://www.github.com/tauri-apps/tauri/pull/7972)) The `APPLE_TEAM_ID` environment variable is now required for notarization authentication via Apple ID and app-specific password. +- [`cdd5516f`](https://www.github.com/tauri-apps/tauri/commit/cdd5516f339ad4345623a1e785c6e2c3a77477f8)([#7956](https://www.github.com/tauri-apps/tauri/pull/7956)) Fixes an app crash on app updates when the product name contained spaces. + ## \[1.4.0] ### New Features diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index 2e18df563..1ad2b19b8 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-bundler" -version = "1.4.0" +version = "1.4.1" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy" diff --git a/tooling/cli/CHANGELOG.md b/tooling/cli/CHANGELOG.md index 4b97e6376..af17f3af7 100644 --- a/tooling/cli/CHANGELOG.md +++ b/tooling/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.2] + +### Dependencies + +- Upgraded to `tauri-bundler@1.4.1` + ## \[1.5.1] ### Bug Fixes diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 65c81ea7c..f1d39a714 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -3304,7 +3304,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "1.4.0" +version = "1.4.1" dependencies = [ "anyhow", "ar", @@ -3344,7 +3344,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "1.5.1" +version = "1.5.2" dependencies = [ "anyhow", "axum", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index c7ec794bb..d42ec04af 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -3,7 +3,7 @@ members = [ "node" ] [package] name = "tauri-cli" -version = "1.5.1" +version = "1.5.2" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" rust-version = "1.60" @@ -42,7 +42,7 @@ path = "src/main.rs" clap_complete = "4" clap = { version = "4.0", features = [ "derive" ] } anyhow = "1.0" -tauri-bundler = { version = "1.4.0", path = "../bundler", default-features = false } +tauri-bundler = { version = "1.4.1", path = "../bundler", default-features = false } colored = "2.0" once_cell = "1" serde = { version = "1.0", features = [ "derive" ] } diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index cdba3ccc4..62a101434 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -1,6 +1,6 @@ { "cli.js": { - "version": "1.5.1", + "version": "1.5.2", "node": ">= 10.0.0" }, "tauri": "1.5.1", diff --git a/tooling/cli/node/CHANGELOG.md b/tooling/cli/node/CHANGELOG.md index 81ac6ea30..de20c49ef 100644 --- a/tooling/cli/node/CHANGELOG.md +++ b/tooling/cli/node/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.2] + +### Dependencies + +- Upgraded to `tauri-cli@1.5.2` + ## \[1.5.1] ### Bug Fixes diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 39f7053c4..105d403bf 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "1.5.1", + "version": "1.5.2", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", From 21cdbb41a38f465148bbeb82feb3e7886c320182 Mon Sep 17 00:00:00 2001 From: Ziyang Hu Date: Mon, 9 Oct 2023 08:22:54 -0500 Subject: [PATCH 082/104] fix: truncate file when not appending in `writeFile`, closes #7973 (#7982) * Fix https://github.com/tauri-apps/tauri/issues/7973 * Fix https://github.com/tauri-apps/tauri/issues/7973 * Fix https://github.com/tauri-apps/tauri/issues/7973 --- .changes/fix-incomplete-writeFile.md | 5 +++++ core/tauri/src/endpoints/file_system.rs | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changes/fix-incomplete-writeFile.md diff --git a/.changes/fix-incomplete-writeFile.md b/.changes/fix-incomplete-writeFile.md new file mode 100644 index 000000000..4e928b59e --- /dev/null +++ b/.changes/fix-incomplete-writeFile.md @@ -0,0 +1,5 @@ +--- +"tauri": 'patch:bug' +--- + +Set the correct `truncate` option on `OpenOptions` so that `write_file` can completely overwrite existing files. \ No newline at end of file diff --git a/core/tauri/src/endpoints/file_system.rs b/core/tauri/src/endpoints/file_system.rs index 48e62f9bc..98ea08ceb 100644 --- a/core/tauri/src/endpoints/file_system.rs +++ b/core/tauri/src/endpoints/file_system.rs @@ -188,6 +188,7 @@ impl Cmd { .append(append) .write(true) .create(true) + .truncate(!append) .open(&resolved_path) .with_context(|| format!("path: {}", resolved_path.display())) .map_err(Into::into) From f552c1796a61a5cfd51fad6d616bea3164b48a21 Mon Sep 17 00:00:00 2001 From: i-c-b <133848861+i-c-b@users.noreply.github.com> Date: Wed, 11 Oct 2023 05:50:21 -0500 Subject: [PATCH 083/104] fix(bundler): WebView2 offline installer GUID changes (#7998) --- .changes/fix-webview2-offline-guid.md | 5 +++++ tooling/bundler/src/bundle/windows/util.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-webview2-offline-guid.md diff --git a/.changes/fix-webview2-offline-guid.md b/.changes/fix-webview2-offline-guid.md new file mode 100644 index 000000000..8a4bcc835 --- /dev/null +++ b/.changes/fix-webview2-offline-guid.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": 'patch:bug' +--- + +Update the WebView2 offline installer GUIDs to resolve the 404 HTTP response status codes. diff --git a/tooling/bundler/src/bundle/windows/util.rs b/tooling/bundler/src/bundle/windows/util.rs index f7c82baa5..c23298e3f 100644 --- a/tooling/bundler/src/bundle/windows/util.rs +++ b/tooling/bundler/src/bundle/windows/util.rs @@ -13,8 +13,8 @@ use sha2::Digest; use zip::ZipArchive; pub const WEBVIEW2_BOOTSTRAPPER_URL: &str = "https://go.microsoft.com/fwlink/p/?LinkId=2124703"; -pub const WEBVIEW2_X86_INSTALLER_GUID: &str = "a17bde80-b5ab-47b5-8bbb-1cbe93fc6ec9"; -pub const WEBVIEW2_X64_INSTALLER_GUID: &str = "aa5fd9b3-dc11-4cbc-8343-a50f57b311e1"; +pub const WEBVIEW2_X86_INSTALLER_GUID: &str = "2c122012-898d-4a69-9ab6-aa50bbe81031"; +pub const WEBVIEW2_X64_INSTALLER_GUID: &str = "0af26c79-02f0-4f06-a12d-116bc05ca860"; pub const NSIS_OUTPUT_FOLDER_NAME: &str = "nsis"; pub const NSIS_UPDATER_OUTPUT_FOLDER_NAME: &str = "nsis-updater"; pub const WIX_OUTPUT_FOLDER_NAME: &str = "msi"; From bab05ff60700d54ff6dd7b4c0f4070d630d9ddd1 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 11 Oct 2023 12:53:01 -0300 Subject: [PATCH 084/104] fix(ci): properly detect @tauri-apps/cli release id from covector output (#8004) --- .github/workflows/covector-version-or-publish.yml | 10 ++++------ .scripts/covector/parse-output.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .scripts/covector/parse-output.js diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index ecce56af2..e4a91586a 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -115,15 +115,13 @@ jobs: repository: tauri-apps/tauri-docs event-type: update-docs - - name: Get `@tauri-apps/cli` release id - id: cliReleaseId + - name: Process covector output + id: covectorOutput if: | steps.covector.outputs.successfulPublish == 'true' && contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') run: | - echo '${{ toJSON(steps.covector.outputs) }}' > output.json - id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json) - rm output.json + id=$(node .scripts/covector/parse-output.js '${{ toJSON(steps.covector.outputs) }}' "-tauri-apps-cli-releaseId") echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT" - name: Trigger `@tauri-apps/cli` publishing workflow @@ -135,7 +133,7 @@ jobs: token: ${{ secrets.ORG_TAURI_BOT_PAT }} repository: tauri-apps/tauri event-type: publish-js-cli - client-payload: '{"releaseId": "${{ steps.cliReleaseId.outputs.cliReleaseId }}" }' + client-payload: '{"releaseId": "${{ steps.covectorOutput.outputs.cliReleaseId }}" }' - name: Trigger `tauri-cli` publishing workflow if: | diff --git a/.scripts/covector/parse-output.js b/.scripts/covector/parse-output.js new file mode 100644 index 000000000..4c1747de6 --- /dev/null +++ b/.scripts/covector/parse-output.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node + +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const json = process.argv[2] +const field = process.argv[3] + +const output = JSON.parse(json) +console.log(output[field]) From 441eb4f4a5f9af206752c2e287975eb8d5ccfd01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:27:37 +0000 Subject: [PATCH 085/104] Apply Version Updates From Current Changes (v1) (#7988) Co-authored-by: lucasfernog --- .changes/fix-incomplete-writeFile.md | 5 ----- .changes/fix-webview2-offline-guid.md | 5 ----- core/tauri/CHANGELOG.md | 6 ++++++ core/tauri/Cargo.toml | 2 +- tooling/bundler/CHANGELOG.md | 6 ++++++ tooling/bundler/Cargo.toml | 2 +- tooling/cli/CHANGELOG.md | 6 ++++++ tooling/cli/Cargo.lock | 4 ++-- tooling/cli/Cargo.toml | 4 ++-- tooling/cli/metadata.json | 4 ++-- tooling/cli/node/CHANGELOG.md | 6 ++++++ tooling/cli/node/package.json | 2 +- 12 files changed, 33 insertions(+), 19 deletions(-) delete mode 100644 .changes/fix-incomplete-writeFile.md delete mode 100644 .changes/fix-webview2-offline-guid.md diff --git a/.changes/fix-incomplete-writeFile.md b/.changes/fix-incomplete-writeFile.md deleted file mode 100644 index 4e928b59e..000000000 --- a/.changes/fix-incomplete-writeFile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": 'patch:bug' ---- - -Set the correct `truncate` option on `OpenOptions` so that `write_file` can completely overwrite existing files. \ No newline at end of file diff --git a/.changes/fix-webview2-offline-guid.md b/.changes/fix-webview2-offline-guid.md deleted file mode 100644 index 8a4bcc835..000000000 --- a/.changes/fix-webview2-offline-guid.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": 'patch:bug' ---- - -Update the WebView2 offline installer GUIDs to resolve the 404 HTTP response status codes. diff --git a/core/tauri/CHANGELOG.md b/core/tauri/CHANGELOG.md index 9df3f851a..4b022d6c9 100644 --- a/core/tauri/CHANGELOG.md +++ b/core/tauri/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.2] + +### Bug Fixes + +- [`21cdbb41`](https://www.github.com/tauri-apps/tauri/commit/21cdbb41a38f465148bbeb82feb3e7886c320182)([#7982](https://www.github.com/tauri-apps/tauri/pull/7982)) Set the correct `truncate` option on `OpenOptions` so that `write_file` can completely overwrite existing files. + ## \[1.5.1] ### Bug Fixes diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index ac4a891e0..f1bcbcc6d 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -10,7 +10,7 @@ license = "Apache-2.0 OR MIT" name = "tauri" readme = "README.md" repository = "https://github.com/tauri-apps/tauri" -version = "1.5.1" +version = "1.5.2" [package.metadata.docs.rs] no-default-features = true diff --git a/tooling/bundler/CHANGELOG.md b/tooling/bundler/CHANGELOG.md index 76cee2c1f..f8205caed 100644 --- a/tooling/bundler/CHANGELOG.md +++ b/tooling/bundler/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.4.2] + +### Bug Fixes + +- [`f552c179`](https://www.github.com/tauri-apps/tauri/commit/f552c1796a61a5cfd51fad6d616bea3164b48a21)([#7998](https://www.github.com/tauri-apps/tauri/pull/7998)) Update the WebView2 offline installer GUIDs to resolve the 404 HTTP response status codes. + ## \[1.4.1] ### Bug Fixes diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index 1ad2b19b8..22fd635b5 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-bundler" -version = "1.4.1" +version = "1.4.2" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy" diff --git a/tooling/cli/CHANGELOG.md b/tooling/cli/CHANGELOG.md index af17f3af7..8d3012343 100644 --- a/tooling/cli/CHANGELOG.md +++ b/tooling/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.3] + +### Dependencies + +- Upgraded to `tauri-bundler@1.4.2` + ## \[1.5.2] ### Dependencies diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index f1d39a714..1243353b1 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -3304,7 +3304,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "1.4.1" +version = "1.4.2" dependencies = [ "anyhow", "ar", @@ -3344,7 +3344,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "1.5.2" +version = "1.5.3" dependencies = [ "anyhow", "axum", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index d42ec04af..0a79161ea 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -3,7 +3,7 @@ members = [ "node" ] [package] name = "tauri-cli" -version = "1.5.2" +version = "1.5.3" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" rust-version = "1.60" @@ -42,7 +42,7 @@ path = "src/main.rs" clap_complete = "4" clap = { version = "4.0", features = [ "derive" ] } anyhow = "1.0" -tauri-bundler = { version = "1.4.1", path = "../bundler", default-features = false } +tauri-bundler = { version = "1.4.2", path = "../bundler", default-features = false } colored = "2.0" once_cell = "1" serde = { version = "1.0", features = [ "derive" ] } diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index 62a101434..b91ecb05c 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -1,8 +1,8 @@ { "cli.js": { - "version": "1.5.2", + "version": "1.5.3", "node": ">= 10.0.0" }, - "tauri": "1.5.1", + "tauri": "1.5.2", "tauri-build": "1.5.0" } diff --git a/tooling/cli/node/CHANGELOG.md b/tooling/cli/node/CHANGELOG.md index de20c49ef..35d129679 100644 --- a/tooling/cli/node/CHANGELOG.md +++ b/tooling/cli/node/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.3] + +### Dependencies + +- Upgraded to `tauri-cli@1.5.3` + ## \[1.5.2] ### Dependencies diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 105d403bf..c7a7dbabf 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "1.5.2", + "version": "1.5.3", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", From d0ae67503cdb2aeaadcea27af67285eea1cf3756 Mon Sep 17 00:00:00 2001 From: Caijinglong Date: Fri, 13 Oct 2023 20:06:34 +0800 Subject: [PATCH 086/104] fix(bundler): read proxy when downloading resources. (#8012) * fix(bundler): read http_proxy env when downloading resources. Signed-off-by: CaiJingLong * Update .changes/add-proxy-for-nsis-download.md * Update add-proxy-for-nsis-download.md * Update tooling/bundler/src/bundle/windows/util.rs --------- Signed-off-by: CaiJingLong --- .changes/add-proxy-for-nsis-download.md | 5 +++++ tooling/bundler/src/bundle/windows/util.rs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changes/add-proxy-for-nsis-download.md diff --git a/.changes/add-proxy-for-nsis-download.md b/.changes/add-proxy-for-nsis-download.md new file mode 100644 index 000000000..db69ef005 --- /dev/null +++ b/.changes/add-proxy-for-nsis-download.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": 'patch:bug' +--- + +Read `HTTP_PROXY` env var when downloading bundling resources on Windows. diff --git a/tooling/bundler/src/bundle/windows/util.rs b/tooling/bundler/src/bundle/windows/util.rs index c23298e3f..96489636a 100644 --- a/tooling/bundler/src/bundle/windows/util.rs +++ b/tooling/bundler/src/bundle/windows/util.rs @@ -22,7 +22,9 @@ pub const WIX_UPDATER_OUTPUT_FOLDER_NAME: &str = "msi-updater"; pub fn download(url: &str) -> crate::Result> { info!(action = "Downloading"; "{}", url); - let response = ureq::get(url).call().map_err(Box::new)?; + + let agent = ureq::AgentBuilder::new().try_proxy_from_env(true).build(); + let response = agent.get(url).call().map_err(Box::new)?; let mut bytes = Vec::new(); response.into_reader().read_to_end(&mut bytes)?; Ok(bytes) From 113bcd7b684a72eb0f421c663c6aa874197252bb Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Mon, 16 Oct 2023 13:33:06 +0200 Subject: [PATCH 087/104] fix(bundler): In .deb packages, set uid=0 for all files (#7980) --- .changes/bundler-deb-fix-owner.md | 5 +++++ tooling/bundler/src/bundle/linux/debian.rs | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .changes/bundler-deb-fix-owner.md diff --git a/.changes/bundler-deb-fix-owner.md b/.changes/bundler-deb-fix-owner.md new file mode 100644 index 000000000..67174a888 --- /dev/null +++ b/.changes/bundler-deb-fix-owner.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:bug' +--- + +In Debian packages, set `root` the owner of control files and package files. diff --git a/tooling/bundler/src/bundle/linux/debian.rs b/tooling/bundler/src/bundle/linux/debian.rs index 6e54325ba..cd6cce8e2 100644 --- a/tooling/bundler/src/bundle/linux/debian.rs +++ b/tooling/bundler/src/bundle/linux/debian.rs @@ -367,10 +367,20 @@ fn create_tar_from_dir, W: Write>(src_dir: P, dest_file: W) -> cr } let dest_path = src_path.strip_prefix(src_dir)?; if entry.file_type().is_dir() { - tar_builder.append_dir(dest_path, src_path)?; + let stat = fs::metadata(src_path)?; + let mut header = tar::Header::new_gnu(); + header.set_metadata(&stat); + header.set_uid(0); + header.set_gid(0); + tar_builder.append_data(&mut header, dest_path, &mut io::empty())?; } else { let mut src_file = fs::File::open(src_path)?; - tar_builder.append_file(dest_path, &mut src_file)?; + let stat = src_file.metadata()?; + let mut header = tar::Header::new_gnu(); + header.set_metadata(&stat); + header.set_uid(0); + header.set_gid(0); + tar_builder.append_data(&mut header, dest_path, &mut src_file)?; } } let dest_file = tar_builder.into_inner()?; From 9d408402996e467aa38767184e5fa14ab7459510 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 16 Oct 2023 14:50:11 +0300 Subject: [PATCH 088/104] chore: update tauri-cli lock file (#8015) --- tooling/cli/Cargo.lock | 1142 ++++++++++++++++++++-------------------- 1 file changed, 577 insertions(+), 565 deletions(-) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 1243353b1..a217d7d9d 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -26,9 +35,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher", @@ -37,9 +46,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -56,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "serde", "version_check", @@ -64,21 +73,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] -name = "aho-corasick" -version = "1.0.1" +name = "android-tzdata" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" @@ -91,30 +97,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -130,9 +135,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -140,9 +145,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "ar" @@ -152,13 +157,13 @@ checksum = "d67af77d68a931ecd5cbd8a3b5987d63a1d1d1278f7f6a60ae33db485cdebb69" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -193,7 +198,7 @@ dependencies = [ "http", "http-body", "hyper", - "itoa 1.0.6", + "itoa 1.0.9", "matchit", "memchr", "mime", @@ -228,6 +233,21 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -236,9 +256,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -275,9 +295,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6776fc96284a0bb647b615056fc496d1fe1644a7ab01829818a6d91cae888b84" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" @@ -290,9 +310,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "serde", @@ -300,33 +320,33 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.2" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytecount" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" +checksum = "ad152d03a2c813c80bb94fedbf3a3f02b28f793e39e7c214c8a0bcc196343de7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2" @@ -351,11 +371,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -377,15 +398,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", "serde", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -400,54 +421,52 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.0" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.0" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", "clap_lex", "strsim", ] [[package]] name = "clap_complete" -version = "4.3.0" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a04ddfaacc3bc9e6ea67d024575fafc2a813027cf374b8f24f7bc233c6b6be12" +checksum = "e3ae8ba90b9d8b007efe66e55e48fb936272f5ca00349b5b0e89877520d35ea7" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.3.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "color_quant" @@ -463,13 +482,13 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -540,9 +559,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -579,9 +598,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", @@ -592,9 +611,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -635,12 +654,12 @@ dependencies = [ [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -655,12 +674,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4056f63fce3b82d852c3da92b08ea59959890813a7f4ce9c0ff85b10cf301b" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" dependencies = [ "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -674,9 +693,9 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.3.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d778600249295e82b6ab12e291ed9029407efee0cfb7baf67157edc65964df" +checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf" dependencies = [ "nix", "windows-sys 0.48.0", @@ -684,9 +703,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -694,27 +713,36 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.16", + "syn 2.0.38", +] + +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", ] [[package]] @@ -776,15 +804,15 @@ dependencies = [ [[package]] name = "dtoa" -version = "0.4.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" +checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" dependencies = [ "dtoa", ] @@ -797,15 +825,15 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encode_unicode" @@ -815,9 +843,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -836,46 +864,41 @@ dependencies = [ ] [[package]] -name = "erased-serde" -version = "0.3.25" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "erased-serde" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ "serde", ] [[package]] name = "errno" -version = "0.3.1" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "exr" -version = "1.6.3" +version = "1.71.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd2162b720141a91a054640662d3edce3d50a944a50ffca5313cd951abb35b4" +checksum = "832a761f35ab3e6664babfbdc6cef35a4860e816ec3916dcfd0882954e98a8a8" dependencies = [ "bit_field", "flume", "half", "lebe", - "miniz_oxide 0.6.2", + "miniz_oxide", "rayon-core", "smallvec", "zune-inflate", @@ -893,12 +916,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" @@ -911,36 +931,32 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] name = "flume" -version = "0.10.14" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "pin-project", "spin 0.9.8", ] @@ -967,9 +983,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1084,15 +1100,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1115,6 +1129,12 @@ dependencies = [ "weezl", ] +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + [[package]] name = "glob" version = "0.3.1" @@ -1123,11 +1143,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1136,9 +1156,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1146,7 +1166,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1164,9 +1184,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.7" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ "log", "pest", @@ -1182,6 +1202,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" + [[package]] name = "heck" version = "0.4.1" @@ -1202,18 +1228,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1252,7 +1269,7 @@ checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.6", + "itoa 1.0.9", ] [[package]] @@ -1268,9 +1285,9 @@ dependencies = [ [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -1280,9 +1297,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1292,9 +1309,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1305,9 +1322,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.6", + "itoa 1.0.9", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1316,9 +1333,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1345,9 +1362,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1372,9 +1389,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -1415,7 +1432,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +dependencies = [ + "equivalent", + "hashbrown 0.14.1", "serde", ] @@ -1457,40 +1485,19 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", + "hermit-abi 0.3.3", "rustix", "windows-sys 0.48.0", ] @@ -1521,15 +1528,15 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] @@ -1545,18 +1552,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] [[package]] name = "json-patch" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" +checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" dependencies = [ "serde", "serde_json", @@ -1589,7 +1596,7 @@ dependencies = [ "fancy-regex", "fraction", "iso8601", - "itoa 1.0.6", + "itoa 1.0.9", "lazy_static", "memchr", "num-cmp", @@ -1606,9 +1613,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ "kqueue-sys", "libc", @@ -1616,9 +1623,9 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ "bitflags 1.3.2", "libc", @@ -1632,7 +1639,7 @@ checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", "html5ever", - "indexmap", + "indexmap 1.9.3", "matches", "selectors", ] @@ -1651,9 +1658,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libflate" @@ -1696,15 +1703,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1759,15 +1766,15 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1790,20 +1797,11 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b23ef13ff1d745b1e52397daaa247e333c607f3cff96d4df2b798dc252db974b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "rpassword", "scrypt", ] -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1816,33 +1814,24 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", -] - -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" -dependencies = [ - "getrandom 0.2.9", + "windows-sys 0.48.0", ] [[package]] name = "napi" -version = "2.13.1" +version = "2.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f0a2e93526dd9c8c522d72a4d0c88678be8966fabe9fb8f2947fde6339b682" +checksum = "fd063c93b900149304e3ba96ce5bf210cd4f81ef5eb80ded0d100df3e85a3ac0" dependencies = [ - "bitflags 2.3.1", - "ctor 0.2.0", + "bitflags 2.4.0", + "ctor 0.2.5", "napi-derive", "napi-sys", "once_cell", @@ -1918,14 +1907,13 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "libc", - "static_assertions", ] [[package]] @@ -1946,20 +1934,21 @@ dependencies = [ [[package]] name = "notify" -version = "6.0.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9ba6c734de18ca27c8cef5cd7058aa4ac9f63596131e4c7e41e579319032a2" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "crossbeam-channel", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", + "log", "mio", "walkdir", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1974,9 +1963,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint", "num-complex", @@ -1988,9 +1977,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -2005,9 +1994,9 @@ checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -2047,28 +2036,37 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.3", "libc", ] [[package]] -name = "once_cell" -version = "1.17.1" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -2078,11 +2076,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -2099,7 +2097,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -2110,18 +2108,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.25.3+1.1.1t" +version = "300.1.5+3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" +checksum = "559068e4c12950d7dcaa1857a61725c0d38d4fc03ff8e070ab31a75d6e316491" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -2132,9 +2130,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" dependencies = [ "num-traits", ] @@ -2172,15 +2170,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.5", ] [[package]] @@ -2208,9 +2206,9 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest", "hmac", @@ -2218,25 +2216,26 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" dependencies = [ "pest", "pest_generator", @@ -2244,22 +2243,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" dependencies = [ "once_cell", "pest", @@ -2376,29 +2375,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2414,12 +2413,12 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ - "base64 0.21.1", - "indexmap", + "base64 0.21.4", + "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", @@ -2428,22 +2427,22 @@ dependencies = [ [[package]] name = "png" -version = "0.17.8" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -2471,9 +2470,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -2489,18 +2488,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2565,7 +2564,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -2588,9 +2587,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -2598,14 +2597,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -2632,35 +2629,47 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" +dependencies = [ + "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.1", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -2679,13 +2688,14 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.10.1", + "winreg", ] [[package]] @@ -2730,6 +2740,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -2741,13 +2757,12 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "errno", - "io-lifetimes", "libc", "linux-raw-sys", "windows-sys 0.48.0", @@ -2755,21 +2770,31 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", + "rustls-webpki", "sct", - "webpki", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +dependencies = [ + "ring", + "untrusted", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -2797,18 +2822,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", @@ -2819,9 +2844,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -2831,9 +2856,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scrypt" @@ -2841,7 +2866,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ - "pbkdf2 0.12.1", + "pbkdf2 0.12.2", "salsa20", "sha2", ] @@ -2858,9 +2883,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2871,9 +2896,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -2901,15 +2926,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] @@ -2926,13 +2951,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -2957,11 +2982,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] @@ -2973,21 +2998,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" +checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" dependencies = [ - "base64 0.21.1", + "base64 0.21.4", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros", @@ -2996,14 +3022,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" +checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -3051,9 +3077,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -3068,9 +3094,9 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -3095,30 +3121,30 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "simd-adler32" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3130,6 +3156,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3151,12 +3187,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "string_cache" version = "0.8.7" @@ -3197,15 +3227,15 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "sval" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e6aa16ce8d9e472e21a528a52c875a76a49190f3968f2ec7e9b550ccc28b410" +checksum = "e55089b73dfa822e1eb6b635f8795215512cca94bfae11aee3a1a06228bc88bb" [[package]] name = "sval_buffer" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905c4373621186ee9637464b0aaa026389ea9e7f841f2225f160a32ba5d5bac4" +checksum = "df307823073d63f1fb126895439fead41afc493ea35d636cceedef9f6b32ba81" dependencies = [ "sval", "sval_ref", @@ -3213,49 +3243,49 @@ dependencies = [ [[package]] name = "sval_dynamic" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6b4988322c5f22859a6a7649fa1249aa3dd01514caf8ed57d83735f997bb8b" +checksum = "e5f8e4c4d6d028d3cbff66c2bb3d98181d031d312b7df4550eea7142d7036f37" dependencies = [ "sval", ] [[package]] name = "sval_fmt" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d3ccd10346f925c2fbd97b75e8573b38e34431bfba04cc531cd23aad0fbabb8" +checksum = "ad53f8eb502b0a3051fea001ae2e3723044699868ebfe06ea81b45545db392c2" dependencies = [ - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "sval", ] [[package]] name = "sval_json" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a12e1488defd6344e23243c17ea4a1b185c547968749e8a281373fde0bde2d5" +checksum = "f913253c9f6cd27645ba9a0b6788039b5d4338eae0833c64b42ef178168d2862" dependencies = [ - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "sval", ] [[package]] name = "sval_ref" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b797fc4b284dd0e45f7ec424479e604ea5be9bb191a1ef4e96c20c7685649938" +checksum = "66a9661412d06740ebe81512a527b3d9220460eb7685f4399232c0e670108cb7" dependencies = [ "sval", ] [[package]] name = "sval_serde" -version = "2.5.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "810fa9a837e67a23e0efa7536250fc4d24043306cc1efd076f1943ba2fc2e62d" +checksum = "b8d077e98c1c8dfa466837ae0ec1e03c78138d42ac75662dac05e1bf0aebae20" dependencies = [ "serde", "sval", @@ -3276,9 +3306,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -3292,10 +3322,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "tar" -version = "0.4.38" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -3338,7 +3389,7 @@ dependencies = [ "uuid", "walkdir", "windows-sys 0.48.0", - "winreg 0.50.0", + "winreg", "zip", ] @@ -3348,7 +3399,7 @@ version = "1.5.3" dependencies = [ "anyhow", "axum", - "base64 0.21.1", + "base64 0.21.4", "cc", "clap", "clap_complete", @@ -3422,7 +3473,7 @@ dependencies = [ "aes-gcm", "ctor 0.1.26", "dunce", - "getrandom 0.2.9", + "getrandom 0.2.10", "glob", "heck", "html5ever", @@ -3448,11 +3499,10 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", @@ -3473,9 +3523,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -3488,22 +3538,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -3518,9 +3568,9 @@ dependencies = [ [[package]] name = "tiff" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" dependencies = [ "flate2", "jpeg-decoder", @@ -3529,11 +3579,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ - "itoa 1.0.6", + "deranged", + "itoa 1.0.9", "serde", "time-core", "time-macros", @@ -3541,15 +3592,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3571,17 +3622,17 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -3594,7 +3645,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", ] [[package]] @@ -3611,9 +3662,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -3639,7 +3690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" dependencies = [ "combine", - "indexmap", + "indexmap 1.9.3", "itertools", ] @@ -3747,15 +3798,15 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-bidi" @@ -3765,9 +3816,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3786,9 +3837,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "universal-hash" @@ -3808,26 +3859,26 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "ureq" -version = "2.6.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" +checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3" dependencies = [ - "base64 0.13.1", + "base64 0.21.4", "flate2", "log", "native-tls", "once_cell", "rustls", + "rustls-webpki", "url", - "webpki", "webpki-roots", ] [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3849,19 +3900,19 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "sha1_smol", ] [[package]] name = "value-bag" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d330786735ea358f3bc09eea4caa098569c1c93f342d9aca0514915022fe7e" +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -3869,9 +3920,9 @@ dependencies = [ [[package]] name = "value-bag-serde1" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4735c95b4cca1447b448e2e2e87e98d7e7498f4da27e355cf7af02204521001d" +checksum = "b0b9f3feef403a50d4d67e9741a6d8fc688bcbb4e4f31bd4aab72cc690284394" dependencies = [ "erased-serde", "serde", @@ -3880,9 +3931,9 @@ dependencies = [ [[package]] name = "value-bag-sval2" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859cb4f0ce7da6a118b559ba74b0e63bf569bea867c20ba457a6b1c886a04e97" +checksum = "30b24f4146b6f3361e91cbf527d1fb35e9376c3c0cef72ca5ec5af6d640fad7d" dependencies = [ "sval", "sval_buffer", @@ -3907,9 +3958,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -3917,11 +3968,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3939,9 +3989,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3949,24 +3999,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -3976,9 +4026,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3986,51 +4036,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "weezl" @@ -4056,9 +4093,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4089,7 +4126,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4102,21 +4139,6 @@ dependencies = [ "windows-tokens", ] -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -4132,7 +4154,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -4152,17 +4174,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -4179,9 +4201,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4197,9 +4219,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4215,9 +4237,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4233,9 +4255,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4251,9 +4273,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4263,9 +4285,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4281,18 +4303,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winreg" @@ -4306,9 +4319,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -4360,12 +4373,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] From d6e10e216ea44602717c3543a67fcfa6aec3afa8 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 16 Oct 2023 15:13:32 +0300 Subject: [PATCH 089/104] chore: rename webview2 offline installer guid consts for more clarity (#8001) --- tooling/bundler/src/bundle/windows/msi/wix.rs | 8 ++++---- tooling/bundler/src/bundle/windows/nsis.rs | 8 ++++---- tooling/bundler/src/bundle/windows/util.rs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index c78b659e3..50f41ab88 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -11,8 +11,8 @@ use crate::bundle::{ sign::try_sign, util::{ download, download_and_verify, extract_zip, HashAlgorithm, WEBVIEW2_BOOTSTRAPPER_URL, - WEBVIEW2_X64_INSTALLER_GUID, WEBVIEW2_X86_INSTALLER_GUID, WIX_OUTPUT_FOLDER_NAME, - WIX_UPDATER_OUTPUT_FOLDER_NAME, + WEBVIEW2_X64_OFFLINE_INSTALLER_GUID, WEBVIEW2_X86_OFFLINE_INSTALLER_GUID, + WIX_OUTPUT_FOLDER_NAME, WIX_UPDATER_OUTPUT_FOLDER_NAME, }, }, }; @@ -485,9 +485,9 @@ pub fn build_wix_app_installer( } WebviewInstallMode::OfflineInstaller { silent: _ } => { let guid = if arch == "x64" { - WEBVIEW2_X64_INSTALLER_GUID + WEBVIEW2_X64_OFFLINE_INSTALLER_GUID } else { - WEBVIEW2_X86_INSTALLER_GUID + WEBVIEW2_X86_OFFLINE_INSTALLER_GUID }; let offline_installer_path = dirs_next::cache_dir() .unwrap() diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index efb7b49b6..9ce567b42 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -9,8 +9,8 @@ use crate::{ common::CommandExt, windows::util::{ download, download_and_verify, extract_zip, HashAlgorithm, NSIS_OUTPUT_FOLDER_NAME, - NSIS_UPDATER_OUTPUT_FOLDER_NAME, WEBVIEW2_BOOTSTRAPPER_URL, WEBVIEW2_X64_INSTALLER_GUID, - WEBVIEW2_X86_INSTALLER_GUID, + NSIS_UPDATER_OUTPUT_FOLDER_NAME, WEBVIEW2_BOOTSTRAPPER_URL, + WEBVIEW2_X64_OFFLINE_INSTALLER_GUID, WEBVIEW2_X86_OFFLINE_INSTALLER_GUID, }, }, Settings, @@ -367,9 +367,9 @@ fn build_nsis_app_installer( } WebviewInstallMode::OfflineInstaller { silent: _ } => { let guid = if arch == "x64" { - WEBVIEW2_X64_INSTALLER_GUID + WEBVIEW2_X64_OFFLINE_INSTALLER_GUID } else { - WEBVIEW2_X86_INSTALLER_GUID + WEBVIEW2_X86_OFFLINE_INSTALLER_GUID }; let offline_installer_path = tauri_tools_path .join("Webview2OfflineInstaller") diff --git a/tooling/bundler/src/bundle/windows/util.rs b/tooling/bundler/src/bundle/windows/util.rs index 96489636a..e27d91432 100644 --- a/tooling/bundler/src/bundle/windows/util.rs +++ b/tooling/bundler/src/bundle/windows/util.rs @@ -13,8 +13,8 @@ use sha2::Digest; use zip::ZipArchive; pub const WEBVIEW2_BOOTSTRAPPER_URL: &str = "https://go.microsoft.com/fwlink/p/?LinkId=2124703"; -pub const WEBVIEW2_X86_INSTALLER_GUID: &str = "2c122012-898d-4a69-9ab6-aa50bbe81031"; -pub const WEBVIEW2_X64_INSTALLER_GUID: &str = "0af26c79-02f0-4f06-a12d-116bc05ca860"; +pub const WEBVIEW2_X86_OFFLINE_INSTALLER_GUID: &str = "2c122012-898d-4a69-9ab6-aa50bbe81031"; +pub const WEBVIEW2_X64_OFFLINE_INSTALLER_GUID: &str = "0af26c79-02f0-4f06-a12d-116bc05ca860"; pub const NSIS_OUTPUT_FOLDER_NAME: &str = "nsis"; pub const NSIS_UPDATER_OUTPUT_FOLDER_NAME: &str = "nsis-updater"; pub const WIX_OUTPUT_FOLDER_NAME: &str = "msi"; From dfe0badf19dd3d3f227999a3cf2c4818dacd105b Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 16 Oct 2023 15:15:15 +0300 Subject: [PATCH 090/104] docs: document macOS restrictions on `Menu::add_item` (#7983) --- core/tauri-runtime/src/menu.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/tauri-runtime/src/menu.rs b/core/tauri-runtime/src/menu.rs index bc65aa890..1d47dd86c 100644 --- a/core/tauri-runtime/src/menu.rs +++ b/core/tauri-runtime/src/menu.rs @@ -335,6 +335,12 @@ impl Menu { } /// Adds the custom menu item to the menu. + /// + /// ## Platform-spcific: + /// + /// - **macOS:** Only [`Submenu`] can be added to the menu + /// + /// [`Submenu`]: crate::Submenu #[must_use] pub fn add_item(mut self, item: CustomMenuItem) -> Self { self.items.push(MenuEntry::CustomItem(item)); From 2b0212af49c386e52bb2357381813d6d435ec4af Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 17 Oct 2023 15:33:44 +0300 Subject: [PATCH 091/104] feat(api): add mock for `convertFileSrc`, closes #7935 (#7961) * feat(api): add mock for `convertFileSrc`, closes #7935 * fix lint * Update tooling/api/src/mocks.ts * fmt --- .changes/api-convert-file-src-mock.md | 5 ++++ tooling/api/src/mocks.ts | 34 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .changes/api-convert-file-src-mock.md diff --git a/.changes/api-convert-file-src-mock.md b/.changes/api-convert-file-src-mock.md new file mode 100644 index 000000000..0ea5fb5a9 --- /dev/null +++ b/.changes/api-convert-file-src-mock.md @@ -0,0 +1,5 @@ +--- +'@tauri-apps/api': 'minor:feat' +--- + +Add `mockConvertFileSrc` in `mocks` module, to mock `convertFileSrc` function. diff --git a/tooling/api/src/mocks.ts b/tooling/api/src/mocks.ts index 1a21e18f7..2a4ca9a48 100644 --- a/tooling/api/src/mocks.ts +++ b/tooling/api/src/mocks.ts @@ -142,6 +142,38 @@ export function mockWindows( } } +/** + * Mock `convertFileSrc` function + * + * + * @example + * ```js + * import { mockConvertFileSrc } from "@tauri-apps/api/mocks"; + * import { convertFileSrc } from "@tauri-apps/api/tauri"; + * + * mockConvertFileSrc("windows") + * + * const url = convertFileSrc("C:\\Users\\user\\file.txt") + * ``` + * + * @param osName The operating system to mock, can be one of linux, macos, or windows + * @param windowsProtocolScheme The scheme to use on Windows, can be either `http` or `https` and defaults to `https` + * + * @since 1.6.0 + */ +export function mockConvertFileSrc( + osName: string, + windowsProtocolScheme = 'https' +): void { + window.__TAURI__ = window.__TAURI__ ?? {} + window.__TAURI__.convertFileSrc = function (filePath, protocol = 'asset') { + const path = encodeURIComponent(filePath) + return osName === 'windows' + ? `${windowsProtocolScheme}://${protocol}.localhost/${path}` + : `${protocol}://localhost/${path}` + } +} + /** * Clears mocked functions/data injected by the other functions in this module. * When using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties. @@ -169,6 +201,8 @@ export function mockWindows( * @since 1.0.0 */ export function clearMocks(): void { + // @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case + delete window.__TAURI__.convertFileSrc // @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case delete window.__TAURI_IPC__ // @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case From f259db35969938bb741ad1f66029913bd218bdb8 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 17 Oct 2023 16:00:03 +0300 Subject: [PATCH 092/104] chore: downgrade bump to patch (#8033) --- .changes/api-convert-file-src-mock.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/api-convert-file-src-mock.md b/.changes/api-convert-file-src-mock.md index 0ea5fb5a9..0d4a72df9 100644 --- a/.changes/api-convert-file-src-mock.md +++ b/.changes/api-convert-file-src-mock.md @@ -1,5 +1,5 @@ --- -'@tauri-apps/api': 'minor:feat' +'@tauri-apps/api': 'patch:feat' --- Add `mockConvertFileSrc` in `mocks` module, to mock `convertFileSrc` function. From 550173aaf5b3c0bf68a6b0c0d9d8fc9699cf9db9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 12:29:33 -0300 Subject: [PATCH 093/104] Apply Version Updates From Current Changes (v1) (#8022) Co-authored-by: lucasfernog Co-authored-by: Lucas Nogueira --- .changes/add-proxy-for-nsis-download.md | 5 - .changes/api-convert-file-src-mock.md | 5 - .changes/bundler-deb-fix-owner.md | 5 - tooling/api/CHANGELOG.md | 6 + tooling/api/package.json | 2 +- tooling/bundler/CHANGELOG.md | 7 + tooling/bundler/Cargo.toml | 2 +- tooling/cli/CHANGELOG.md | 6 + tooling/cli/Cargo.lock | 4 +- tooling/cli/Cargo.toml | 4 +- tooling/cli/metadata.json | 2 +- tooling/cli/node/CHANGELOG.md | 6 + tooling/cli/node/package.json | 4 +- tooling/cli/node/yarn.lock | 1746 ++++++++++------------- 14 files changed, 825 insertions(+), 979 deletions(-) delete mode 100644 .changes/add-proxy-for-nsis-download.md delete mode 100644 .changes/api-convert-file-src-mock.md delete mode 100644 .changes/bundler-deb-fix-owner.md diff --git a/.changes/add-proxy-for-nsis-download.md b/.changes/add-proxy-for-nsis-download.md deleted file mode 100644 index db69ef005..000000000 --- a/.changes/add-proxy-for-nsis-download.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": 'patch:bug' ---- - -Read `HTTP_PROXY` env var when downloading bundling resources on Windows. diff --git a/.changes/api-convert-file-src-mock.md b/.changes/api-convert-file-src-mock.md deleted file mode 100644 index 0d4a72df9..000000000 --- a/.changes/api-convert-file-src-mock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tauri-apps/api': 'patch:feat' ---- - -Add `mockConvertFileSrc` in `mocks` module, to mock `convertFileSrc` function. diff --git a/.changes/bundler-deb-fix-owner.md b/.changes/bundler-deb-fix-owner.md deleted file mode 100644 index 67174a888..000000000 --- a/.changes/bundler-deb-fix-owner.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-bundler': 'patch:bug' ---- - -In Debian packages, set `root` the owner of control files and package files. diff --git a/tooling/api/CHANGELOG.md b/tooling/api/CHANGELOG.md index f6af6db11..ba78b3844 100644 --- a/tooling/api/CHANGELOG.md +++ b/tooling/api/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.1] + +### New Features + +- [`2b0212af`](https://www.github.com/tauri-apps/tauri/commit/2b0212af49c386e52bb2357381813d6d435ec4af)([#7961](https://www.github.com/tauri-apps/tauri/pull/7961)) Add `mockConvertFileSrc` in `mocks` module, to mock `convertFileSrc` function. + ## \[1.5.0] ### New Features diff --git a/tooling/api/package.json b/tooling/api/package.json index 4b0e21556..94694e489 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/api", - "version": "1.5.0", + "version": "1.5.1", "description": "Tauri API definitions", "type": "module", "funding": { diff --git a/tooling/bundler/CHANGELOG.md b/tooling/bundler/CHANGELOG.md index f8205caed..c253a122c 100644 --- a/tooling/bundler/CHANGELOG.md +++ b/tooling/bundler/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## \[1.4.3] + +### Bug Fixes + +- [`d0ae6750`](https://www.github.com/tauri-apps/tauri/commit/d0ae67503cdb2aeaadcea27af67285eea1cf3756)([#8012](https://www.github.com/tauri-apps/tauri/pull/8012)) Read `HTTP_PROXY` env var when downloading bundling resources on Windows. +- [`113bcd7b`](https://www.github.com/tauri-apps/tauri/commit/113bcd7b684a72eb0f421c663c6aa874197252bb)([#7980](https://www.github.com/tauri-apps/tauri/pull/7980)) In Debian packages, set `root` the owner of control files and package files. + ## \[1.4.2] ### Bug Fixes diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index 22fd635b5..b09283ea7 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-bundler" -version = "1.4.2" +version = "1.4.3" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy" diff --git a/tooling/cli/CHANGELOG.md b/tooling/cli/CHANGELOG.md index 8d3012343..65f7e9875 100644 --- a/tooling/cli/CHANGELOG.md +++ b/tooling/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.4] + +### Dependencies + +- Upgraded to `tauri-bundler@1.4.3` + ## \[1.5.3] ### Dependencies diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index a217d7d9d..81489417c 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -3355,7 +3355,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "1.4.2" +version = "1.4.3" dependencies = [ "anyhow", "ar", @@ -3395,7 +3395,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "1.5.3" +version = "1.5.4" dependencies = [ "anyhow", "axum", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 0a79161ea..4089e9129 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -3,7 +3,7 @@ members = [ "node" ] [package] name = "tauri-cli" -version = "1.5.3" +version = "1.5.4" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" rust-version = "1.60" @@ -42,7 +42,7 @@ path = "src/main.rs" clap_complete = "4" clap = { version = "4.0", features = [ "derive" ] } anyhow = "1.0" -tauri-bundler = { version = "1.4.2", path = "../bundler", default-features = false } +tauri-bundler = { version = "1.4.3", path = "../bundler", default-features = false } colored = "2.0" once_cell = "1" serde = { version = "1.0", features = [ "derive" ] } diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index b91ecb05c..b7deb4596 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -1,6 +1,6 @@ { "cli.js": { - "version": "1.5.3", + "version": "1.5.4", "node": ">= 10.0.0" }, "tauri": "1.5.2", diff --git a/tooling/cli/node/CHANGELOG.md b/tooling/cli/node/CHANGELOG.md index 35d129679..49e7f9ab0 100644 --- a/tooling/cli/node/CHANGELOG.md +++ b/tooling/cli/node/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[1.5.4] + +### Dependencies + +- Upgraded to `tauri-cli@1.5.4` + ## \[1.5.3] ### Dependencies diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index c7a7dbabf..798168787 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "1.5.3", + "version": "1.5.4", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", @@ -42,7 +42,7 @@ "cross-env": "7.0.3", "cross-spawn": "7.0.3", "fs-extra": "11.1.1", - "jest": "29.5.0", + "jest": "29.7.0", "jest-transform-toml": "1.0.0", "prettier": "2.8.8" }, diff --git a/tooling/cli/node/yarn.lock b/tooling/cli/node/yarn.lock index 9b28ddc93..1760043a6 100644 --- a/tooling/cli/node/yarn.lock +++ b/tooling/cli/node/yarn.lock @@ -2,268 +2,163 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.0.tgz#72becdf17ee44b2d1ac5651fb12f1952c336fe23" - integrity sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g== +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: - "@jridgewell/trace-mapping" "^0.3.0" - -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== dependencies: - "@babel/highlight" "^7.16.7" + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" -"@babel/compat-data@^7.16.4": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.0.tgz#86850b8597ea6962089770952075dcaabb8dba34" - integrity sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng== +"@babel/compat-data@^7.22.9": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" + integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== -"@babel/compat-data@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" - integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== - -"@babel/core@^7.11.6": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.10.tgz#74ef0fbf56b7dfc3f198fc2d927f4f03e12f4b05" - integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== +"@babel/core@^7.11.6", "@babel/core@^7.12.3": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" + integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.10" - "@babel/helper-compilation-targets" "^7.17.10" - "@babel/helper-module-transforms" "^7.17.7" - "@babel/helpers" "^7.17.9" - "@babel/parser" "^7.17.10" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.10" - "@babel/types" "^7.17.10" - convert-source-map "^1.7.0" + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.0" + "@babel/helpers" "^7.23.2" + "@babel/parser" "^7.23.0" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" + convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" + json5 "^2.2.3" + semver "^6.3.1" -"@babel/core@^7.12.3": - version "7.17.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.2.tgz#2c77fc430e95139d816d39b113b31bf40fb22337" - integrity sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw== +"@babel/generator@^7.23.0", "@babel/generator@^7.7.2": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== dependencies: - "@ampproject/remapping" "^2.0.0" - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.0" - "@babel/helper-compilation-targets" "^7.16.7" - "@babel/helper-module-transforms" "^7.16.7" - "@babel/helpers" "^7.17.2" - "@babel/parser" "^7.17.0" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.0" - "@babel/types" "^7.17.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - -"@babel/generator@^7.17.0", "@babel/generator@^7.7.2": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.0.tgz#7bd890ba706cd86d3e2f727322346ffdbf98f65e" - integrity sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw== - dependencies: - "@babel/types" "^7.17.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/generator@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189" - integrity sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg== - dependencies: - "@babel/types" "^7.17.10" - "@jridgewell/gen-mapping" "^0.1.0" + "@babel/types" "^7.23.0" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz#06e66c5f299601e6c7da350049315e83209d551b" - integrity sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA== +"@babel/helper-compilation-targets@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" + integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== dependencies: - "@babel/compat-data" "^7.16.4" - "@babel/helper-validator-option" "^7.16.7" - browserslist "^4.17.5" - semver "^6.3.0" + "@babel/compat-data" "^7.22.9" + "@babel/helper-validator-option" "^7.22.15" + browserslist "^4.21.9" + lru-cache "^5.1.1" + semver "^6.3.1" -"@babel/helper-compilation-targets@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz#09c63106d47af93cf31803db6bc49fef354e2ebe" - integrity sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ== +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/compat-data" "^7.17.10" - "@babel/helper-validator-option" "^7.16.7" - browserslist "^4.20.2" - semver "^6.3.0" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-environment-visitor@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz#ff484094a839bde9d89cd63cba017d7aae80ecd7" - integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.22.5" -"@babel/helper-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz#f1ec51551fb1c8956bc8dd95f38523b6cf375f8f" - integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== +"@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== dependencies: - "@babel/helper-get-function-arity" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/types" "^7.22.15" -"@babel/helper-function-name@^7.17.9": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" - integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== +"@babel/helper-module-transforms@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" + integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== dependencies: - "@babel/template" "^7.16.7" - "@babel/types" "^7.17.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" -"@babel/helper-get-function-arity@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" - integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.22.5" -"@babel/helper-hoist-variables@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" - integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.22.5" -"@babel/helper-module-imports@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" - integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== +"@babel/helper-string-parser@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" + integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" + integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== + +"@babel/helpers@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" + integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== dependencies: - "@babel/types" "^7.16.7" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" -"@babel/helper-module-transforms@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz#7665faeb721a01ca5327ddc6bba15a5cb34b6a41" - integrity sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng== +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== dependencies: - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-simple-access" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/helper-validator-identifier" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.16.7" - "@babel/types" "^7.16.7" - -"@babel/helper-module-transforms@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" - integrity sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw== - dependencies: - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-simple-access" "^7.17.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/helper-validator-identifier" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" - "@babel/types" "^7.17.0" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== - -"@babel/helper-plugin-utils@^7.18.6": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" - integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== - -"@babel/helper-simple-access@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz#d656654b9ea08dbb9659b69d61063ccd343ff0f7" - integrity sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g== - dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-simple-access@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz#aaa473de92b7987c6dfa7ce9a7d9674724823367" - integrity sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA== - dependencies: - "@babel/types" "^7.17.0" - -"@babel/helper-split-export-declaration@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" - integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== - dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== - -"@babel/helper-validator-option@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" - integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== - -"@babel/helpers@^7.17.2": - version "7.17.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.2.tgz#23f0a0746c8e287773ccd27c14be428891f63417" - integrity sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ== - dependencies: - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.0" - "@babel/types" "^7.17.0" - -"@babel/helpers@^7.17.9": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" - integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== - dependencies: - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.9" - "@babel/types" "^7.17.0" - -"@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - chalk "^2.0.0" + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.0.tgz#f0ac33eddbe214e4105363bb17c3341c5ffcc43c" - integrity sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw== - -"@babel/parser@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" - integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -301,11 +196,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" + integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -357,67 +252,44 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz#39c9b55ee153151990fb038651d58d3fd03f98f8" - integrity sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A== + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" + integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/template@^7.16.7", "@babel/template@^7.3.3": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" - integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== +"@babel/template@^7.22.15", "@babel/template@^7.3.3": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/parser" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" -"@babel/traverse@^7.16.7", "@babel/traverse@^7.17.0", "@babel/traverse@^7.7.2": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.0.tgz#3143e5066796408ccc880a33ecd3184f3e75cd30" - integrity sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg== +"@babel/traverse@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.0" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.0" - "@babel/types" "^7.17.0" + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.17.10", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.10.tgz#1ee1a5ac39f4eac844e6cf855b35520e5eb6f8b5" - integrity sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.3.3": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.10" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.10" - "@babel/types" "^7.17.10" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" - integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - to-fast-properties "^2.0.0" - -"@babel/types@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" - integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -441,110 +313,110 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.5.0.tgz#593a6c5c0d3f75689835f1b3b4688c4f8544cb57" - integrity sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ== +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" -"@jest/core@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.5.0.tgz#76674b96904484e8214614d17261cc491e5f1f03" - integrity sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ== +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== dependencies: - "@jest/console" "^29.5.0" - "@jest/reporters" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^29.5.0" - jest-config "^29.5.0" - jest-haste-map "^29.5.0" - jest-message-util "^29.5.0" - jest-regex-util "^29.4.3" - jest-resolve "^29.5.0" - jest-resolve-dependencies "^29.5.0" - jest-runner "^29.5.0" - jest-runtime "^29.5.0" - jest-snapshot "^29.5.0" - jest-util "^29.5.0" - jest-validate "^29.5.0" - jest-watcher "^29.5.0" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" micromatch "^4.0.4" - pretty-format "^29.5.0" + pretty-format "^29.7.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" - integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ== +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== dependencies: - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^29.5.0" + jest-mock "^29.7.0" -"@jest/expect-utils@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.5.0.tgz#f74fad6b6e20f924582dc8ecbf2cb800fe43a036" - integrity sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg== +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== dependencies: - jest-get-type "^29.4.3" + jest-get-type "^29.6.3" -"@jest/expect@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.5.0.tgz#80952f5316b23c483fbca4363ce822af79c38fba" - integrity sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g== +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== dependencies: - expect "^29.5.0" - jest-snapshot "^29.5.0" + expect "^29.7.0" + jest-snapshot "^29.7.0" -"@jest/fake-timers@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c" - integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg== +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^29.5.0" - jest-mock "^29.5.0" - jest-util "^29.5.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" -"@jest/globals@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.5.0.tgz#6166c0bfc374c58268677539d0c181f9c1833298" - integrity sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ== +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: - "@jest/environment" "^29.5.0" - "@jest/expect" "^29.5.0" - "@jest/types" "^29.5.0" - jest-mock "^29.5.0" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" -"@jest/reporters@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.5.0.tgz#985dfd91290cd78ddae4914ba7921bcbabe8ac9b" - integrity sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA== +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@jridgewell/trace-mapping" "^0.3.15" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" @@ -552,213 +424,180 @@ glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" + istanbul-lib-instrument "^6.0.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.5.0" - jest-util "^29.5.0" - jest-worker "^29.5.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" v8-to-istanbul "^9.0.1" -"@jest/schemas@^29.4.3": - version "29.4.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788" - integrity sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg== +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== dependencies: - "@sinclair/typebox" "^0.25.16" + "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^29.4.3": - version "29.4.3" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.3.tgz#ff8d05cbfff875d4a791ab679b4333df47951d20" - integrity sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w== +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: - "@jridgewell/trace-mapping" "^0.3.15" + "@jridgewell/trace-mapping" "^0.3.18" callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/test-result@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.5.0.tgz#7c856a6ca84f45cc36926a4e9c6b57f1973f1408" - integrity sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ== +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: - "@jest/console" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz#34d7d82d3081abd523dbddc038a3ddcb9f6d3cc4" - integrity sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ== +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== dependencies: - "@jest/test-result" "^29.5.0" + "@jest/test-result" "^29.7.0" graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" + jest-haste-map "^29.7.0" slash "^3.0.0" -"@jest/transform@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.5.0.tgz#cf9c872d0965f0cbd32f1458aa44a2b1988b00f9" - integrity sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw== +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.5.0" - "@jridgewell/trace-mapping" "^0.3.15" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" - jest-regex-util "^29.4.3" - jest-util "^29.5.0" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" write-file-atomic "^4.0.2" -"@jest/types@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593" - integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog== +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: - "@jest/schemas" "^29.4.3" + "@jest/schemas" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== dependencies: - "@jridgewell/set-array" "^1.0.0" + "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== -"@jridgewell/resolve-uri@^3.0.3": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.4.tgz#b876e3feefb9c8d3aa84014da28b5e52a0640d72" - integrity sha512-cz8HFjOFfUBtvN+NXYSFMHYRdxZMaEl0XypVrhzxBgadKIXhIkRd8aMeHhmF56Sl7SuS8OnUpQ73/k9LE4VnLg== +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/set-array@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.0.tgz#1179863356ac8fbea64a5a4bcde93a4871012c01" - integrity sha512-SfJxIxNVYLTsKwzB3MoOQ1yxf4w/E6MdkvTgrgAt1bfxjSrLUoHMKrDOykwN14q65waezZIdqDneUIPh4/sKxg== +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.10" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.10.tgz#baf57b4e2a690d4f38560171f91783656b7f8186" - integrity sha512-Ht8wIW5v165atIX1p+JvKR5ONzUyF4Ac8DZIQ5kZs9zrb6M8SJNXpx1zn04rn65VjBMygRoMXcyYwNK0fT7bEg== - -"@jridgewell/trace-mapping@^0.3.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3" - integrity sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ== +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.12": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.15": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@napi-rs/cli@2.16.1": version "2.16.1" resolved "https://registry.yarnpkg.com/@napi-rs/cli/-/cli-2.16.1.tgz#912e1169be6ff8bb5e1e22bb702adcc5e73e232b" integrity sha512-L0Gr5iEQIDEbvWdDr1HUaBOxBSHL1VZhWSk1oryawoT8qJIY+KGfLFelU+Qma64ivCPbxYpkfPoKYVG3rcoGIA== -"@sinclair/typebox@^0.25.16": - version "0.25.21" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.21.tgz#763b05a4b472c93a8db29b2c3e359d55b29ce272" - integrity sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g== +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== -"@sinonjs/commons@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" - integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== +"@sinonjs/commons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== dependencies: type-detect "4.0.8" "@sinonjs/fake-timers@^10.0.2": - version "10.0.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz#d10549ed1f423d80639c528b6c7f5a1017747d0c" - integrity sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw== + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: - "@sinonjs/commons" "^2.0.0" + "@sinonjs/commons" "^3.0.0" "@types/babel__core@^7.1.14": - version "7.1.18" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.18.tgz#1a29abcc411a9c05e2094c98f9a1b7da6cdf49f8" - integrity sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ== + version "7.20.2" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.2.tgz#215db4f4a35d710256579784a548907237728756" + integrity sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA== dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" "@types/babel__generator" "*" "@types/babel__template" "*" "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + version "7.6.5" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.5.tgz#281f4764bcbbbc51fdded0f25aa587b4ce14da95" + integrity sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + version "7.4.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.2.tgz#843e9f1f47c957553b0c374481dc4772921d6a6b" + integrity sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" - integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== + version "7.20.2" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.2.tgz#4ddf99d95cfdd946ff35d2b65c978d9c9bf2645d" + integrity sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw== dependencies: - "@babel/types" "^7.3.0" + "@babel/types" "^7.20.7" "@types/graceful-fs@^4.1.3": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.7.tgz#30443a2e64fd51113bc3e2ba0914d47109695e2a" + integrity sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw== dependencies: "@types/node" "*" @@ -768,28 +607,25 @@ integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== "@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#412e0725ef41cde73bfa03e0e833eaff41e0fd63" + integrity sha512-gPQuzaPR5h/djlAv2apEG1HVOyj1IUs7GpfMZixU0/0KXT3pm64ylHuMUI1/Akh+sq/iikxg6Z2j+fcMDXaaTQ== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.2.tgz#edc8e421991a3b4df875036d381fc0a5a982f549" + integrity sha512-kv43F9eb3Lhj+lr/Hn6OcLCs/sSM8bt+fIaP11rCYngfV6NVjzWXJ17owQtDQTL9tQ8WSLUrGsSJ6rJz0F1w1A== dependencies: "@types/istanbul-lib-report" "*" "@types/node@*": - version "17.0.16" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.16.tgz#e3733f46797b9df9e853ca9f719c8a6f7b84cd26" - integrity sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA== - -"@types/prettier@^2.1.5": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17" - integrity sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA== + version "20.8.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.6.tgz#0dbd4ebcc82ad0128df05d0e6f57e05359ee47fa" + integrity sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ== + dependencies: + undici-types "~5.25.1" "@types/stack-utils@^2.0.0": version "2.0.1" @@ -797,14 +633,14 @@ integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== "@types/yargs-parser@*": - version "20.2.1" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" - integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== + version "21.0.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.1.tgz#07773d7160494d56aa882d7531aac7319ea67c3b" + integrity sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ== "@types/yargs@^17.0.8": - version "17.0.10" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" - integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA== + version "17.0.28" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.28.tgz#d106e4301fbacde3d1796ab27374dd16588ec851" + integrity sha512-N3e3fkS86hNhtk6BEnc0rj3zcehaxx8QWhCROJkqpl5Zaoi7nAic3jH8q94jVD3zu5LGk+PUB6KAiDmimYOEQw== dependencies: "@types/yargs-parser" "*" @@ -840,9 +676,9 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== anymatch@^3.0.3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -854,15 +690,15 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -babel-jest@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5" - integrity sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q== +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== dependencies: - "@jest/transform" "^29.5.0" + "@jest/transform" "^29.7.0" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.5.0" + babel-preset-jest "^29.6.3" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -878,10 +714,10 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz#a97db437936f441ec196990c9738d4b88538618a" - integrity sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w== +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -906,12 +742,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz#57bc8cc88097af7ff6a5ab59d1cd29d52a5916e2" - integrity sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg== +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== dependencies: - babel-plugin-jest-hoist "^29.5.0" + babel-plugin-jest-hoist "^29.6.3" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -927,34 +763,22 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.1: +braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" -browserslist@^4.17.5: - version "4.19.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.1.tgz#4ac0435b35ab655896c31d53018b6dd5e9e4c9a3" - integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A== +browserslist@^4.21.9: + version "4.22.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" + integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== dependencies: - caniuse-lite "^1.0.30001286" - electron-to-chromium "^1.4.17" - escalade "^3.1.1" - node-releases "^2.0.1" - picocolors "^1.0.0" - -browserslist@^4.20.2: - version "4.20.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf" - integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== - dependencies: - caniuse-lite "^1.0.30001332" - electron-to-chromium "^1.4.118" - escalade "^3.1.1" - node-releases "^2.0.3" - picocolors "^1.0.0" + caniuse-lite "^1.0.30001541" + electron-to-chromium "^1.4.535" + node-releases "^2.0.13" + update-browserslist-db "^1.0.13" bser@2.1.1: version "2.1.1" @@ -983,17 +807,12 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001286: - version "1.0.30001310" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001310.tgz#da02cd07432c9eece6992689d1b84ca18139eea8" - integrity sha512-cb9xTV8k9HTIUA3GnPUJCk0meUnrHL5gy5QePfDjxHyNBcnzPzrHFv5GqfP7ue5b1ZyzZL0RJboD6hQlPXjhjg== +caniuse-lite@^1.0.30001541: + version "1.0.30001549" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz#7d1a3dce7ea78c06ed72c32c2743ea364b3615aa" + integrity sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA== -caniuse-lite@^1.0.30001332: - version "1.0.30001334" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001334.tgz#892e9965b35285033fc2b8a8eff499fe02f13d8b" - integrity sha512-kbaCEBRRVSoeNs74sCuq92MJyGrMtjWVfhltoHUCW4t4pXFvGjUBrfo47weBRViHkiV3eBYyIsfl956NtHGazw== - -chalk@^2.0.0: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1016,33 +835,33 @@ char-regex@^1.0.2: integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== ci-info@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" - integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" wrap-ansi "^7.0.0" co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== color-convert@^1.9.0: version "1.9.3" @@ -1061,7 +880,7 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" @@ -1071,20 +890,26 @@ color-name@~1.1.4: concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== convert-source-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + cross-env@7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" @@ -1102,41 +927,36 @@ cross-spawn@7.0.3, cross-spawn@^7.0.1, cross-spawn@^7.0.3: which "^2.0.1" debug@^4.1.0, debug@^4.1.1: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= +dedent@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" - integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -electron-to-chromium@^1.4.118: - version "1.4.127" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.127.tgz#4ef19d5d920abe2676d938f4170729b44f7f423a" - integrity sha512-nhD6S8nKI0O2MueC6blNOEZio+/PWppE/pevnf3LOlQA/fKPCrDp2Ao4wx4LFwmIkJpVdFdn2763YWLy9ENIZg== - -electron-to-chromium@^1.4.17: - version "1.4.68" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.68.tgz#d79447b6bd1bec9183f166bb33d4bef0d5e4e568" - integrity sha512-cId+QwWrV8R1UawO6b9BR1hnkJ4EJPCPAr4h315vliHUtVUJDk39Sg1PMNnaWKfj5x+93ssjeJ9LKL6r8LaMiA== +electron-to-chromium@^1.4.535: + version "1.4.556" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.556.tgz#97385917eb6ea3ac6a3378cf87bb39ee1db96e76" + integrity sha512-6RPN0hHfzDU8D56E72YkDvnLw5Cj2NMXZGg3UkgyoHxjVhG99KZpsKgBWMmTy0Ei89xwan+rbRsVB9yzATmYzQ== emittery@^0.13.1: version "0.13.1" @@ -1163,7 +983,7 @@ escalade@^3.1.1: escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== escape-string-regexp@^2.0.0: version "2.0.0" @@ -1193,18 +1013,18 @@ execa@^5.0.0: exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expect@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7" - integrity sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg== +expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: - "@jest/expect-utils" "^29.5.0" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" fast-json-stable-stringify@^2.1.0: version "2.1.0" @@ -1212,9 +1032,9 @@ fast-json-stable-stringify@^2.1.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== dependencies: bser "2.1.1" @@ -1245,17 +1065,12 @@ fs-extra@11.1.1: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" @@ -1278,14 +1093,14 @@ get-stream@^6.0.0: integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== glob@^7.1.3, glob@^7.1.4: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" @@ -1294,15 +1109,20 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9: +graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" @@ -1310,11 +1130,9 @@ has-flag@^4.0.0: integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== html-escaper@^2.0.0: version "2.0.2" @@ -1337,12 +1155,12 @@ import-local@^3.0.2: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -1355,12 +1173,12 @@ inherits@2: is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: has "^1.0.3" @@ -1387,17 +1205,17 @@ is-stream@^2.0.0: isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz#7b49198b657b27a730b8e9cb601f1e1bff24c59a" - integrity sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q== +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" "@babel/parser" "^7.14.7" @@ -1405,13 +1223,24 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" + integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" + make-dir "^4.0.0" supports-color "^7.1.0" istanbul-lib-source-maps@^4.0.0: @@ -1424,315 +1253,312 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" - integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.5.0.tgz#e88786dca8bf2aa899ec4af7644e16d9dcf9b23e" - integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag== +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: execa "^5.0.0" + jest-util "^29.7.0" p-limit "^3.1.0" -jest-circus@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.5.0.tgz#b5926989449e75bff0d59944bae083c9d7fb7317" - integrity sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA== +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== dependencies: - "@jest/environment" "^29.5.0" - "@jest/expect" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - dedent "^0.7.0" + dedent "^1.0.0" is-generator-fn "^2.0.0" - jest-each "^29.5.0" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-runtime "^29.5.0" - jest-snapshot "^29.5.0" - jest-util "^29.5.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" p-limit "^3.1.0" - pretty-format "^29.5.0" + pretty-format "^29.7.0" pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.5.0.tgz#b34c20a6d35968f3ee47a7437ff8e53e086b4a67" - integrity sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw== +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: - "@jest/core" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" chalk "^4.0.0" + create-jest "^29.7.0" exit "^0.1.2" - graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.5.0" - jest-util "^29.5.0" - jest-validate "^29.5.0" - prompts "^2.0.1" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" yargs "^17.3.1" -jest-config@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.5.0.tgz#3cc972faec8c8aaea9ae158c694541b79f3748da" - integrity sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA== +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.5.0" - "@jest/types" "^29.5.0" - babel-jest "^29.5.0" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^29.5.0" - jest-environment-node "^29.5.0" - jest-get-type "^29.4.3" - jest-regex-util "^29.4.3" - jest-resolve "^29.5.0" - jest-runner "^29.5.0" - jest-util "^29.5.0" - jest-validate "^29.5.0" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.5.0" + pretty-format "^29.7.0" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.5.0.tgz#e0d83a58eb5451dcc1fa61b1c3ee4e8f5a290d63" - integrity sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw== +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: chalk "^4.0.0" - diff-sequences "^29.4.3" - jest-get-type "^29.4.3" - pretty-format "^29.5.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-docblock@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.3.tgz#90505aa89514a1c7dceeac1123df79e414636ea8" - integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg== +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: detect-newline "^3.0.0" -jest-each@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.5.0.tgz#fc6e7014f83eac68e22b7195598de8554c2e5c06" - integrity sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA== +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" chalk "^4.0.0" - jest-get-type "^29.4.3" - jest-util "^29.5.0" - pretty-format "^29.5.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" -jest-environment-node@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.5.0.tgz#f17219d0f0cc0e68e0727c58b792c040e332c967" - integrity sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw== +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== dependencies: - "@jest/environment" "^29.5.0" - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^29.5.0" - jest-util "^29.5.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" -jest-get-type@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" - integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== -jest-haste-map@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.5.0.tgz#69bd67dc9012d6e2723f20a945099e972b2e94de" - integrity sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA== +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^29.4.3" - jest-util "^29.5.0" - jest-worker "^29.5.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-leak-detector@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz#cf4bdea9615c72bac4a3a7ba7e7930f9c0610c8c" - integrity sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow== +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: - jest-get-type "^29.4.3" - pretty-format "^29.5.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-matcher-utils@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz#d957af7f8c0692c5453666705621ad4abc2c59c5" - integrity sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw== +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== dependencies: chalk "^4.0.0" - jest-diff "^29.5.0" - jest-get-type "^29.4.3" - pretty-format "^29.5.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-message-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e" - integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA== +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.5.0" + pretty-format "^29.7.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed" - integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw== +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-util "^29.5.0" + jest-util "^29.7.0" jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" - integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-regex-util@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.3.tgz#a42616141e0cae052cfa32c169945d00c0aa0bb8" - integrity sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg== +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== -jest-resolve-dependencies@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz#f0ea29955996f49788bf70996052aa98e7befee4" - integrity sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg== +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== dependencies: - jest-regex-util "^29.4.3" - jest-snapshot "^29.5.0" + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" -jest-resolve@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.5.0.tgz#b053cc95ad1d5f6327f0ac8aae9f98795475ecdc" - integrity sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w== +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" + jest-haste-map "^29.7.0" jest-pnp-resolver "^1.2.2" - jest-util "^29.5.0" - jest-validate "^29.5.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" resolve "^1.20.0" resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.5.0.tgz#6a57c282eb0ef749778d444c1d758c6a7693b6f8" - integrity sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ== +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== dependencies: - "@jest/console" "^29.5.0" - "@jest/environment" "^29.5.0" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^29.4.3" - jest-environment-node "^29.5.0" - jest-haste-map "^29.5.0" - jest-leak-detector "^29.5.0" - jest-message-util "^29.5.0" - jest-resolve "^29.5.0" - jest-runtime "^29.5.0" - jest-util "^29.5.0" - jest-watcher "^29.5.0" - jest-worker "^29.5.0" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.5.0.tgz#c83f943ee0c1da7eb91fa181b0811ebd59b03420" - integrity sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw== +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== dependencies: - "@jest/environment" "^29.5.0" - "@jest/fake-timers" "^29.5.0" - "@jest/globals" "^29.5.0" - "@jest/source-map" "^29.4.3" - "@jest/test-result" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^29.5.0" - jest-message-util "^29.5.0" - jest-mock "^29.5.0" - jest-regex-util "^29.4.3" - jest-resolve "^29.5.0" - jest-snapshot "^29.5.0" - jest-util "^29.5.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce" - integrity sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g== +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" "@babel/plugin-syntax-jsx" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.5.0" - "@jest/transform" "^29.5.0" - "@jest/types" "^29.5.0" - "@types/babel__traverse" "^7.0.6" - "@types/prettier" "^2.1.5" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^29.5.0" + expect "^29.7.0" graceful-fs "^4.2.9" - jest-diff "^29.5.0" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" natural-compare "^1.4.0" - pretty-format "^29.5.0" - semver "^7.3.5" + pretty-format "^29.7.0" + semver "^7.5.3" jest-transform-toml@1.0.0: version "1.0.0" @@ -1741,63 +1567,63 @@ jest-transform-toml@1.0.0: dependencies: toml-loader "^1.0.0" -jest-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" - integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== +jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.5.0.tgz#8e5a8f36178d40e47138dc00866a5f3bd9916ffc" - integrity sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ== +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^29.4.3" + jest-get-type "^29.6.3" leven "^3.1.0" - pretty-format "^29.5.0" + pretty-format "^29.7.0" -jest-watcher@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.5.0.tgz#cf7f0f949828ba65ddbbb45c743a382a4d911363" - integrity sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA== +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: - "@jest/test-result" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.13.1" - jest-util "^29.5.0" + jest-util "^29.7.0" string-length "^4.0.1" -jest-worker@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.5.0.tgz#bdaefb06811bd3384d93f009755014d8acb4615d" - integrity sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA== +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" - jest-util "^29.5.0" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.5.0.tgz#f75157622f5ce7ad53028f2f8888ab53e1f1f24e" - integrity sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ== +jest@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - "@jest/core" "^29.5.0" - "@jest/types" "^29.5.0" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" import-local "^3.0.2" - jest-cli "^29.5.0" + jest-cli "^29.7.0" js-tokens@^4.0.0: version "4.0.0" @@ -1822,7 +1648,7 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -json5@^2.1.2, json5@^2.2.1: +json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -1858,6 +1684,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -1865,12 +1698,12 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: - semver "^6.0.0" + semver "^7.5.3" makeerror@1.0.12: version "1.0.12" @@ -1885,22 +1718,22 @@ merge-stream@^2.0.0: integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== micromatch@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - braces "^3.0.1" - picomatch "^2.2.3" + braces "^3.0.2" + picomatch "^2.3.1" mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4: - version "3.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" - integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw== +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" @@ -1912,22 +1745,17 @@ ms@2.1.2: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" - integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== - -node-releases@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.4.tgz#f38252370c43854dc48aa431c766c6c398f40476" - integrity sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ== +node-releases@^2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" + integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== normalize-path@^3.0.0: version "3.0.0" @@ -1944,7 +1772,7 @@ npm-run-path@^4.0.1: once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" @@ -1999,7 +1827,7 @@ path-exists@^4.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" @@ -2016,15 +1844,15 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.3: +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== pkg-dir@^4.2.0: version "4.2.0" @@ -2038,12 +1866,12 @@ prettier@2.8.8: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -pretty-format@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a" - integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw== +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: - "@jest/schemas" "^29.4.3" + "@jest/schemas" "^29.6.3" ansi-styles "^5.0.0" react-is "^18.0.0" @@ -2056,19 +1884,19 @@ prompts@^2.0.1: sisteransi "^1.0.5" pure-rand@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.1.tgz#31207dddd15d43f299fdcdb2f572df65030c19af" - integrity sha512-t+x1zEHDjBwkDGY5v5ApnZ/utcd4XYDiJsaQQoptTXgUXX95sDg1elCdJghzicm7n2mbCBJ3uYWr6M22SO19rg== + version "6.0.4" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" + integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== react-is@^18.0.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67" - integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg== + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== resolve-cwd@^3.0.0: version "3.0.0" @@ -2083,25 +1911,20 @@ resolve-from@^5.0.0: integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.0.tgz#c1a0028c2d166ec2fbf7d0644584927e76e7400e" - integrity sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== resolve@^1.20.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" - integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.8.1" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -semver@>=7.5.2, semver@^6.0.0, semver@^6.3.0, semver@^7.3.5: +semver@>=7.5.2, semver@^6.3.0, semver@^6.3.1, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -2143,11 +1966,6 @@ source-map-support@0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.5.0: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -2156,12 +1974,12 @@ source-map@^0.6.0, source-map@^0.6.1: sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== stack-utils@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" - integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== dependencies: escape-string-regexp "^2.0.0" @@ -2247,7 +2065,7 @@ tmpl@1.0.5: to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== to-regex-range@^5.0.1: version "5.0.1" @@ -2278,19 +2096,32 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +undici-types@~5.25.1: + version "5.25.3" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" + integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + v8-to-istanbul@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" - integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== + version "9.1.3" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz#ea456604101cd18005ac2cae3cdd1aa058a6306b" + integrity sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" + convert-source-map "^2.0.0" walker@^1.0.8: version "1.0.8" @@ -2318,7 +2149,7 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^4.0.2: version "4.0.2" @@ -2333,28 +2164,33 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^21.0.0: - version "21.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^17.3.1: - version "17.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" - integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g== + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: - cliui "^7.0.2" + cliui "^8.0.1" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^21.0.0" + yargs-parser "^21.1.1" yocto-queue@^0.1.0: version "0.1.0" From 99865d9e9ad960bff9fef69bee19f383c4338233 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 17 Oct 2023 19:09:59 +0300 Subject: [PATCH 094/104] refactor(cli): cleanup info command (#7204) Co-authored-by: martin frances Co-authored-by: Lucas Nogueira --- tooling/cli/src/info/app.rs | 48 ++----- tooling/cli/src/info/env_nodejs.rs | 178 +++++++----------------- tooling/cli/src/info/env_rust.rs | 150 +++++++------------- tooling/cli/src/info/env_system.rs | 133 +++++++----------- tooling/cli/src/info/mod.rs | 152 +++++++++++++++----- tooling/cli/src/info/packages_nodejs.rs | 80 +++++------ tooling/cli/src/info/packages_rust.rs | 130 ++++++----------- 7 files changed, 364 insertions(+), 507 deletions(-) diff --git a/tooling/cli/src/info/app.rs b/tooling/cli/src/info/app.rs index ff37302a0..ef4977b4d 100644 --- a/tooling/cli/src/info/app.rs +++ b/tooling/cli/src/info/app.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use super::{SectionItem, Status}; +use super::SectionItem; use crate::helpers::framework; use std::{fs::read_to_string, path::PathBuf}; @@ -14,15 +14,11 @@ pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option) -> Vec, tauri_dir: Option) -> Vec (Vec, Option) { - let yarn_version = cross_command("yarn") +pub fn manager_version(package_manager: &str) -> Option { + cross_command(package_manager) .arg("-v") .output() .map(|o| { @@ -19,129 +18,58 @@ pub fn items(metadata: &VersionMetadata) -> (Vec, Option) { } }) .ok() - .unwrap_or_default(); - let yarn_version_c = yarn_version.clone(); + .unwrap_or_default() +} + +pub fn items(metadata: &VersionMetadata) -> Vec { let node_target_ver = metadata.js_cli.node.replace(">= ", ""); - ( - vec![ - SectionItem::new( - move || { - cross_command("node") - .arg("-v") - .output() - .map(|o| { - if o.status.success() { - let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string(); - let v = v - .split('\n') - .next() - .unwrap() - .strip_prefix('v') - .unwrap_or_default() - .trim(); - Some(( - format!("node: {}{}", v, { - let version = semver::Version::parse(v).unwrap(); - let target_version = semver::Version::parse(node_target_ver.as_str()).unwrap(); - if version < target_version { - format!( - " ({}, latest: {})", - "outdated".red(), - target_version.to_string().green() - ) - } else { - "".into() - } - }), - Status::Neutral, - )) + vec![ + SectionItem::new().action(move || { + cross_command("node") + .arg("-v") + .output() + .map(|o| { + if o.status.success() { + let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string(); + let v = v + .split('\n') + .next() + .unwrap() + .strip_prefix('v') + .unwrap_or_default() + .trim(); + ActionResult::Description(format!("node: {}{}", v, { + let version = semver::Version::parse(v).unwrap(); + let target_version = semver::Version::parse(node_target_ver.as_str()).unwrap(); + if version < target_version { + format!( + " ({}, latest: {})", + "outdated".red(), + target_version.to_string().green() + ) } else { - None + "".into() } - }) - .ok() - .unwrap_or_default() - }, - || None, - false, - ), - SectionItem::new( - || { - cross_command("pnpm") - .arg("-v") - .output() - .map(|o| { - if o.status.success() { - let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string(); - Some(( - format!("pnpm: {}", v.split('\n').next().unwrap()), - Status::Neutral, - )) - } else { - None - } - }) - .ok() - .unwrap_or_default() - }, - || None, - false, - ), - SectionItem::new( - || { - cross_command("bun") - .arg("-v") - .output() - .map(|o| { - if o.status.success() { - let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string(); - Some(( - format!("bun: {}", v.split('\n').next().unwrap()), - Status::Neutral, - )) - } else { - None - } - }) - .ok() - .unwrap_or_default() - }, - || None, - false, - ), - SectionItem::new( - move || { - yarn_version_c - .as_ref() - .map(|v| (format!("yarn: {v}"), Status::Neutral)) - }, - || None, - false, - ), - SectionItem::new( - || { - cross_command("npm") - .arg("-v") - .output() - .map(|o| { - if o.status.success() { - let v = String::from_utf8_lossy(o.stdout.as_slice()).to_string(); - Some(( - format!("npm: {}", v.split('\n').next().unwrap()), - Status::Neutral, - )) - } else { - None - } - }) - .ok() - .unwrap_or_default() - }, - || None, - false, - ), - ], - yarn_version, - ) + })) + } else { + ActionResult::None + } + }) + .ok() + .unwrap_or_default() + }), + SectionItem::new().action(|| { + manager_version("pnpm") + .map(|v| format!("pnpm: {}", v)) + .into() + }), + SectionItem::new().action(|| { + manager_version("yarn") + .map(|v| format!("yarn: {}", v)) + .into() + }), + SectionItem::new().action(|| manager_version("npm").map(|v| format!("npm: {}", v)).into()), + SectionItem::new().action(|| manager_version("bun").map(|v| format!("bun: {}", v)).into()), + ] } diff --git a/tooling/cli/src/info/env_rust.rs b/tooling/cli/src/info/env_rust.rs index 40f03ebd5..8fa786e10 100644 --- a/tooling/cli/src/info/env_rust.rs +++ b/tooling/cli/src/info/env_rust.rs @@ -7,95 +7,55 @@ use super::Status; use colored::Colorize; use std::process::Command; +fn component_version(component: &str) -> Option<(String, Status)> { + Command::new(component) + .arg("-V") + .output() + .map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string()) + .map(|v| { + format!( + "{component}: {}", + v.split('\n') + .next() + .unwrap() + .strip_prefix(&format!("{component} ")) + .unwrap_or_default() + ) + }) + .map(|desc| (desc, Status::Success)) + .ok() +} + pub fn items() -> Vec { vec![ - SectionItem::new( - || { - Some( - Command::new("rustc") - .arg("-V") - .output() - .map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string()) - .map(|v| { + SectionItem::new().action(|| { + component_version("rustc") + .unwrap_or_else(|| { + ( format!( - "rustc: {}", - v.split('\n') - .next() - .unwrap() - .strip_prefix("rustc ") - .unwrap_or_default() - ) - }) - .map(|desc| (desc, Status::Success)) - .ok() - .unwrap_or_else(|| { - ( - format!( - "rustc: {}\nMaybe you don't have rust installed! Visit {}", - "not installed!".red(), - "https://rustup.rs/".cyan() - ), - Status::Error, - ) - }), - ) - }, - || None, - false, - ), - SectionItem::new( - || { - Some( - Command::new("cargo") - .arg("-V") - .output() - .map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string()) - .map(|v| { + "rustc: {}\nMaybe you don't have rust installed! Visit {}", + "not installed!".red(), + "https://rustup.rs/".cyan() + ), + Status::Error, + ) + }).into() + }), + SectionItem::new().action(|| { + component_version("cargo") + .unwrap_or_else(|| { + ( format!( - "Cargo: {}", - v.split('\n') - .next() - .unwrap() - .strip_prefix("cargo ") - .unwrap_or_default() - ) - }) - .map(|desc| (desc, Status::Success)) - .ok() - .unwrap_or_else(|| { - ( - format!( - "Cargo: {}\nMaybe you don't have rust installed! Visit {}", - "not installed!".red(), - "https://rustup.rs/".cyan() - ), - Status::Error, - ) - }), - ) - }, - || None, - false, - ), - SectionItem::new( - || { - Some( - Command::new("rustup") - .arg("-V") - .output() - .map(|o| String::from_utf8_lossy(o.stdout.as_slice()).to_string()) - .map(|v| { - format!( - "rustup: {}", - v.split('\n') - .next() - .unwrap() - .strip_prefix("rustup ") - .unwrap_or_default() - ) - }) - .map(|desc| (desc, Status::Success)) - .ok() + "Cargo: {}\nMaybe you don't have rust installed! Visit {}", + "not installed!".red(), + "https://rustup.rs/".cyan() + ), + Status::Error, + ) + }).into() + }), + SectionItem::new().action(|| { + component_version("rustup") .unwrap_or_else(|| { ( format!( @@ -105,15 +65,9 @@ pub fn items() -> Vec { ), Status::Warning, ) - }), - ) - }, - || None, - false, - ), - SectionItem::new( - || { - Some( + }).into() + }), + SectionItem::new().action(|| { Command::new("rustup") .args(["show", "active-toolchain"]) .output() @@ -135,11 +89,7 @@ pub fn items() -> Vec { ), Status::Warning, ) - }), - ) - }, - || None, - false, - ), + }).into() + }), ] } diff --git a/tooling/cli/src/info/env_system.rs b/tooling/cli/src/info/env_system.rs index a4bc6a24b..bc7ea3cc5 100644 --- a/tooling/cli/src/info/env_system.rs +++ b/tooling/cli/src/info/env_system.rs @@ -2,8 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use super::SectionItem; -use super::Status; +use super::{SectionItem, Status}; use colored::Colorize; #[cfg(windows)] use serde::Deserialize; @@ -177,74 +176,55 @@ fn is_xcode_command_line_tools_installed() -> bool { pub fn items() -> Vec { vec![ - SectionItem::new( - || { - let os_info = os_info::get(); - Some(( - format!( - "OS: {} {} {:?}", - os_info.os_type(), - os_info.version(), - os_info.bitness() - ), - Status::Neutral, - )) - }, - || None, - false, - ), + SectionItem::new().action(|| { + let os_info = os_info::get(); + format!( + "OS: {} {} {:?}", + os_info.os_type(), + os_info.version(), + os_info.bitness() + ).into() + }), #[cfg(windows)] - SectionItem::new( - || { - let error = || { - format!( - "Webview2: {}\nVisit {}", - "not installed!".red(), - "https://developer.microsoft.com/en-us/microsoft-edge/webview2/".cyan() - ) - }; - Some( - webview2_version() - .map(|v| { - v.map(|v| (format!("WebView2: {}", v), Status::Success)) - .unwrap_or_else(|| (error(), Status::Error)) - }) - .unwrap_or_else(|_| (error(), Status::Error)), - ) - }, - || None, - false, - ), + SectionItem::new().action(|| { + let error = format!( + "Webview2: {}\nVisit {}", + "not installed!".red(), + "https://developer.microsoft.com/en-us/microsoft-edge/webview2/".cyan() + ); + webview2_version() + .map(|v| { + v.map(|v| (format!("WebView2: {}", v), Status::Success)) + .unwrap_or_else(|| (error.clone(), Status::Error)) + }) + .unwrap_or_else(|_| (error, Status::Error)).into() + }), #[cfg(windows)] - SectionItem::new( - || { - let build_tools = build_tools_version().unwrap_or_default(); - if build_tools.is_empty() { - Some(( + SectionItem::new().action(|| { + let build_tools = build_tools_version().unwrap_or_default(); + if build_tools.is_empty() { + ( format!( "Couldn't detect any Visual Studio or VS Build Tools instance with MSVC and SDK components. Download from {}", "https://aka.ms/vs/17/release/vs_BuildTools.exe".cyan() ), Status::Error, - )) - } else { - Some(( - format!( - "MSVC: {}{}", - if build_tools.len() > 1 { - format!("\n {} ", "-".cyan()) - } else { - "".into() - }, - build_tools.join(format!("\n {} ", "-".cyan()).as_str()), - ), - Status::Success, - )) - } - }, - || None, - false, - ), + ).into() + } else { + ( + format!( + "MSVC: {}{}", + if build_tools.len() > 1 { + format!("\n {} ", "-".cyan()) + } else { + "".into() + }, + build_tools.join(format!("\n {} ", "-".cyan()).as_str()), + ), + Status::Success, + ).into() + } + }), #[cfg(any( target_os = "linux", target_os = "dragonfly", @@ -252,9 +232,7 @@ pub fn items() -> Vec { target_os = "openbsd", target_os = "netbsd" ))] - SectionItem::new( - || { - Some( + SectionItem::new().action(|| { webkit2gtk_ver() .map(|v| (format!("webkit2gtk-4.0: {v}"), Status::Success)) .unwrap_or_else(|| { @@ -266,11 +244,8 @@ pub fn items() -> Vec { ), Status::Error, ) - }), - ) + }).into() }, - || None, - false, ), #[cfg(any( target_os = "linux", @@ -279,9 +254,7 @@ pub fn items() -> Vec { target_os = "openbsd", target_os = "netbsd" ))] - SectionItem::new( - || { - Some( + SectionItem::new().action(|| { rsvg2_ver() .map(|v| (format!("rsvg2: {v}"), Status::Success)) .unwrap_or_else(|| { @@ -293,16 +266,12 @@ pub fn items() -> Vec { ), Status::Error, ) - }), - ) + }).into() }, - || None, - false, ), #[cfg(target_os = "macos")] - SectionItem::new( - || { - Some(if is_xcode_command_line_tools_installed() { + SectionItem::new().action(|| { + if is_xcode_command_line_tools_installed() { ( "Xcode Command Line Tools: installed".into(), Status::Success, @@ -316,10 +285,8 @@ pub fn items() -> Vec { ), Status::Error, ) - }) + }.into() }, - || None, - false, ), ] } diff --git a/tooling/cli/src/info/mod.rs b/tooling/cli/src/info/mod.rs index 1abc22bbf..868dce287 100644 --- a/tooling/cli/src/info/mod.rs +++ b/tooling/cli/src/info/mod.rs @@ -4,7 +4,7 @@ use crate::Result; use clap::Parser; -use colored::Colorize; +use colored::{ColoredString, Colorize}; use dialoguer::{theme::ColorfulTheme, Confirm}; use serde::Deserialize; use std::{ @@ -92,6 +92,18 @@ pub enum Status { Error, } +impl Status { + fn color>(&self, s: S) -> ColoredString { + let s = s.as_ref(); + match self { + Status::Neutral => s.normal(), + Status::Success => s.green(), + Status::Warning => s.yellow(), + Status::Error => s.red(), + } + } +} + impl Display for Status { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { write!( @@ -107,15 +119,55 @@ impl Display for Status { } } +#[derive(Default)] +pub enum ActionResult { + Full { + description: String, + status: Status, + }, + Description(String), + #[default] + None, +} + +impl From for ActionResult { + fn from(value: String) -> Self { + ActionResult::Description(value) + } +} + +impl From<(String, Status)> for ActionResult { + fn from(value: (String, Status)) -> Self { + ActionResult::Full { + description: value.0, + status: value.1, + } + } +} + +impl From> for ActionResult { + fn from(value: Option) -> Self { + value.map(ActionResult::Description).unwrap_or_default() + } +} + +impl From> for ActionResult { + fn from(value: Option<(String, Status)>) -> Self { + value + .map(|v| ActionResult::Full { + description: v.0, + status: v.1, + }) + .unwrap_or_default() + } +} + pub struct SectionItem { /// If description is none, the item is skipped description: Option, status: Status, - /// This closure return will be assigned to status and description - action: Box Option<(String, Status)>>, - /// This closure return will be assigned to status and description - action_if_err: Box Option<(String, Status)>>, - has_action_if_err: bool, + action: Option ActionResult>>, + action_if_err: Option ActionResult>>, } impl Display for SectionItem { @@ -131,29 +183,66 @@ impl Display for SectionItem { } impl SectionItem { - fn new< - F1: FnMut() -> Option<(String, Status)> + 'static, - F2: FnMut() -> Option<(String, Status)> + 'static, - >( - action: F1, - action_if_err: F2, - has_action_if_err: bool, - ) -> Self { + fn new() -> Self { Self { - action: Box::new(action), - action_if_err: Box::new(action_if_err), - has_action_if_err, + action: None, + action_if_err: None, description: None, status: Status::Neutral, } } - fn run(&mut self, interactive: bool) -> Status { - if let Some(ret) = (self.action)() { - self.description = Some(ret.0); - self.status = ret.1; - } - if self.status == Status::Error && interactive && self.has_action_if_err { + fn action ActionResult + 'static>(mut self, action: F) -> Self { + self.action = Some(Box::new(action)); + self + } + + // fn action_if_err ActionResult + 'static>(mut self, action: F) -> Self { + // self.action_if_err = Some(Box::new(action)); + // self + // } + + fn description>(mut self, description: S) -> Self { + self.description = Some(description.as_ref().to_string()); + self + } + + fn run_action(&mut self) { + let mut res = ActionResult::None; + if let Some(action) = &mut self.action { + res = action(); + } + self.apply_action_result(res); + } + + fn run_action_if_err(&mut self) { + let mut res = ActionResult::None; + if let Some(action) = &mut self.action_if_err { + res = action(); + } + self.apply_action_result(res); + } + + fn apply_action_result(&mut self, result: ActionResult) { + match result { + ActionResult::Full { + description, + status, + } => { + self.description = Some(description); + self.status = status; + } + ActionResult::Description(description) => { + self.description = Some(description); + } + ActionResult::None => {} + } + } + + fn run(&mut self, interactive: bool) -> Status { + self.run_action(); + + if self.status == Status::Error && interactive && self.action_if_err.is_some() { if let Some(description) = &self.description { let confirmed = Confirm::with_theme(&ColorfulTheme::default()) .with_prompt(format!( @@ -163,13 +252,11 @@ impl SectionItem { .interact() .unwrap_or(false); if confirmed { - if let Some(ret) = (self.action_if_err)() { - self.description = Some(ret.0); - self.status = ret.1; - } + self.run_action_if_err() } } } + self.status } } @@ -192,12 +279,7 @@ impl Section<'_> { } let status_str = format!("[{status}]"); - let status = match status { - Status::Neutral => status_str.normal(), - Status::Success => status_str.green(), - Status::Warning => status_str.yellow(), - Status::Error => status_str.red(), - }; + let status = status.color(status_str); println!(); println!("{} {}", status, self.label.bold().yellow()); @@ -239,7 +321,7 @@ pub fn command(options: Options) -> Result<()> { }; environment.items.extend(env_system::items()); environment.items.extend(env_rust::items()); - let (items, yarn_version) = env_nodejs::items(&metadata); + let items = env_nodejs::items(&metadata); environment.items.extend(items); let mut packages = Section { @@ -252,7 +334,7 @@ pub fn command(options: Options) -> Result<()> { .extend(packages_rust::items(app_dir, tauri_dir.clone())); packages .items - .extend(packages_nodejs::items(app_dir, &metadata, yarn_version)); + .extend(packages_nodejs::items(app_dir, &metadata)); let mut app = Section { label: "App", diff --git a/tooling/cli/src/info/packages_nodejs.rs b/tooling/cli/src/info/packages_nodejs.rs index 217ce34e2..13cbb7e80 100644 --- a/tooling/cli/src/info/packages_nodejs.rs +++ b/tooling/cli/src/info/packages_nodejs.rs @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use super::{cross_command, VersionMetadata}; -use super::{SectionItem, Status}; +use super::SectionItem; +use super::{cross_command, env_nodejs::manager_version, VersionMetadata}; use colored::Colorize; use serde::Deserialize; use std::fmt::Display; @@ -241,11 +241,7 @@ fn get_package_manager>(app_dir_entries: &[T]) -> PackageManager { } } -pub fn items( - app_dir: Option<&PathBuf>, - metadata: &VersionMetadata, - yarn_version: Option, -) -> Vec { +pub fn items(app_dir: Option<&PathBuf>, metadata: &VersionMetadata) -> Vec { let mut package_manager = PackageManager::Npm; if let Some(app_dir) = &app_dir { let app_dir_entries = std::fs::read_dir(app_dir) @@ -256,7 +252,7 @@ pub fn items( } if package_manager == PackageManager::Yarn - && yarn_version + && manager_version("yarn") .map(|v| v.chars().next().map(|c| c > '1').unwrap_or_default()) .unwrap_or(false) { @@ -270,46 +266,40 @@ pub fn items( ("@tauri-apps/cli", Some(metadata.js_cli.version.clone())), ] { let app_dir = app_dir.clone(); - let item = SectionItem::new( - move || { - let version = version.clone().unwrap_or_else(|| { - npm_package_version(&package_manager, package, &app_dir) - .unwrap_or_default() - .unwrap_or_default() - }); - let latest_ver = npm_latest_version(&package_manager, package) + let item = SectionItem::new().action(move || { + let version = version.clone().unwrap_or_else(|| { + npm_package_version(&package_manager, package, &app_dir) .unwrap_or_default() - .unwrap_or_default(); + .unwrap_or_default() + }); + let latest_ver = npm_latest_version(&package_manager, package) + .unwrap_or_default() + .unwrap_or_default(); - Some(( - if version.is_empty() { - format!("{} {}: not installed!", package, "[NPM]".dimmed()) + if version.is_empty() { + format!("{} {}: not installed!", package, "".green()) + } else { + format!( + "{} {}: {}{}", + package, + "[NPM]".dimmed(), + version, + if !(version.is_empty() || latest_ver.is_empty()) { + let version = semver::Version::parse(version.as_str()).unwrap(); + let target_version = semver::Version::parse(latest_ver.as_str()).unwrap(); + + if version < target_version { + format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green()) + } else { + "".into() + } } else { - format!( - "{} {}: {}{}", - package, - "[NPM]".dimmed(), - version, - if !(version.is_empty() || latest_ver.is_empty()) { - let version = semver::Version::parse(version.as_str()).unwrap(); - let target_version = semver::Version::parse(latest_ver.as_str()).unwrap(); - - if version < target_version { - format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green()) - } else { - "".into() - } - } else { - "".into() - } - ) - }, - Status::Neutral, - )) - }, - || None, - false, - ); + "".into() + } + ) + } + .into() + }); items.push(item); } diff --git a/tooling/cli/src/info/packages_rust.rs b/tooling/cli/src/info/packages_rust.rs index 30359c043..0386ca4b2 100644 --- a/tooling/cli/src/info/packages_rust.rs +++ b/tooling/cli/src/info/packages_rust.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use super::{SectionItem, Status}; +use super::{ActionResult, SectionItem}; use crate::interface::rust::get_workspace_dir; use colored::Colorize; use serde::Deserialize; @@ -212,96 +212,58 @@ pub fn items(app_dir: Option<&PathBuf>, tauri_dir: Option) -> Vec { - let version = semver::Version::parse(&version_string).unwrap(); - let target_version = semver::Version::parse(&target_version).unwrap(); - if version < target_version { - Some(format!( - " ({}, latest: {})", - "outdated".yellow(), - target_version.to_string().green() - )) - } else { - None - } + if version < target_version { + format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green()) + } else { + "".into() + } + } else { + "".into() + } + ) + .into() + } else { + ActionResult::None } - None => None, - }; - - items.push(SectionItem::new( - move || { - Some(( - format!( - "{} {}: {}{}", - dep, - "[RUST]".dimmed(), - version_string, - version_suffix - .clone() - .map(|s| format!(", {s}")) - .unwrap_or_else(|| "".into()) - ), - Status::Neutral, - )) - }, - || None, - false, - )); - } else { - items.push(SectionItem::new( - move || { - Some(( - format!("tauri-cli {}: not installed!", "[RUST]".dimmed()), - Status::Neutral, - )) - }, - || None, - false, - )); - } - } + }) + .unwrap_or_default() + }); + items.push(tauri_cli_rust_item); items } From 94bef1c705c20edd1998ad00bd2b96f9dd7fb482 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:48:30 -0300 Subject: [PATCH 095/104] chore(deps) Update Tauri CLI (1.x) (#7641) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lucas Nogueira --- tooling/cli/Cargo.lock | 332 +++++++++--------- tooling/cli/Cargo.toml | 30 +- tooling/cli/node/Cargo.toml | 2 +- .../jest/fixtures/app/src-tauri/Cargo.toml | 2 +- tooling/cli/src/helpers/web_dev_server.rs | 18 +- 5 files changed, 194 insertions(+), 190 deletions(-) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 81489417c..0ff20a1e0 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -157,26 +157,15 @@ checksum = "d67af77d68a931ecd5cbd8a3b5987d63a1d1d1278f7f6a60ae33db485cdebb69" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", "syn 2.0.38", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -185,13 +174,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.5.17" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", - "base64 0.13.1", + "base64", "bitflags 1.3.2", "bytes", "futures-util", @@ -204,24 +193,25 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", + "rustversion", "serde", "serde_json", + "serde_path_to_error", "serde_urlencoded", - "sha-1", + "sha1", "sync_wrapper", "tokio", "tokio-tungstenite", "tower", - "tower-http", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.2.9" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", @@ -229,6 +219,7 @@ dependencies = [ "http", "http-body", "mime", + "rustversion", "tower-layer", "tower-service", ] @@ -248,12 +239,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.4" @@ -295,9 +280,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "block-buffer" @@ -491,16 +476,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "common-path" version = "1.0.0" @@ -737,11 +712,18 @@ dependencies = [ ] [[package]] -name = "deranged" -version = "0.3.8" +name = "data-encoding" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + +[[package]] +name = "deranged" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ + "powerfmt", "serde", ] @@ -852,12 +834,12 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" dependencies = [ - "atty", "humantime", + "is-terminal", "log", "regex", "termcolor", @@ -906,9 +888,9 @@ dependencies = [ [[package]] name = "fancy-regex" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0678ab2d46fa5195aaf59ad034c083d351377d4af57f3e073c074d0da3e3c766" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" dependencies = [ "bit-set", "regex", @@ -992,9 +974,9 @@ dependencies = [ [[package]] name = "fraction" -version = "0.12.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa5de57a62c2440ece64342ea59efb7171aa7d016faf8dfcb8795066a17146b" +checksum = "3027ae1df8d41b4bed2241c8fdad4acc1e7af60c8e17743534b545e77182d678" dependencies = [ "lazy_static", "num", @@ -1105,8 +1087,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -1217,15 +1201,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.3" @@ -1283,12 +1258,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - [[package]] name = "httparse" version = "1.8.0" @@ -1333,16 +1302,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -1497,25 +1466,25 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "rustix", "windows-sys 0.48.0", ] [[package]] name = "iso8601" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "296af15e112ec6dc38c9fd3ae027b5337a75466e8eed757bd7d5cf742ea85eb6" +checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" dependencies = [ "nom", ] [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] @@ -1584,22 +1553,23 @@ dependencies = [ [[package]] name = "jsonschema" -version = "0.16.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca9e2b45609132ae2214d50482c03aeee78826cd6fd53a8940915b81acedf16" +checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978" dependencies = [ "ahash", "anyhow", - "base64 0.13.1", + "base64", "bytecount", "clap", "fancy-regex", "fraction", + "getrandom 0.2.10", "iso8601", "itoa 1.0.9", - "lazy_static", "memchr", "num-cmp", + "once_cell", "parking_lot", "percent-encoding", "regex", @@ -1709,9 +1679,9 @@ checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1754,9 +1724,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.5.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "md5" @@ -1793,9 +1763,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minisign" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23ef13ff1d745b1e52397daaa247e333c607f3cff96d4df2b798dc252db974b" +checksum = "d2b6f58413c6cee060115673578e47271838f3c87cb9322c61a3bcd6d740b7d2" dependencies = [ "getrandom 0.2.10", "rpassword", @@ -1830,7 +1800,7 @@ version = "2.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd063c93b900149304e3ba96ce5bf210cd4f81ef5eb80ded0d100df3e85a3ac0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "ctor 0.2.5", "napi-derive", "napi-sys", @@ -1911,7 +1881,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cfg-if", "libc", ] @@ -1938,7 +1908,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "crossbeam-channel", "filetime", "fsevent-sys", @@ -2049,7 +2019,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", ] @@ -2080,7 +2050,7 @@ version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -2170,13 +2140,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -2417,7 +2387,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ - "base64 0.21.4", + "base64", "indexmap 1.9.3", "line-wrap", "quick-xml", @@ -2450,6 +2420,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2623,6 +2599,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -2636,9 +2621,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -2648,9 +2633,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -2659,9 +2644,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" @@ -2669,7 +2654,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.4", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2761,7 +2746,7 @@ version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", @@ -2790,6 +2775,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "ryu" version = "1.0.15" @@ -2991,6 +2982,25 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +dependencies = [ + "itoa 1.0.9", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3005,11 +3015,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ - "base64 0.21.4", + "base64", "chrono", "hex", "indexmap 1.9.3", @@ -3022,9 +3032,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling", "proc-macro2", @@ -3064,17 +3074,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha1" version = "0.10.6" @@ -3399,7 +3398,7 @@ version = "1.5.4" dependencies = [ "anyhow", "axum", - "base64 0.21.4", + "base64", "cc", "clap", "clap_complete", @@ -3436,7 +3435,7 @@ dependencies = [ "tauri-icns", "tauri-utils", "tokio", - "toml", + "toml 0.7.8", "toml_edit", "unicode-width", "ureq", @@ -3491,10 +3490,10 @@ dependencies = [ "serde_with", "serialize-to-javascript", "thiserror", - "toml", + "toml 0.5.11", "url", "walkdir", - "windows 0.39.0", + "windows", ] [[package]] @@ -3579,12 +3578,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa 1.0.9", + "powerfmt", "serde", "time-core", "time-macros", @@ -3650,9 +3650,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.17.2" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", @@ -3684,14 +3684,37 @@ dependencies = [ ] [[package]] -name = "toml_edit" -version = "0.14.4" +name = "toml" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ - "combine", - "indexmap 1.9.3", - "itertools", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.0.2", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] @@ -3710,25 +3733,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags 1.3.2", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -3743,11 +3747,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-core", @@ -3755,9 +3758,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -3779,18 +3782,18 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" -version = "0.17.3" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", + "data-encoding", "http", "httparse", "log", "rand 0.8.5", - "sha-1", + "sha1", "thiserror", "url", "utf-8", @@ -3863,7 +3866,7 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3" dependencies = [ - "base64 0.21.4", + "base64", "flate2", "log", "native-tls", @@ -4121,10 +4124,10 @@ dependencies = [ ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] @@ -4307,6 +4310,15 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "winnow" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 4089e9129..65cc30cc4 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -40,7 +40,7 @@ path = "src/main.rs" [dependencies] clap_complete = "4" -clap = { version = "4.0", features = [ "derive" ] } +clap = { version = "4.3", features = [ "derive" ] } anyhow = "1.0" tauri-bundler = { version = "1.4.3", path = "../bundler", default-features = false } colored = "2.0" @@ -50,38 +50,38 @@ serde_json = "1.0" notify = "6.0" notify-debouncer-mini = "0.3" shared_child = "1.0" -toml_edit = "0.14" +toml_edit = "0.19" json-patch = "1.0" tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] } -toml = "0.5" -jsonschema = "0.16" +toml = "0.7" +jsonschema = "0.17" handlebars = "4.3" include_dir = "0.7" -minisign = "=0.7.3" -base64 = "0.21.0" -ureq = { version = "2.5", default-features = false, features = [ "gzip" ] } +minisign = "=0.7.5" +base64 = "0.21.2" +ureq = { version = "2.7", default-features = false, features = [ "gzip" ] } os_info = "3" semver = "1.0" -regex = "1.6.0" +regex = "1.9.3" unicode-width = "0.1" -zeroize = "1.5" +zeroize = "1.6" heck = { version = "0.4", features = [ "unicode" ] } dialoguer = "0.10" -url = { version = "2.3", features = [ "serde" ] } +url = { version = "2.4", features = [ "serde" ] } os_pipe = "1" ignore = "0.4" -ctrlc = "3.2" -log = { version = "0.4.17", features = [ "kv_unstable", "kv_unstable_std" ] } -env_logger = "0.9.1" +ctrlc = "3.4" +log = { version = "0.4.20", features = [ "kv_unstable", "kv_unstable_std" ] } +env_logger = "0.10.0" icns = { package = "tauri-icns", version = "0.1" } image = { version = "0.24", default-features = false, features = [ "ico" ] } -axum = { version = "0.5.16", features = [ "ws" ] } +axum = { version = "0.6.20", features = [ "ws" ] } html5ever = "0.26" kuchiki = { package = "kuchikiki", version = "0.8" } tokio = { version = "1", features = [ "macros", "sync" ] } common-path = "1" serde-value = "0.7.0" -itertools = "0.10" +itertools = "0.11" [target."cfg(windows)".dependencies] winapi = { version = "0.3", features = [ "handleapi", "processenv", "winbase", "wincon", "winnt" ] } diff --git a/tooling/cli/node/Cargo.toml b/tooling/cli/node/Cargo.toml index 939695daa..79618c4f6 100644 --- a/tooling/cli/node/Cargo.toml +++ b/tooling/cli/node/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] napi = { version = "2.13", default-features = false, features = ["napi4"] } napi-derive = "2.13" tauri-cli = { path = "..", default-features = false } -log = "0.4.19" +log = "0.4.20" [build-dependencies] napi-build = "2.0" diff --git a/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml b/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml index d12609718..9a1ed09ae 100644 --- a/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml +++ b/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml @@ -24,7 +24,7 @@ icon = [ tauri-build = { path = "../../../../../../../../core/tauri-build", features = [] } [dependencies] -serde_json = "1.0.96" +serde_json = "1.0.105" serde = "1.0" serde_derive = "1.0" tauri = { path = "../../../../../../../../core/tauri", features = ["api-all"] } diff --git a/tooling/cli/src/helpers/web_dev_server.rs b/tooling/cli/src/helpers/web_dev_server.rs index d39f1579e..3db17ea6d 100644 --- a/tooling/cli/src/helpers/web_dev_server.rs +++ b/tooling/cli/src/helpers/web_dev_server.rs @@ -4,7 +4,7 @@ use axum::{ extract::{ws::WebSocket, WebSocketUpgrade}, - http::{header::CONTENT_TYPE, Request, StatusCode}, + http::{header::CONTENT_TYPE, StatusCode}, response::IntoResponse, routing::get, Router, Server, @@ -67,17 +67,9 @@ pub fn start_dev_server>(path: P, port: Option) -> crate::Re }); let state = Arc::new(State { serve_dir, tx }); + let state_ = state.clone(); let router = Router::new() - .fallback( - Router::new().nest( - "/", - get({ - let state = state.clone(); - move |req| handler(req, state) - }) - .handle_error(|_error| async move { StatusCode::INTERNAL_SERVER_ERROR }), - ), - ) + .fallback(move |uri| handler(uri, state_)) .route( "/_tauri-cli/ws", get(move |ws: WebSocketUpgrade| async move { @@ -130,8 +122,8 @@ pub fn start_dev_server>(path: P, port: Option) -> crate::Re server_url_rx.recv().unwrap() } -async fn handler(req: Request, state: Arc) -> impl IntoResponse { - let uri = req.uri().to_string(); +async fn handler(uri: axum::http::Uri, state: Arc) -> impl IntoResponse { + let uri = uri.to_string(); let uri = if uri == "/" { &uri } else { From be8e5aa3071d9bc5d0bd24647e8168f312d11c8d Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 18 Oct 2023 12:29:12 -0300 Subject: [PATCH 096/104] fix(cli): duplicated newlines on child process output (#8042) --- .changes/fix-cmd-output.md | 7 +++++++ examples/api/src-tauri/Cargo.lock | 2 +- tooling/bundler/src/bundle/common.rs | 24 +++++++++++------------ tooling/cli/src/interface/rust/desktop.rs | 3 --- tooling/cli/src/lib.rs | 23 +++++++++++----------- 5 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 .changes/fix-cmd-output.md diff --git a/.changes/fix-cmd-output.md b/.changes/fix-cmd-output.md new file mode 100644 index 000000000..53176bb07 --- /dev/null +++ b/.changes/fix-cmd-output.md @@ -0,0 +1,7 @@ +--- +"@tauri-apps/cli": patch:bug +"tauri-cli": patch:bug +"tauri-bundler": patch:bug +--- + +Fixes duplicated newlines on command outputs. diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 80d411a36..96070ddbe 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3529,7 +3529,7 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tauri" -version = "1.5.1" +version = "1.5.2" dependencies = [ "anyhow", "base64 0.21.2", diff --git a/tooling/bundler/src/bundle/common.rs b/tooling/bundler/src/bundle/common.rs index 4269825df..712e3ebc9 100644 --- a/tooling/bundler/src/bundle/common.rs +++ b/tooling/bundler/src/bundle/common.rs @@ -8,7 +8,7 @@ use log::debug; use std::{ ffi::OsStr, fs::{self, File}, - io::{self, BufReader, BufWriter}, + io::{self, BufRead, BufReader, BufWriter}, path::Path, process::{Command, ExitStatus, Output, Stdio}, sync::{Arc, Mutex}, @@ -165,16 +165,15 @@ impl CommandExt for Command { let stdout_lines = Arc::new(Mutex::new(Vec::new())); let stdout_lines_ = stdout_lines.clone(); std::thread::spawn(move || { - let mut buf = Vec::new(); + let mut line = String::new(); let mut lines = stdout_lines_.lock().unwrap(); loop { - buf.clear(); - if let Ok(0) = tauri_utils::io::read_line(&mut stdout, &mut buf) { + line.clear(); + if let Ok(0) = stdout.read_line(&mut line) { break; } - debug!(action = "stdout"; "{}", String::from_utf8_lossy(&buf)); - lines.extend(buf.clone()); - lines.push(b'\n'); + debug!(action = "stdout"; "{}", &line[0..line.len() - 1]); + lines.extend(line.as_bytes().to_vec()); } }); @@ -182,16 +181,15 @@ impl CommandExt for Command { let stderr_lines = Arc::new(Mutex::new(Vec::new())); let stderr_lines_ = stderr_lines.clone(); std::thread::spawn(move || { - let mut buf = Vec::new(); + let mut line = String::new(); let mut lines = stderr_lines_.lock().unwrap(); loop { - buf.clear(); - if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) { + line.clear(); + if let Ok(0) = stderr.read_line(&mut line) { break; } - debug!(action = "stderr"; "{}", String::from_utf8_lossy(&buf)); - lines.extend(buf.clone()); - lines.push(b'\n'); + debug!(action = "stderr"; "{}", &line[0..line.len() - 1]); + lines.extend(line.as_bytes().to_vec()); } }); diff --git a/tooling/cli/src/interface/rust/desktop.rs b/tooling/cli/src/interface/rust/desktop.rs index dc6771e6b..a938acd15 100644 --- a/tooling/cli/src/interface/rust/desktop.rs +++ b/tooling/cli/src/interface/rust/desktop.rs @@ -207,9 +207,6 @@ fn build_dev_app( break; } let _ = io_stderr.write_all(&buf); - if !buf.ends_with(&[b'\r']) { - let _ = io_stderr.write_all(b"\n"); - } lines.push(String::from_utf8_lossy(&buf).into_owned()); } }); diff --git a/tooling/cli/src/lib.rs b/tooling/cli/src/lib.rs index faf416d2d..801033356 100644 --- a/tooling/cli/src/lib.rs +++ b/tooling/cli/src/lib.rs @@ -24,6 +24,7 @@ use std::io::{BufReader, Write}; use std::process::{exit, Command, ExitStatus, Output, Stdio}; use std::{ ffi::OsString, + io::BufRead, sync::{Arc, Mutex}, }; @@ -226,16 +227,15 @@ impl CommandExt for Command { let stdout_lines = Arc::new(Mutex::new(Vec::new())); let stdout_lines_ = stdout_lines.clone(); std::thread::spawn(move || { - let mut buf = Vec::new(); + let mut line = String::new(); let mut lines = stdout_lines_.lock().unwrap(); loop { - buf.clear(); - if let Ok(0) = tauri_utils::io::read_line(&mut stdout, &mut buf) { + line.clear(); + if let Ok(0) = stdout.read_line(&mut line) { break; } - debug!(action = "stdout"; "{}", String::from_utf8_lossy(&buf)); - lines.extend(buf.clone()); - lines.push(b'\n'); + debug!(action = "stdout"; "{}", &line[0..line.len() - 1]); + lines.extend(line.as_bytes().to_vec()); } }); @@ -243,16 +243,15 @@ impl CommandExt for Command { let stderr_lines = Arc::new(Mutex::new(Vec::new())); let stderr_lines_ = stderr_lines.clone(); std::thread::spawn(move || { - let mut buf = Vec::new(); + let mut line = String::new(); let mut lines = stderr_lines_.lock().unwrap(); loop { - buf.clear(); - if let Ok(0) = tauri_utils::io::read_line(&mut stderr, &mut buf) { + line.clear(); + if let Ok(0) = stderr.read_line(&mut line) { break; } - debug!(action = "stderr"; "{}", String::from_utf8_lossy(&buf)); - lines.extend(buf.clone()); - lines.push(b'\n'); + debug!(action = "stderr"; "{}", &line[0..line.len() - 1]); + lines.extend(line.as_bytes().to_vec()); } }); From de985bad18da3231bd352f0a6c29d9325ba1709d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 13:26:24 -0300 Subject: [PATCH 097/104] chore(deps) Update Tauri Bundler (1.x) (#7639) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- tooling/bundler/Cargo.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index b09283ea7..18303a9ef 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -18,21 +18,21 @@ exclude = [ "CHANGELOG.md", "/target", "rustfmt.toml" ] [dependencies] tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "resources" ] } -image = "0.24.6" +image = "0.24.7" libflate = "1.4" anyhow = "1.0" thiserror = "1.0" serde_json = "1.0" serde = { version = "1.0", features = [ "derive" ] } strsim = "0.10.0" -tar = "0.4.38" +tar = "0.4.40" walkdir = "2" -handlebars = "4.3" -tempfile = "3.6.0" -log = { version = "0.4.19", features = [ "kv_unstable" ] } +handlebars = "4.4" +tempfile = "3.8.0" +log = { version = "0.4.20", features = [ "kv_unstable" ] } dirs-next = "2.0" os_pipe = "1" -ureq = { version = "2.6", default-features = false } +ureq = { version = "2.8", default-features = false } native-tls = { version = "0.2", optional = true } hex = "0.4" semver = "1" @@ -43,7 +43,7 @@ dunce = "1" [target."cfg(target_os = \"windows\")".dependencies] uuid = { version = "1", features = [ "v4", "v5" ] } -winreg = "0.50" +winreg = "0.51" glob = "0.3" [target."cfg(target_os = \"windows\")".dependencies.windows-sys] From 2da043f04dae10a7d92a9311af1caa6290bdce0c Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Thu, 19 Oct 2023 15:48:16 +0200 Subject: [PATCH 098/104] fix: improve French translations for nsis installer (cherry-pick #7523 on 1.x) (#8058) Co-authored-by: Stanislas Michalak --- .../templates/nsis-languages/French.nsh | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/templates/nsis-languages/French.nsh b/tooling/bundler/src/bundle/windows/templates/nsis-languages/French.nsh index a3656a1d4..4795a0b8e 100644 --- a/tooling/bundler/src/bundle/windows/templates/nsis-languages/French.nsh +++ b/tooling/bundler/src/bundle/windows/templates/nsis-languages/French.nsh @@ -1,27 +1,27 @@ LangString addOrReinstall ${LANG_FRENCH} "Ajouter/Réinstaller un composant." LangString alreadyInstalled ${LANG_FRENCH} "Déja installé." -LangString alreadyInstalledLong ${LANG_FRENCH} "${PRODUCTNAME} ${VERSION} est déja installé. Selectionne l'opération que tu souhaite effectuer puis clique sur Suivant pour continuer." -LangString appRunning ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution! Ferme le et recommence." -LangString appRunningOkKill ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution!$\nClique sur OK pour fermer l'application." -LangString chooseMaintenanceOption ${LANG_FRENCH} "Choisie l'option de maintenance à effectuer." -LangString choowHowToInstall ${LANG_FRENCH} "Choisie comment tu veux installer ${PRODUCTNAME}." +LangString alreadyInstalledLong ${LANG_FRENCH} "${PRODUCTNAME} ${VERSION} est déja installé. Sélectionnez l'opération que vous souhaitez effectuer, puis cliquez sur Suivant pour continuer." +LangString appRunning ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution. Veuillez fermer l'application avant de réessayer." +LangString appRunningOkKill ${LANG_FRENCH} "${PRODUCTNAME} est en cours d'exécution.$\nCliquez sur OK pour fermer l'application." +LangString chooseMaintenanceOption ${LANG_FRENCH} "Veuillez choisir l'option de maintenance à effectuer." +LangString choowHowToInstall ${LANG_FRENCH} "Veuillez choisir l'emplacement d'installation de ${PRODUCTNAME}." LangString createDesktop ${LANG_FRENCH} "Créer un raccourci sur le bureau." LangString dontUninstall ${LANG_FRENCH} "Ne pas désinstaller" -LangString dontUninstallDowngrade ${LANG_FRENCH} "Ne pas désinstaller (Revenir à une ancienne version sans désinstallation est désactivé pour cette installateur)" -LangString failedToKillApp ${LANG_FRENCH} "La fermeture de ${PRODUCTNAME} a échoué. Ferme le et reessaye" +LangString dontUninstallDowngrade ${LANG_FRENCH} "Ne pas désinstaller (revenir à une ancienne version sans désinstallation est désactivé pour cet installateur)" +LangString failedToKillApp ${LANG_FRENCH} "La fermeture de ${PRODUCTNAME} a échoué. Veuillez fermer l'application et réessayer." LangString installingWebview2 ${LANG_FRENCH} "Installation de WebView2..." -LangString newerVersionInstalled ${LANG_FRENCH} "Une version plus récente de ${PRODUCTNAME} est déja installé! Il n'est pas recommandé d'installer une ancienne version. Si tu veux vraiment installer cett ancienne version, il est conseillé de désinstaller la version courante en premier. Selectionne l'opération que tu souhaite effectuer puis clique sur Suivant pour continer" +LangString newerVersionInstalled ${LANG_FRENCH} "Une version plus récente de ${PRODUCTNAME} est déja installée. Il n'est pas recommandé d'installer une ancienne version. Si vous souhaitez installer cette ancienne version, il est conseillé de désinstaller la version courante en premier. Veuillez sélectionner l'opération que vous souhaitez effectuer, puis cliquez sur Suivant pour continer." LangString older ${LANG_FRENCH} "ancien" -LangString olderOrUnknownVersionInstalled ${LANG_FRENCH} "La version $R4 de ${PRODUCTNAME} est installé sur le système. il est recommandé de désinstaller la version actuelle avant d'installer celle-ci. Selectionne l'opération que tu soute effectuer puis clique sur Suivant pour continuer." -LangString silentDowngrades ${LANG_FRENCH} "Revenir à une version antérieur est désactivé pour cet installateur, impossible de continer avec l'installation silencieuse, utilise l'interface graphique à la place.$\n" -LangString unableToUninstall ${LANG_FRENCH} "Impossible de désinstaller!" -LangString uninstallApp ${LANG_FRENCH} "Désinstalle ${PRODUCTNAME}" -LangString uninstallBeforeInstalling ${LANG_FRENCH} "Désinstalle avant d'installer" +LangString olderOrUnknownVersionInstalled ${LANG_FRENCH} "La version $R4 de ${PRODUCTNAME} est installée sur le système. Il est recommandé de désinstaller la version actuelle avant d'installer celle-ci. Sélectionnez l'opération que vous souhaitez effectuer, puis cliquez sur Suivant pour continuer." +LangString silentDowngrades ${LANG_FRENCH} "Revenir à une version antérieure est désactivé pour cet installateur. Impossible de continuer avec l'installation silencieuse, veuillez utiliser l'interface graphique à la place.$\n" +LangString unableToUninstall ${LANG_FRENCH} "Impossible de désinstaller le programme !" +LangString uninstallApp ${LANG_FRENCH} "Désinstaller ${PRODUCTNAME}" +LangString uninstallBeforeInstalling ${LANG_FRENCH} "Désinstaller avant d'installer" LangString unknown ${LANG_FRENCH} "inconnu" -LangString webview2AbortError ${LANG_FRENCH} "L'installation de WebView2 a échoué! L'application ne peut s'éxécuter sans WebView2. Essaye de redémarrer l'installation." -LangString webview2DownloadError ${LANG_FRENCH} "Erreur: le téléchargement de WebView2 a échoué - $0" -LangString webview2DownloadSuccess ${LANG_FRENCH} "Le téléchargement du comosant WebView2 a été téléchargé avec succès!" -LangString webview2Downloading ${LANG_FRENCH} "Téléchargement du composant WebView2 ..." -LangString webview2InstallError ${LANG_FRENCH} "Erreur: L'installation de WebView2 a échoué avec le code erreur $1" +LangString webview2AbortError ${LANG_FRENCH} "L'installation de WebView2 a échoué ! L'application ne peut s'éxécuter sans WebView2. Veuillez essayer de redémarrer l'installation." +LangString webview2DownloadError ${LANG_FRENCH} "Erreur : le téléchargement de WebView2 a échoué - $0" +LangString webview2DownloadSuccess ${LANG_FRENCH} "Le composant WebView2 a été téléchargé avec succès !" +LangString webview2Downloading ${LANG_FRENCH} "Téléchargement du composant WebView2..." +LangString webview2InstallError ${LANG_FRENCH} "Erreur : l'installation de WebView2 a échoué avec le code d'erreur $1" LangString webview2InstallSuccess ${LANG_FRENCH} "L'installation de WebView2 a réussi" LangString deleteAppData ${LANG_FRENCH} "Supprimer les données de l'application" From 9bead42dbca0fb6dd7ea0b6bfb2f2308a5c5f992 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 19 Oct 2023 12:43:48 -0300 Subject: [PATCH 099/104] feat(cli): allow rotating updater private key (#8059) --- .changes/allow-updater-key-rotation.md | 6 +++++ .github/workflows/test-core.yml | 3 ++- core/tests/app-updater/tauri.conf.json | 2 +- core/tests/app-updater/tests/update.rs | 33 ++++++++++++++++++++++++-- tooling/cli/Cargo.lock | 14 +++++++++-- tooling/cli/src/build.rs | 6 ++--- 6 files changed, 55 insertions(+), 9 deletions(-) create mode 100644 .changes/allow-updater-key-rotation.md diff --git a/.changes/allow-updater-key-rotation.md b/.changes/allow-updater-key-rotation.md new file mode 100644 index 000000000..5a2d10820 --- /dev/null +++ b/.changes/allow-updater-key-rotation.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Allow rotating the updater private key. diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 0d9bd59da..5ce515d8e 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -88,6 +88,7 @@ jobs: cargo update -p system-deps:6.1.2 --precise 6.1.1 cargo update -p toml:0.7.8 --precise 0.7.3 cargo update -p toml_edit:0.19.15 --precise 0.19.8 + cargo update -p embed-resource --precise 2.3.0 cargo update -p toml_datetime --precise 0.6.1 cargo update -p serde_spanned --precise 0.6.1 cargo update -p winnow --precise 0.4.1 @@ -100,7 +101,7 @@ jobs: cargo update -p is-terminal --precise 0.4.7 cargo update -p colored --precise 2.0.2 cargo update -p tempfile --precise 3.6.0 - cargo update -p serde_with:3.3.0 --precise 3.0.0 + cargo update -p serde_with:3.4.0 --precise 3.0.0 cargo update -p tokio --precise 1.29.0 cargo update -p flate2 --precise 1.0.26 cargo update -p h2 --precise 0.3.20 diff --git a/core/tests/app-updater/tauri.conf.json b/core/tests/app-updater/tauri.conf.json index 1de6eb67e..273e0e7fa 100644 --- a/core/tests/app-updater/tauri.conf.json +++ b/core/tests/app-updater/tauri.conf.json @@ -34,7 +34,7 @@ "updater": { "active": true, "dialog": false, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", + "pubkey": "dummy", "endpoints": ["http://localhost:3007"], "windows": { "installMode": "quiet" diff --git a/core/tests/app-updater/tests/update.rs b/core/tests/app-updater/tests/update.rs index dd3024367..a21821467 100644 --- a/core/tests/app-updater/tests/update.rs +++ b/core/tests/app-updater/tests/update.rs @@ -14,15 +14,30 @@ use std::{ use serde::Serialize; const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg=="; +// const UPDATER_PUBLIC_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK"; + +const UPDATER_PRIVATE_KEY_NEXT: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5Vm1kaFhCeEh0N2svRy85djJQbmNGTnk3TUQ1emJRWTF3Y01INW9OZjJwSUFBQkFBQUFBQUFBQUFBQUlBQUFBQS9YRStJU1RjK1JmUS9QK0F3WmdaMFE0RmUrcVY1RXhkL0VaYVZEeTVDNHREWnE2Y21yTVZCcW0rM1lKOUVLd1p1MWVPVFN5WmZBZEUxYnVtT3BnWW93TDZZRnYra1FUblFXazBVempRUFZOTnFRSjdod05LMjhvK3M0VGhoR0V4YWkzWUpOQXBIcEU9Cg=="; +const UPDATER_PUBLIC_KEY_NEXT: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE3RjlEQzI0MjEzRTcxRkQKUldUOWNUNGhKTno1RjZtKzNZSjlFS3dadTFlT1RTeVpmQWRFMWJ1bU9wZ1lvd0w2WUZ2K2tRVG4K"; #[derive(Serialize)] struct PackageConfig { version: &'static str, } +#[derive(Serialize)] +struct UpdaterConfig { + pubkey: &'static str, +} + +#[derive(Serialize)] +struct TauriConfig { + updater: UpdaterConfig, +} + #[derive(Serialize)] struct Config { package: PackageConfig, + tauri: TauriConfig, } #[derive(Serialize)] @@ -57,6 +72,7 @@ fn get_cli_bin_path(cli_dir: &Path, debug: bool) -> Option { fn build_app( cli_bin_path: &Path, cwd: &Path, + envs: Vec<(&str, &str)>, config: &Config, bundle_updater: bool, target: BundleTarget, @@ -78,7 +94,7 @@ fn build_app( command.args(["--bundles", "msi", "nsis"]); command - .env("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY) + .envs(envs) .env("TAURI_KEY_PASSWORD", "") .args(["--bundles", "updater"]); } else { @@ -197,12 +213,18 @@ fn update_app() { let mut config = Config { package: PackageConfig { version: "1.0.0" }, + tauri: TauriConfig { + updater: UpdaterConfig { + pubkey: UPDATER_PUBLIC_KEY_NEXT, + }, + }, }; // bundle app update build_app( &cli_bin_path, &manifest_dir, + vec![("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY_NEXT)], &config, true, Default::default(), @@ -285,7 +307,14 @@ fn update_app() { config.package.version = "0.1.0"; // bundle initial app version - build_app(&cli_bin_path, &manifest_dir, &config, false, bundle_target); + build_app( + &cli_bin_path, + &manifest_dir, + vec![("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY)], + &config, + false, + bundle_target, + ); let mut binary_cmd = if cfg!(windows) { Command::new(root_dir.join("target/debug/app-updater.exe")) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 0ff20a1e0..946490191 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -2680,7 +2680,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "winreg 0.50.0", ] [[package]] @@ -3388,7 +3388,7 @@ dependencies = [ "uuid", "walkdir", "windows-sys 0.48.0", - "winreg", + "winreg 0.51.0", "zip", ] @@ -4329,6 +4329,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "xattr" version = "1.0.1" diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index cd51e802d..7cbfea4b8 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -320,9 +320,9 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { // sign our path from environment variables let (signature_path, signature) = sign_file(&secret_key, path)?; if signature.keynum() != public_key.keynum() { - return Err(anyhow::anyhow!( - "The updater secret key from `TAURI_PRIVATE_KEY` does not match the public key defined in `tauri.conf.json > tauri > updater > pubkey`." - )); + log::warn!( + "The updater secret key from `TAURI_PRIVATE_KEY` does not match the public key defined in `tauri.conf.json > tauri > updater > pubkey`. If you are not rotating keys, this means your configuration is wrong and won't be accepted at runtime." + ); } signed_paths.push(signature_path); } From 3880b42d18f218b89998bb5ead1aacfbed9d6202 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 19 Oct 2023 12:56:20 -0300 Subject: [PATCH 100/104] feat(bundler): enhance notarization error message (#7974) --- .changes/improve-notarytool-error-message.md | 5 +++++ tooling/bundler/src/bundle/macos/sign.rs | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .changes/improve-notarytool-error-message.md diff --git a/.changes/improve-notarytool-error-message.md b/.changes/improve-notarytool-error-message.md new file mode 100644 index 000000000..89159430c --- /dev/null +++ b/.changes/improve-notarytool-error-message.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch:enhance +--- + +Include notarytool log output on error message in case notarization fails. diff --git a/tooling/bundler/src/bundle/macos/sign.rs b/tooling/bundler/src/bundle/macos/sign.rs index b9bdee49d..bbdcd55da 100644 --- a/tooling/bundler/src/bundle/macos/sign.rs +++ b/tooling/bundler/src/bundle/macos/sign.rs @@ -306,7 +306,22 @@ pub fn notarize( staple_app(app_bundle_path)?; Ok(()) } else { - Err(anyhow::anyhow!("{log_message}").into()) + if let Ok(output) = Command::new("xcrun") + .args(["notarytool", "log"]) + .arg(&submit_output.id) + .notarytool_args(&auth) + .output_ok() + { + Err( + anyhow::anyhow!( + "{log_message}\nLog:\n{}", + String::from_utf8_lossy(&output.stdout) + ) + .into(), + ) + } else { + Err(anyhow::anyhow!("{log_message}").into()) + } } } else { Err(anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into()) From ae13be2d1713fab957c62f0294e5e2a27b5958c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:48:27 +0000 Subject: [PATCH 101/104] Apply Version Updates From Current Changes (v1) (#8062) Co-authored-by: lucasfernog --- .changes/allow-updater-key-rotation.md | 6 ------ .changes/fix-cmd-output.md | 7 ------- .changes/improve-notarytool-error-message.md | 5 ----- tooling/bundler/CHANGELOG.md | 10 ++++++++++ tooling/bundler/Cargo.toml | 2 +- tooling/cli/CHANGELOG.md | 14 ++++++++++++++ tooling/cli/Cargo.lock | 4 ++-- tooling/cli/Cargo.toml | 4 ++-- tooling/cli/metadata.json | 2 +- tooling/cli/node/CHANGELOG.md | 14 ++++++++++++++ tooling/cli/node/package.json | 2 +- 11 files changed, 45 insertions(+), 25 deletions(-) delete mode 100644 .changes/allow-updater-key-rotation.md delete mode 100644 .changes/fix-cmd-output.md delete mode 100644 .changes/improve-notarytool-error-message.md diff --git a/.changes/allow-updater-key-rotation.md b/.changes/allow-updater-key-rotation.md deleted file mode 100644 index 5a2d10820..000000000 --- a/.changes/allow-updater-key-rotation.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tauri-apps/cli": patch:enhance -"tauri-cli": patch:enhance ---- - -Allow rotating the updater private key. diff --git a/.changes/fix-cmd-output.md b/.changes/fix-cmd-output.md deleted file mode 100644 index 53176bb07..000000000 --- a/.changes/fix-cmd-output.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@tauri-apps/cli": patch:bug -"tauri-cli": patch:bug -"tauri-bundler": patch:bug ---- - -Fixes duplicated newlines on command outputs. diff --git a/.changes/improve-notarytool-error-message.md b/.changes/improve-notarytool-error-message.md deleted file mode 100644 index 89159430c..000000000 --- a/.changes/improve-notarytool-error-message.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": patch:enhance ---- - -Include notarytool log output on error message in case notarization fails. diff --git a/tooling/bundler/CHANGELOG.md b/tooling/bundler/CHANGELOG.md index c253a122c..c055cbc6d 100644 --- a/tooling/bundler/CHANGELOG.md +++ b/tooling/bundler/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[1.4.4] + +### Enhancements + +- [`3880b42d`](https://www.github.com/tauri-apps/tauri/commit/3880b42d18f218b89998bb5ead1aacfbed9d6202)([#7974](https://www.github.com/tauri-apps/tauri/pull/7974)) Include notarytool log output on error message in case notarization fails. + +### Bug Fixes + +- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs. + ## \[1.4.3] ### Bug Fixes diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index 18303a9ef..55e6e0430 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -2,7 +2,7 @@ workspace = { } [package] name = "tauri-bundler" -version = "1.4.3" +version = "1.4.4" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy" diff --git a/tooling/cli/CHANGELOG.md b/tooling/cli/CHANGELOG.md index 65f7e9875..18f62aab5 100644 --- a/tooling/cli/CHANGELOG.md +++ b/tooling/cli/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## \[1.5.5] + +### Enhancements + +- [`9bead42d`](https://www.github.com/tauri-apps/tauri/commit/9bead42dbca0fb6dd7ea0b6bfb2f2308a5c5f992)([#8059](https://www.github.com/tauri-apps/tauri/pull/8059)) Allow rotating the updater private key. + +### Bug Fixes + +- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs. + +### Dependencies + +- Upgraded to `tauri-bundler@1.4.4` + ## \[1.5.4] ### Dependencies diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 946490191..7b7e66fbb 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -3354,7 +3354,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "1.4.3" +version = "1.4.4" dependencies = [ "anyhow", "ar", @@ -3394,7 +3394,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "axum", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 65cc30cc4..801c0a555 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -3,7 +3,7 @@ members = [ "node" ] [package] name = "tauri-cli" -version = "1.5.4" +version = "1.5.5" authors = [ "Tauri Programme within The Commons Conservancy" ] edition = "2021" rust-version = "1.60" @@ -42,7 +42,7 @@ path = "src/main.rs" clap_complete = "4" clap = { version = "4.3", features = [ "derive" ] } anyhow = "1.0" -tauri-bundler = { version = "1.4.3", path = "../bundler", default-features = false } +tauri-bundler = { version = "1.4.4", path = "../bundler", default-features = false } colored = "2.0" once_cell = "1" serde = { version = "1.0", features = [ "derive" ] } diff --git a/tooling/cli/metadata.json b/tooling/cli/metadata.json index b7deb4596..8ad9d6ba3 100644 --- a/tooling/cli/metadata.json +++ b/tooling/cli/metadata.json @@ -1,6 +1,6 @@ { "cli.js": { - "version": "1.5.4", + "version": "1.5.5", "node": ">= 10.0.0" }, "tauri": "1.5.2", diff --git a/tooling/cli/node/CHANGELOG.md b/tooling/cli/node/CHANGELOG.md index 49e7f9ab0..12af690ce 100644 --- a/tooling/cli/node/CHANGELOG.md +++ b/tooling/cli/node/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## \[1.5.5] + +### Enhancements + +- [`9bead42d`](https://www.github.com/tauri-apps/tauri/commit/9bead42dbca0fb6dd7ea0b6bfb2f2308a5c5f992)([#8059](https://www.github.com/tauri-apps/tauri/pull/8059)) Allow rotating the updater private key. + +### Bug Fixes + +- [`be8e5aa3`](https://www.github.com/tauri-apps/tauri/commit/be8e5aa3071d9bc5d0bd24647e8168f312d11c8d)([#8042](https://www.github.com/tauri-apps/tauri/pull/8042)) Fixes duplicated newlines on command outputs. + +### Dependencies + +- Upgraded to `tauri-cli@1.5.5` + ## \[1.5.4] ### Dependencies diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 798168787..08fec7145 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "1.5.4", + "version": "1.5.5", "description": "Command line interface for building Tauri apps", "funding": { "type": "opencollective", From cfe6fa6c91a8cc177d4665ba04dad32ba545159d Mon Sep 17 00:00:00 2001 From: Johannes Velde <17915008+veldhaenchen@users.noreply.github.com> Date: Fri, 20 Oct 2023 00:47:34 +0200 Subject: [PATCH 102/104] feat(lang) added german language (#8061) --- .changes/nsis-german.md | 5 ++++ tooling/bundler/src/bundle/windows/nsis.rs | 1 + .../templates/nsis-languages/German.nsh | 27 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .changes/nsis-german.md create mode 100644 tooling/bundler/src/bundle/windows/templates/nsis-languages/German.nsh diff --git a/.changes/nsis-german.md b/.changes/nsis-german.md new file mode 100644 index 000000000..8425d0cf2 --- /dev/null +++ b/.changes/nsis-german.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:enhance' +--- + +Added German language support to the NSIS bundler. diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 9ce567b42..b0711b31e 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -566,6 +566,7 @@ fn get_lang_data( "bulgarian" => Some(include_str!("./templates/nsis-languages/Bulgarian.nsh")), "dutch" => Some(include_str!("./templates/nsis-languages/Dutch.nsh")), "english" => Some(include_str!("./templates/nsis-languages/English.nsh")), + "german" => Some(include_str!("./templates/nsis-languages/German.nsh")), "japanese" => Some(include_str!("./templates/nsis-languages/Japanese.nsh")), "korean" => Some(include_str!("./templates/nsis-languages/Korean.nsh")), "portuguesebr" => Some(include_str!("./templates/nsis-languages/PortugueseBR.nsh")), diff --git a/tooling/bundler/src/bundle/windows/templates/nsis-languages/German.nsh b/tooling/bundler/src/bundle/windows/templates/nsis-languages/German.nsh new file mode 100644 index 000000000..6247b453c --- /dev/null +++ b/tooling/bundler/src/bundle/windows/templates/nsis-languages/German.nsh @@ -0,0 +1,27 @@ +LangString addOrReinstall ${LANG_GERMAN} "Komponenten hinzufügen/neu installieren" +LangString alreadyInstalled ${LANG_GERMAN} "Bereits installiert" +LangString alreadyInstalledLong ${LANG_GERMAN} "${PRODUCTNAME} ${VERSION} ist bereits installiert. Wählen Sie den gewünschten Vorgang aus und klicken Sie auf Weiter, um fortzufahren." +LangString appRunning ${LANG_GERMAN} "${PRODUCTNAME} wird ausgeführt! Bitte schließen Sie es zuerst und versuchen Sie es dann erneut." +LangString appRunningOkKill ${LANG_GERMAN} "${PRODUCTNAME} läuft! $\nKlicken Sie auf OK, um es zu beenden" +LangString chooseMaintenanceOption ${LANG_GERMAN} "Wählen Sie die auszuführende Wartungsoption." +LangString choowHowToInstall ${LANG_GERMAN} "Wählen Sie, wie Sie ${PRODUCTNAME} installieren möchten." +LangString createDesktop ${LANG_GERMAN} "Desktop-Verknüpfung erstellen" +LangString dontUninstall ${LANG_GERMAN} "Nicht deinstallieren" +LangString dontUninstallDowngrade ${LANG_GERMAN} "Nicht deinstallieren (Downgrading ohne Deinstallation ist für dieses Installationsprogramm deaktiviert)" +LangString failedToKillApp ${LANG_GERMAN} "Failed to kill ${PRODUCTNAME}. Bitte schließen Sie es zuerst und versuchen Sie es dann erneut" +LangString installingWebview2 ${LANG_GERMAN} "Installiere WebView2..." +LangString newerVersionInstalled ${LANG_GERMAN} "Eine neuere Version von ${PRODUCTNAME} ist bereits installiert! Es wird nicht empfohlen, eine ältere Version zu installieren. Wenn Sie diese ältere Version wirklich installieren wollen, ist es besser, die aktuelle Version zuerst zu deinstallieren. Wählen Sie den gewünschten Vorgang aus und klicken Sie auf Weiter, um fortzufahren." +LangString älter ${LANG_GERMAN} "älter" +LangString olderOrUnknownVersionInstalled ${LANG_GERMAN} "Eine $R4-Version von ${PRODUCTNAME} ist auf Ihrem System installiert. Es wird empfohlen, dass Sie die aktuelle Version vor der Installation deinstallieren. Wählen Sie den gewünschten Vorgang aus und klicken Sie auf Weiter, um fortzufahren." +LangString silentDowngrades ${LANG_GERMAN} "Downgrades sind für dieses Installationsprogramm deaktiviert, Sie können nicht mit dem Silent-Installationsprogramm fortfahren, bitte verwenden Sie stattdessen das Installationsprogramm mit grafischer Benutzeroberfläche.$\n" +LangString unableToUninstall ${LANG_GERMAN} "Unable to uninstall!" +LangString uninstallApp ${LANG_GERMAN} "Deinstalliere ${PRODUCTNAME}" +LangString uninstallBeforeInstalling ${LANG_GERMAN} "Vor der Installation deinstallieren" +LangString unbekannt ${LANG_GERMAN} "unbekannt" +LangString webview2AbortError ${LANG_GERMAN} "Die Installation von WebView2 ist fehlgeschlagen! Die Anwendung kann ohne es nicht laufen. Versuchen Sie, das Installationsprogramm neu zu starten." +LangString webview2DownloadError ${LANG_GERMAN} "Fehler: Herunterladen von WebView2 fehlgeschlagen - $0" +LangString webview2DownloadSuccess ${LANG_GERMAN} "WebView2 Bootstrapper erfolgreich heruntergeladen" +LangString webview2Downloading ${LANG_GERMAN} "Herunterladen des WebView2 Bootstrappers..." +LangString webview2InstallError ${LANG_GERMAN} "Fehler: Die Installation von WebView2 ist mit Exit Code $1 fehlgeschlagen" +LangString webview2InstallSuccess ${LANG_GERMAN} "WebView2 erfolgreich installiert" +LangString deleteAppData ${LANG_GERMAN} "Lösche die Anwendungsdaten" From 10da70307a43122c1585ef101e54876a7ad12e27 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:44:04 +0000 Subject: [PATCH 103/104] chore(deps) Update Tauri Codegen (1.x) (#7576) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lucas Nogueira --- .github/workflows/test-core.yml | 3 +++ core/tauri-codegen/Cargo.toml | 4 ++-- core/tauri/Cargo.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 5ce515d8e..dc91cfca2 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -110,6 +110,9 @@ jobs: cargo update -p memchr --precise 2.6.2 cargo update -p async-executor --precise 1.5.1 cargo update -p proptest --precise 1.2.0 + cargo update -p regex --precise 1.9.6 + cargo update -p bstr --precise 1.6.2 + cargo update -p backtrace --precise 0.3.68 - name: test run: cargo test --target ${{ matrix.platform.target }} ${{ matrix.features.args }} diff --git a/core/tauri-codegen/Cargo.toml b/core/tauri-codegen/Cargo.toml index b8b6750d5..9323847d6 100644 --- a/core/tauri-codegen/Cargo.toml +++ b/core/tauri-codegen/Cargo.toml @@ -23,12 +23,12 @@ tauri-utils = { version = "1.5.0", path = "../tauri-utils", features = [ "build" thiserror = "1" walkdir = "2" brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] } -regex = { version = "1.7.1", optional = true } +regex = { version = "1", optional = true } uuid = { version = "1", features = [ "v4" ] } semver = "1" ico = "0.3" png = "0.17" -json-patch = "1.0" +json-patch = "1.2" [target."cfg(target_os = \"macos\")".dependencies] plist = "1" diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index f1bcbcc6d..a493280d2 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -77,7 +77,7 @@ raw-window-handle = "0.5" minisign-verify = { version = "0.2", optional = true } time = { version = "0.3", features = [ "parsing", "formatting" ], optional = true } os_info = { version = "3", optional = true } -regex = { version = "1.6.0", optional = true } +regex = { version = "1", optional = true } glob = "0.3" data-url = { version = "0.2", optional = true } serialize-to-javascript = "=0.1.1" From 5f75ebbbbb9ae821d9f2e229ca0110e16f8f0316 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 02:26:11 +0000 Subject: [PATCH 104/104] chore(deps) Update Tauri CLI (1.x) (#8051) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lucas Nogueira --- tooling/cli/Cargo.lock | 20 +++++++++-------- tooling/cli/Cargo.toml | 22 +++++++++---------- .../jest/fixtures/app/src-tauri/Cargo.toml | 2 +- tooling/cli/src/helpers/web_dev_server.rs | 2 +- tooling/cli/src/init.rs | 8 +++---- tooling/cli/src/interface/rust.rs | 4 ++-- 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 7b7e66fbb..157c881e6 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -742,13 +742,14 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", "shell-words", "tempfile", + "thiserror", "zeroize", ] @@ -1923,11 +1924,12 @@ dependencies = [ [[package]] name = "notify-debouncer-mini" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55ee272914f4563a2f8b8553eb6811f3c0caea81c756346bad15b7e3ef969f0" +checksum = "5d40b221972a1fc5ef4d858a2f671fb34c75983eb385463dff3780eeff6a9d43" dependencies = [ "crossbeam-channel", + "log", "notify", ] @@ -3435,7 +3437,7 @@ dependencies = [ "tauri-icns", "tauri-utils", "tokio", - "toml 0.7.8", + "toml 0.8.2", "toml_edit", "unicode-width", "ureq", @@ -3685,9 +3687,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", @@ -3706,9 +3708,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.0.2", "serde", diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 801c0a555..e6ef98d57 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -40,33 +40,33 @@ path = "src/main.rs" [dependencies] clap_complete = "4" -clap = { version = "4.3", features = [ "derive" ] } +clap = { version = "4.4", features = [ "derive" ] } anyhow = "1.0" tauri-bundler = { version = "1.4.4", path = "../bundler", default-features = false } colored = "2.0" once_cell = "1" serde = { version = "1.0", features = [ "derive" ] } serde_json = "1.0" -notify = "6.0" -notify-debouncer-mini = "0.3" +notify = "6.1" +notify-debouncer-mini = "0.4" shared_child = "1.0" -toml_edit = "0.19" -json-patch = "1.0" +toml_edit = "0.20" +json-patch = "1.2" tauri-utils = { version = "1.5.0", path = "../../core/tauri-utils", features = [ "isolation", "schema", "config-json5", "config-toml" ] } -toml = "0.7" +toml = "0.8" jsonschema = "0.17" -handlebars = "4.3" +handlebars = "4.4" include_dir = "0.7" minisign = "=0.7.5" -base64 = "0.21.2" -ureq = { version = "2.7", default-features = false, features = [ "gzip" ] } +base64 = "0.21.4" +ureq = { version = "2.8", default-features = false, features = [ "gzip" ] } os_info = "3" semver = "1.0" -regex = "1.9.3" +regex = "1.10.2" unicode-width = "0.1" zeroize = "1.6" heck = { version = "0.4", features = [ "unicode" ] } -dialoguer = "0.10" +dialoguer = "0.11" url = { version = "2.4", features = [ "serde" ] } os_pipe = "1" ignore = "0.4" diff --git a/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml b/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml index 9a1ed09ae..99a4984ed 100644 --- a/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml +++ b/tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml @@ -24,7 +24,7 @@ icon = [ tauri-build = { path = "../../../../../../../../core/tauri-build", features = [] } [dependencies] -serde_json = "1.0.105" +serde_json = "1.0.107" serde = "1.0" serde_derive = "1.0" tauri = { path = "../../../../../../../../core/tauri", features = ["api-all"] } diff --git a/tooling/cli/src/helpers/web_dev_server.rs b/tooling/cli/src/helpers/web_dev_server.rs index 3db17ea6d..ff05ab556 100644 --- a/tooling/cli/src/helpers/web_dev_server.rs +++ b/tooling/cli/src/helpers/web_dev_server.rs @@ -47,7 +47,7 @@ pub fn start_dev_server>(path: P, port: Option) -> crate::Re let serve_dir_ = serve_dir.clone(); thread::spawn(move || { let (tx, rx) = sync_channel(1); - let mut watcher = new_debouncer(Duration::from_secs(1), None, move |r| { + let mut watcher = new_debouncer(Duration::from_secs(1), move |r| { if let Ok(events) = r { tx.send(events).unwrap() } diff --git a/tooling/cli/src/init.rs b/tooling/cli/src/init.rs index a2dcaceec..d86fa40f6 100644 --- a/tooling/cli/src/init.rs +++ b/tooling/cli/src/init.rs @@ -294,12 +294,12 @@ where Ok(initial) } else { let theme = dialoguer::theme::ColorfulTheme::default(); - let mut builder = Input::with_theme(&theme); - builder.with_prompt(prompt); - builder.allow_empty(allow_empty); + let mut builder = Input::with_theme(&theme) + .with_prompt(prompt) + .allow_empty(allow_empty); if let Some(v) = initial { - builder.with_initial_text(v.to_string()); + builder = builder.with_initial_text(v.to_string()); } builder.interact_text().map(Some).map_err(Into::into) diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index d2fb9474f..88c391a6c 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -129,7 +129,7 @@ impl Interface for Rust { fn new(config: &Config, target: Option) -> crate::Result { let manifest = { let (tx, rx) = sync_channel(1); - let mut watcher = new_debouncer(Duration::from_secs(1), None, move |r| { + let mut watcher = new_debouncer(Duration::from_secs(1), move |r| { if let Ok(events) = r { let _ = tx.send(events); } @@ -424,7 +424,7 @@ impl Rust { let common_ancestor = common_path::common_path_all(watch_folders.clone()).unwrap(); let ignore_matcher = build_ignore_matcher(&common_ancestor); - let mut watcher = new_debouncer(Duration::from_secs(1), None, move |r| { + let mut watcher = new_debouncer(Duration::from_secs(1), move |r| { if let Ok(events) = r { tx.send(events).unwrap() }