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/122] 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 d7d6df216405..fd9ddcaa8aaa 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/122] 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 000000000000..4be13c600697 --- /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 4be13c600697..33f7b7c361fc 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/122] 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 33f7b7c361fc..ecce56af2e0b 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/122] 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 000000000000..06783c496ad9 --- /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 4aa42e49fd3a..685acafdce26 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/122] 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 dcb965cdaed5..97652556f28c 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 32c86cc9237e..7be4034ca2d6 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/122] 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 000000000000..d30f5bb37bb2 --- /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 7aa007a5c375..b0bae71579e0 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/122] 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 657652567292..f66bab51d17a 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/122] 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 f66bab51d17a..f6db4e06ab11 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/122] 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 000000000000..35f5443f0c29 --- /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 04966bac6629..375ad212c664 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 ed09964c650e..613e12931fc7 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 6b668b91c46c..cd51e802d451 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/122] 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 000000000000..29a6ffc8ab02 --- /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 c8f5e2602c27..93f0159e3c93 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/122] 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 000000000000..452d4f5e85f8 --- /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 93f0159e3c93..a7136f5865ad 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/122] 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 000000000000..eea0d9b22071 --- /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 a7136f5865ad..2d62bc1f182a 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/122] 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 000000000000..f865f5d546b0 --- /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 2d62bc1f182a..1674adc78e51 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/122] 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 | 209 ++++++++++++++++++++++++-------- 2 files changed, 160 insertions(+), 53 deletions(-) diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index f6db4e06ab11..4a854bb5def0 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 17a88936e05f..183857351092 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,21 +20,54 @@ 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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +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" @@ -38,74 +77,96 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +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 = "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_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows_x86_64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +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/122] 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 a11f6de7bf15..2b4305fa2339 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 69348748cafe..0fb317b747bd 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 213ecf7e9351..53559aebbb66 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 df687e1ced13..4bf34ea7644b 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 ea3c5b106552..58f1c9426a0a 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 7b418faf817c..9b28ddc93944 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/122] 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 000000000000..b57057901779 --- /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 86076c606f22..bbd672fc5a95 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 13600817dde5..5b8af5772cac 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 29c9772e4ea7..49d3b80387cc 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/122] 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 000000000000..1b7dee940772 --- /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 685acafdce26..98936e707460 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/122] 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 000000000000..231383077aaa --- /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 0ac489544be9..ad2196c17842 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/122] 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 000000000000..73721da13d64 --- /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 d1945de1173e..9144ead29157 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 57960c87982d..76fa745ff248 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 95b2559b48d0..792b0771f0e0 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 1674adc78e51..6b52d28085c0 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 2672302a05d3..2ebe6dcb42be 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/122] 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 77c5bee7acfa..117d6a67f22e 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/122] 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 000000000000..d875dc28d15c --- /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 b0b3489fb490..13abfa040ed4 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 792b0771f0e0..8a2725a72163 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 2ebe6dcb42be..f7c82baa5e51 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 833593af580e..28090c49dd03 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/122] 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 ad2196c17842..9424b7504c2c 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 0bf6f6d73649..000000000000 --- 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 a57e1cc052d2..7a574ab003c7 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 bdeca61ac80e..38f7e54ff172 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 3e89ee93a83c..d415b1ae3322 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 99b0d35f79ae..6b41dba2686f 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 fdc33a0cf3b1..056936a2b7f4 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/122] 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 000000000000..a6978e4d2a96 --- /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 c458e2b6c5aa..763ca75b7696 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 26e6b0b9d82c..c78b659e3fb7 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 ddf5d6075871..a3e018edf550 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 8a2725a72163..95ca5bf62b7d 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/122] 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 | 292 +++++++++++++++--------- tooling/webdriver/Cargo.toml | 2 +- 4 files changed, 195 insertions(+), 109 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 000000000000..c96df8ef9cf0 --- /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 000000000000..9a3cebab47bb --- /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 d0e96ed4735f..332f1ecb12cd 100644 --- a/tooling/webdriver/Cargo.lock +++ b/tooling/webdriver/Cargo.lock @@ -2,11 +2,26 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.58" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "autocfg" @@ -14,11 +29,32 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "bytes" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +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", @@ -127,11 +163,17 @@ dependencies = [ "slab", ] +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +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,54 +228,56 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] -name = "lazy_static" -version = "1.4.0" +name = "libc" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] -name = "libc" -version = "0.2.126" +name = "memchr" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] -name = "log" -version = "0.4.17" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "cfg-if", + "adler", ] -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - [[package]] name = "mio" -version = "0.8.4" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi", "windows-sys", ] +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.12.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +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 = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "ryu" -version = "1.0.10" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" +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_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +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 = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +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 b7e8c36f6fed..3b2ada75cf04 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/122] 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 000000000000..cc6195d9a303 --- /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 85d1e6da8402..9dc699fa6b5c 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 fe4911e1a35e..6b3fd73dbae5 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 19c036dd653c..15e9a21a1583 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 197d87e39245..125cf6c34451 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/122] 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 000000000000..67aa32aefea0 --- /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 7be4034ca2d6..e1290bf97474 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 f41581bbe7fd..d6891bac37e2 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 974a2ba43323..3eb231bb26e6 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/122] 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 332f1ecb12cd..56a17956dbd0 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 3b2ada75cf04..6a61f293ed8b 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/122] 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 b62b1ec018de..0473a05319bc 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 214f34aa2495..39e363cdfe99 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/122] 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 000000000000..ee9a10d2ed25 --- /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 000000000000..7a14aff06c2b --- /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 98936e707460..e487aab37ed8 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 549eda47828f..e5a631f34264 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/122] 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 dae07693f0ce..01b7c87a4815 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 9650182e0ee2..69e55b0f3025 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 dae07693f0ce..01b7c87a4815 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/122] 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 000000000000..4bc116c25a42 --- /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 83f6ce504e07..356fdcde1d7a 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/122] 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 a3e018edf550..38166e98ed47 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/122] 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 000000000000..8fdc2e3a8ca2 --- /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 38166e98ed47..964e57b7a6ba 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 000000000000..ea3f20665929 --- /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/122] 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 | 189 +++++++++++------------ tooling/cli/ENVIRONMENT_VARIABLES.md | 1 + 5 files changed, 100 insertions(+), 106 deletions(-) create mode 100644 .changes/notarytool.md diff --git a/.changes/config.json b/.changes/config.json index 78a03db4c177..7a46ae633053 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 000000000000..16c46f5eff13 --- /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 628a0fd9f10e..809825e54f7d 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 1fde21ec3d64..e06c401bb036 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())?; + if !output.status.success() { + return Err(anyhow::anyhow!("failed to notarize app").into()); + } + + 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 RequestUUID from upload output. {}", - notarize_response - ) - .into(), + anyhow::anyhow!("failed to parse notarytool output as JSON: `{output_str}`").into(), ); } - - Ok(()) } 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 8416b62b93e2..78f04462b81e 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/122] 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 000000000000..a55e0dcbbeb8 --- /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 0acea50db38a..48e62f9bc564 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 9d47b8a19a46..956073e01860 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/122] 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 4fa44f07bc27..35e63f63bd5b 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/122] 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 35e63f63bd5b..f64479ce0844 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/122] 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 000000000000..5813c18e24db --- /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 964e57b7a6ba..3e56045dab8d 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/122] 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 f64479ce0844..6d49a8395a74 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/122] 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 000000000000..e107e66c306a --- /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 7cb89422c187..30359c04358e 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/122] 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 000000000000..729fd24252f3 --- /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 bf961aa46322..7cf8ea03b017 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 1516306dfb44..8ee5b93cd5ba 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 874e5d2a0ce2..585ee6f508a4 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 fa8c77fd4c9f..22ef3fd83269 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 247c5909d1e4..217ce34e2547 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/122] 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 2901f5d29b66..f5326c071636 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 e26f8f8f1957..83eff15eaa3d 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 594e13cc4908..eab2e7b06a7c 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/122] 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 af5d14713f18..356d8c6c9172 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/122] 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 83eff15eaa3d..ad99920a471b 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 eab2e7b06a7c..fb5511d43332 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/122] 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 000000000000..f28c23f4fb9c --- /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 9424b7504c2c..5eaefba47edb 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/122] 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 16c46f5eff13..59a8a8245c05 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 e06c401bb036..7b9e8ce5bfd6 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 78f04462b81e..66f44d8887ef 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/122] 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 000000000000..34256f5d5a16 --- /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 01b7c87a4815..46306d0ac0b5 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 69e55b0f3025..e435f7eea606 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 eba98ef8b5bb..46d67d8beeac 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 3e56045dab8d..efb7b49b62cc 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 356fdcde1d7a..45e63acc061c 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 01b7c87a4815..46306d0ac0b5 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 4ae8dad59ece..48ad9364b0df 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/122] 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 6d49a8395a74..bad28680e43d 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/122] 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 778a7fc294b1..0ccd8cf72440 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/122] 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 000000000000..0bc7cc7b5feb --- /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 843a95ff379a..30aa3b2a42df 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 ad99920a471b..2683c74c0244 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 c30d606b3095..1d214dab15a1 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/122] 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 7c5fbbd90e69..8cb62fb387e3 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/122] 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 7a46ae633053..4bf07c0bfcd5 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 2e6ce0ecf676..000000000000 --- 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 000000000000..0ffb41cb962c --- /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/122] 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 000000000000..9cccd0a7c4cf --- /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 7b9e8ce5bfd6..a4e5ec9c0c60 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 66f44d8887ef..80469612dfb1 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/122] 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 000000000000..561bb20e7f71 --- /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 000000000000..17a972c802a8 --- /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 a177d2a6b926..000000000000 --- 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 000000000000..a177d2a6b926 --- /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 000000000000..5736f3186e79 --- /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 953ee36f3bb7..000000000000 --- 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 000000000000..953ee36f3bb7 --- /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 fed3381b210e..3539143d0dd8 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 000000000000..f1545257a73d --- /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 593ddefdbab6..6f736f0a2b46 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 eb609b5b82ec..000000000000 --- 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 000000000000..82d2063275e6 --- /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 ba98c4e6555c..3748a5cfe6de 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 a4e5ec9c0c60..b2ab2f79d2ee 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 46d67d8beeac..09936a74fb03 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/122] 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 000000000000..1d041bfadcb3 --- /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 4f92f8a467ab..9319920ff8ea 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 f5326c071636..045011dfe4e1 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 0ccd8cf72440..2e95b0f250e1 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/122] 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 7e38e0e37460..c91e7e31398c 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/122] 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 000000000000..c907f5262f4e --- /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 46306d0ac0b5..af0ca7635b00 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 2683c74c0244..1fb9410a34e9 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 7c154cdea58d..34a5f5118427 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 e435f7eea606..0a1e06f7a243 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 9aa74ce68b18..dea0ba44dc66 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 5eaefba47edb..95acf595b419 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 7bc7bd497b36..d9bd7635a9eb 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 d6891bac37e2..4e66be645c53 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 8bf953871a24..6a66f1ade06b 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 3eb231bb26e6..212f21047ed8 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 40c27aa55a19..ebfd06d0ff2e 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 46306d0ac0b5..af0ca7635b00 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/122] 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 eaefa40aff15..66422b8aa89d 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/122] 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 000000000000..9a6367a82a7a --- /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 bbd672fc5a95..d2a08666f033 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 ca36e83ca365..1e9627e18859 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/122] 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 bad28680e43d..b4b9c24b14e3 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/122] 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 67aa32aefea0..000000000000 --- 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 8a73317f36dd..000000000000 --- 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 35f5443f0c29..000000000000 --- 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 16f136fe7307..000000000000 --- 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 73721da13d64..000000000000 --- 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 9cccd0a7c4cf..000000000000 --- 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 a6978e4d2a96..000000000000 --- 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 561bb20e7f71..000000000000 --- 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 d30f5bb37bb2..000000000000 --- 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 17a972c802a8..000000000000 --- 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 231383077aaa..000000000000 --- 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 e107e66c306a..000000000000 --- 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 0a71670ebf55..000000000000 --- 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 f865f5d546b0..000000000000 --- 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 452d4f5e85f8..000000000000 --- 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 4bc116c25a42..000000000000 --- 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 29a6ffc8ab02..000000000000 --- 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 1a4abaad63fb..000000000000 --- 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 a55e0dcbbeb8..000000000000 --- 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 b57057901779..000000000000 --- 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 59a8a8245c05..000000000000 --- 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 69c12ef5533c..000000000000 --- 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 8fdc2e3a8ca2..000000000000 --- 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 5813c18e24db..000000000000 --- 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 34256f5d5a16..000000000000 --- 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 eea0d9b22071..000000000000 --- 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 8841c67307be..000000000000 --- 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 d875dc28d15c..000000000000 --- 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 ccb61bbd946d..000000000000 --- 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 7a8e44427c0d..000000000000 --- 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 1d041bfadcb3..000000000000 --- 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 729fd24252f3..000000000000 --- 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 5ab5a117c74a..000000000000 --- 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 0bc7cc7b5feb..000000000000 --- 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 f28c23f4fb9c..000000000000 --- 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 cc6195d9a303..000000000000 --- 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 06783c496ad9..000000000000 --- 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 ee9a10d2ed25..000000000000 --- 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 7a14aff06c2b..000000000000 --- 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 1b7dee940772..000000000000 --- 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 9a6367a82a7a..000000000000 --- 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 c96df8ef9cf0..000000000000 --- 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 9a3cebab47bb..000000000000 --- 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 c907f5262f4e..000000000000 --- 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 ccf6cebbc427..f266e89f987e 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 9319920ff8ea..10d05c15fdbe 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 6081cbc7b409..0101dc000d88 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 16d201e50673..b8b6750d5846 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 f3a4f4b782a6..4c002959122d 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 2381ebfaba2d..4085f128610b 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 2840b148f3ba..fb26af9b621b 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 30aa3b2a42df..d13484dd5bdc 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 2a411df2be54..31945fcbc17b 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 1c255a94ae78..264348c79a37 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 835f3ed36794..086917cc7317 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 d2a08666f033..81433e9c9054 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 e87175be2836..d59643f971c4 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 4faf157c65c9..405f7171ead6 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 0cb6561ecee3..f6af6db11cae 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 0473a05319bc..4b0e21556189 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 edfe89192c45..e969af377fdf 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 13abfa040ed4..2e18df563989 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 10dcca12293b..a93c7b4968b8 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 28090c49dd03..7f9bc2f7b1e8 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 49d3b80387cc..e76b13a32144 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 085637ef2625..5cfad11754dd 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 2edb05edd032..2bdd5e14c15e 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 58f1c9426a0a..6108156e5038 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 b8d66ecafad6..8d9e5733628c 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 6a61f293ed8b..922053a993a1 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/122] 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 4bf07c0bfcd5..870c62356741 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 56a17956dbd0..9fcf9c9d1782 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/122] 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 000000000000..200ebe8908e2 --- /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/122] 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 200ebe8908e2..000000000000 --- 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 f266e89f987e..940834687079 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 10d05c15fdbe..3fd900466e1d 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 5cfad11754dd..e28b6fb71894 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/122] 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 000000000000..95b89b71bf6f --- /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 f7e521ce5cd9..854bff4c80a2 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 4e66be645c53..5c9a3490d592 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 1d214dab15a1..8a4a03fc4b70 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/122] 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 000000000000..b0e6b02d99c9 --- /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 b2ab2f79d2ee..a08866ed94e8 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/122] 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 b0e6b02d99c9..000000000000 --- 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 95b89b71bf6f..000000000000 --- 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 d59643f971c4..9df3f851ab77 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 405f7171ead6..ac4a891e049c 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 a93c7b4968b8..4b97e6376fc2 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 7f9bc2f7b1e8..65c81ea7c875 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 e76b13a32144..c7ec794bb474 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 e28b6fb71894..cdba3ccc4cca 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 2bdd5e14c15e..81ac6ea30d8d 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 6108156e5038..39f7053c41e2 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/122] 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 000000000000..09b821be604c --- /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 b4b9c24b14e3..0d9bd59dad3e 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 e487aab37ed8..4d488d3e756f 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/122] 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 000000000000..f72f4135e19a --- /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 4b3bbb61c559..88cc10e23d90 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 1fb9410a34e9..9a222c5cf691 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 5c9a3490d592..a6948afd31f4 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 212f21047ed8..594ff2de63d3 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 8a4a03fc4b70..80d411a36511 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 456d37b59adb..4269825dfbcf 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 cae46785d6be..f931d0ece885 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 a08866ed94e8..b9bdee49d8c2 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 80469612dfb1..f065e79d8536 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 a09cc6479f2c..dc6771e6b040 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 de520f85da25..faf416d2d5b4 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/122] 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 f72f4135e19a..000000000000 --- 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 09b821be604c..000000000000 --- 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 e969af377fdf..76cee2c1f4c6 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 2e18df563989..1ad2b19b80d3 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 4b97e6376fc2..af17f3af70a8 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 65c81ea7c875..f1d39a7146dd 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 c7ec794bb474..d42ec04afb70 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 cdba3ccc4cca..62a101434e2b 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 81ac6ea30d8d..de20c49efcb6 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 39f7053c41e2..105d403bf4de 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/122] 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 000000000000..4e928b59edb0 --- /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 48e62f9bc564..98ea08ceba23 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/122] 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 000000000000..8a4bcc835227 --- /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 f7c82baa5e51..c23298e3f693 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/122] 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 ecce56af2e0b..e4a91586a2e6 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 000000000000..4c1747de6f85 --- /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/122] 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 4e928b59edb0..000000000000 --- 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 8a4bcc835227..000000000000 --- 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 9df3f851ab77..4b022d6c94d2 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 ac4a891e049c..f1bcbcc6d4d8 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 76cee2c1f4c6..f8205caed673 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 1ad2b19b80d3..22fd635b5748 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 af17f3af70a8..8d30123437f4 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 f1d39a7146dd..1243353b1c41 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 d42ec04afb70..0a79161eacb7 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 62a101434e2b..b91ecb05c90e 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 de20c49efcb6..35d1296790bd 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 105d403bf4de..c7a7dbabfed4 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/122] 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 000000000000..db69ef005c5c --- /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 c23298e3f693..96489636ac63 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/122] 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 000000000000..67174a888217 --- /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 6e54325babb7..cd6cce8e2195 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/122] chore: update tauri-cli lock file (#8015) --- tooling/cli/Cargo.lock | 1136 ++++++++++++++++++++-------------------- 1 file changed, 574 insertions(+), 562 deletions(-) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 1243353b1c41..a217d7d9d239 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", ] @@ -835,47 +863,42 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "erased-serde" -version = "0.3.25" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.3" 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 = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +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", @@ -3291,11 +3321,32 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +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/122] 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 c78b659e3fb7..50f41ab88473 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 efb7b49b62cc..9ce567b42dae 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 96489636ac63..e27d91432cfd 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/122] 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 bc65aa890b06..1d47dd86cd2e 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/122] 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 000000000000..0ea5fb5a96e7 --- /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 1a21e18f76da..2a4ca9a48e65 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/122] 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 0ea5fb5a96e7..0d4a72df9be8 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/122] 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 | 1804 +++++++++++------------ 14 files changed, 854 insertions(+), 1008 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 db69ef005c5c..000000000000 --- 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 0d4a72df9be8..000000000000 --- 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 67174a888217..000000000000 --- 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 f6af6db11cae..ba78b3844e93 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 4b0e21556189..94694e489c0d 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 f8205caed673..c253a122c1b9 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 22fd635b5748..b09283ea7b3f 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 8d30123437f4..65f7e9875312 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 a217d7d9d239..81489417cfbd 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 0a79161eacb7..4089e9129cbf 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 b91ecb05c90e..b7deb4596456 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 35d1296790bd..49e7f9ab07ef 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 c7a7dbabfed4..798168787564 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 9b28ddc93944..1760043a6781 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== - 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== +"@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/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== - dependencies: - "@babel/highlight" "^7.16.7" - -"@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.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== - 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" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@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== - 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" +"@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.22.13" + chalk "^2.4.2" + +"@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/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.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.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" + json5 "^2.2.3" + semver "^6.3.1" -"@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== +"@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: - "@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== - dependencies: - "@babel/compat-data" "^7.16.4" - "@babel/helper-validator-option" "^7.16.7" - browserslist "^4.17.5" - semver "^6.3.0" - -"@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== - dependencies: - "@babel/compat-data" "^7.17.10" - "@babel/helper-validator-option" "^7.16.7" - browserslist "^4.20.2" - semver "^6.3.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== - dependencies: - "@babel/types" "^7.16.7" - -"@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== - dependencies: - "@babel/helper-get-function-arity" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/types" "^7.16.7" - -"@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== - dependencies: - "@babel/template" "^7.16.7" - "@babel/types" "^7.17.0" - -"@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== - dependencies: - "@babel/types" "^7.16.7" - -"@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== - dependencies: - "@babel/types" "^7.16.7" - -"@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== - dependencies: - "@babel/types" "^7.16.7" - -"@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== - 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-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.22.9" + "@babel/helper-validator-option" "^7.22.15" + browserslist "^4.21.9" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@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/template" "^7.22.15" + "@babel/types" "^7.23.0" + +"@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.22.5" + +"@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/types" "^7.22.15" + +"@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/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-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.22.5" + +"@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.22.5" + +"@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/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" + +"@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-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== - dependencies: - "@babel/helper-plugin-utils" "^7.16.7" - -"@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== - dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/parser" "^7.16.7" - "@babel/types" "^7.16.7" - -"@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== - 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" + 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.22.5" + +"@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.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@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.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== - 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== +"@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/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.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.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.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== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" +"@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/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/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/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/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/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== +"@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/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.30001332: - version "1.0.30001334" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001334.tgz#892e9965b35285033fc2b8a8eff499fe02f13d8b" - integrity sha512-kbaCEBRRVSoeNs74sCuq92MJyGrMtjWVfhltoHUCW4t4pXFvGjUBrfo47weBRViHkiV3eBYyIsfl956NtHGazw== +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== -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-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== - dependencies: - "@jest/environment" "^29.5.0" - "@jest/fake-timers" "^29.5.0" - "@jest/types" "^29.5.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +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.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== - 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-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.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/122] 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 | 150 +++++++++++++++----- tooling/cli/src/info/packages_nodejs.rs | 80 +++++------ tooling/cli/src/info/packages_rust.rs | 130 ++++++----------- 7 files changed, 363 insertions(+), 506 deletions(-) diff --git a/tooling/cli/src/info/app.rs b/tooling/cli/src/info/app.rs index ff37302a056c..ef4977b4d36f 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, - )) - } else { - None - } - }) - .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, - )) + 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, - ), - ], - 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 40f03ebd5b27..8fa786e100ea 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| { - 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| { + SectionItem::new().action(|| { + component_version("rustc") + .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| { + "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!( - "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 a4bc6a24ba4a..bc7ea3cc5c25 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 1abc22bbf56e..868dce2870e3 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; + + 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); + } - if self.status == Status::Error && interactive && self.has_action_if_err { + 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 217ce34e2547..13cbb7e80115 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()) - } 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.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 { - "".into() - } - ) - }, - Status::Neutral, - )) - }, - || None, - false, - ); + if version < target_version { + format!(" ({}, latest: {})", "outdated".yellow(), latest_ver.green()) + } else { + "".into() + } + } else { + "".into() + } + ) + } + .into() + }); items.push(item); } diff --git a/tooling/cli/src/info/packages_rust.rs b/tooling/cli/src/info/packages_rust.rs index 30359c04358e..0386ca4b254a 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/122] 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 | 328 +++++++++--------- 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, 192 insertions(+), 188 deletions(-) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 81489417cfbd..0ff20a1e020a 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" @@ -736,12 +711,19 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +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", @@ -3683,15 +3683,38 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "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.14.4" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "combine", - "indexmap 1.9.3", - "itertools", + "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 4089e9129cbf..65cc30cc46aa 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 939695daa4c6..79618c4f68b6 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 d126097180d5..9a1ed09ae24a 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 d39f1579e8ee..3db17ea6d316 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/122] 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 000000000000..53176bb07b73 --- /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 80d411a36511..96070ddbeecb 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 4269825dfbcf..712e3ebc9467 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 dc6771e6b040..a938acd15a29 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 faf416d2d5b4..80103335646a 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/122] 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 b09283ea7b3f..18303a9ef457 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/122] 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 a3656a1d49ed..4795a0b8e890 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/122] 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 000000000000..5a2d10820f6a --- /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 0d9bd59dad3e..5ce515d8ec07 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 1de6eb67e1ad..273e0e7faf05 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 dd30243677ca..a21821467815 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 0ff20a1e020a..946490191e4e 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 cd51e802d451..7cbfea4b8bcf 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/122] 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 000000000000..89159430c50b --- /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 b9bdee49d8c2..bbdcd55daae2 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/122] 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 5a2d10820f6a..000000000000 --- 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 53176bb07b73..000000000000 --- 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 89159430c50b..000000000000 --- 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 c253a122c1b9..c055cbc6dcb8 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 18303a9ef457..55e6e0430df8 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 65f7e9875312..18f62aab590e 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 946490191e4e..7b7e66fbba5f 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 65cc30cc46aa..801c0a5553ca 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 b7deb4596456..8ad9d6ba30c8 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 49e7f9ab07ef..12af690ce9b1 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 798168787564..08fec714575d 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/122] 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 000000000000..8425d0cf2bd1 --- /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 9ce567b42dae..b0711b31e3ff 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 000000000000..6247b453c3cd --- /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/122] 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 5ce515d8ec07..dc91cfca28ba 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 b8b6750d5846..9323847d6bb9 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 f1bcbcc6d4d8..a493280d2f6e 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/122] 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 7b7e66fbba5f..157c881e6238 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 801c0a5553ca..e6ef98d571a5 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 9a1ed09ae24a..99a4984ed2d7 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 3db17ea6d316..ff05ab556416 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 a2dcaceeccfb..d86fa40f69a1 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 d2fb9474fe61..88c391a6cc7c 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() } From 287066b279f503dd09bfd43d5da37d1f471451fb Mon Sep 17 00:00:00 2001 From: Konstantin Azizov Date: Sat, 21 Oct 2023 19:51:08 +0200 Subject: [PATCH 105/122] fix(api): do nothing in clearMocks if __TAURI_INTERNALS__ is not defined (#8071) --- .changes/fix-clearmocks.md | 5 +++++ tooling/api/src/mocks.ts | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .changes/fix-clearmocks.md diff --git a/.changes/fix-clearmocks.md b/.changes/fix-clearmocks.md new file mode 100644 index 000000000000..b788c1f6566d --- /dev/null +++ b/.changes/fix-clearmocks.md @@ -0,0 +1,5 @@ +--- +"@tauri-apps/api": 'patch:bug' +--- + +No longer crashing in tests without mocks when `clearMocks` is defined in `afterEach` hook. diff --git a/tooling/api/src/mocks.ts b/tooling/api/src/mocks.ts index 685d9f279c95..fd47796589a2 100644 --- a/tooling/api/src/mocks.ts +++ b/tooling/api/src/mocks.ts @@ -152,11 +152,12 @@ export function mockWindows( * * @since 1.6.0 */ -export function mockConvertFileSrc( - osName: string -): void { +export function mockConvertFileSrc(osName: string): void { window.__TAURI_INTERNALS__ = window.__TAURI_INTERNALS__ ?? {} - window.__TAURI_INTERNALS__.convertFileSrc = function (filePath, protocol = 'asset') { + window.__TAURI_INTERNALS__.convertFileSrc = function ( + filePath, + protocol = 'asset' + ) { const path = encodeURIComponent(filePath) return osName === 'windows' ? `http://${protocol}.localhost/${path}` @@ -191,6 +192,10 @@ export function mockConvertFileSrc( * @since 1.0.0 */ export function clearMocks(): void { + if (typeof window.__TAURI_INTERNALS__ !== 'object') { + return + } + // @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case delete window.__TAURI_INTERNALS__.convertFileSrc // @ts-expect-error "The operand of a 'delete' operator must be optional' does not matter in this case From efe7811804a32c45f55686a9541b44c022cc571e Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Sun, 22 Oct 2023 02:38:18 +0200 Subject: [PATCH 106/122] fix(examples): use __TAURI__.primitives (#8077) Closes #8073 --- examples/commands/index.html | 7 +++++-- examples/isolation/dist/index.html | 2 +- examples/parent-window/index.html | 2 +- examples/splashscreen/dist/index.html | 2 +- examples/streaming/index.html | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/commands/index.html b/examples/commands/index.html index 3abb8cb8a7e7..66841fd70c2c 100644 --- a/examples/commands/index.html +++ b/examples/commands/index.html @@ -15,10 +15,13 @@

Tauri Commands

function runCommand(commandName, args, optional) { const id = optional ? '#response-optional' : '#response' const result = document.querySelector(id) - window.__TAURI__ + window.__TAURI__.primitives .invoke(commandName, args) .then((response) => { - const val = response instanceof ArrayBuffer ? new TextDecoder().decode(response) : response + const val = + response instanceof ArrayBuffer + ? new TextDecoder().decode(response) + : response result.innerText = `Ok(${val})` }) .catch((error) => { diff --git a/examples/isolation/dist/index.html b/examples/isolation/dist/index.html index 7ecca7406639..7af93b540e07 100644 --- a/examples/isolation/dist/index.html +++ b/examples/isolation/dist/index.html @@ -71,7 +71,7 @@

Hello, Tauri!

const ping = document.querySelector("#ping") const pong = document.querySelector('#pong') ping.addEventListener("click", () => { - window.__TAURI__.tauri.invoke("ping") + window.__TAURI__.primitives.invoke("ping") .then(() => { pong.innerText = `ok: ${Date.now()}` }) diff --git a/examples/parent-window/index.html b/examples/parent-window/index.html index 776293db78f8..059607659d71 100644 --- a/examples/parent-window/index.html +++ b/examples/parent-window/index.html @@ -24,7 +24,7 @@ const responseContainer = document.getElementById('response') function runCommand(commandName, args, optional) { - window.__TAURI__ + window.__TAURI__.primitives .invoke(commandName, args) .then((response) => { responseContainer.innerText += `Ok(${response})\n\n` diff --git a/examples/splashscreen/dist/index.html b/examples/splashscreen/dist/index.html index 7e96301cf59e..a51c58d6088d 100644 --- a/examples/splashscreen/dist/index.html +++ b/examples/splashscreen/dist/index.html @@ -6,7 +6,7 @@

This is the main window!

document.addEventListener('DOMContentLoaded', () => { // we delay here just so we can see the splashscreen for a while setTimeout(() => { - window.__TAURI__.invoke('close_splashscreen') + window.__TAURI__.primitives.invoke('close_splashscreen') }, 2000) }) diff --git a/examples/streaming/index.html b/examples/streaming/index.html index edcc5f020d0a..a0eabf610ab7 100644 --- a/examples/streaming/index.html +++ b/examples/streaming/index.html @@ -20,7 +20,7 @@ diff --git a/tooling/bench/tests/helloworld/public/index.html b/tooling/bench/tests/helloworld/public/index.html index cea1b7a23ece..a304244ade52 100644 --- a/tooling/bench/tests/helloworld/public/index.html +++ b/tooling/bench/tests/helloworld/public/index.html @@ -10,7 +10,7 @@

Welcome to Tauri!

From a74ff464bb6d62213badaa94f4289802dd2894e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 11:14:57 -0300 Subject: [PATCH 109/122] chore(deps): bump rustix from 0.37.23 to 0.37.26 in /tooling/bench (#8070) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tooling/bench/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tooling/bench/Cargo.lock b/tooling/bench/Cargo.lock index 183857351092..dcfba194043a 100644 --- a/tooling/bench/Cargo.lock +++ b/tooling/bench/Cargo.lock @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" dependencies = [ "bitflags", "errno", From 198abe3c2cae06dacab860b3a93f715dcf529a95 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 23 Oct 2023 14:09:42 -0300 Subject: [PATCH 110/122] feat(plugins): typed invoke arguments for mobile plugins (#8076) --- .changes/android-plugin-get-config-typed.md | 5 + .changes/mobile-plugin-resolve-object.md | 5 + .changes/mobile-plugin-typed-invoke-args.md | 5 + .changes/update-mobile-template.md | 6 + core/tauri/Cargo.toml | 2 +- core/tauri/mobile/android/build.gradle.kts | 1 + core/tauri/mobile/android/proguard-rules.pro | 4 + .../main/java/app/tauri/PermissionHelper.kt | 12 +- .../java/app/tauri/annotation/InvokeArg.kt | 9 + .../src/main/java/app/tauri/plugin/Channel.kt | 26 +- .../src/main/java/app/tauri/plugin/Invoke.kt | 182 ++----------- .../src/main/java/app/tauri/plugin/Plugin.kt | 142 +++++----- .../java/app/tauri/plugin/PluginHandle.kt | 5 +- .../java/app/tauri/plugin/PluginManager.kt | 55 +++- .../ios-api/Sources/Tauri/Channel.swift | 58 ++++- .../mobile/ios-api/Sources/Tauri/Invoke.swift | 92 ++++--- .../ios-api/Sources/Tauri/JSTypes.swift | 242 +----------------- .../ios-api/Sources/Tauri/Plugin/Plugin.swift | 58 +++-- .../mobile/ios-api/Sources/Tauri/Tauri.swift | 34 +-- core/tauri/src/ios.rs | 136 +--------- core/tauri/src/jni_helpers.rs | 98 ------- core/tauri/src/lib.rs | 2 - core/tauri/src/plugin/mobile.rs | 26 +- core/tauri/src/protocol/tauri.rs | 2 +- examples/api/src-tauri/Cargo.lock | 94 ------- examples/api/src-tauri/Cargo.toml | 1 - examples/api/src-tauri/src/lib.rs | 5 - .../java/com/plugin/sample/ExamplePlugin.kt | 16 +- .../ios/Sources/ExamplePlugin.swift | 13 +- .../android/src/main/java/ExamplePlugin.kt | 11 +- .../plugin/ios/Sources/ExamplePlugin.swift | 18 +- 31 files changed, 431 insertions(+), 934 deletions(-) create mode 100644 .changes/android-plugin-get-config-typed.md create mode 100644 .changes/mobile-plugin-resolve-object.md create mode 100644 .changes/mobile-plugin-typed-invoke-args.md create mode 100644 .changes/update-mobile-template.md create mode 100644 core/tauri/mobile/android/src/main/java/app/tauri/annotation/InvokeArg.kt delete mode 100644 core/tauri/src/jni_helpers.rs diff --git a/.changes/android-plugin-get-config-typed.md b/.changes/android-plugin-get-config-typed.md new file mode 100644 index 000000000000..53be05bb1f6b --- /dev/null +++ b/.changes/android-plugin-get-config-typed.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:breaking +--- + +The Android `PluginManager.loadConfig` now takes a third parameter to define the class type of the config object. diff --git a/.changes/mobile-plugin-resolve-object.md b/.changes/mobile-plugin-resolve-object.md new file mode 100644 index 000000000000..4819e4d6913c --- /dev/null +++ b/.changes/mobile-plugin-resolve-object.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:enhance +--- + +Mobile plugins can now resolve using an arbitrary object instead of using the `JSObject` class via `Invoke.resolve` on iOS and `Invoke.resolveObject` on Android. diff --git a/.changes/mobile-plugin-typed-invoke-args.md b/.changes/mobile-plugin-typed-invoke-args.md new file mode 100644 index 000000000000..d98d78794f34 --- /dev/null +++ b/.changes/mobile-plugin-typed-invoke-args.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:breaking +--- + +Mobile plugins now have access to a parser for the invoke arguments instead of relying on the `Invoke#get${TYPE}` methods. diff --git a/.changes/update-mobile-template.md b/.changes/update-mobile-template.md new file mode 100644 index 000000000000..cf21979688ee --- /dev/null +++ b/.changes/update-mobile-template.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:breaking +"@tauri-apps/cli": patch:breaking +--- + +Updated the mobile plugin templates following the tauri v2.0.0-alpha.17 changes. diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 7387e8d078df..6bee84a33fe6 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -42,7 +42,7 @@ development = [ "quickcheck_macros" ] [dependencies] serde_json = { version = "1.0", features = [ "raw_value" ] } -serde = { version = "1.0", features = [ "derive" ] } +serde = { version = "1.0", features = [ "derive", "rc" ] } tokio = { version = "1", features = [ "rt", "rt-multi-thread", "sync", "fs", "io-util" ] } futures-util = "0.3" uuid = { version = "1", features = [ "v4" ], optional = true } diff --git a/core/tauri/mobile/android/build.gradle.kts b/core/tauri/mobile/android/build.gradle.kts index d23ad0fb148c..36cc3f1a0bee 100644 --- a/core/tauri/mobile/android/build.gradle.kts +++ b/core/tauri/mobile/android/build.gradle.kts @@ -38,6 +38,7 @@ dependencies { implementation("androidx.core:core-ktx:1.7.0") implementation("androidx.appcompat:appcompat:1.6.0") implementation("com.google.android.material:material:1.7.0") + implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") diff --git a/core/tauri/mobile/android/proguard-rules.pro b/core/tauri/mobile/android/proguard-rules.pro index fed38c703624..a461a5556f35 100644 --- a/core/tauri/mobile/android/proguard-rules.pro +++ b/core/tauri/mobile/android/proguard-rules.pro @@ -23,3 +23,7 @@ @app.tauri.annotation.Permission ; public (...); } + +-keep @app.tauri.annotation.InvokeArg public class * { + *; +} diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/PermissionHelper.kt b/core/tauri/mobile/android/src/main/java/app/tauri/PermissionHelper.kt index e84ae9b3177e..7d560fbac76e 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/PermissionHelper.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/PermissionHelper.kt @@ -95,10 +95,10 @@ object PermissionHelper { * @param neededPermissions The permissions needed. * @return The permissions not present in AndroidManifest.xml */ - fun getUndefinedPermissions(context: Context, neededPermissions: Array): Array { - val undefinedPermissions = ArrayList() + fun getUndefinedPermissions(context: Context, neededPermissions: Array): Array { + val undefinedPermissions = ArrayList() val requestedPermissions = getManifestPermissions(context) - if (requestedPermissions != null && requestedPermissions.isNotEmpty()) { + if (!requestedPermissions.isNullOrEmpty()) { val requestedPermissionsList = listOf(*requestedPermissions) val requestedPermissionsArrayList = ArrayList(requestedPermissionsList) for (permission in neededPermissions) { @@ -106,10 +106,8 @@ object PermissionHelper { undefinedPermissions.add(permission) } } - var undefinedPermissionArray = arrayOfNulls(undefinedPermissions.size) - undefinedPermissionArray = undefinedPermissions.toArray(undefinedPermissionArray) - return undefinedPermissionArray + return undefinedPermissions.toTypedArray() } - return neededPermissions as Array + return neededPermissions } } diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/annotation/InvokeArg.kt b/core/tauri/mobile/android/src/main/java/app/tauri/annotation/InvokeArg.kt new file mode 100644 index 000000000000..ffef326d0dc7 --- /dev/null +++ b/core/tauri/mobile/android/src/main/java/app/tauri/annotation/InvokeArg.kt @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +package app.tauri.annotation + +@Retention(AnnotationRetention.RUNTIME) +@Target(AnnotationTarget.CLASS) +annotation class InvokeArg diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt index eb7afa51a3bb..34eba4ca5239 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt @@ -4,8 +4,30 @@ package app.tauri.plugin -class Channel(val id: Long, private val handler: (data: JSObject) -> Unit) { +import com.fasterxml.jackson.core.JsonParser +import com.fasterxml.jackson.databind.DeserializationContext +import com.fasterxml.jackson.databind.JsonDeserializer +import com.fasterxml.jackson.databind.ObjectMapper + +const val CHANNEL_PREFIX = "__CHANNEL__:" + +internal class ChannelDeserializer(val sendChannelData: (channelId: Long, data: String) -> Unit, private val objectMapper: ObjectMapper): JsonDeserializer() { + override fun deserialize( + jsonParser: JsonParser?, + deserializationContext: DeserializationContext + ): Channel { + val channelDef = deserializationContext.readValue(jsonParser, String::class.java) + val callback = channelDef.substring(CHANNEL_PREFIX.length).toLongOrNull() ?: throw Error("unexpected channel value $channelDef") + return Channel(callback, { res -> sendChannelData(callback, res) }, objectMapper) + } +} + +class Channel(val id: Long, private val handler: (data: String) -> Unit, private val objectMapper: ObjectMapper) { fun send(data: JSObject) { - handler(data) + handler(PluginResult(data).toString()) + } + + fun sendObject(data: Any) { + handler(objectMapper.writeValueAsString(data)) } } diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt index 3f0ea12146c3..4ff17d5356cf 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt @@ -5,42 +5,54 @@ package app.tauri.plugin import app.tauri.Logger - -const val CHANNEL_PREFIX = "__CHANNEL__:" +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper class Invoke( val id: Long, val command: String, val callback: Long, val error: Long, - private val sendResponse: (callback: Long, data: PluginResult?) -> Unit, - private val sendChannelData: (channelId: Long, data: PluginResult) -> Unit, - val data: JSObject) { + private val sendResponse: (callback: Long, data: String) -> Unit, + private val argsJson: String, + private val jsonMapper: ObjectMapper +) { + fun parseArgs(cls: Class): T { + return jsonMapper.readValue(argsJson, cls) + } + + fun parseArgs(ref: TypeReference): T { + return jsonMapper.readValue(argsJson, ref) + } fun resolve(data: JSObject?) { - val result = PluginResult(data) - sendResponse(callback, result) + sendResponse(callback, PluginResult(data).toString()) + } + + fun resolveObject(data: Any) { + sendResponse(callback, jsonMapper.writeValueAsString(data)) } fun resolve() { - sendResponse(callback, null) + sendResponse(callback, "null") } fun reject(msg: String?, code: String?, ex: Exception?, data: JSObject?) { val errorResult = PluginResult() + if (ex != null) { Logger.error(Logger.tags("Plugin"), msg!!, ex) } - try { - errorResult.put("message", msg) + + errorResult.put("message", msg) + if (code != null) { errorResult.put("code", code) - if (null != data) { - errorResult.put("data", data) - } - } catch (jsonEx: Exception) { - Logger.error(Logger.tags("Plugin"), jsonEx.message!!, jsonEx) } - sendResponse(error, errorResult) + if (data != null) { + errorResult.put("data", data) + } + + sendResponse(error, errorResult.toString()) } fun reject(msg: String?, ex: Exception?, data: JSObject?) { @@ -70,142 +82,4 @@ class Invoke( fun reject(msg: String?) { reject(msg, null, null, null) } - - fun getString(name: String): String? { - return getStringInternal(name, null) - } - - fun getString(name: String, defaultValue: String): String { - return getStringInternal(name, defaultValue)!! - } - - private fun getStringInternal(name: String, defaultValue: String?): String? { - val value = data.opt(name) ?: return defaultValue - return if (value is String) { - value - } else defaultValue - } - - fun getInt(name: String): Int? { - return getIntInternal(name, null) - } - - fun getInt(name: String, defaultValue: Int): Int { - return getIntInternal(name, defaultValue)!! - } - - private fun getIntInternal(name: String, defaultValue: Int?): Int? { - val value = data.opt(name) ?: return defaultValue - return if (value is Int) { - value - } else defaultValue - } - - fun getLong(name: String): Long? { - return getLongInternal(name, null) - } - - fun getLong(name: String, defaultValue: Long): Long { - return getLongInternal(name, defaultValue)!! - } - - private fun getLongInternal(name: String, defaultValue: Long?): Long? { - val value = data.opt(name) ?: return defaultValue - return if (value is Long) { - value - } else defaultValue - } - - fun getFloat(name: String): Float? { - return getFloatInternal(name, null) - } - - fun getFloat(name: String, defaultValue: Float): Float { - return getFloatInternal(name, defaultValue)!! - } - - private fun getFloatInternal(name: String, defaultValue: Float?): Float? { - val value = data.opt(name) ?: return defaultValue - if (value is Float) { - return value - } - if (value is Double) { - return value.toFloat() - } - return if (value is Int) { - value.toFloat() - } else defaultValue - } - - fun getDouble(name: String): Double? { - return getDoubleInternal(name, null) - } - - fun getDouble(name: String, defaultValue: Double): Double { - return getDoubleInternal(name, defaultValue)!! - } - - private fun getDoubleInternal(name: String, defaultValue: Double?): Double? { - val value = data.opt(name) ?: return defaultValue - if (value is Double) { - return value - } - if (value is Float) { - return value.toDouble() - } - return if (value is Int) { - value.toDouble() - } else defaultValue - } - - fun getBoolean(name: String): Boolean? { - return getBooleanInternal(name, null) - } - - fun getBoolean(name: String, defaultValue: Boolean): Boolean { - return getBooleanInternal(name, defaultValue)!! - } - - private fun getBooleanInternal(name: String, defaultValue: Boolean?): Boolean? { - val value = data.opt(name) ?: return defaultValue - return if (value is Boolean) { - value - } else defaultValue - } - - fun getObject(name: String): JSObject? { - return getObjectInternal(name, null) - } - - fun getObject(name: String, defaultValue: JSObject): JSObject { - return getObjectInternal(name, defaultValue)!! - } - - private fun getObjectInternal(name: String, defaultValue: JSObject?): JSObject? { - val value = data.opt(name) ?: return defaultValue - return if (value is JSObject) value else defaultValue - } - - fun getArray(name: String): JSArray? { - return getArrayInternal(name, null) - } - - fun getArray(name: String, defaultValue: JSArray): JSArray { - return getArrayInternal(name, defaultValue)!! - } - - private fun getArrayInternal(name: String, defaultValue: JSArray?): JSArray? { - val value = data.opt(name) ?: return defaultValue - return if (value is JSArray) value else defaultValue - } - - fun hasOption(name: String): Boolean { - return data.has(name) - } - - fun getChannel(name: String): Channel? { - val channelDef = getString(name, "") - val callback = channelDef.substring(CHANNEL_PREFIX.length).toLongOrNull() ?: return null - return Channel(callback) { res -> sendChannelData(callback, PluginResult(res)) } - } } diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt index 5f1ee212fa41..aa5c573b62c6 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt @@ -16,20 +16,42 @@ import app.tauri.PermissionHelper import app.tauri.PermissionState import app.tauri.annotation.ActivityCallback import app.tauri.annotation.Command +import app.tauri.annotation.InvokeArg import app.tauri.annotation.PermissionCallback import app.tauri.annotation.TauriPlugin +import com.fasterxml.jackson.databind.ObjectMapper import org.json.JSONException import java.util.* import java.util.concurrent.CopyOnWriteArrayList +@InvokeArg +internal class RegisterListenerArgs { + lateinit var event: String + lateinit var handler: Channel +} + +@InvokeArg +internal class RemoveListenerArgs { + lateinit var event: String + var channelId: Long = 0 +} + +@InvokeArg internal class RequestPermissionsArgs { + var permissions: List? = null +} + abstract class Plugin(private val activity: Activity) { var handle: PluginHandle? = null private val listeners: MutableMap> = mutableMapOf() open fun load(webView: WebView) {} - fun getConfig(): JSObject { - return handle!!.config + fun jsonMapper(): ObjectMapper { + return handle!!.jsonMapper + } + + fun getConfig(cls: Class): T { + return jsonMapper().readValue(handle!!.config, cls) } /** @@ -88,20 +110,25 @@ abstract class Plugin(private val activity: Activity) { } } + fun triggerObject(event: String, payload: Any) { + val eventListeners = listeners[event] + if (!eventListeners.isNullOrEmpty()) { + val listeners = CopyOnWriteArrayList(eventListeners) + for (channel in listeners) { + channel.sendObject(payload) + } + } + } + @Command open fun registerListener(invoke: Invoke) { - val event = invoke.getString("event") - val channel = invoke.getChannel("handler") + val args = invoke.parseArgs(RegisterListenerArgs::class.java) - if (event == null || channel == null) { - invoke.reject("`event` or `handler` not provided") + val eventListeners = listeners[args.event] + if (eventListeners.isNullOrEmpty()) { + listeners[args.event] = mutableListOf(args.handler) } else { - val eventListeners = listeners[event] - if (eventListeners.isNullOrEmpty()) { - listeners[event] = mutableListOf(channel) - } else { - eventListeners.add(channel) - } + eventListeners.add(args.handler) } invoke.resolve() @@ -109,18 +136,13 @@ abstract class Plugin(private val activity: Activity) { @Command open fun removeListener(invoke: Invoke) { - val event = invoke.getString("event") - val channelId = invoke.getLong("channelId") + val args = invoke.parseArgs(RemoveListenerArgs::class.java) - if (event == null || channelId == null) { - invoke.reject("`event` or `channelId` not provided") - } else { - val eventListeners = listeners[event] - if (!eventListeners.isNullOrEmpty()) { - val c = eventListeners.find { c -> c.id == channelId } - if (c != null) { - eventListeners.remove(c) - } + val eventListeners = listeners[args.event] + if (!eventListeners.isNullOrEmpty()) { + val c = eventListeners.find { c -> c.id == args.channelId } + if (c != null) { + eventListeners.remove(c) } } @@ -165,26 +187,32 @@ abstract class Plugin(private val activity: Activity) { var permAliases: Array? = null val autoGrantPerms: MutableSet = HashSet() - // If call was made with a list of specific permission aliases to request, save them - // to be requested - val providedPerms: JSArray = invoke.getArray("permissions", JSArray()) - var providedPermsList: List? = null - try { - providedPermsList = providedPerms.toList() - } catch (ignore: JSONException) { - // do nothing - } + val args = invoke.parseArgs(RequestPermissionsArgs::class.java) + + args.permissions?.let { + val aliasSet: MutableSet = HashSet() + + for (perm in annotation.permissions) { + if (it.contains(perm.alias)) { + aliasSet.add(perm.alias) + } + } + if (aliasSet.isEmpty()) { + invoke.reject("No valid permission alias was requested of this plugin.") + return + } else { + permAliases = aliasSet.toTypedArray() + } + } ?: run { + val aliasSet: MutableSet = HashSet() - // If call was made without any custom permissions, request all from plugin annotation - val aliasSet: MutableSet = HashSet() - if (providedPermsList.isNullOrEmpty()) { for (perm in annotation.permissions) { // If a permission is defined with no permission strings, separate it for auto-granting. // Otherwise, the alias is added to the list to be requested. if (perm.strings.isEmpty() || perm.strings.size == 1 && perm.strings[0] .isEmpty() ) { - if (!perm.alias.isEmpty()) { + if (perm.alias.isNotEmpty()) { autoGrantPerms.add(perm.alias) } } else { @@ -192,31 +220,23 @@ abstract class Plugin(private val activity: Activity) { } } permAliases = aliasSet.toTypedArray() - } else { - for (perm in annotation.permissions) { - if (providedPermsList.contains(perm.alias)) { - aliasSet.add(perm.alias) - } - } - if (aliasSet.isEmpty()) { - invoke.reject("No valid permission alias was requested of this plugin.") - } else { - permAliases = aliasSet.toTypedArray() - } } - if (!permAliases.isNullOrEmpty()) { + + permAliases?.let { // request permissions using provided aliases or all defined on the plugin - requestPermissionForAliases(permAliases, invoke, "checkPermissions") - } else if (autoGrantPerms.isNotEmpty()) { - // if the plugin only has auto-grant permissions, return all as GRANTED - val permissionsResults = JSObject() - for (perm in autoGrantPerms) { - permissionsResults.put(perm, PermissionState.GRANTED.toString()) + requestPermissionForAliases(it, invoke, "checkPermissions") + } ?: run { + if (autoGrantPerms.isNotEmpty()) { + // if the plugin only has auto-grant permissions, return all as GRANTED + val permissionsResults = JSObject() + for (perm in autoGrantPerms) { + permissionsResults.put(perm, PermissionState.GRANTED.toString()) + } + invoke.resolve(permissionsResults) + } else { + // no permissions are defined on the plugin, resolve undefined + invoke.resolve() } - invoke.resolve(permissionsResults) - } else { - // no permissions are defined on the plugin, resolve undefined - invoke.resolve() } } } @@ -288,15 +308,15 @@ abstract class Plugin(private val activity: Activity) { * [PermissionCallback] annotation. * * @param alias an alias defined on the plugin - * @param invoke the invoke involved in originating the request + * @param invoke the invoke involved in originating the request * @param callbackName the name of the callback to run when the permission request is complete */ protected fun requestPermissionForAlias( alias: String, - call: Invoke, + invoke: Invoke, callbackName: String ) { - requestPermissionForAliases(arrayOf(alias), call, callbackName) + requestPermissionForAliases(arrayOf(alias), invoke, callbackName) } /** diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginHandle.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginHandle.kt index 08f4a0862519..30d1d77c9627 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginHandle.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginHandle.kt @@ -15,11 +15,10 @@ import app.tauri.annotation.ActivityCallback import app.tauri.annotation.Command import app.tauri.annotation.PermissionCallback import app.tauri.annotation.TauriPlugin +import com.fasterxml.jackson.databind.ObjectMapper import java.lang.reflect.Method -import java.util.Arrays - -class PluginHandle(private val manager: PluginManager, val name: String, val instance: Plugin, val config: JSObject) { +class PluginHandle(private val manager: PluginManager, val name: String, val instance: Plugin, val config: String, val jsonMapper: ObjectMapper) { private val commands: HashMap = HashMap() private val permissionCallbackMethods: HashMap = HashMap() private val startActivityCallbackMethods: HashMap = HashMap() diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt index 62ddc8d19d5a..74a21ed824f4 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt @@ -11,9 +11,15 @@ import androidx.activity.result.ActivityResult import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity +import app.tauri.annotation.InvokeArg import app.tauri.FsUtils import app.tauri.JniMethod import app.tauri.Logger +import com.fasterxml.jackson.databind.DeserializationFeature +import com.fasterxml.jackson.databind.JsonNode +import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.databind.module.SimpleModule +import java.lang.reflect.InvocationTargetException class PluginManager(val activity: AppCompatActivity) { fun interface RequestPermissionsCallback { @@ -29,6 +35,7 @@ class PluginManager(val activity: AppCompatActivity) { private val requestPermissionsLauncher: ActivityResultLauncher> private var requestPermissionsCallback: RequestPermissionsCallback? = null private var startActivityForResultCallback: ActivityResultCallback? = null + private var jsonMapper: ObjectMapper init { startActivityForResultLauncher = @@ -46,6 +53,16 @@ class PluginManager(val activity: AppCompatActivity) { requestPermissionsCallback!!.onResult(result) } } + + jsonMapper = ObjectMapper() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES) + + val channelDeserializer = ChannelDeserializer({ channelId, payload -> + sendChannelData(channelId, payload) + }, jsonMapper) + jsonMapper + .registerModule(SimpleModule().addDeserializer(Channel::class.java, channelDeserializer)) } fun onNewIntent(intent: Intent) { @@ -77,8 +94,8 @@ class PluginManager(val activity: AppCompatActivity) { } @JniMethod - fun load(webView: WebView?, name: String, plugin: Plugin, config: JSObject) { - val handle = PluginHandle(this, name, plugin, config) + fun load(webView: WebView?, name: String, plugin: Plugin, config: String) { + val handle = PluginHandle(this, name, plugin, config, jsonMapper) plugins[name] = handle if (webView != null) { plugin.load(webView) @@ -86,21 +103,19 @@ class PluginManager(val activity: AppCompatActivity) { } @JniMethod - fun runCommand(id: Int, pluginId: String, command: String, data: JSObject) { + fun runCommand(id: Int, pluginId: String, command: String, data: String) { val successId = 0L val errorId = 1L val invoke = Invoke(id.toLong(), command, successId, errorId, { fn, result -> - var success: PluginResult? = null - var error: PluginResult? = null + var success: String? = null + var error: String? = null if (fn == successId) { success = result } else { error = result } - handlePluginResponse(id, success?.toString(), error?.toString()) - }, { channelId, payload -> - sendChannelData(channelId, payload.toString()) - }, data) + handlePluginResponse(id, success, error) + }, data, jsonMapper) dispatchPluginMessage(invoke, pluginId) } @@ -119,19 +134,31 @@ class PluginManager(val activity: AppCompatActivity) { plugins[pluginId]?.invoke(invoke) } } catch (e: Exception) { - invoke.reject(if (e.message?.isEmpty() != false) { e.toString() } else { e.message }) + var exception: Throwable = e + if (exception.message?.isEmpty() != false) { + if (e is InvocationTargetException) { + exception = e.targetException + } + } + invoke.reject(if (exception.message?.isEmpty() != false) { exception.toString() } else { exception.message }) } } companion object { - fun loadConfig(context: Context, plugin: String): JSObject { + fun loadConfig(context: Context, plugin: String, cls: Class): T { val tauriConfigJson = FsUtils.readAsset(context.assets, "tauri.conf.json") - val tauriConfig = JSObject(tauriConfigJson) - val plugins = tauriConfig.getJSObject("plugins", JSObject()) - return plugins.getJSObject(plugin, JSObject()) + val mapper = ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + val config = mapper.readValue(tauriConfigJson, Config::class.java) + return mapper.readValue(config.plugins[plugin].toString(), cls) } } private external fun handlePluginResponse(id: Int, success: String?, error: String?) private external fun sendChannelData(id: Long, data: String) } + +@InvokeArg +internal class Config { + lateinit var plugins: Map +} diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift index f3d03ba662b7..798104c7a349 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift @@ -2,16 +2,64 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -public class Channel { +import Foundation + +let CHANNEL_PREFIX = "__CHANNEL__:" +let channelDataKey = CodingUserInfoKey(rawValue: "sendChannelData")! + +public class Channel: Decodable { public let id: UInt64 - let handler: (JsonValue) -> Void + let handler: (String) -> Void + + public required init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + let channelDef = try container.decode(String.self) + + let components = channelDef.components(separatedBy: CHANNEL_PREFIX) + if components.count < 2 { + throw DecodingError.dataCorruptedError( + in: container, + debugDescription: "Invalid channel definition from \(channelDef)" + ) - public init(id: UInt64, handler: @escaping (JsonValue) -> Void) { - self.id = id + } + guard let channelId = UInt64(components[1]) else { + throw DecodingError.dataCorruptedError( + in: container, + debugDescription: "Invalid channel ID from \(channelDef)" + ) + } + + guard let handler = decoder.userInfo[channelDataKey] as? (String) -> Void else { + throw DecodingError.dataCorruptedError( + in: container, + debugDescription: "missing userInfo for Channel handler. This is a Tauri issue" + ) + } + + self.id = channelId self.handler = handler } + func serialize(_ data: JsonValue) -> String { + do { + return try data.jsonRepresentation() ?? "\"Failed to serialize payload\"" + } catch { + return "\"\(error)\"" + } + } + public func send(_ data: JsonObject) { - handler(.dictionary(data)) + send(.dictionary(data)) + } + + public func send(_ data: JsonValue) { + handler(serialize(data)) } + + public func send(_ data: T) throws { + let json = try JSONEncoder().encode(data) + handler(String(decoding: json, as: UTF8.self)) + } + } diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift index f7490ae35bdc..72f124d48c78 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift @@ -5,37 +5,42 @@ import Foundation import UIKit -let CHANNEL_PREFIX = "__CHANNEL__:" - -@objc public class Invoke: NSObject, JSValueContainer, BridgedJSValueContainer { - public var dictionaryRepresentation: NSDictionary { - return data as NSDictionary - } - - public static var jsDateFormatter: ISO8601DateFormatter = { - return ISO8601DateFormatter() - }() - - public var command: String - var callback: UInt64 - var error: UInt64 - public var data: JSObject - var sendResponse: (UInt64, JsonValue?) -> Void - var sendChannelData: (UInt64, JsonValue) -> Void +@objc public class Invoke: NSObject { + public let command: String + let callback: UInt64 + let error: UInt64 + let data: String + let sendResponse: (UInt64, String?) -> Void + let sendChannelData: (UInt64, String) -> Void public init( command: String, callback: UInt64, error: UInt64, - sendResponse: @escaping (UInt64, JsonValue?) -> Void, - sendChannelData: @escaping (UInt64, JsonValue) -> Void, data: JSObject? + sendResponse: @escaping (UInt64, String?) -> Void, + sendChannelData: @escaping (UInt64, String) -> Void, data: String ) { self.command = command self.callback = callback self.error = error - self.data = data ?? [:] + self.data = data self.sendResponse = sendResponse self.sendChannelData = sendChannelData } + public func parseArgs(_ type: T.Type) throws -> T { + let jsonData = self.data.data(using: .utf8)! + let decoder = JSONDecoder() + decoder.userInfo[channelDataKey] = sendChannelData + return try decoder.decode(type, from: jsonData) + } + + func serialize(_ data: JsonValue) -> String { + do { + return try data.jsonRepresentation() ?? "\"Failed to serialize payload\"" + } catch { + return "\"\(error)\"" + } + } + public func resolve() { sendResponse(callback, nil) } @@ -45,15 +50,33 @@ let CHANNEL_PREFIX = "__CHANNEL__:" } public func resolve(_ data: JsonValue) { - sendResponse(callback, data) + sendResponse(callback, serialize(data)) + } + + public func resolve(_ data: T) { + do { + let json = try JSONEncoder().encode(data) + sendResponse(callback, String(decoding: json, as: UTF8.self)) + } catch { + sendResponse(self.error, "\"\(error)\"") + } } public func reject( - _ message: String, _ code: String? = nil, _ error: Error? = nil, _ data: JsonValue? = nil + _ message: String, code: String? = nil, error: Error? = nil, data: JsonValue? = nil ) { let payload: NSMutableDictionary = [ - "message": message, "code": code ?? "", "error": error ?? "", + "message": message ] + + if let code = code { + payload["code"] = code + } + + if let error = error { + payload["error"] = error + } + if let data = data { switch data { case .dictionary(let dict): @@ -62,7 +85,8 @@ let CHANNEL_PREFIX = "__CHANNEL__:" } } } - sendResponse(self.error, .dictionary(payload as! JsonObject)) + + sendResponse(self.error, serialize(.dictionary(payload as! JsonObject))) } public func unimplemented() { @@ -70,7 +94,7 @@ let CHANNEL_PREFIX = "__CHANNEL__:" } public func unimplemented(_ message: String) { - sendResponse(error, .dictionary(["message": message])) + reject(message) } public func unavailable() { @@ -78,22 +102,6 @@ let CHANNEL_PREFIX = "__CHANNEL__:" } public func unavailable(_ message: String) { - sendResponse(error, .dictionary(["message": message])) - } - - public func getChannel(_ key: String) -> Channel? { - let channelDef = getString(key, "") - let components = channelDef.components(separatedBy: CHANNEL_PREFIX) - if components.count < 2 { - return nil - } - guard let channelId = UInt64(components[1]) else { - return nil - } - return Channel( - id: channelId, - handler: { (res: JsonValue) -> Void in - self.sendChannelData(channelId, res) - }) + reject(message) } } diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/JSTypes.swift b/core/tauri/mobile/ios-api/Sources/Tauri/JSTypes.swift index d1c3fb07b485..505342dba646 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/JSTypes.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/JSTypes.swift @@ -5,238 +5,18 @@ import Foundation // declare our empty protocol, and conformance, for typing -public protocol JSValue { } -extension String: JSValue { } -extension Bool: JSValue { } -extension Int: JSValue { } -extension Float: JSValue { } -extension Double: JSValue { } -extension NSNumber: JSValue { } -extension NSNull: JSValue { } -extension Array: JSValue { } -extension Date: JSValue { } -extension Dictionary: JSValue where Key == String, Value == JSValue { } +public protocol JSValue {} +extension String: JSValue {} +extension Bool: JSValue {} +extension Int: JSValue {} +extension Float: JSValue {} +extension Double: JSValue {} +extension NSNumber: JSValue {} +extension NSNull: JSValue {} +extension Array: JSValue {} +extension Date: JSValue {} +extension Dictionary: JSValue where Key == String, Value == JSValue {} // convenience aliases public typealias JSObject = [String: JSValue] public typealias JSArray = [JSValue] - -// string types -public protocol JSStringContainer { - func getString(_ key: String, _ defaultValue: String) -> String - func getString(_ key: String) -> String? -} - -extension JSStringContainer { - public func getString(_ key: String, _ defaultValue: String) -> String { - return getString(key) ?? defaultValue - } -} - -// boolean types -public protocol JSBoolContainer { - func getBool(_ key: String, _ defaultValue: Bool) -> Bool - func getBool(_ key: String) -> Bool? -} - -extension JSBoolContainer { - public func getBool(_ key: String, _ defaultValue: Bool) -> Bool { - return getBool(key) ?? defaultValue - } -} - -// integer types -public protocol JSIntContainer { - func getInt(_ key: String, _ defaultValue: Int) -> Int - func getInt(_ key: String) -> Int? -} - -extension JSIntContainer { - public func getInt(_ key: String, _ defaultValue: Int) -> Int { - return getInt(key) ?? defaultValue - } -} - -// float types -public protocol JSFloatContainer { - func getFloat(_ key: String, _ defaultValue: Float) -> Float - func getFloat(_ key: String) -> Float? -} - -extension JSFloatContainer { - public func getFloat(_ key: String, _ defaultValue: Float) -> Float { - return getFloat(key) ?? defaultValue - } -} - -// double types -public protocol JSDoubleContainer { - func getDouble(_ key: String, _ defaultValue: Double) -> Double - func getDouble(_ key: String) -> Double? -} - -extension JSDoubleContainer { - public func getDouble(_ key: String, _ defaultValue: Double) -> Double { - return getDouble(key) ?? defaultValue - } -} - -// date types -public protocol JSDateContainer { - func getDate(_ key: String, _ defaultValue: Date) -> Date - func getDate(_ key: String) -> Date? -} - -extension JSDateContainer { - public func getDate(_ key: String, _ defaultValue: Date) -> Date { - return getDate(key) ?? defaultValue - } -} - -// array types -public protocol JSArrayContainer { - func getArray(_ key: String, _ defaultValue: JSArray) -> JSArray - func getArray(_ key: String, _ ofType: T.Type) -> [T]? - func getArray(_ key: String) -> JSArray? -} - -extension JSArrayContainer { - public func getArray(_ key: String, _ defaultValue: JSArray) -> JSArray { - return getArray(key) ?? defaultValue - } - - public func getArray(_ key: String, _ ofType: T.Type) -> [T]? { - return getArray(key) as? [T] - } -} - -// dictionary types -public protocol JSObjectContainer { - func getObject(_ key: String, _ defaultValue: JSObject) -> JSObject - func getObject(_ key: String) -> JSObject? -} - -extension JSObjectContainer { - public func getObject(_ key: String, _ defaultValue: JSObject) -> JSObject { - return getObject(key) ?? defaultValue - } -} - -public protocol JSValueContainer: JSStringContainer, JSBoolContainer, JSIntContainer, JSFloatContainer, - JSDoubleContainer, JSDateContainer, JSArrayContainer, JSObjectContainer { - static var jsDateFormatter: ISO8601DateFormatter { get } - var data: JSObject { get } -} - -extension JSValueContainer { - public func getValue(_ key: String) -> JSValue? { - return data[key] - } - - public func getString(_ key: String) -> String? { - return data[key] as? String - } - - public func getBool(_ key: String) -> Bool? { - return data[key] as? Bool - } - - public func getInt(_ key: String) -> Int? { - return data[key] as? Int - } - - public func getFloat(_ key: String) -> Float? { - if let floatValue = data[key] as? Float { - return floatValue - } else if let doubleValue = data[key] as? Double { - return Float(doubleValue) - } - return nil - } - - public func getDouble(_ key: String) -> Double? { - return data[key] as? Double - } - - public func getDate(_ key: String) -> Date? { - if let isoString = data[key] as? String { - return Self.jsDateFormatter.date(from: isoString) - } - return data[key] as? Date - } - - public func getArray(_ key: String) -> JSArray? { - return data[key] as? JSArray - } - - public func getObject(_ key: String) -> JSObject? { - return data[key] as? JSObject - } -} - -@objc protocol BridgedJSValueContainer: NSObjectProtocol { - static var jsDateFormatter: ISO8601DateFormatter { get } - var dictionaryRepresentation: NSDictionary { get } -} - -/* - Simply casting objects from foundation class clusters (such as __NSArrayM) - doesn't work with the JSValue protocol and will always fail. So we need to - recursively and explicitly convert each value in the dictionary. - */ -public enum JSTypes { } -extension JSTypes { - public static func coerceDictionaryToJSObject(_ dictionary: NSDictionary?, formattingDatesAsStrings: Bool = false) -> JSObject? { - return coerceToJSValue(dictionary, formattingDates: formattingDatesAsStrings) as? JSObject - } - - public static func coerceDictionaryToJSObject(_ dictionary: [AnyHashable: Any]?, formattingDatesAsStrings: Bool = false) -> JSObject? { - return coerceToJSValue(dictionary, formattingDates: formattingDatesAsStrings) as? JSObject - } - - public static func coerceArrayToJSArray(_ array: [Any]?, formattingDatesAsStrings: Bool = false) -> JSArray? { - return array?.compactMap { coerceToJSValue($0, formattingDates: formattingDatesAsStrings) } - } -} - -private let dateStringFormatter = ISO8601DateFormatter() - -// We need a large switch statement because we have a lot of types. -// swiftlint:disable:next cyclomatic_complexity -private func coerceToJSValue(_ value: Any?, formattingDates: Bool) -> JSValue? { - guard let value = value else { - return nil - } - switch value { - case let stringValue as String: - return stringValue - case let numberValue as NSNumber: - return numberValue - case let boolValue as Bool: - return boolValue - case let intValue as Int: - return intValue - case let floatValue as Float: - return floatValue - case let doubleValue as Double: - return doubleValue - case let dateValue as Date: - if formattingDates { - return dateStringFormatter.string(from: dateValue) - } - return dateValue - case let nullValue as NSNull: - return nullValue - case let arrayValue as NSArray: - return arrayValue.compactMap { coerceToJSValue($0, formattingDates: formattingDates) } - case let dictionaryValue as NSDictionary: - let keys = dictionaryValue.allKeys.compactMap { $0 as? String } - var result: JSObject = [:] - for key in keys { - result[key] = coerceToJSValue(dictionaryValue[key], formattingDates: formattingDates) - } - return result - default: - return nil - } -} diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Plugin/Plugin.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Plugin/Plugin.swift index 50179e2da09d..c90715b588dc 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/Plugin/Plugin.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Plugin/Plugin.swift @@ -5,15 +5,31 @@ import WebKit import os.log +struct RegisterListenerArgs: Decodable { + let event: String + let handler: Channel +} + +struct RemoveListenerArgs: Decodable { + let event: String + let channelId: UInt64 +} + open class Plugin: NSObject { public let manager: PluginManager = PluginManager.shared - public var config: JSObject = [:] + var config: String = "{}" private var listeners = [String: [Channel]]() - internal func setConfig(_ config: JSObject) { + internal func setConfig(_ config: String) { self.config = config } + public func parseConfig(_ type: T.Type) throws -> T { + let jsonData = self.config.data(using: .utf8)! + let decoder = JSONDecoder() + return try decoder.decode(type, from: jsonData) + } + @objc open func load(webview: WKWebView) {} @objc open func checkPermissions(_ invoke: Invoke) { @@ -32,38 +48,32 @@ open class Plugin: NSObject { } } - @objc func registerListener(_ invoke: Invoke) { - guard let event = invoke.getString("event") else { - invoke.reject("`event` not provided") - return - } - guard let channel = invoke.getChannel("handler") else { - invoke.reject("`handler` not provided") - return + public func trigger(_ event: String, data: T) throws { + if let eventListeners = listeners[event] { + for channel in eventListeners { + try channel.send(data) + } } + } + + @objc func registerListener(_ invoke: Invoke) throws { + let args = try invoke.parseArgs(RegisterListenerArgs.self) - if var eventListeners = listeners[event] { - eventListeners.append(channel) + if var eventListeners = listeners[args.event] { + eventListeners.append(args.handler) } else { - listeners[event] = [channel] + listeners[args.event] = [args.handler] } invoke.resolve() } - @objc func removeListener(_ invoke: Invoke) { - guard let event = invoke.getString("event") else { - invoke.reject("`event` not provided") - return - } + @objc func removeListener(_ invoke: Invoke) throws { + let args = try invoke.parseArgs(RemoveListenerArgs.self) - if let eventListeners = listeners[event] { - guard let channelId = invoke.getInt("channelId") else { - invoke.reject("`channelId` not provided") - return - } + if let eventListeners = listeners[args.event] { - listeners[event] = eventListeners.filter { $0.id != channelId } + listeners[args.event] = eventListeners.filter { $0.id != args.channelId } } invoke.resolve() diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift index 80a80fab764d..d130015df278 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift @@ -46,7 +46,7 @@ public class PluginManager { } } - func load(name: String, plugin: P, config: JSObject, webview: WKWebView?) { + func load(name: String, plugin: P, config: String, webview: WKWebView?) { plugin.setConfig(config) let handle = PluginHandle(plugin: plugin) if let webview = webview { @@ -95,11 +95,11 @@ extension PluginManager: NSCopying { } @_cdecl("register_plugin") -func registerPlugin(name: SRString, plugin: NSObject, config: NSDictionary?, webview: WKWebView?) { +func registerPlugin(name: SRString, plugin: NSObject, config: SRString, webview: WKWebView?) { PluginManager.shared.load( name: name.toString(), plugin: plugin as! Plugin, - config: JSTypes.coerceDictionaryToJSObject(config ?? [:], formattingDatesAsStrings: true)!, + config: config.toString(), webview: webview ) } @@ -115,34 +115,20 @@ func runCommand( id: Int, name: SRString, command: SRString, - data: NSDictionary, - callback: @escaping @convention(c) (Int, Bool, UnsafePointer?) -> Void, + data: SRString, + callback: @escaping @convention(c) (Int, Bool, UnsafePointer) -> Void, sendChannelData: @escaping @convention(c) (UInt64, UnsafePointer) -> Void ) { let callbackId: UInt64 = 0 let errorId: UInt64 = 1 let invoke = Invoke( command: command.toString(), callback: callbackId, error: errorId, - sendResponse: { (fn: UInt64, payload: JsonValue?) -> Void in + sendResponse: { (fn: UInt64, payload: String?) -> Void in let success = fn == callbackId - var payloadJson: String = "" - do { - try payloadJson = - payload == nil ? "null" : payload!.jsonRepresentation() ?? "`Failed to serialize payload`" - } catch { - payloadJson = "`\(error)`" - } - callback(id, success, payloadJson.cString(using: String.Encoding.utf8)) + callback(id, success, payload ?? "null") }, - sendChannelData: { (id: UInt64, payload: JsonValue) -> Void in - var payloadJson: String = "" - do { - try payloadJson = - payload.jsonRepresentation() ?? "`Failed to serialize payload`" - } catch { - payloadJson = "`\(error)`" - } - sendChannelData(id, payloadJson) - }, data: JSTypes.coerceDictionaryToJSObject(data, formattingDatesAsStrings: true)) + sendChannelData: { (id: UInt64, payload: String) -> Void in + sendChannelData(id, payload) + }, data: data.toString()) PluginManager.shared.invoke(name: name.toString(), invoke: invoke) } diff --git a/core/tauri/src/ios.rs b/core/tauri/src/ios.rs index 16bb3c6e5cf7..a46bf1741634 100644 --- a/core/tauri/src/ios.rs +++ b/core/tauri/src/ios.rs @@ -2,9 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use cocoa::base::{id, nil, NO, YES}; -use objc::*; -use serde_json::Value as JsonValue; use swift_rs::{swift, SRString, SwiftArg}; use std::{ @@ -38,143 +35,14 @@ swift!(pub fn run_plugin_command( id: i32, name: &SRString, method: &SRString, - data: *const c_void, + data: &SRString, callback: PluginMessageCallback, send_channel_data_callback: ChannelSendDataCallback )); swift!(pub fn register_plugin( name: &SRString, plugin: *const c_void, - config: *const c_void, + config: &SRString, webview: *const c_void )); swift!(pub fn on_webview_created(webview: *const c_void, controller: *const c_void)); - -pub fn json_to_dictionary(json: &JsonValue) -> id { - if let serde_json::Value::Object(map) = json { - unsafe { - let dictionary: id = msg_send![class!(NSMutableDictionary), alloc]; - let data: id = msg_send![dictionary, init]; - for (key, value) in map { - add_json_entry_to_dictionary(data, key, value); - } - data - } - } else { - nil - } -} - -const UTF8_ENCODING: usize = 4; - -struct NSString(id); - -impl NSString { - fn new(s: &str) -> Self { - // Safety: objc runtime calls are unsafe - NSString(unsafe { - let ns_string: id = msg_send![class!(NSString), alloc]; - let ns_string: id = msg_send![ns_string, - initWithBytes:s.as_ptr() - length:s.len() - encoding:UTF8_ENCODING]; - - // The thing is allocated in rust, the thing must be set to autorelease in rust to relinquish control - // or it can not be released correctly in OC runtime - let _: () = msg_send![ns_string, autorelease]; - - ns_string - }) - } -} - -unsafe fn add_json_value_to_array(array: id, value: &JsonValue) { - match value { - JsonValue::Null => { - let null: id = msg_send![class!(NSNull), null]; - let () = msg_send![array, addObject: null]; - } - JsonValue::Bool(val) => { - let value = if *val { YES } else { NO }; - let v: id = msg_send![class!(NSNumber), numberWithBool: value]; - let () = msg_send![array, addObject: v]; - } - JsonValue::Number(val) => { - let number: id = if let Some(v) = val.as_i64() { - msg_send![class!(NSNumber), numberWithInteger: v] - } else if let Some(v) = val.as_u64() { - msg_send![class!(NSNumber), numberWithUnsignedLongLong: v] - } else if let Some(v) = val.as_f64() { - msg_send![class!(NSNumber), numberWithDouble: v] - } else { - unreachable!() - }; - let () = msg_send![array, addObject: number]; - } - JsonValue::String(val) => { - let () = msg_send![array, addObject: NSString::new(val)]; - } - JsonValue::Array(val) => { - let nsarray: id = msg_send![class!(NSMutableArray), alloc]; - let inner_array: id = msg_send![nsarray, init]; - for value in val { - add_json_value_to_array(inner_array, value); - } - let () = msg_send![array, addObject: inner_array]; - } - JsonValue::Object(val) => { - let dictionary: id = msg_send![class!(NSMutableDictionary), alloc]; - let data: id = msg_send![dictionary, init]; - for (key, value) in val { - add_json_entry_to_dictionary(data, key, value); - } - let () = msg_send![array, addObject: data]; - } - } -} - -unsafe fn add_json_entry_to_dictionary(data: id, key: &str, value: &JsonValue) { - let key = NSString::new(key); - match value { - JsonValue::Null => { - let null: id = msg_send![class!(NSNull), null]; - let () = msg_send![data, setObject:null forKey: key]; - } - JsonValue::Bool(val) => { - let flag = if *val { YES } else { NO }; - let value: id = msg_send![class!(NSNumber), numberWithBool: flag]; - let () = msg_send![data, setObject:value forKey: key]; - } - JsonValue::Number(val) => { - let number: id = if let Some(v) = val.as_i64() { - msg_send![class!(NSNumber), numberWithInteger: v] - } else if let Some(v) = val.as_u64() { - msg_send![class!(NSNumber), numberWithUnsignedLongLong: v] - } else if let Some(v) = val.as_f64() { - msg_send![class!(NSNumber), numberWithDouble: v] - } else { - unreachable!() - }; - let () = msg_send![data, setObject:number forKey: key]; - } - JsonValue::String(val) => { - let () = msg_send![data, setObject:NSString::new(val) forKey: key]; - } - JsonValue::Array(val) => { - let nsarray: id = msg_send![class!(NSMutableArray), alloc]; - let array: id = msg_send![nsarray, init]; - for value in val { - add_json_value_to_array(array, value); - } - let () = msg_send![data, setObject:array forKey: key]; - } - JsonValue::Object(val) => { - let dictionary: id = msg_send![class!(NSMutableDictionary), alloc]; - let inner_data: id = msg_send![dictionary, init]; - for (key, value) in val { - add_json_entry_to_dictionary(inner_data, key, value); - } - let () = msg_send![data, setObject:inner_data forKey: key]; - } - } -} diff --git a/core/tauri/src/jni_helpers.rs b/core/tauri/src/jni_helpers.rs deleted file mode 100644 index 4f72bfacef19..000000000000 --- a/core/tauri/src/jni_helpers.rs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use crate::Runtime; -use jni::{ - errors::Error as JniError, - objects::{JObject, JValueOwned}, - JNIEnv, -}; -use serde_json::Value as JsonValue; -use tauri_runtime::RuntimeHandle; - -fn json_to_java<'a, R: Runtime>( - env: &mut JNIEnv<'a>, - activity: &JObject<'_>, - runtime_handle: &R::Handle, - json: &JsonValue, -) -> Result<(&'static str, JValueOwned<'a>), JniError> { - let (class, v) = match json { - JsonValue::Null => ("Ljava/lang/Object;", JObject::null().into()), - JsonValue::Bool(val) => ("Z", (*val).into()), - JsonValue::Number(val) => { - if let Some(v) = val.as_i64() { - ("J", v.into()) - } else if let Some(v) = val.as_f64() { - ("D", v.into()) - } else { - ("Ljava/lang/Object;", JObject::null().into()) - } - } - JsonValue::String(val) => ( - "Ljava/lang/Object;", - JObject::from(env.new_string(val)?).into(), - ), - JsonValue::Array(val) => { - let js_array_class = runtime_handle.find_class(env, activity, "app/tauri/plugin/JSArray")?; - let data = env.new_object(js_array_class, "()V", &[])?; - - for v in val { - let (signature, val) = json_to_java::(env, activity, runtime_handle, v)?; - env.call_method( - &data, - "put", - format!("({signature})Lorg/json/JSONArray;"), - &[val.borrow()], - )?; - } - - ("Ljava/lang/Object;", data.into()) - } - JsonValue::Object(val) => { - let data = { - let js_object_class = - runtime_handle.find_class(env, activity, "app/tauri/plugin/JSObject")?; - env.new_object(js_object_class, "()V", &[])? - }; - - for (key, value) in val { - let (signature, val) = json_to_java::(env, activity, runtime_handle, value)?; - let key = env.new_string(key)?; - env.call_method( - &data, - "put", - format!("(Ljava/lang/String;{signature})Lapp/tauri/plugin/JSObject;"), - &[(&key).into(), val.borrow()], - )?; - } - - ("Ljava/lang/Object;", data.into()) - } - }; - Ok((class, v)) -} - -pub fn to_jsobject<'a, R: Runtime>( - env: &mut JNIEnv<'a>, - activity: &JObject<'_>, - runtime_handle: &R::Handle, - json: &JsonValue, -) -> Result, JniError> { - if let JsonValue::Object(_) = json { - json_to_java::(env, activity, runtime_handle, json).map(|(_class, data)| data) - } else { - Ok(empty_object::(env, activity, runtime_handle)?.into()) - } -} - -fn empty_object<'a, R: Runtime>( - env: &mut JNIEnv<'a>, - activity: &JObject<'_>, - runtime_handle: &R::Handle, -) -> Result, JniError> { - // currently the Kotlin lib cannot handle nulls or raw values, it must be an object - let js_object_class = runtime_handle.find_class(env, activity, "app/tauri/plugin/JSObject")?; - let data = env.new_object(js_object_class, "()V", &[])?; - Ok(data) -} diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 2e1a1c25a179..61a6b2fe662e 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -88,8 +88,6 @@ pub mod window; use tauri_runtime as runtime; #[cfg(target_os = "ios")] mod ios; -#[cfg(target_os = "android")] -mod jni_helpers; #[cfg(desktop)] pub mod menu; /// Path APIs. diff --git a/core/tauri/src/plugin/mobile.rs b/core/tauri/src/plugin/mobile.rs index a708f509add8..15f49aa79e02 100644 --- a/core/tauri/src/plugin/mobile.rs +++ b/core/tauri/src/plugin/mobile.rs @@ -168,7 +168,7 @@ impl PluginApi { crate::ios::register_plugin( &name.into(), init_fn(), - crate::ios::json_to_dictionary(&config) as _, + &serde_json::to_string(&config).unwrap().as_str().into(), w.inner() as _, ) }; @@ -181,7 +181,10 @@ impl PluginApi { crate::ios::register_plugin( &self.name.into(), init_fn(), - crate::ios::json_to_dictionary(&self.raw_config) as _, + &serde_json::to_string(&self.raw_config) + .unwrap() + .as_str() + .into(), std::ptr::null(), ) }; @@ -230,17 +233,16 @@ impl PluginApi { .l()?; let plugin_name = env.new_string(plugin_name)?; - let config = - crate::jni_helpers::to_jsobject::(env, activity, &runtime_handle, plugin_config)?; + let config = env.new_string(&serde_json::to_string(plugin_config).unwrap())?; env.call_method( plugin_manager, "load", - "(Landroid/webkit/WebView;Ljava/lang/String;Lapp/tauri/plugin/Plugin;Lapp/tauri/plugin/JSObject;)V", + "(Landroid/webkit/WebView;Ljava/lang/String;Lapp/tauri/plugin/Plugin;Ljava/lang/String;)V", &[ webview.into(), (&plugin_name).into(), (&plugin).into(), - config.borrow() + (&config).into(), ], )?; @@ -381,7 +383,7 @@ pub(crate) fn run_command, F: FnOnce(PluginResponse) + id, &name.into(), &command.as_ref().into(), - crate::ios::json_to_dictionary(&payload) as _, + &serde_json::to_string(&payload).unwrap().as_str().into(), crate::ios::PluginMessageCallback(plugin_command_response_handler), crate::ios::ChannelSendDataCallback(send_channel_data_handler), ); @@ -409,13 +411,12 @@ pub(crate) fn run_command< plugin: &str, command: String, payload: &serde_json::Value, - runtime_handle: R::Handle, env: &mut JNIEnv<'_>, activity: &JObject<'_>, ) -> Result<(), JniError> { let plugin = env.new_string(plugin)?; let command = env.new_string(&command)?; - let data = crate::jni_helpers::to_jsobject::(env, activity, &runtime_handle, payload)?; + let data = env.new_string(&serde_json::to_string(payload).unwrap())?; let plugin_manager = env .call_method( activity, @@ -428,12 +429,12 @@ pub(crate) fn run_command< env.call_method( plugin_manager, "runCommand", - "(ILjava/lang/String;Ljava/lang/String;Lapp/tauri/plugin/JSObject;)V", + "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", &[ id.into(), (&plugin).into(), (&command).into(), - data.borrow(), + (&data).into(), ], )?; @@ -449,7 +450,6 @@ pub(crate) fn run_command< let id: i32 = PENDING_PLUGIN_CALLS_ID.fetch_add(1, Ordering::Relaxed); let plugin_name = name.to_string(); let command = command.as_ref().to_string(); - let handle_ = handle.clone(); PENDING_PLUGIN_CALLS .get_or_init(Default::default) @@ -458,7 +458,7 @@ pub(crate) fn run_command< .insert(id, Box::new(handler.clone())); handle.run_on_android_context(move |env, activity, _webview| { - if let Err(e) = run::(id, &plugin_name, command, &payload, handle_, env, activity) { + if let Err(e) = run::(id, &plugin_name, command, &payload, env, activity) { handler(Err(e.to_string().into())); } }); diff --git a/core/tauri/src/protocol/tauri.rs b/core/tauri/src/protocol/tauri.rs index bd2ba5d11436..0b67c111c2f4 100644 --- a/core/tauri/src/protocol/tauri.rs +++ b/core/tauri/src/protocol/tauri.rs @@ -27,7 +27,7 @@ struct CachedResponse { } pub fn get( - manager: &WindowManager, + #[allow(unused_variables)] manager: &WindowManager, window_origin: &str, web_resource_request_handler: Option>, ) -> UriSchemeProtocolHandler { diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index e62cececc225..62a76a73e5e7 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -82,24 +82,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" -[[package]] -name = "android_log-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" - -[[package]] -name = "android_logger" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8619b80c242aa7bd638b5c7ddd952addeecb71f69c75e33f1d47b2804f8f883a" -dependencies = [ - "android_log-sys", - "env_logger", - "log", - "once_cell", -] - [[package]] name = "android_system_properties" version = "0.1.5" @@ -173,7 +155,6 @@ dependencies = [ "tauri", "tauri-build", "tauri-plugin-cli", - "tauri-plugin-log", "tauri-plugin-sample", "tiny_http", "window-shadows", @@ -451,16 +432,6 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" -[[package]] -name = "byte-unit" -version = "4.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" -dependencies = [ - "serde", - "utf8-width", -] - [[package]] name = "bytemuck" version = "1.14.0" @@ -1021,16 +992,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "log", - "regex", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -1088,15 +1049,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "fern" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" -dependencies = [ - "log", -] - [[package]] name = "field-offset" version = "0.3.6" @@ -2018,9 +1970,6 @@ name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] [[package]] name = "loom" @@ -2275,15 +2224,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -3579,26 +3519,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "tauri-plugin-log" -version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=next#4a10f218f0e1fdd66a549dc0bf16be3efb17ea49" -dependencies = [ - "android_logger", - "byte-unit", - "cocoa 0.24.1", - "fern", - "log", - "objc", - "serde", - "serde_json", - "serde_repr", - "swift-rs", - "tauri", - "tauri-build", - "time", -] - [[package]] name = "tauri-plugin-sample" version = "0.1.0" @@ -3753,8 +3673,6 @@ checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa 1.0.9", - "libc", - "num_threads", "powerfmt", "serde", "time-core", @@ -4065,12 +3983,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8-width" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" - [[package]] name = "utf8parse" version = "0.2.1" @@ -4092,12 +4004,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" - [[package]] name = "version-compare" version = "0.1.1" diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 728eee79a903..a8c625a387cf 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -18,7 +18,6 @@ serde_json = "1.0" serde = { version = "1.0", features = [ "derive" ] } tiny_http = "0.11" log = "0.4" -tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } tauri-plugin-sample = { path = "./tauri-plugin-sample/" } [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 9a06be515b09..9c08b55ec587 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -43,11 +43,6 @@ pub fn run_app) + Send + 'static>( ) { #[allow(unused_mut)] let mut builder = builder - .plugin( - tauri_plugin_log::Builder::default() - .level(log::LevelFilter::Info) - .build(), - ) .plugin(tauri_plugin_sample::init()) .setup(move |app| { #[cfg(desktop)] diff --git a/examples/api/src-tauri/tauri-plugin-sample/android/src/main/java/com/plugin/sample/ExamplePlugin.kt b/examples/api/src-tauri/tauri-plugin-sample/android/src/main/java/com/plugin/sample/ExamplePlugin.kt index 69f11898eac5..e61e08209dde 100644 --- a/examples/api/src-tauri/tauri-plugin-sample/android/src/main/java/com/plugin/sample/ExamplePlugin.kt +++ b/examples/api/src-tauri/tauri-plugin-sample/android/src/main/java/com/plugin/sample/ExamplePlugin.kt @@ -6,25 +6,33 @@ package com.plugin.sample import android.app.Activity import app.tauri.annotation.Command +import app.tauri.annotation.InvokeArg import app.tauri.annotation.TauriPlugin +import app.tauri.plugin.Channel import app.tauri.plugin.JSObject import app.tauri.plugin.Plugin import app.tauri.plugin.Invoke +@InvokeArg +class PingArgs { + var value: String? = null + var onEvent: Channel? = null +} + @TauriPlugin class ExamplePlugin(private val activity: Activity): Plugin(activity) { private val implementation = Example() @Command fun ping(invoke: Invoke) { - val onEvent = invoke.getChannel("onEvent") + val args = invoke.parseArgs(PingArgs::class.java) + val event = JSObject() event.put("kind", "ping") - onEvent?.send(event) + args.onEvent?.send(event) - val value = invoke.getString("value") ?: "" val ret = JSObject() - ret.put("value", implementation.pong(value)) + ret.put("value", implementation.pong(args.value ?: "default value :(")) invoke.resolve(ret) } } diff --git a/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift b/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift index 9774ba895dd0..b68793867f67 100644 --- a/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift +++ b/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift @@ -7,13 +7,16 @@ import Tauri import UIKit import WebKit +class PingArgs: Decodable { + let value: String? + let onEvent: Channel? +} + class ExamplePlugin: Plugin { @objc public func ping(_ invoke: Invoke) throws { - let onEvent = invoke.getChannel("onEvent") - onEvent?.send(["kind": "ping"]) - - let value = invoke.getString("value") - invoke.resolve(["value": value as Any]) + let args = try invoke.parseArgs(PingArgs.self) + args.onEvent?.send(["kind": "ping"]) + invoke.resolve(["value": args.value ?? ""]) } } diff --git a/tooling/cli/templates/plugin/android/src/main/java/ExamplePlugin.kt b/tooling/cli/templates/plugin/android/src/main/java/ExamplePlugin.kt index 81ab5be9bf54..68a36ca01cab 100644 --- a/tooling/cli/templates/plugin/android/src/main/java/ExamplePlugin.kt +++ b/tooling/cli/templates/plugin/android/src/main/java/ExamplePlugin.kt @@ -2,20 +2,27 @@ package {{android_package_id}} import android.app.Activity import app.tauri.annotation.Command +import app.tauri.annotation.InvokeArg import app.tauri.annotation.TauriPlugin import app.tauri.plugin.JSObject import app.tauri.plugin.Plugin import app.tauri.plugin.Invoke +@InvokeArg +class PingArgs { + var value: String? = null +} + @TauriPlugin class ExamplePlugin(private val activity: Activity): Plugin(activity) { private val implementation = Example() @Command fun ping(invoke: Invoke) { - val value = invoke.getString("value") ?: "" + val args = invoke.parseArgs(PingArgs::class.java) + val ret = JSObject() - ret.put("value", implementation.pong(value)) + ret.put("value", implementation.pong(args.value ?: "default value :(")) invoke.resolve(ret) } } diff --git a/tooling/cli/templates/plugin/ios/Sources/ExamplePlugin.swift b/tooling/cli/templates/plugin/ios/Sources/ExamplePlugin.swift index 3923f5129131..526d730631ad 100644 --- a/tooling/cli/templates/plugin/ios/Sources/ExamplePlugin.swift +++ b/tooling/cli/templates/plugin/ios/Sources/ExamplePlugin.swift @@ -1,16 +1,20 @@ +import SwiftRs +import Tauri import UIKit import WebKit -import Tauri -import SwiftRs + +class PingArgs: Decodable { + let value: String? +} class ExamplePlugin: Plugin { - @objc public func ping(_ invoke: Invoke) throws { - let value = invoke.getString("value") - invoke.resolve(["value": value as Any]) - } + @objc public func ping(_ invoke: Invoke) throws { + let args = try invoke.parseArgs(PingArgs.self) + invoke.resolve(["value": args.value ?? ""]) + } } @_cdecl("init_plugin_{{ plugin_name_snake_case }}") func initPlugin() -> Plugin { - return ExamplePlugin() + return ExamplePlugin() } From 93c8a77b347b9934ec0732784d4b78b3260abc08 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 23 Oct 2023 21:10:01 +0300 Subject: [PATCH 111/122] refactor: enhance event system rust apis (#7996) Co-authored-by: Lucas Nogueira --- .changes/tauri-event-system-apis.md | 12 ++ core/tauri/src/app.rs | 2 +- core/tauri/src/event/listener.rs | 113 +++++++---- core/tauri/src/event/mod.rs | 102 ++++++++-- core/tauri/src/event/plugin.rs | 27 +-- core/tauri/src/lib.rs | 164 +++++++-------- core/tauri/src/manager.rs | 301 ++++++++++++++++++++++------ core/tauri/src/scope/fs.rs | 10 +- core/tauri/src/window/mod.rs | 137 +++---------- 9 files changed, 521 insertions(+), 347 deletions(-) create mode 100644 .changes/tauri-event-system-apis.md diff --git a/.changes/tauri-event-system-apis.md b/.changes/tauri-event-system-apis.md new file mode 100644 index 000000000000..adc60a5a0fb9 --- /dev/null +++ b/.changes/tauri-event-system-apis.md @@ -0,0 +1,12 @@ +--- +'tauri': 'major:breaking' +--- + +The event system APIS on Rust is recieving a few changes for consistency and quality of life improvements: + +- Renamed `Manager::emit_all` to just `Manager::emit` and will now both trigger the events on JS side as well as Rust. +- Removed `Manager::trigger_global`, use `Manager::emit` +- Added `Manager::emit_filter`. +- Removed `Window::emit`, and moved the implementation to `Manager::emit`. +- Removed `Window::emit_and_trigger` and `Window::trigger`, use `Window::emit` instead. +- Changed `Window::emit_to` to only trigger the target window listeners so it won't be catched by `Manager::listen_global` diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 2c953f5aa35f..fa993606971b 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -246,7 +246,7 @@ impl GlobalWindowEvent { &self.event } - /// The window that the menu belongs to. + /// The window that the event belongs to. pub fn window(&self) -> &Window { &self.window } diff --git a/core/tauri/src/event/listener.rs b/core/tauri/src/event/listener.rs index 6b9fa2f9075b..a6182414fee7 100644 --- a/core/tauri/src/event/listener.rs +++ b/core/tauri/src/event/listener.rs @@ -2,7 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use super::{Event, EventId}; +use crate::{Runtime, Window}; + +use super::{EmitArgs, Event, EventId}; use std::{ boxed::Box, @@ -15,33 +17,33 @@ use std::{ }; /// What to do with the pending handler when resolving it? -enum Pending { +enum Pending { Unlisten(EventId), - Listen(EventId, String, Handler), - Trigger(String, Option, Option), + Listen(EventId, String, Handler), + Emit(EmitArgs), } /// Stored in [`Listeners`] to be called upon when the event that stored it is triggered. -struct Handler { - window: Option, +struct Handler { + window: Option>, callback: Box, } /// Holds event handlers and pending event handlers, along with the salts associating them. -struct InnerListeners { - handlers: Mutex>>, - pending: Mutex>, +struct InnerListeners { + handlers: Mutex>>>, + pending: Mutex>>, function_name: &'static str, listeners_object_name: &'static str, next_event_id: Arc, } /// A self-contained event manager. -pub struct Listeners { - inner: Arc, +pub struct Listeners { + inner: Arc>, } -impl Default for Listeners { +impl Default for Listeners { fn default() -> Self { Self { inner: Arc::new(InnerListeners { @@ -55,7 +57,7 @@ impl Default for Listeners { } } -impl Clone for Listeners { +impl Clone for Listeners { fn clone(&self) -> Self { Self { inner: self.inner.clone(), @@ -63,7 +65,7 @@ impl Clone for Listeners { } } -impl Listeners { +impl Listeners { pub(crate) fn next_event_id(&self) -> EventId { self.inner.next_event_id.fetch_add(1, Ordering::Relaxed) } @@ -79,7 +81,7 @@ impl Listeners { } /// Insert a pending event action to the queue. - fn insert_pending(&self, action: Pending) { + fn insert_pending(&self, action: Pending) { self .inner .pending @@ -89,7 +91,7 @@ impl Listeners { } /// Finish all pending event actions. - fn flush_pending(&self) { + fn flush_pending(&self) -> crate::Result<()> { let pending = { let mut lock = self .inner @@ -102,13 +104,17 @@ impl Listeners { for action in pending { match action { Pending::Unlisten(id) => self.unlisten(id), - Pending::Listen(id, event, handler) => self.listen_(id, event, handler), - Pending::Trigger(ref event, window, payload) => self.trigger(event, window, payload), + Pending::Listen(id, event, handler) => self.listen_with_id(id, event, handler), + Pending::Emit(args) => { + self.emit(&args)?; + } } } + + Ok(()) } - fn listen_(&self, id: EventId, event: String, handler: Handler) { + fn listen_with_id(&self, id: EventId, event: String, handler: Handler) { match self.inner.handlers.try_lock() { Err(_) => self.insert_pending(Pending::Listen(id, event, handler)), Ok(mut lock) => { @@ -117,11 +123,11 @@ impl Listeners { } } - /// Adds an event listener for JS events. + /// Adds an event listener. pub(crate) fn listen( &self, event: String, - window: Option, + window: Option>, handler: F, ) -> EventId { let id = self.next_event_id(); @@ -130,16 +136,16 @@ impl Listeners { callback: Box::new(handler), }; - self.listen_(id, event, handler); + self.listen_with_id(id, event, handler); id } - /// Listen to a JS event and immediately unlisten. + /// Listen to an event and immediately unlisten. pub(crate) fn once( &self, event: String, - window: Option, + window: Option>, handler: F, ) { let self_ = self.clone(); @@ -164,19 +170,42 @@ impl Listeners { } } - /// Triggers the given global event with its payload. - pub(crate) fn trigger(&self, event: &str, window: Option, payload: Option) { + /// Emits the given event with its payload based on a filter. + pub(crate) fn emit_filter(&self, emit_args: &EmitArgs, filter: Option) -> crate::Result<()> + where + F: Fn(&Window) -> bool, + { let mut maybe_pending = false; match self.inner.handlers.try_lock() { - Err(_) => self.insert_pending(Pending::Trigger(event.to_owned(), window, payload)), + Err(_) => self.insert_pending(Pending::Emit(emit_args.clone())), Ok(lock) => { - if let Some(handlers) = lock.get(event) { - for (&id, handler) in handlers { - if handler.window.is_none() || window == handler.window { + if let Some(handlers) = lock.get(&emit_args.event_name) { + let handlers = if let Some(filter) = filter { + handlers + .iter() + .filter(|h| { + h.1 + .window + .as_ref() + .map(|w| { + // clippy sees this as redundant closure but + // fixing it will result in a compiler error + #[allow(clippy::redundant_closure)] + filter(w) + }) + .unwrap_or(false) + }) + .collect::>() + } else { + handlers.iter().collect::>() + }; + + if !handlers.is_empty() { + for (&id, handler) in handlers { maybe_pending = true; (handler.callback)(self::Event { id, - data: payload.clone(), + data: emit_args.payload.clone(), }) } } @@ -185,14 +214,22 @@ impl Listeners { } if maybe_pending { - self.flush_pending(); + self.flush_pending()?; } + + Ok(()) + } + + /// Emits the given event with its payload. + pub(crate) fn emit(&self, emit_args: &EmitArgs) -> crate::Result<()> { + self.emit_filter(emit_args, None::<&dyn Fn(&Window) -> bool>) } } #[cfg(test)] mod test { use super::*; + use crate::test::MockRuntime; use proptest::prelude::*; // dummy event handler function @@ -206,7 +243,7 @@ mod test { // check to see if listen() is properly passing keys into the LISTENERS map #[test] fn listeners_check_key(e in "[a-z]+") { - let listeners: Listeners = Default::default(); + let listeners: Listeners = Default::default(); // clone e as the key let key = e.clone(); // pass e and an dummy func into listen @@ -222,7 +259,7 @@ mod test { // check to see if listen inputs a handler function properly into the LISTENERS map. #[test] fn listeners_check_fn(e in "[a-z]+") { - let listeners: Listeners = Default::default(); + let listeners: Listeners = Default::default(); // clone e as the key let key = e.clone(); // pass e and an dummy func into listen @@ -248,11 +285,11 @@ mod test { // check to see if on_event properly grabs the stored function from listen. #[test] fn check_on_event(key in "[a-z]+", d in "[a-z]+") { - let listeners: Listeners = Default::default(); - // call listen with e and the event_fn dummy func + let listeners: Listeners = Default::default(); + // call listen with key and the event_fn dummy func listeners.listen(key.clone(), None, event_fn); - // call on event with e and d. - listeners.trigger(&key, None, Some(d)); + // call on event with key and d. + listeners.emit(&EmitArgs { event_name: key.clone(), event: serde_json::to_string(&key).unwrap(), source_window_label: "null".into(), payload: serde_json::to_string(&d).unwrap() })?; // lock the mutex let l = listeners.inner.handlers.lock().unwrap(); diff --git a/core/tauri/src/event/mod.rs b/core/tauri/src/event/mod.rs index decb189b2c05..b16dcb515ed4 100644 --- a/core/tauri/src/event/mod.rs +++ b/core/tauri/src/event/mod.rs @@ -5,6 +5,7 @@ mod listener; pub(crate) mod plugin; pub(crate) use listener::Listeners; +use serde::Serialize; /// Checks if an event name is valid. pub fn is_event_name_valid(event: &str) -> bool { @@ -23,11 +24,39 @@ pub fn assert_event_name_is_valid(event: &str) { /// Unique id of an event. pub type EventId = u32; -/// An event that was triggered. +/// Serialized emit arguments. +#[derive(Clone)] +pub struct EmitArgs { + /// Raw event name. + pub event_name: String, + /// Serialized event name. + pub event: String, + /// Serialized source window label ("null" for global events) + pub source_window_label: String, + /// Serialized payload. + pub payload: String, +} + +impl EmitArgs { + pub fn from( + event: &str, + source_window_label: Option<&str>, + payload: S, + ) -> crate::Result { + Ok(EmitArgs { + event_name: event.into(), + event: serde_json::to_string(event)?, + source_window_label: serde_json::to_string(&source_window_label)?, + payload: serde_json::to_string(&payload)?, + }) + } +} + +/// An event that was emitted. #[derive(Debug, Clone)] pub struct Event { id: EventId, - data: Option, + data: String, } impl Event { @@ -37,27 +66,11 @@ impl Event { } /// The event payload. - pub fn payload(&self) -> Option<&str> { - self.data.as_deref() + pub fn payload(&self) -> &str { + &self.data } } -pub fn unlisten_js(listeners_object_name: &str, event_name: &str, event_id: EventId) -> String { - format!( - " - (function () {{ - const listeners = (window['{listeners_object_name}'] || {{}})['{event_name}'] - if (listeners) {{ - const index = window['{listeners_object_name}']['{event_name}'].findIndex(e => e.id === {event_id}) - if (index > -1) {{ - window['{listeners_object_name}']['{event_name}'].splice(index, 1) - }} - }} - }})() - ", - ) -} - pub fn listen_js( listeners_object_name: &str, event: &str, @@ -92,3 +105,52 @@ pub fn listen_js( }, ) } + +pub fn emit_js(event_emit_function_name: &str, emit_args: &EmitArgs) -> crate::Result { + Ok(format!( + "(function () {{ const fn = window['{}']; fn && fn({{event: {}, windowLabel: {}, payload: {}}}) }})()", + event_emit_function_name, + emit_args.event, + emit_args.source_window_label, + emit_args.payload + )) +} + +pub fn unlisten_js(listeners_object_name: &str, event_name: &str, event_id: EventId) -> String { + format!( + " + (function () {{ + const listeners = (window['{listeners_object_name}'] || {{}})['{event_name}'] + if (listeners) {{ + const index = window['{listeners_object_name}']['{event_name}'].findIndex(e => e.id === {event_id}) + if (index > -1) {{ + window['{listeners_object_name}']['{event_name}'].splice(index, 1) + }} + }} + }})() + ", + ) +} + +pub fn event_initialization_script(function: &str, listeners: &str) -> String { + format!( + " + Object.defineProperty(window, '{function}', {{ + value: function (eventData) {{ + const listeners = (window['{listeners}'] && window['{listeners}'][eventData.event]) || [] + + for (let i = listeners.length - 1; i >= 0; i--) {{ + const listener = listeners[i] + if ( + (listener.windowLabel && listener.windowLabel === eventData.windowLabel) || + (!listener.windowLabel && (listener.windowLabel === null || eventData.windowLabel === null)) + ) {{ + eventData.id = listener.id + listener.handler(eventData) + }} + }} + }} + }}); + " + ) +} diff --git a/core/tauri/src/event/plugin.rs b/core/tauri/src/event/plugin.rs index 236c1a6eb362..004023dbebd4 100644 --- a/core/tauri/src/event/plugin.rs +++ b/core/tauri/src/event/plugin.rs @@ -37,6 +37,12 @@ impl<'de> Deserialize<'de> for EventName { pub struct WindowLabel(String); +impl AsRef for WindowLabel { + fn as_ref(&self) -> &str { + &self.0 + } +} + impl<'de> Deserialize<'de> for WindowLabel { fn deserialize(deserializer: D) -> std::result::Result where @@ -75,25 +81,10 @@ pub fn emit( window_label: Option, payload: Option, ) -> Result<()> { - // dispatch the event to Rust listeners - window.trigger( - &event.0, - payload.as_ref().and_then(|p| { - serde_json::to_string(&p) - .map_err(|e| { - #[cfg(debug_assertions)] - eprintln!("{e}"); - e - }) - .ok() - }), - ); - - // emit event to JS - if let Some(target) = window_label { - window.emit_to(&target.0, &event.0, payload) + if let Some(label) = window_label { + window.emit_filter(&event.0, payload, |w| label.as_ref() == w.label()) } else { - window.emit_all(&event.0, payload) + window.emit(&event.0, payload) } } diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 61a6b2fe662e..fb56aa01e0ea 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -546,67 +546,7 @@ pub trait Manager: sealed::ManagerBase { self.manager().package_info() } - /// 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`]. - /// - /// # Examples - /// ``` - /// use tauri::Manager; - /// - /// #[tauri::command] - /// fn synchronize(app: tauri::AppHandle) { - /// // emits the synchronized event to all windows - /// app.emit_all("synchronized", ()); - /// } - /// ``` - fn emit_all(&self, event: &str, payload: S) -> Result<()> { - 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 - /// ``` - /// use tauri::Manager; - /// - /// #[tauri::command] - /// fn download(app: tauri::AppHandle) { - /// for i in 1..100 { - /// std::thread::sleep(std::time::Duration::from_millis(150)); - /// // emit a download progress event to the updater window - /// app.emit_to("updater", "download-progress", i); - /// } - /// } - /// ``` - fn emit_to(&self, label: &str, event: &str, payload: S) -> Result<()> { - self - .manager() - .emit_filter(event, None, payload, |w| label == w.label()) - } - - /// Listen to a event triggered on any window ([`Window::trigger`] or [`Window::emit_and_trigger`]) or with [`Self::trigger_global`]. + /// Listen to an event emitted on any window. /// /// # Examples /// ``` @@ -615,7 +555,7 @@ pub trait Manager: sealed::ManagerBase { /// #[tauri::command] /// fn synchronize(window: tauri::Window) { /// // emits the synchronized event to all windows - /// window.emit_and_trigger("synchronized", ()); + /// window.emit("synchronized", ()); /// } /// /// tauri::Builder::default() @@ -634,6 +574,34 @@ pub trait Manager: sealed::ManagerBase { self.manager().listen(event.into(), None, handler) } + /// Remove an event listener. + /// + /// # Examples + /// ``` + /// use tauri::Manager; + /// + /// tauri::Builder::default() + /// .setup(|app| { + /// let handle = app.handle().clone(); + /// let handler = app.listen_global("ready", move |event| { + /// println!("app is ready"); + /// + /// // we no longer need to listen to the event + /// // we also could have used `app.once_global` instead + /// handle.unlisten(event.id()); + /// }); + /// + /// // stop listening to the event when you do not need it anymore + /// app.unlisten(handler); + /// + /// + /// Ok(()) + /// }); + /// ``` + fn unlisten(&self, id: EventId) { + self.manager().unlisten(id) + } + /// Listen to a global event only once. /// /// See [`Self::listen_global`] for more information. @@ -644,12 +612,27 @@ pub trait Manager: sealed::ManagerBase { self.manager().once(event.into(), None, handler) } - /// Trigger a global event to Rust listeners. - /// To send the events to the webview, see [`Self::emit_all`] and [`Self::emit_to`]. - /// To trigger listeners registed on an specific window, see [`Window::trigger`]. - /// To trigger all listeners, see [`Window::emit_and_trigger`]. + /// Emits an event to all windows. + /// + /// If using [`Window`] to emit the event, it will be used as the source. + /// + /// # Examples + /// ``` + /// use tauri::Manager; + /// + /// #[tauri::command] + /// fn synchronize(app: tauri::AppHandle) { + /// // emits the synchronized event to all windows + /// app.emit("synchronized", ()); + /// } + /// ``` + fn emit(&self, event: &str, payload: S) -> Result<()> { + self.manager().emit(event, None, payload) + } + + /// Emits an event to the window with the specified label. /// - /// A global event does not have a source or target window attached. + /// If using [`Window`] to emit the event, it will be used as the source. /// /// # Examples /// ``` @@ -659,41 +642,40 @@ pub trait Manager: sealed::ManagerBase { /// fn download(app: tauri::AppHandle) { /// for i in 1..100 { /// std::thread::sleep(std::time::Duration::from_millis(150)); - /// // emit a download progress event to all listeners registed in Rust - /// app.trigger_global("download-progress", Some(i.to_string())); + /// // emit a download progress event to the updater window + /// app.emit_to("updater", "download-progress", i); /// } /// } /// ``` - fn trigger_global(&self, event: &str, data: Option) { - self.manager().trigger(event, None, data) + fn emit_to(&self, label: &str, event: &str, payload: S) -> Result<()> { + self + .manager() + .emit_filter(event, None, payload, |w| label == w.label()) } - /// Remove an event listener. + /// Emits an event to specific windows based on a filter. + /// + /// If using [`Window`] to emit the event, it will be used as the source. /// /// # Examples /// ``` /// use tauri::Manager; /// - /// tauri::Builder::default() - /// .setup(|app| { - /// let handle = app.handle().clone(); - /// let handler = app.listen_global("ready", move |event| { - /// println!("app is ready"); - /// - /// // we no longer need to listen to the event - /// // we also could have used `app.once_global` instead - /// handle.unlisten(event.id()); - /// }); - /// - /// // stop listening to the event when you do not need it anymore - /// app.unlisten(handler); - /// - /// - /// Ok(()) - /// }); + /// #[tauri::command] + /// fn download(app: tauri::AppHandle) { + /// for i in 1..100 { + /// std::thread::sleep(std::time::Duration::from_millis(150)); + /// // emit a download progress event to the updater window + /// app.emit_filter("download-progress", i, |w| w.label() == "main" ); + /// } + /// } /// ``` - fn unlisten(&self, id: EventId) { - self.manager().unlisten(id) + 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) } /// Fetch a single window from the manager. diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 358d541e9625..2154b0979e81 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -27,7 +27,7 @@ use tauri_utils::{ html::{SCRIPT_NONCE_TOKEN, STYLE_NONCE_TOKEN}, }; -use crate::window::WindowEmitArgs; +use crate::event::EmitArgs; use crate::{ app::{ AppHandle, GlobalWindowEvent, GlobalWindowEventListener, OnPageLoad, PageLoadPayload, @@ -225,7 +225,7 @@ fn replace_csp_nonce( pub struct InnerWindowManager { pub(crate) windows: Mutex>>, pub(crate) plugins: Mutex>, - listeners: Listeners, + listeners: Listeners, pub(crate) state: Arc, /// The JS message handler. @@ -847,7 +847,10 @@ impl WindowManager { } .render_default(&Default::default())? .into_string(), - event_initialization_script: &self.event_initialization_script(), + event_initialization_script: &crate::event::event_initialization_script( + self.listeners().function_name(), + self.listeners().listeners_object_name(), + ), plugin_initialization_script, freeze_prototype, } @@ -856,29 +859,7 @@ impl WindowManager { .map_err(Into::into) } - fn event_initialization_script(&self) -> String { - format!( - " - Object.defineProperty(window, '{function}', {{ - value: function (eventData) {{ - const listeners = (window['{listeners}'] && window['{listeners}'][eventData.event]) || [] - - for (let i = listeners.length - 1; i >= 0; i--) {{ - const listener = listeners[i] - if (listener.windowLabel === null || eventData.windowLabel === null || listener.windowLabel === eventData.windowLabel) {{ - eventData.id = listener.id - listener.handler(eventData) - }} - }} - }} - }}); - ", - function = self.listeners().function_name(), - listeners = self.listeners().listeners_object_name() - ) - } - - pub(crate) fn listeners(&self) -> &Listeners { + pub(crate) fn listeners(&self) -> &Listeners { &self.inner.listeners } } @@ -1146,26 +1127,6 @@ impl WindowManager { self.windows_lock().remove(label); } - pub fn emit_filter( - &self, - event: &str, - source_window_label: Option<&str>, - payload: S, - filter: F, - ) -> crate::Result<()> - where - 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() - .values() - .filter(|&w| filter(w)) - .try_for_each(|window| window.emit_internal(&emit_args)) - } - pub fn eval_script_all>(&self, script: S) -> crate::Result<()> { let script = script.into(); self @@ -1186,21 +1147,20 @@ impl WindowManager { &self.inner.package_info } - pub fn trigger(&self, event: &str, window: Option, data: Option) { - assert_event_name_is_valid(event); - self.listeners().trigger(event, window, data) - } - pub fn listen( &self, event: String, - window: Option, + window: Option>, handler: F, ) -> EventId { assert_event_name_is_valid(&event); self.listeners().listen(event, window, handler) } + pub fn unlisten(&self, id: EventId) { + self.listeners().unlisten(id) + } + pub fn once( &self, event: String, @@ -1208,19 +1168,63 @@ impl WindowManager { handler: F, ) { assert_event_name_is_valid(&event); - self.listeners().once(event, window, handler) + self + .listeners() + .once(event, window.and_then(|w| self.get_window(&w)), handler) } - pub fn event_listeners_object_name(&self) -> &str { - self.inner.listeners.listeners_object_name() - } + pub fn emit_filter( + &self, + event: &str, + source_window_label: Option<&str>, + payload: S, + filter: F, + ) -> crate::Result<()> + where + S: Serialize + Clone, + F: Fn(&Window) -> bool, + { + assert_event_name_is_valid(event); + + let emit_args = EmitArgs::from(event, source_window_label, payload)?; + + self + .windows_lock() + .values() + .filter(|w| { + w.has_js_listener(None, event) + || w.has_js_listener(source_window_label.map(Into::into), event) + }) + .filter(|w| filter(w)) + .try_for_each(|window| window.emit_js(&emit_args))?; + + self.listeners().emit_filter(&emit_args, Some(filter))?; - pub fn event_emit_function_name(&self) -> &str { - self.inner.listeners.function_name() + Ok(()) } - pub fn unlisten(&self, id: EventId) { - self.listeners().unlisten(id) + pub fn emit( + &self, + event: &str, + source_window_label: Option<&str>, + payload: S, + ) -> crate::Result<()> { + assert_event_name_is_valid(event); + + let emit_args = EmitArgs::from(event, source_window_label, payload)?; + + self + .windows_lock() + .values() + .filter(|w| { + w.has_js_listener(None, event) + || w.has_js_listener(source_window_label.map(Into::into), event) + }) + .try_for_each(|window| window.emit_js(&emit_args))?; + + self.listeners().emit(&emit_args)?; + + Ok(()) } pub fn get_window(&self, label: &str) -> Option> { @@ -1346,10 +1350,25 @@ mod tests { #[cfg(test)] mod test { - use crate::{generate_context, plugin::PluginStore, StateManager, Wry}; + use std::{ + sync::mpsc::{channel, Receiver, Sender}, + time::Duration, + }; + + use crate::{ + generate_context, + plugin::PluginStore, + test::{mock_app, MockRuntime}, + App, Manager, StateManager, Window, WindowBuilder, Wry, + }; use super::WindowManager; + const WINDOW_LISTEN_ID: &str = "Window::listen"; + const WINDOW_LISTEN_GLOBAL_ID: &str = "Window::listen_global"; + const APP_LISTEN_GLOBAL_ID: &str = "App::listen_global"; + const TEST_EVENT_NAME: &str = "event"; + #[test] fn check_get_url() { let context = generate_context!("test/fixture/src-tauri/tauri.conf.json", crate); @@ -1380,4 +1399,164 @@ mod test { #[cfg(dev)] assert_eq!(manager.get_url().to_string(), "http://localhost:4000/"); } + + struct EventSetup { + app: App, + window: Window, + tx: Sender<(&'static str, String)>, + rx: Receiver<(&'static str, String)>, + } + + fn setup_events() -> EventSetup { + let app = mock_app(); + let window = WindowBuilder::new(&app, "main", Default::default()) + .build() + .unwrap(); + + let (tx, rx) = channel(); + + let tx_ = tx.clone(); + window.listen(TEST_EVENT_NAME, move |evt| { + tx_ + .send(( + WINDOW_LISTEN_ID, + serde_json::from_str::(evt.payload()).unwrap(), + )) + .unwrap(); + }); + + let tx_ = tx.clone(); + window.listen_global(TEST_EVENT_NAME, move |evt| { + tx_ + .send(( + WINDOW_LISTEN_GLOBAL_ID, + serde_json::from_str::(evt.payload()).unwrap(), + )) + .unwrap(); + }); + + let tx_ = tx.clone(); + app.listen_global(TEST_EVENT_NAME, move |evt| { + tx_ + .send(( + APP_LISTEN_GLOBAL_ID, + serde_json::from_str::(evt.payload()).unwrap(), + )) + .unwrap(); + }); + + EventSetup { + app, + window, + tx, + rx, + } + } + + fn assert_events(received: &[&str], expected: &[&str]) { + for e in expected { + assert!(received.contains(e), "{e} did not receive global event"); + } + assert_eq!( + received.len(), + expected.len(), + "received {:?} events but expected {:?}", + received, + expected + ); + } + + #[test] + fn app_global_events() { + let EventSetup { + app, + window: _, + tx: _, + rx, + } = setup_events(); + + let mut received = Vec::new(); + let payload = "global-payload"; + app.emit(TEST_EVENT_NAME, payload).unwrap(); + while let Ok((source, p)) = rx.recv_timeout(Duration::from_secs(1)) { + assert_eq!(p, payload); + received.push(source); + } + assert_events( + &received, + &[ + WINDOW_LISTEN_ID, + WINDOW_LISTEN_GLOBAL_ID, + APP_LISTEN_GLOBAL_ID, + ], + ); + } + + #[test] + fn window_global_events() { + let EventSetup { + app: _, + window, + tx: _, + rx, + } = setup_events(); + + let mut received = Vec::new(); + let payload = "global-payload"; + window.emit(TEST_EVENT_NAME, payload).unwrap(); + while let Ok((source, p)) = rx.recv_timeout(Duration::from_secs(1)) { + assert_eq!(p, payload); + received.push(source); + } + assert_events( + &received, + &[ + WINDOW_LISTEN_ID, + WINDOW_LISTEN_GLOBAL_ID, + APP_LISTEN_GLOBAL_ID, + ], + ); + } + + #[test] + fn window_local_events() { + let EventSetup { + app, + window, + tx, + rx, + } = setup_events(); + + let mut received = Vec::new(); + let payload = "global-payload"; + window + .emit_to(window.label(), TEST_EVENT_NAME, payload) + .unwrap(); + while let Ok((source, p)) = rx.recv_timeout(Duration::from_secs(1)) { + assert_eq!(p, payload); + received.push(source); + } + assert_events(&received, &[WINDOW_LISTEN_ID]); + + received.clear(); + let other_window_listen_id = "OtherWindow::listen"; + let other_window = WindowBuilder::new(&app, "other", Default::default()) + .build() + .unwrap(); + other_window.listen(TEST_EVENT_NAME, move |evt| { + tx.send(( + other_window_listen_id, + serde_json::from_str::(evt.payload()).unwrap(), + )) + .unwrap(); + }); + window + .emit_to(other_window.label(), TEST_EVENT_NAME, payload) + .unwrap(); + while let Ok((source, p)) = rx.recv_timeout(Duration::from_secs(1)) { + assert_eq!(p, payload); + received.push(source); + } + assert_events(&received, &[other_window_listen_id]); + } } diff --git a/core/tauri/src/scope/fs.rs b/core/tauri/src/scope/fs.rs index 498c9b73c2ed..c68b2d8ff4c4 100644 --- a/core/tauri/src/scope/fs.rs +++ b/core/tauri/src/scope/fs.rs @@ -180,7 +180,7 @@ impl Scope { self.event_listeners.lock().unwrap().remove(&id); } - fn trigger(&self, event: Event) { + fn emit(&self, event: Event) { let listeners = self.event_listeners.lock().unwrap(); let handlers = listeners.values(); for listener in handlers { @@ -204,7 +204,7 @@ impl Scope { escaped_pattern_with(p, if recursive { "**" } else { "*" }) })?; } - self.trigger(Event::PathAllowed(path.to_path_buf())); + self.emit(Event::PathAllowed(path.to_path_buf())); Ok(()) } @@ -218,7 +218,7 @@ impl Scope { path, escaped_pattern, )?; - self.trigger(Event::PathAllowed(path.to_path_buf())); + self.emit(Event::PathAllowed(path.to_path_buf())); Ok(()) } @@ -237,7 +237,7 @@ impl Scope { escaped_pattern_with(p, if recursive { "**" } else { "*" }) })?; } - self.trigger(Event::PathForbidden(path.to_path_buf())); + self.emit(Event::PathForbidden(path.to_path_buf())); Ok(()) } @@ -251,7 +251,7 @@ impl Scope { path, escaped_pattern, )?; - self.trigger(Event::PathForbidden(path.to_path_buf())); + self.emit(Event::PathForbidden(path.to_path_buf())); Ok(()) } diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index bcc39f0d962c..52802f797582 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -15,7 +15,7 @@ use crate::TitleBarStyle; use crate::{ app::{AppHandle, UriSchemeResponder}, command::{CommandArg, CommandItem}, - event::{Event, EventId}, + event::{EmitArgs, Event, EventId}, ipc::{ CallbackFn, Invoke, InvokeBody, InvokeError, InvokeMessage, InvokeResolver, OwnedInvokeResponder, @@ -71,26 +71,6 @@ 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")] @@ -976,6 +956,11 @@ impl PartialEq for Window { } impl Manager for Window { + fn emit(&self, event: &str, payload: S) -> crate::Result<()> { + self.manager().emit(event, Some(self.label()), payload)?; + Ok(()) + } + fn emit_to( &self, label: &str, @@ -987,10 +972,14 @@ impl Manager for Window { .emit_filter(event, Some(self.label()), payload, |w| label == w.label()) } - fn emit_all(&self, event: &str, payload: S) -> crate::Result<()> { + fn emit_filter(&self, event: &str, payload: S, filter: F) -> crate::Result<()> + where + S: Serialize + Clone, + F: Fn(&Window) -> bool, + { self .manager() - .emit_filter(event, Some(self.label()), payload, |_| true) + .emit_filter(event, Some(self.label()), payload, filter) } } impl ManagerBase for Window { @@ -2337,6 +2326,14 @@ impl Window { Ok(()) } + pub(crate) fn emit_js(&self, emit_args: &EmitArgs) -> crate::Result<()> { + self.eval(&crate::event::emit_js( + self.manager().listeners().function_name(), + emit_args, + )?)?; + Ok(()) + } + /// Whether this window registered a listener to an event from the given window and event name. pub(crate) fn has_js_listener(&self, window_label: Option, event: &str) -> bool { self @@ -2445,75 +2442,8 @@ impl Window { /// Event system APIs. impl Window { - /// Emits an event to both the JavaScript and the Rust listeners. - /// - /// This API is a combination of [`Self::trigger`] and [`Self::emit`]. - /// - /// # Examples - /// ``` - /// use tauri::Manager; - /// - /// #[tauri::command] - /// fn download(window: tauri::Window) { - /// window.emit_and_trigger("download-started", ()); - /// - /// for i in 1..100 { - /// std::thread::sleep(std::time::Duration::from_millis(150)); - /// // emit a download progress event to all listeners - /// window.emit_and_trigger("download-progress", i); - /// } - /// } - /// ``` - pub fn emit_and_trigger( - &self, - event: &str, - payload: S, - ) -> crate::Result<()> { - self.trigger(event, Some(serde_json::to_string(&payload)?)); - self.emit(event, payload) - } - - 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(), - emit_args.event, - emit_args.source_window_label, - emit_args.payload - ))?; - Ok(()) - } - - /// Emits an event to the JavaScript listeners on the current window or globally. - /// - /// # Examples - /// ``` - /// use tauri::Manager; - /// - /// #[tauri::command] - /// fn download(window: tauri::Window) { - /// for i in 1..100 { - /// std::thread::sleep(std::time::Duration::from_millis(150)); - /// // emit a download progress event to all listeners registed in the webview - /// window.emit("download-progress", i); - /// } - /// } - /// ``` - pub fn emit(&self, event: &str, payload: S) -> crate::Result<()> { - self - .manager - .emit_filter(event, Some(self.label()), payload, |w| { - w.has_js_listener(None, event) || w.has_js_listener(Some(self.label().into()), event) - })?; - Ok(()) - } - /// Listen to an event on this window. /// - /// This listener only receives events that are triggered using the - /// [`trigger`](Window#method.trigger) and [`emit_and_trigger`](Window#method.emit_and_trigger) methods or - /// the `emit` function from the window plugin (`@tauri-apps/api/window` package). - /// /// # Examples /// ``` /// use tauri::Manager; @@ -2532,8 +2462,9 @@ impl Window { where F: Fn(Event) + Send + 'static, { - let label = self.window.label.clone(); - self.manager.listen(event.into(), Some(label), handler) + self + .manager + .listen(event.into(), Some(self.clone()), handler) } /// Unlisten to an event on this window. @@ -2565,7 +2496,7 @@ impl Window { self.manager.unlisten(id) } - /// Listen to an event on this window a single time. + /// Listen to an event on this window only once. /// /// See [`Self::listen`] for more information. pub fn once(&self, event: impl Into, handler: F) @@ -2575,26 +2506,6 @@ impl Window { let label = self.window.label.clone(); self.manager.once(event.into(), Some(label), handler) } - - /// Triggers an event to the Rust listeners on this window or global listeners. - /// - /// # Examples - /// ``` - /// use tauri::Manager; - /// - /// #[tauri::command] - /// fn download(window: tauri::Window) { - /// for i in 1..100 { - /// std::thread::sleep(std::time::Duration::from_millis(150)); - /// // emit a download progress event to all listeners registed on `window` in Rust - /// window.trigger("download-progress", Some(i.to_string())); - /// } - /// } - /// ``` - pub fn trigger(&self, event: &str, data: Option) { - let label = self.window.label.clone(); - self.manager.trigger(event, Some(label), data) - } } /// The [`WindowEffectsConfig`] object builder From a0f7b88fd88f72e83dd7326af05c8724d9fec9a2 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 24 Oct 2023 00:22:00 +0300 Subject: [PATCH 112/122] build(api.js): simplify output JS files (#8025) Co-authored-by: Lucas Nogueira --- .../workflows/covector-version-or-publish.yml | 2 +- .github/workflows/lint-js.yml | 4 +- .prettierignore | 1 + .prettierrc | 5 + .prettierrc.js | 9 - .scripts/ci/check-license-header.js | 6 +- core/tauri/scripts/bundle.global.js | 3 +- examples/api/dist/assets/index.js | 78 +- examples/api/src-tauri/Cargo.lock | 6 +- package.json | 3 +- tooling/api/.eslintrc | 53 + tooling/api/.eslintrc.cjs | 56 - tooling/api/.npmignore | 4 - tooling/api/.prettierrc.cjs | 5 - tooling/api/package.json | 58 +- tooling/api/rollup.config.ts | 129 ++ tooling/api/scripts/after-build.cjs | 44 - tooling/api/tsconfig.json | 8 +- tooling/api/tsup.config.ts | 34 - tooling/api/yarn.lock | 1600 ++++++----------- tooling/cli/node/package.json | 6 +- tooling/cli/node/yarn.lock | 31 +- .../workflows/covector-version-or-publish.yml | 2 +- 23 files changed, 833 insertions(+), 1314 deletions(-) create mode 100644 .prettierrc delete mode 100644 .prettierrc.js create mode 100644 tooling/api/.eslintrc delete mode 100644 tooling/api/.eslintrc.cjs delete mode 100644 tooling/api/.npmignore delete mode 100644 tooling/api/.prettierrc.cjs create mode 100644 tooling/api/rollup.config.ts delete mode 100644 tooling/api/scripts/after-build.cjs delete mode 100644 tooling/api/tsup.config.ts diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 49616bbdfa96..8bf43b139724 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -69,7 +69,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: 18 registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index da14e6c3f584..587d8285d4af 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: '18' cache: yarn @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: '18' cache: yarn diff --git a/.prettierignore b/.prettierignore index f8dc4774520a..4a034d846e9e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ dist /tooling/cli/node /tooling/cli/schema.json /core/tauri-config-schema/schema.json +CHANGELOG.md diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000000..299b9e14e8ab --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "singleQuote": true, + "semi": false, + "trailingComma": "none" +} diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index 6641113efc2e..000000000000 --- a/.prettierrc.js +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -module.exports = { - singleQuote: true, - semi: false, - trailingComma: 'none' -} diff --git a/.scripts/ci/check-license-header.js b/.scripts/ci/check-license-header.js index d0d6dc68f98f..a3a8b32c0f36 100644 --- a/.scripts/ci/check-license-header.js +++ b/.scripts/ci/check-license-header.js @@ -21,12 +21,14 @@ const ignore = [ 'node_modules', 'gen', 'dist', - 'bundle.js', 'bundle.global.js' ] async function checkFile(file) { - if (extensions.some((e) => file.endsWith(e)) && !ignore.some((i) => file.includes(`/${i}/`))) { + if ( + extensions.some((e) => file.endsWith(e)) && + !ignore.some((i) => file.includes(`/${i}/`) || path.basename(file) == i) + ) { const fileStream = fs.createReadStream(file) const rl = readline.createInterface({ input: fileStream, diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index b3a64e91e425..29cf683faf99 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1 @@ -"use strict";var __TAURI_IIFE__=(()=>{var D=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var n in e)D(t,n,{get:e[n],enumerable:!0})},Y=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of J(e))!K.call(t,u)&&u!==n&&D(t,u,{get:()=>e[u],enumerable:!(o=Z(e,u))||o.enumerable});return t};var X=t=>Y(D({},"__esModule",{value:!0}),t);var N=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var C=(t,e,n)=>(N(t,e,"read from private field"),n?n.call(t):e.get(t)),O=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},x=(t,e,n,o)=>(N(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n);var Ve={};p(Ve,{app:()=>L,dpi:()=>k,event:()=>W,path:()=>A,primitives:()=>z,window:()=>S});var L={};p(L,{getName:()=>ne,getTauriVersion:()=>te,getVersion:()=>ie,hide:()=>oe,show:()=>re});var z={};p(z,{Channel:()=>y,PluginListener:()=>w,addPluginListener:()=>B,convertFileSrc:()=>ee,invoke:()=>i,transformCallback:()=>P});function P(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var m,y=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;O(this,m,()=>{});this.id=P(e=>{C(this,m).call(this,e)})}set onmessage(e){x(this,m,e)}get onmessage(){return C(this,m)}toJSON(){return`__CHANNEL__:${this.id}`}};m=new WeakMap;var w=class{constructor(e,n,o){this.plugin=e,this.event=n,this.channelId=o}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function B(t,e,n){let o=new y;return o.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:o}).then(()=>new w(t,e,o.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ee(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function ie(){return i("plugin:app|version")}async function ne(){return i("plugin:app|name")}async function te(){return i("plugin:app|tauri_version")}async function re(){return i("plugin:app|app_show")}async function oe(){return i("plugin:app|app_hide")}var W={};p(W,{TauriEvent:()=>I,emit:()=>E,listen:()=>v,once:()=>T});var I=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a))(I||{});async function F(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function v(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:P(e)}).then(o=>async()=>F(t,o))}async function T(t,e,n){return v(t,o=>{e(o),F(t,o.id).catch(()=>{})},n)}async function E(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var S={};p(S,{CloseRequestedEvent:()=>f,Effect:()=>G,EffectState:()=>q,LogicalPosition:()=>b,LogicalSize:()=>h,PhysicalPosition:()=>d,PhysicalSize:()=>c,ProgressBarStatus:()=>H,UserAttentionType:()=>M,Window:()=>g,availableMonitors:()=>ae,currentMonitor:()=>se,getAll:()=>_,getCurrent:()=>V,primaryMonitor:()=>le});var k={};p(k,{LogicalPosition:()=>b,LogicalSize:()=>h,PhysicalPosition:()=>d,PhysicalSize:()=>c});var h=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},c=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new h(this.width/e,this.height/e)}},b=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},d=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new b(this.x/e,this.y/e)}};var M=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(M||{}),f=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}},H=(l=>(l.None="none",l.Normal="normal",l.Indeterminate="indeterminate",l.Paused="paused",l.Error="error",l))(H||{});function V(){return new g(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function _(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new g(t.label,{skip:!0}))}var U=["tauri://created","tauri://error"],g=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return _().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return V()}static getAll(){return _()}static async getFocusedWindow(){for(let e of _())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):v(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):T(e,n,{target:this.label})}async emit(e,n){if(U.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return E(e,n,{target:this.label})}_handleTauriEvent(e,n){return U.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new d(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new d(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new c(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new c(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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 i("plugin:window|set_size",{label:this.label,value:{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 i("plugin:window|set_min_size",{label:this.label,value: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 i("plugin:window|set_max_size",{label:this.label,value: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 i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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 i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=j(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=$(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let o=new f(n);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",u=>{e({...u,payload:!0})}),o=await this.listen("tauri://blur",u=>{e({...u,payload:!1})});return()=>{n(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),o=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),u=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{n(),o(),u()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},G=(s=>(s.AppearanceBased="appearanceBased",s.Light="light",s.Dark="dark",s.MediumLight="mediumLight",s.UltraDark="ultraDark",s.Titlebar="titlebar",s.Selection="selection",s.Menu="menu",s.Popover="popover",s.Sidebar="sidebar",s.HeaderView="headerView",s.Sheet="sheet",s.WindowBackground="windowBackground",s.HudWindow="hudWindow",s.FullScreenUI="fullScreenUI",s.Tooltip="tooltip",s.ContentBackground="contentBackground",s.UnderWindowBackground="underWindowBackground",s.UnderPageBackground="underPageBackground",s.Mica="mica",s.Blur="blur",s.Acrylic="acrylic",s.Tabbed="tabbed",s.TabbedDark="tabbedDark",s.TabbedLight="tabbedLight",s))(G||{}),q=(o=>(o.FollowsWindowActiveState="followsWindowActiveState",o.Active="active",o.Inactive="inactive",o))(q||{});function R(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:$(t.position),size:j(t.size)}}function $(t){return new d(t.x,t.y)}function j(t){return new c(t.width,t.height)}async function se(){return i("plugin:window|current_monitor").then(R)}async function le(){return i("plugin:window|primary_monitor").then(R)}async function ae(){return i("plugin:window|available_monitors").then(t=>t.map(R))}var A={};p(A,{BaseDirectory:()=>Q,appCacheDir:()=>pe,appConfigDir:()=>ue,appDataDir:()=>ce,appLocalDataDir:()=>de,appLogDir:()=>ke,audioDir:()=>me,basename:()=>Me,cacheDir:()=>he,configDir:()=>be,dataDir:()=>ge,delimiter:()=>Ae,desktopDir:()=>ye,dirname:()=>Fe,documentDir:()=>we,downloadDir:()=>Pe,executableDir:()=>ve,extname:()=>Ue,fontDir:()=>_e,homeDir:()=>fe,isAbsolute:()=>He,join:()=>xe,localDataDir:()=>De,normalize:()=>Oe,pictureDir:()=>Ce,publicDir:()=>ze,resolve:()=>Ne,resolveResource:()=>Ie,resourceDir:()=>Le,runtimeDir:()=>Te,sep:()=>Se,tempDir:()=>Re,templateDir:()=>Ee,videoDir:()=>We});var Q=(r=>(r[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",r))(Q||{});async function ue(){return i("plugin:path|resolve_directory",{directory:13})}async function ce(){return i("plugin:path|resolve_directory",{directory:14})}async function de(){return i("plugin:path|resolve_directory",{directory:15})}async function pe(){return i("plugin:path|resolve_directory",{directory:16})}async function me(){return i("plugin:path|resolve_directory",{directory:1})}async function he(){return i("plugin:path|resolve_directory",{directory:2})}async function be(){return i("plugin:path|resolve_directory",{directory:3})}async function ge(){return i("plugin:path|resolve_directory",{directory:4})}async function ye(){return i("plugin:path|resolve_directory",{directory:18})}async function we(){return i("plugin:path|resolve_directory",{directory:6})}async function Pe(){return i("plugin:path|resolve_directory",{directory:7})}async function ve(){return i("plugin:path|resolve_directory",{directory:19})}async function _e(){return i("plugin:path|resolve_directory",{directory:20})}async function fe(){return i("plugin:path|resolve_directory",{directory:21})}async function De(){return i("plugin:path|resolve_directory",{directory:5})}async function Ce(){return i("plugin:path|resolve_directory",{directory:8})}async function ze(){return i("plugin:path|resolve_directory",{directory:9})}async function Le(){return i("plugin:path|resolve_directory",{directory:11})}async function Ie(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Te(){return i("plugin:path|resolve_directory",{directory:22})}async function Ee(){return i("plugin:path|resolve_directory",{directory:23})}async function We(){return i("plugin:path|resolve_directory",{directory:10})}async function ke(){return i("plugin:path|resolve_directory",{directory:17})}async function Re(t){return i("plugin:path|resolve_directory",{directory:12})}function Se(){return window.__TAURI_INTERNALS__.plugins.path.sep}function Ae(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function Ne(...t){return i("plugin:path|resolve",{paths:t})}async function Oe(t){return i("plugin:path|normalize",{path:t})}async function xe(...t){return i("plugin:path|join",{paths:t})}async function Fe(t){return i("plugin:path|dirname",{path:t})}async function Ue(t){return i("plugin:path|extname",{path:t})}async function Me(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function He(t){return i("plugin:path|isAbsolute",{path:t})}return X(Ve);})(); -window.__TAURI__ = __TAURI_IIFE__ +var __TAURI_IIFE__=function(e){"use strict";function t(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}var n;function i(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,n.set(this,(()=>{})),this.id=i((e=>{t(this,n,"f").call(this,e)}))}set onmessage(e){!function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?r.call(e,n):r?r.value=n:t.set(e,n)}(this,n,e,"f")}get onmessage(){return t(this,n,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}n=new WeakMap;class a{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}var s=Object.freeze({__proto__:null,Channel:r,PluginListener:a,addPluginListener:async function(e,t,n){const i=new r;return i.onmessage=n,l(`plugin:${e}|register_listener`,{event:t,handler:i}).then((()=>new a(e,t,i.id)))},convertFileSrc:function(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)},invoke:l,transformCallback:i});var o,u=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function c(e,t){await l("plugin:event|unlisten",{event:e,eventId:t})}async function p(e,t,n){return l("plugin:event|listen",{event:e,windowLabel:n?.target,handler:i(t)}).then((t=>async()=>c(e,t)))}async function h(e,t,n){return p(e,(n=>{t(n),c(e,n.id).catch((()=>{}))}),n)}async function d(e,t,n){await l("plugin:event|emit",{event:e,windowLabel:n?.target,payload:t})}!function(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"}(o||(o={}));var y=Object.freeze({__proto__:null,get TauriEvent(){return o},emit:d,listen:p,once:h});class w{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class _{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new w(this.width/e,this.height/e)}}class g{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class b{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new g(this.x/e,this.y/e)}}var f,m,v=Object.freeze({__proto__:null,LogicalPosition:g,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function E(){return new A(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new A(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(m||(m={}));const I=["tauri://created","tauri://error"];class A{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||l("plugin:window|create",{options:{...t,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return L().some((t=>t.label===e))?new A(e,{skip:!0}):null}static getCurrent(){return E()}static getAll(){return L()}static async getFocusedWindow(){for(const e of L())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const n=this.listeners[e];n.splice(n.indexOf(t),1)})):p(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const n=this.listeners[e];n.splice(n.indexOf(t),1)})):h(e,t,{target:this.label})}async emit(e,t){if(I.includes(e)){for(const n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return d(e,t,{target:this.label})}_handleTauriEvent(e,t){return!!I.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new b(e,t)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new b(e,t)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new _(e,t)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new _(e,t)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(o.WINDOW_RESIZED,(t=>{t.payload=N(t.payload),e(t)}))}async onMoved(e){return this.listen(o.WINDOW_MOVED,(t=>{t.payload=W(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(o.WINDOW_CLOSE_REQUESTED,(t=>{const n=new D(t);Promise.resolve(e(n)).then((()=>{if(!n.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const t=await this.listen(o.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),n=await this.listen(o.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),n()}}async onScaleChanged(e){return this.listen(o.WINDOW_SCALE_FACTOR_CHANGED,e)}async onMenuClicked(e){return this.listen(o.MENU,e)}async onFileDropEvent(e){const t=await this.listen(o.WINDOW_FILE_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload}})})),n=await this.listen(o.WINDOW_FILE_DROP_HOVER,(t=>{e({...t,payload:{type:"hover",paths:t.payload}})})),i=await this.listen(o.WINDOW_FILE_DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen(o.WINDOW_THEME_CHANGED,e)}}var z,C;function P(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:W(e.position),size:N(e.size)}}function W(e){return new b(e.x,e.y)}function N(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(z||(z={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(C||(C={}));var T,O=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return z},get EffectState(){return C},LogicalPosition:g,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return m},get UserAttentionType(){return f},Window:A,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(P)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(P)},getAll:L,getCurrent:E,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(P)}});!function(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.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(T||(T={}));var R=Object.freeze({__proto__:null,get BaseDirectory(){return T},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:T.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:T.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:T.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:T.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:T.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Audio})},basename:async function(e,t){return l("plugin:path|basename",{path:e,ext:t})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:T.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:T.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(e){return l("plugin:path|resolve_directory",{directory:T.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:T.Video})}});return e.app=u,e.dpi=v,e.event=y,e.path=R,e.primitives=s,e.window=O,e}({});window.__TAURI__=__TAURI_IIFE__; diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 5ecc27cb8eca..88acdd8fca5e 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,41 +1,41 @@ -var no=Object.defineProperty;var lo=(e,t,n)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ft=(e,t,n)=>(lo(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&i(_)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();function ee(){}function Rs(e){return e()}function cs(){return Object.create(null)}function Fe(e){e.forEach(Rs)}function Ds(e){return typeof e=="function"}function Pt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Sl;function io(e,t){return e===t?!0:(Sl||(Sl=document.createElement("a")),Sl.href=t,e===Sl.href)}function so(e){return Object.keys(e).length===0}function oo(e,...t){if(e==null){for(const i of t)i(void 0);return ee}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ao(e,t,n){e.$$.on_destroy.push(oo(t,n))}function l(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ds(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e){return e===""?null:+e}function uo(e){return Array.from(e.childNodes)}function se(e,t){t=""+t,e.data!==t&&(e.data=t)}function T(e,t){e.value=t??""}function Jt(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,i?"important":"")}function Ye(e,t,n){for(let i=0;ie.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),$t=t}const Cl=new Set;let St;function go(){St={r:0,c:[],p:St}}function _o(){St.r||Fe(St.c),St=St.p}function ci(e,t){e&&e.i&&(Cl.delete(e),e.i(t))}function ps(e,t,n,i){if(e&&e.o){if(Cl.has(e))return;Cl.add(e),St.c.push(()=>{Cl.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ye(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function bs(e){e&&e.c()}function di(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),pt(()=>{const r=e.$$.on_mount.map(Rs).filter(Ds);e.$$.on_destroy?e.$$.on_destroy.push(...r):Fe(r),e.$$.on_mount=[]}),o.forEach(pt)}function fi(e,t){const n=e.$$;n.fragment!==null&&(bo(n.after_update),Fe(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function mo(e,t){e.$$.dirty[0]===-1&&(xt.push(e),ho(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const A=E.length?E[0]:Y;return d.ctx&&o(d.ctx[z],d.ctx[z]=A)&&(!d.skip_bound&&d.bound[z]&&d.bound[z](A),I&&mo(e,z)),Y}):[],d.update(),I=!0,Fe(d.before_update),d.fragment=i?i(d.ctx):!1,t.target){if(t.hydrate){const z=uo(t.target);d.fragment&&d.fragment.l(z),z.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&ci(e.$$.fragment),di(e,t.target,t.anchor),qs()}kn(g)}class tn{constructor(){ft(this,"$$");ft(this,"$$set")}$destroy(){fi(this,1),this.$destroy=ee}$on(t,n){if(!Ds(n))return ee;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!so(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wo);const Zt=[];function vo(e,t=ee){let n;const i=new Set;function o(h){if(Pt(e,h)&&(e=h,n)){const g=!Zt.length;for(const d of i)d[1](),Zt.push(d,e);if(g){for(let d=0;d{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:o,update:r,subscribe:_}}var yo=Object.defineProperty,En=(e,t)=>{for(var n in t)yo(e,n,{get:t[n],enumerable:!0})},Bs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},gs=(e,t,n)=>(Bs(e,t,"read from private field"),n?n.call(e):t.get(e)),ko=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zo=(e,t,n,i)=>(Bs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Lo={};En(Lo,{Channel:()=>Fs,PluginListener:()=>js,addPluginListener:()=>Eo,convertFileSrc:()=>So,invoke:()=>b,transformCallback:()=>pi});function pi(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var yn,Fs=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,ko(this,yn,()=>{}),this.id=pi(t=>{gs(this,yn).call(this,t)})}set onmessage(t){zo(this,yn,t)}get onmessage(){return gs(this,yn)}toJSON(){return`__CHANNEL__:${this.id}`}};yn=new WeakMap;var js=class{constructor(t,n,i){this.plugin=t,this.event=n,this.channelId=i}async unregister(){return b(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function Eo(e,t,n){let i=new Fs;return i.onmessage=n,b(`plugin:${e}|register_listener`,{event:t,handler:i}).then(()=>new js(e,t,i.id))}async function b(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function So(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}var Co={};En(Co,{getName:()=>Gs,getTauriVersion:()=>Xs,getVersion:()=>Vs,hide:()=>Ks,show:()=>Ys});async function Vs(){return b("plugin:app|version")}async function Gs(){return b("plugin:app|name")}async function Xs(){return b("plugin:app|tauri_version")}async function Ys(){return b("plugin:app|app_show")}async function Ks(){return b("plugin:app|app_hide")}function Po(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re;return{c(){t=s("div"),n=s("p"),n.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 +var Rs=Object.defineProperty;var Hs=(e,t,n)=>t in e?Rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ft=(e,t,n)=>(Hs(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const g of r.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&i(g)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();function ee(){}function Es(e){return e()}function is(){return Object.create(null)}function je(e){e.forEach(Es)}function Is(e){return typeof e=="function"}function Ot(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Sl;function Fs(e,t){return e===t?!0:(Sl||(Sl=document.createElement("a")),Sl.href=t,e===Sl.href)}function Us(e){return Object.keys(e).length===0}function qs(e,...t){if(e==null){for(const i of t)i(void 0);return ee}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Bs(e,t,n){e.$$.on_destroy.push(qs(t,n))}function l(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Pt(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ss(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function q(e){return e===""?null:+e}function Vs(e){return Array.from(e.childNodes)}function se(e,t){t=""+t,e.data!==t&&(e.data=t)}function E(e,t){e.value=t??""}function Qt(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,i?"important":"")}function Ke(e,t,n){for(let i=0;ie.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),$t=t}const zl=new Set;let St;function Zs(){St={r:0,c:[],p:St}}function Js(){St.r||je(St.c),St=St.p}function ri(e,t){e&&e.i&&(zl.delete(e),e.i(t))}function rs(e,t,n,i){if(e&&e.o){if(zl.has(e))return;zl.add(e),St.c.push(()=>{zl.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ye(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function us(e){e&&e.c()}function ui(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),ht(()=>{const r=e.$$.on_mount.map(Es).filter(Is);e.$$.on_destroy?e.$$.on_destroy.push(...r):je(r),e.$$.on_mount=[]}),o.forEach(ht)}function ci(e,t){const n=e.$$;n.fragment!==null&&(Qs(n.after_update),je(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function xs(e,t){e.$$.dirty[0]===-1&&(xt.push(e),Ys(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const I=S.length?S[0]:Y;return d.ctx&&o(d.ctx[L],d.ctx[L]=I)&&(!d.skip_bound&&d.bound[L]&&d.bound[L](I),W&&xs(e,L)),Y}):[],d.update(),W=!0,je(d.before_update),d.fragment=i?i(d.ctx):!1,t.target){if(t.hydrate){const L=Vs(t.target);d.fragment&&d.fragment.l(L),L.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&ri(e.$$.fragment),ui(e,t.target,t.anchor),As()}kn(b)}class nn{constructor(){ft(this,"$$");ft(this,"$$set")}$destroy(){ci(this,1),this.$destroy=ee}$on(t,n){if(!Is(n))return ee;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Us(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const $s="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add($s);const Jt=[];function eo(e,t=ee){let n;const i=new Set;function o(h){if(Ot(e,h)&&(e=h,n)){const b=!Jt.length;for(const d of i)d[1](),Jt.push(d,e);if(b){for(let d=0;d{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:o,update:r,subscribe:g}}function to(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function _(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}async function no(){return _("plugin:app|version")}async function lo(){return _("plugin:app|name")}async function io(){return _("plugin:app|tauri_version")}async function so(){return _("plugin:app|app_show")}async function oo(){return _("plugin:app|app_hide")}function ao(e){let t,n,i,o,r,g,h,b,d,W,L,Y,S,I,M,D,ae,H,N,V,G,O,B,re;return{c(){t=s("div"),n=s("p"),n.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.`,i=c(),o=s("br"),r=c(),_=s("br"),h=c(),g=s("pre"),d=p(" App name: "),I=s("code"),z=p(e[2]),Y=p(` - App version: `),E=s("code"),A=p(e[0]),M=p(` - Tauri version: `),N=s("code"),ae=p(e[1]),H=p(` - `),W=c(),V=s("br"),G=c(),P=s("button"),P.textContent="Context menu",a(P,"class","btn")},m(R,x){w(R,t,x),l(t,n),l(t,i),l(t,o),l(t,r),l(t,_),l(t,h),l(t,g),l(g,d),l(g,I),l(I,z),l(g,Y),l(g,E),l(E,A),l(g,M),l(g,N),l(N,ae),l(g,H),l(t,W),l(t,V),l(t,G),l(t,P),F||(re=k(P,"click",e[3]),F=!0)},p(R,[x]){x&4&&se(z,R[2]),x&1&&se(A,R[0]),x&2&&se(ae,R[1])},i:ee,o:ee,d(R){R&&m(t),F=!1,re()}}}function To(e,t,n){let i="1.0.0",o="1.0.0",r="Unknown";Gs().then(h=>{n(2,r=h)}),Vs().then(h=>{n(0,i=h)}),Xs().then(h=>{n(1,o=h)});function _(){b("popup_context_menu")}return[i,o,r,_]}class Ao extends tn{constructor(t){super(),en(this,t,To,Po,Pt,{})}}var Mo={};En(Mo,{TauriEvent:()=>Js,emit:()=>bi,listen:()=>Ol,once:()=>Zs});var Js=(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))(Js||{});async function Qs(e,t){await b("plugin:event|unlisten",{event:e,eventId:t})}async function Ol(e,t,n){return b("plugin:event|listen",{event:e,windowLabel:n==null?void 0:n.target,handler:pi(t)}).then(i=>async()=>Qs(e,i))}async function Zs(e,t,n){return Ol(e,i=>{t(i),Qs(e,i.id).catch(()=>{})},n)}async function bi(e,t,n){await b("plugin:event|emit",{event:e,windowLabel:n==null?void 0:n.target,payload:t})}function Io(e){let t,n,i,o,r,_,h,g;return{c(){t=s("div"),n=s("button"),n.textContent="Call Log API",i=c(),o=s("button"),o.textContent="Call Request (async) API",r=c(),_=s("button"),_.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(o,"class","btn"),a(o,"id","request"),a(_,"class","btn"),a(_,"id","event")},m(d,I){w(d,t,I),l(t,n),l(t,i),l(t,o),l(t,r),l(t,_),h||(g=[k(n,"click",e[0]),k(o,"click",e[1]),k(_,"click",e[2])],h=!0)},p:ee,i:ee,o:ee,d(d){d&&m(t),h=!1,Fe(g)}}}function Oo(e,t,n){let{onMessage:i}=t,o;Tl(async()=>{o=await Ol("rust-event",i)}),Us(()=>{o&&o()});function r(){b("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function _(){b("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function h(){bi("js-event","this is the payload string")}return e.$$set=g=>{"onMessage"in g&&n(3,i=g.onMessage)},[r,_,h,i]}class No extends tn{constructor(t){super(),en(this,t,Oo,Io,Pt,{onMessage:3})}}var Wo={};En(Wo,{LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht});var Ln=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ht=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Ln(this.width/e,this.height/e)}},gi=class{constructor(t,n){this.type="Logical",this.x=t,this.y=n}},xe=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new gi(this.x/e,this.y/e)}},Ro={};En(Ro,{CloseRequestedEvent:()=>xs,Effect:()=>Ml,EffectState:()=>Il,LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht,ProgressBarStatus:()=>Al,UserAttentionType:()=>_i,Window:()=>Nl,availableMonitors:()=>Uo,currentMonitor:()=>Do,getAll:()=>Pl,getCurrent:()=>mi,primaryMonitor:()=>Ho});var _i=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(_i||{}),xs=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}},Al=(e=>(e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error",e))(Al||{});function mi(){return new Nl(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function Pl(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new Nl(e.label,{skip:!0}))}var _s=["tauri://created","tauri://error"],Nl=class $s{constructor(t,n={}){this.label=t,this.listeners=Object.create(null),n!=null&&n.skip||b("plugin:window|create",{options:{...n,label:t}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(t){return Pl().some(n=>n.label===t)?new $s(t,{skip:!0}):null}static getCurrent(){return mi()}static getAll(){return Pl()}static async getFocusedWindow(){for(let t of Pl())if(await t.isFocused())return t;return null}async listen(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{let i=this.listeners[t];i.splice(i.indexOf(n),1)}):Ol(t,n,{target:this.label})}async once(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{let i=this.listeners[t];i.splice(i.indexOf(n),1)}):Zs(t,n,{target:this.label})}async emit(t,n){if(_s.includes(t)){for(let i of this.listeners[t]||[])i({event:t,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return bi(t,n,{target:this.label})}_handleTauriEvent(t,n){return _s.includes(t)?(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0):!1}async scaleFactor(){return b("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return b("plugin:window|inner_position",{label:this.label}).then(({x:t,y:n})=>new xe(t,n))}async outerPosition(){return b("plugin:window|outer_position",{label:this.label}).then(({x:t,y:n})=>new xe(t,n))}async innerSize(){return b("plugin:window|inner_size",{label:this.label}).then(({width:t,height:n})=>new ht(t,n))}async outerSize(){return b("plugin:window|outer_size",{label:this.label}).then(({width:t,height:n})=>new ht(t,n))}async isFullscreen(){return b("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return b("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return b("plugin:window|is_maximized",{label:this.label})}async isFocused(){return b("plugin:window|is_focused",{label:this.label})}async isDecorated(){return b("plugin:window|is_decorated",{label:this.label})}async isResizable(){return b("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return b("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return b("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return b("plugin:window|is_closable",{label:this.label})}async isVisible(){return b("plugin:window|is_visible",{label:this.label})}async title(){return b("plugin:window|title",{label:this.label})}async theme(){return b("plugin:window|theme",{label:this.label})}async center(){return b("plugin:window|center",{label:this.label})}async requestUserAttention(t){let n=null;return t&&(t===1?n={type:"Critical"}:n={type:"Informational"}),b("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(t){return b("plugin:window|set_resizable",{label:this.label,value:t})}async setMaximizable(t){return b("plugin:window|set_maximizable",{label:this.label,value:t})}async setMinimizable(t){return b("plugin:window|set_minimizable",{label:this.label,value:t})}async setClosable(t){return b("plugin:window|set_closable",{label:this.label,value:t})}async setTitle(t){return b("plugin:window|set_title",{label:this.label,value:t})}async maximize(){return b("plugin:window|maximize",{label:this.label})}async unmaximize(){return b("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return b("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return b("plugin:window|minimize",{label:this.label})}async unminimize(){return b("plugin:window|unminimize",{label:this.label})}async show(){return b("plugin:window|show",{label:this.label})}async hide(){return b("plugin:window|hide",{label:this.label})}async close(){return b("plugin:window|close",{label:this.label})}async setDecorations(t){return b("plugin:window|set_decorations",{label:this.label,value:t})}async setShadow(t){return b("plugin:window|set_shadow",{label:this.label,value:t})}async setEffects(t){return b("plugin:window|set_effects",{label:this.label,value:t})}async clearEffects(){return b("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(t){return b("plugin:window|set_always_on_top",{label:this.label,value:t})}async setAlwaysOnBottom(t){return b("plugin:window|set_always_on_bottom",{label:this.label,value:t})}async setContentProtected(t){return b("plugin:window|set_content_protected",{label:this.label,value:t})}async setSize(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_size",{label:this.label,value:{type:t.type,data:{width:t.width,height:t.height}}})}async setMinSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_min_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setMaxSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_max_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setFullscreen(t){return b("plugin:window|set_fullscreen",{label:this.label,value:t})}async setFocus(){return b("plugin:window|set_focus",{label:this.label})}async setIcon(t){return b("plugin:window|set_icon",{label:this.label,value:typeof t=="string"?t:Array.from(t)})}async setSkipTaskbar(t){return b("plugin:window|set_skip_taskbar",{label:this.label,value:t})}async setCursorGrab(t){return b("plugin:window|set_cursor_grab",{label:this.label,value:t})}async setCursorVisible(t){return b("plugin:window|set_cursor_visible",{label:this.label,value:t})}async setCursorIcon(t){return b("plugin:window|set_cursor_icon",{label:this.label,value:t})}async setCursorPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_cursor_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setIgnoreCursorEvents(t){return b("plugin:window|set_ignore_cursor_events",{label:this.label,value:t})}async startDragging(){return b("plugin:window|start_dragging",{label:this.label})}async setProgressBar(t){return b("plugin:window|set_progress_bar",{label:this.label,value:t})}async onResized(t){return this.listen("tauri://resize",n=>{n.payload=to(n.payload),t(n)})}async onMoved(t){return this.listen("tauri://move",n=>{n.payload=eo(n.payload),t(n)})}async onCloseRequested(t){return this.listen("tauri://close-requested",n=>{let i=new xs(n);Promise.resolve(t(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(t){let n=await this.listen("tauri://focus",o=>{t({...o,payload:!0})}),i=await this.listen("tauri://blur",o=>{t({...o,payload:!1})});return()=>{n(),i()}}async onScaleChanged(t){return this.listen("tauri://scale-change",t)}async onMenuClicked(t){return this.listen("tauri://menu",t)}async onFileDropEvent(t){let n=await this.listen("tauri://file-drop",r=>{t({...r,payload:{type:"drop",paths:r.payload}})}),i=await this.listen("tauri://file-drop-hover",r=>{t({...r,payload:{type:"hover",paths:r.payload}})}),o=await this.listen("tauri://file-drop-cancelled",r=>{t({...r,payload:{type:"cancel"}})});return()=>{n(),i(),o()}}async onThemeChanged(t){return this.listen("tauri://theme-changed",t)}},Ml=(e=>(e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight",e))(Ml||{}),Il=(e=>(e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive",e))(Il||{});function wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:eo(e.position),size:to(e.size)}}function eo(e){return new xe(e.x,e.y)}function to(e){return new ht(e.width,e.height)}async function Do(){return b("plugin:window|current_monitor").then(wi)}async function Ho(){return b("plugin:window|primary_monitor").then(wi)}async function Uo(){return b("plugin:window|available_monitors").then(e=>e.map(wi))}function ms(e,t,n){const i=e.slice();return i[105]=t[n],i}function ws(e,t,n){const i=e.slice();return i[108]=t[n],i}function vs(e,t,n){const i=e.slice();return i[111]=t[n],i}function ys(e,t,n){const i=e.slice();return i[114]=t[n],i}function ks(e,t,n){const i=e.slice();return i[117]=t[n],i}function zs(e){let t,n,i,o,r,_,h=ye(Object.keys(e[1])),g=[];for(let d=0;de[59].call(i))},m(d,I){w(d,t,I),w(d,n,I),w(d,i,I),l(i,o);for(let z=0;ze[83].call(Qe)),a(ut,"class","input"),a(ut,"type","number"),a(ct,"class","input"),a(ct,"type","number"),a(Je,"class","flex gap-2"),a(dt,"class","input grow"),a(dt,"id","title"),a(_n,"class","btn"),a(_n,"type","submit"),a(Lt,"class","flex gap-1"),a(gn,"class","flex flex-col gap-1"),a(Ze,"class","input"),e[26]===void 0&&pt(()=>e[87].call(Ze)),a(Xe,"class","input"),a(Xe,"type","number"),a(Xe,"min","0"),a(Xe,"max","100"),a(Xt,"class","flex gap-2"),a(mn,"class","flex flex-col gap-1")},m(u,f){w(u,t,f),w(u,n,f),w(u,i,f),l(i,o),l(i,r),l(i,_),l(_,h),T(h,e[43]),l(_,g),l(_,d),w(u,I,f),w(u,z,f),w(u,Y,f),w(u,E,f),l(E,A),l(E,M),l(E,N),l(E,ae),l(E,H),l(E,W),l(E,V),w(u,G,f),w(u,P,f),l(P,F),l(F,re),l(F,R),R.checked=e[6],l(P,x),l(P,te),l(te,y),l(te,U),U.checked=e[2],l(P,j),l(P,$),l($,ue),l($,K),K.checked=e[3],l(P,_e),l(P,ke),l(ke,de),l(ke,oe),oe.checked=e[4],l(P,J),l(P,he),l(he,q),l(he,ne),ne.checked=e[5],l(P,Z),l(P,v),l(v,X),l(v,S),S.checked=e[7],l(P,fe),l(P,Ee),l(Ee,me),l(Ee,pe),pe.checked=e[8],l(P,Me),l(P,Se),l(Se,Ie),l(Se,be),be.checked=e[9],l(P,ge),l(P,ze),l(ze,Ce),l(ze,ce),ce.checked=e[10],l(P,Le),l(P,le),l(le,Oe),l(le,Ne),Ne.checked=e[11],w(u,Pe,f),w(u,ie,f),w(u,L,f),w(u,Q,f),l(Q,C),l(C,Te),l(Te,Sn),l(Te,We),T(We,e[18]),l(C,Cn),l(C,Tt),l(Tt,Pn),l(Tt,Re),T(Re,e[19]),l(Q,Tn),l(Q,$e),l($e,At),l(At,An),l(At,De),T(De,e[12]),l($e,Mn),l($e,Mt),l(Mt,In),l(Mt,He),T(He,e[13]),l(Q,On),l(Q,et),l(et,It),l(It,Nn),l(It,je),T(je,e[14]),l(et,Wn),l(et,Ot),l(Ot,Rn),l(Ot,Ve),T(Ve,e[15]),l(Q,Dn),l(Q,tt),l(tt,Nt),l(Nt,Hn),l(Nt,Ue),T(Ue,e[16]),l(tt,Un),l(tt,Wt),l(Wt,qn),l(Wt,qe),T(qe,e[17]),w(u,nn,f),w(u,ln,f),w(u,sn,f),w(u,Ae,f),l(Ae,nt),l(nt,Ge),l(Ge,O),l(Ge,on),l(Ge,bt),l(bt,an),l(bt,Rt),l(Ge,rn),l(Ge,_t),l(_t,un),l(_t,Dt),l(nt,cn),l(nt,Be),l(Be,wt),l(Be,dn),l(Be,vt),l(vt,fn),l(vt,Ht),l(Be,hn),l(Be,kt),l(kt,pn),l(kt,Ut),l(Ae,Bn),l(Ae,qt),l(qt,lt),l(lt,Fn),l(lt,vi),l(lt,jn),l(jn,yi),l(jn,Wl),l(lt,ki),l(lt,Gn),l(Gn,zi),l(Gn,Rl),l(qt,Li),l(qt,it),l(it,Yn),l(it,Ei),l(it,Kn),l(Kn,Si),l(Kn,Dl),l(it,Ci),l(it,Qn),l(Qn,Pi),l(Qn,Hl),l(Ae,Ti),l(Ae,Bt),l(Bt,st),l(st,xn),l(st,Ai),l(st,$n),l($n,Mi),l($n,Ul),l(st,Ii),l(st,tl),l(tl,Oi),l(tl,ql),l(Bt,Ni),l(Bt,ot),l(ot,ll),l(ot,Wi),l(ot,il),l(il,Ri),l(il,Bl),l(ot,Di),l(ot,ol),l(ol,Hi),l(ol,Fl),l(Ae,Ui),l(Ae,Ft),l(Ft,at),l(at,rl),l(at,qi),l(at,ul),l(ul,Bi),l(ul,jl),l(at,Fi),l(at,dl),l(dl,ji),l(dl,Vl),l(Ft,Vi),l(Ft,rt),l(rt,hl),l(rt,Gi),l(rt,pl),l(pl,Xi),l(pl,Gl),l(rt,Yi),l(rt,gl),l(gl,Ki),l(gl,Xl),w(u,Yl,f),w(u,Kl,f),w(u,Jl,f),w(u,bn,f),w(u,Ql,f),w(u,Ke,f),l(Ke,ml),l(ml,jt),jt.checked=e[20],l(ml,Ji),l(Ke,Qi),l(Ke,wl),l(wl,Vt),Vt.checked=e[21],l(wl,Zi),l(Ke,xi),l(Ke,vl),l(vl,Gt),Gt.checked=e[25],l(vl,$i),w(u,Zl,f),w(u,Je,f),l(Je,yl),l(yl,es),l(yl,Qe);for(let D=0;De[89].call(r)),a(d,"class","input"),e[37]===void 0&&pt(()=>e[90].call(d)),a(E,"class","input"),a(E,"type","number"),a(n,"class","flex"),Jt(W,"max-width","120px"),a(W,"class","input"),a(W,"type","number"),a(W,"placeholder","R"),Jt(G,"max-width","120px"),a(G,"class","input"),a(G,"type","number"),a(G,"placeholder","G"),Jt(F,"max-width","120px"),a(F,"class","input"),a(F,"type","number"),a(F,"placeholder","B"),Jt(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","A"),a(H,"class","flex"),a(M,"class","flex"),a(y,"class","btn"),Jt(y,"width","80px"),a(te,"class","flex"),a(de,"class","btn"),Jt(de,"width","80px"),a(j,"class","flex"),a(t,"class","flex flex-col gap-1")},m(v,X){w(v,t,X),l(t,n),l(n,i),l(i,o),l(i,r);for(let S=0;S=1,I,z,Y,E=d&&zs(e),A=e[1][e[0]]&&Es(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=c(),r=s("button"),r.textContent="New window",_=c(),h=s("br"),g=c(),E&&E.c(),I=c(),A&&A.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(r,"class","btn"),a(n,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(M,N){w(M,t,N),l(t,n),l(n,i),T(i,e[28]),l(n,o),l(n,r),l(t,_),l(t,h),l(t,g),E&&E.m(t,null),l(t,I),A&&A.m(t,null),z||(Y=[k(i,"input",e[58]),k(r,"click",e[53])],z=!0)},p(M,N){N[0]&268435456&&i.value!==M[28]&&T(i,M[28]),N[0]&2&&(d=Object.keys(M[1]).length>=1),d?E?E.p(M,N):(E=zs(M),E.c(),E.m(t,I)):E&&(E.d(1),E=null),M[1][M[0]]?A?A.p(M,N):(A=Es(M),A.c(),A.m(t,null)):A&&(A.d(1),A=null)},i:ee,o:ee,d(M){M&&m(t),E&&E.d(),A&&A.d(),z=!1,Fe(Y)}}}function Fo(e,t,n){const i=mi();let o=i.label;const r={[i.label]:i},_=["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"],h=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],g=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let I=g?h:Object.keys(Ml).map(O=>Ml[O]).filter(O=>!h.includes(O));const z=Object.keys(Il).map(O=>Il[O]),Y=Object.keys(Al).map(O=>Al[O]);let{onMessage:E}=t;const A=document.querySelector("main");let M,N=!0,ae=!0,H=!0,W=!0,V=!1,G=!0,P=!1,F=!1,re=!0,R=!1,x=null,te=null,y=null,U=null,j=null,$=null,ue=null,K=null,_e=1,ke=new xe(ue,K),de=new xe(ue,K),oe=new ht(x,te),J=new ht(x,te),he,q,ne=!1,Z=!0,v=null,X=null,S="default",fe=!1,Ee="Awesome Tauri Example!",me=[],pe,Me,Se,Ie,be,ge,ze,Ce="none",ce=0,Le;function le(){r[o].setTitle(Ee)}function Oe(){r[o].hide(),setTimeout(r[o].show,2e3)}function Ne(){r[o].minimize(),setTimeout(r[o].unminimize,2e3)}function Pe(){if(!M)return;const O=new Nl(M);n(1,r[M]=O,r),O.once("tauri://error",function(){E("Error creating new webview")})}function ie(){r[o].innerSize().then(O=>{n(32,oe=O),n(12,x=oe.width),n(13,te=oe.height)}),r[o].outerSize().then(O=>{n(33,J=O)})}function L(){r[o].innerPosition().then(O=>{n(30,ke=O)}),r[o].outerPosition().then(O=>{n(31,de=O),n(18,ue=de.x),n(19,K=de.y)})}async function Q(O){O&&(he&&he(),q&&q(),q=await O.listen("tauri://move",L),he=await O.listen("tauri://resize",ie))}async function C(){await r[o].minimize(),await r[o].requestUserAttention(_i.Critical),await new Promise(O=>setTimeout(O,3e3)),await r[o].requestUserAttention(null)}async function Te(){me.includes(pe)||n(35,me=[...me,pe]);const O={effects:me,state:Me,radius:Se};Number.isInteger(Ie)&&Number.isInteger(be)&&Number.isInteger(ge)&&Number.isInteger(ze)&&(O.color=[Ie,be,ge,ze]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await r[o].clearEffects(),await r[o].setEffects(O)}async function Sn(){n(35,me=[]),await r[o].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function We(){M=this.value,n(28,M)}function Cn(){o=vn(this),n(0,o),n(1,r)}function Tt(){Le=this.value,n(43,Le)}const Pn=()=>r[o].center();function Re(){V=this.checked,n(6,V)}function Tn(){N=this.checked,n(2,N)}function $e(){ae=this.checked,n(3,ae)}function At(){H=this.checked,n(4,H)}function An(){W=this.checked,n(5,W)}function De(){G=this.checked,n(7,G)}function Mn(){P=this.checked,n(8,P)}function Mt(){F=this.checked,n(9,F)}function In(){re=this.checked,n(10,re)}function He(){R=this.checked,n(11,R)}function On(){ue=B(this.value),n(18,ue)}function et(){K=B(this.value),n(19,K)}function It(){x=B(this.value),n(12,x)}function Nn(){te=B(this.value),n(13,te)}function je(){y=B(this.value),n(14,y)}function Wn(){U=B(this.value),n(15,U)}function Ot(){j=B(this.value),n(16,j)}function Rn(){$=B(this.value),n(17,$)}function Ve(){ne=this.checked,n(20,ne)}function Dn(){Z=this.checked,n(21,Z)}function tt(){fe=this.checked,n(25,fe)}function Nt(){S=vn(this),n(24,S),n(44,_)}function Hn(){v=B(this.value),n(22,v)}function Ue(){X=B(this.value),n(23,X)}function Un(){Ee=this.value,n(34,Ee)}function Wt(){Ce=vn(this),n(26,Ce),n(49,Y)}function qn(){ce=B(this.value),n(27,ce)}function qe(){pe=vn(this),n(36,pe),n(47,I)}function nn(){Me=vn(this),n(37,Me),n(48,z)}function ln(){Se=B(this.value),n(38,Se)}function sn(){Ie=B(this.value),n(39,Ie)}function Ae(){be=B(this.value),n(40,be)}function nt(){ge=B(this.value),n(41,ge)}function Ge(){ze=B(this.value),n(42,ze)}return e.$$set=O=>{"onMessage"in O&&n(57,E=O.onMessage)},e.$$.update=()=>{var O,on,bt,an,gt,Rt,rn,_t,un,mt,Dt,cn,Be,wt,dn,vt,fn,yt,Ht,hn,kt,pn,zt,Ut;e.$$.dirty[0]&3&&(r[o],L(),ie()),e.$$.dirty[0]&7&&((O=r[o])==null||O.setResizable(N)),e.$$.dirty[0]&11&&((on=r[o])==null||on.setMaximizable(ae)),e.$$.dirty[0]&19&&((bt=r[o])==null||bt.setMinimizable(H)),e.$$.dirty[0]&35&&((an=r[o])==null||an.setClosable(W)),e.$$.dirty[0]&67&&(V?(gt=r[o])==null||gt.maximize():(Rt=r[o])==null||Rt.unmaximize()),e.$$.dirty[0]&131&&((rn=r[o])==null||rn.setDecorations(G)),e.$$.dirty[0]&259&&((_t=r[o])==null||_t.setAlwaysOnTop(P)),e.$$.dirty[0]&515&&((un=r[o])==null||un.setAlwaysOnBottom(F)),e.$$.dirty[0]&1027&&((mt=r[o])==null||mt.setContentProtected(re)),e.$$.dirty[0]&2051&&((Dt=r[o])==null||Dt.setFullscreen(R)),e.$$.dirty[0]&12291&&x&&te&&((cn=r[o])==null||cn.setSize(new ht(x,te))),e.$$.dirty[0]&49155&&(y&&U?(Be=r[o])==null||Be.setMinSize(new Ln(y,U)):(wt=r[o])==null||wt.setMinSize(null)),e.$$.dirty[0]&196611&&(j>800&&$>400?(dn=r[o])==null||dn.setMaxSize(new Ln(j,$)):(vt=r[o])==null||vt.setMaxSize(null)),e.$$.dirty[0]&786435&&ue!==null&&K!==null&&((fn=r[o])==null||fn.setPosition(new xe(ue,K))),e.$$.dirty[0]&3&&((yt=r[o])==null||yt.scaleFactor().then(Bn=>n(29,_e=Bn))),e.$$.dirty[0]&3&&Q(r[o]),e.$$.dirty[0]&1048579&&((Ht=r[o])==null||Ht.setCursorGrab(ne)),e.$$.dirty[0]&2097155&&((hn=r[o])==null||hn.setCursorVisible(Z)),e.$$.dirty[0]&16777219&&((kt=r[o])==null||kt.setCursorIcon(S)),e.$$.dirty[0]&12582915&&v!==null&&X!==null&&((pn=r[o])==null||pn.setCursorPosition(new xe(v,X))),e.$$.dirty[0]&33554435&&((zt=r[o])==null||zt.setIgnoreCursorEvents(fe)),e.$$.dirty[0]&201326595&&((Ut=r[o])==null||Ut.setProgressBar({status:Ce,progress:ce}))},[o,r,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K,ne,Z,v,X,S,fe,Ce,ce,M,_e,ke,de,oe,J,Ee,me,pe,Me,Se,Ie,be,ge,ze,Le,_,g,d,I,z,Y,le,Oe,Ne,Pe,C,Te,Sn,E,We,Cn,Tt,Pn,Re,Tn,$e,At,An,De,Mn,Mt,In,He,On,et,It,Nn,je,Wn,Ot,Rn,Ve,Dn,tt,Nt,Hn,Ue,Un,Wt,qn,qe,nn,ln,sn,Ae,nt,Ge]}class jo extends tn{constructor(t){super(),en(this,t,Fo,Bo,Pt,{onMessage:57},null,[-1,-1,-1,-1])}}function Vo(e){let t;return{c(){t=s("div"),t.innerHTML='
Not available for Linux
',a(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:ee,i:ee,o:ee,d(n){n&&m(t)}}}function Go(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function r(h){const g=document.querySelector("video"),d=h.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${d[0].label}`),window.stream=h,g.srcObject=h}function _(h){if(h.name==="ConstraintNotSatisfiedError"){const g=o.video;i(`The resolution ${g.width.exact}x${g.height.exact} px is not supported by your device.`)}else h.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: ${h.name}`,h)}return Tl(async()=>{try{const h=await navigator.mediaDevices.getUserMedia(o);r(h)}catch(h){_(h)}}),Us(()=>{window.stream.getTracks().forEach(function(h){h.stop()})}),e.$$set=h=>{"onMessage"in h&&n(0,i=h.onMessage)},[i]}class Xo extends tn{constructor(t){super(),en(this,t,Go,Vo,Pt,{onMessage:0})}}function Yo(e){let t,n,i,o,r,_;return{c(){t=s("div"),n=s("button"),n.textContent="Show",i=c(),o=s("button"),o.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(o,"class","btn"),a(o,"id","hide")},m(h,g){w(h,t,g),l(t,n),l(t,i),l(t,o),r||(_=[k(n,"click",e[0]),k(o,"click",e[1])],r=!0)},p:ee,i:ee,o:ee,d(h){h&&m(t),r=!1,Fe(_)}}}function Ko(e,t,n){let{onMessage:i}=t;function o(){r().then(()=>{setTimeout(()=>{Ys().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return Ks().then(()=>i("Hide app")).catch(i)}return e.$$set=_=>{"onMessage"in _&&n(2,i=_.onMessage)},[o,r,i]}class Jo extends tn{constructor(t){super(),en(this,t,Ko,Yo,Pt,{onMessage:2})}}function As(e,t,n){const i=e.slice();return i[25]=t[n],i}function Ms(e,t,n){const i=e.slice();return i[28]=t[n],i}function Qo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function Zo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function xo(e){let t,n;return{c(){t=p(`Switch to Dark mode - `),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function $o(e){let t,n;return{c(){t=p(`Switch to Light mode - `),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function ea(e){let t,n,i,o,r,_,h;function g(){return e[14](e[28])}return{c(){t=s("a"),n=s("div"),i=c(),o=s("p"),o.textContent=`${e[28].label}`,a(n,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,I){w(d,t,I),l(t,n),l(t,i),l(t,o),_||(h=k(t,"click",g),_=!0)},p(d,I){e=d,I&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),_=!1,h()}}}function Is(e){let t,n=e[28]&&ea(e);return{c(){n&&n.c(),t=hi()},m(i,o){n&&n.m(i,o),w(i,t,o)},p(i,o){i[28]&&n.p(i,o)},d(i){i&&m(t),n&&n.d(i)}}}function Os(e){let t,n=e[25].html+"",i;return{c(){t=new co(!1),i=hi(),t.a=i},m(o,r){t.m(n,o,r),w(o,i,r)},p(o,r){r&16&&n!==(n=o[25].html+"")&&t.p(n)},d(o){o&&(m(i),t.d())}}}function ta(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K=e[1].label+"",_e,ke,de,oe,J,he,q,ne,Z,v,X,S,fe,Ee,me,pe,Me,Se;function Ie(L,Q){return L[0]?Zo:Qo}let be=Ie(e),ge=be(e);function ze(L,Q){return L[2]?$o:xo}let Ce=ze(e),ce=Ce(e),Le=ye(e[5]),le=[];for(let L=0;L{n(2,r=h)}),no().then(h=>{n(0,i=h)}),io().then(h=>{n(1,o=h)});function g(){_("popup_context_menu")}return[i,o,r,g]}class uo extends nn{constructor(t){super(),tn(this,t,ro,ao,Ot,{})}}var Se;(function(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"})(Se||(Se={}));async function Ds(e,t){await _("plugin:event|unlisten",{event:e,eventId:t})}async function hi(e,t,n){return _("plugin:event|listen",{event:e,windowLabel:n==null?void 0:n.target,handler:to(t)}).then(i=>async()=>Ds(e,i))}async function co(e,t,n){return hi(e,i=>{t(i),Ds(e,i.id).catch(()=>{})},n)}async function Ns(e,t,n){await _("plugin:event|emit",{event:e,windowLabel:n==null?void 0:n.target,payload:t})}function fo(e){let t,n,i,o,r,g,h,b;return{c(){t=s("div"),n=s("button"),n.textContent="Call Log API",i=c(),o=s("button"),o.textContent="Call Request (async) API",r=c(),g=s("button"),g.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(o,"class","btn"),a(o,"id","request"),a(g,"class","btn"),a(g,"id","event")},m(d,W){w(d,t,W),l(t,n),l(t,i),l(t,o),l(t,r),l(t,g),h||(b=[k(n,"click",e[0]),k(o,"click",e[1]),k(g,"click",e[2])],h=!0)},p:ee,i:ee,o:ee,d(d){d&&m(t),h=!1,je(b)}}}function ho(e,t,n){let{onMessage:i}=t,o;Pl(async()=>{o=await hi("rust-event",i)}),Ws(()=>{o&&o()});function r(){_("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function g(){_("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function h(){Ns("js-event","this is the payload string")}return e.$$set=b=>{"onMessage"in b&&n(3,i=b.onMessage)},[r,g,h,i]}class po extends nn{constructor(t){super(),tn(this,t,ho,fo,Ot,{onMessage:3})}}class di{constructor(t,n){this.type="Logical",this.width=t,this.height=n}}class en{constructor(t,n){this.type="Physical",this.width=t,this.height=n}toLogical(t){return new di(this.width/t,this.height/t)}}class bo{constructor(t,n){this.type="Logical",this.x=t,this.y=n}}class zt{constructor(t,n){this.type="Physical",this.x=t,this.y=n}toLogical(t){return new bo(this.x/t,this.y/t)}}var Ol;(function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"})(Ol||(Ol={}));class _o{constructor(t){this._preventDefault=!1,this.event=t.event,this.windowLabel=t.windowLabel,this.id=t.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var El;(function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"})(El||(El={}));function Ts(){return new Cn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function si(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new Cn(e.label,{skip:!0}))}const cs=["tauri://created","tauri://error"];class Cn{constructor(t,n={}){this.label=t,this.listeners=Object.create(null),n!=null&&n.skip||_("plugin:window|create",{options:{...n,label:t}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(t){return si().some(n=>n.label===t)?new Cn(t,{skip:!0}):null}static getCurrent(){return Ts()}static getAll(){return si()}static async getFocusedWindow(){for(const t of si())if(await t.isFocused())return t;return null}async listen(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{const i=this.listeners[t];i.splice(i.indexOf(n),1)}):hi(t,n,{target:this.label})}async once(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{const i=this.listeners[t];i.splice(i.indexOf(n),1)}):co(t,n,{target:this.label})}async emit(t,n){if(cs.includes(t)){for(const i of this.listeners[t]||[])i({event:t,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return Ns(t,n,{target:this.label})}_handleTauriEvent(t,n){return cs.includes(t)?(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0):!1}async scaleFactor(){return _("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return _("plugin:window|inner_position",{label:this.label}).then(({x:t,y:n})=>new zt(t,n))}async outerPosition(){return _("plugin:window|outer_position",{label:this.label}).then(({x:t,y:n})=>new zt(t,n))}async innerSize(){return _("plugin:window|inner_size",{label:this.label}).then(({width:t,height:n})=>new en(t,n))}async outerSize(){return _("plugin:window|outer_size",{label:this.label}).then(({width:t,height:n})=>new en(t,n))}async isFullscreen(){return _("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return _("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return _("plugin:window|is_maximized",{label:this.label})}async isFocused(){return _("plugin:window|is_focused",{label:this.label})}async isDecorated(){return _("plugin:window|is_decorated",{label:this.label})}async isResizable(){return _("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return _("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return _("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return _("plugin:window|is_closable",{label:this.label})}async isVisible(){return _("plugin:window|is_visible",{label:this.label})}async title(){return _("plugin:window|title",{label:this.label})}async theme(){return _("plugin:window|theme",{label:this.label})}async center(){return _("plugin:window|center",{label:this.label})}async requestUserAttention(t){let n=null;return t&&(t===Ol.Critical?n={type:"Critical"}:n={type:"Informational"}),_("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(t){return _("plugin:window|set_resizable",{label:this.label,value:t})}async setMaximizable(t){return _("plugin:window|set_maximizable",{label:this.label,value:t})}async setMinimizable(t){return _("plugin:window|set_minimizable",{label:this.label,value:t})}async setClosable(t){return _("plugin:window|set_closable",{label:this.label,value:t})}async setTitle(t){return _("plugin:window|set_title",{label:this.label,value:t})}async maximize(){return _("plugin:window|maximize",{label:this.label})}async unmaximize(){return _("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return _("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return _("plugin:window|minimize",{label:this.label})}async unminimize(){return _("plugin:window|unminimize",{label:this.label})}async show(){return _("plugin:window|show",{label:this.label})}async hide(){return _("plugin:window|hide",{label:this.label})}async close(){return _("plugin:window|close",{label:this.label})}async setDecorations(t){return _("plugin:window|set_decorations",{label:this.label,value:t})}async setShadow(t){return _("plugin:window|set_shadow",{label:this.label,value:t})}async setEffects(t){return _("plugin:window|set_effects",{label:this.label,value:t})}async clearEffects(){return _("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(t){return _("plugin:window|set_always_on_top",{label:this.label,value:t})}async setAlwaysOnBottom(t){return _("plugin:window|set_always_on_bottom",{label:this.label,value:t})}async setContentProtected(t){return _("plugin:window|set_content_protected",{label:this.label,value:t})}async setSize(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return _("plugin:window|set_size",{label:this.label,value:{type:t.type,data:{width:t.width,height:t.height}}})}async setMinSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return _("plugin:window|set_min_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setMaxSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return _("plugin:window|set_max_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return _("plugin:window|set_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setFullscreen(t){return _("plugin:window|set_fullscreen",{label:this.label,value:t})}async setFocus(){return _("plugin:window|set_focus",{label:this.label})}async setIcon(t){return _("plugin:window|set_icon",{label:this.label,value:typeof t=="string"?t:Array.from(t)})}async setSkipTaskbar(t){return _("plugin:window|set_skip_taskbar",{label:this.label,value:t})}async setCursorGrab(t){return _("plugin:window|set_cursor_grab",{label:this.label,value:t})}async setCursorVisible(t){return _("plugin:window|set_cursor_visible",{label:this.label,value:t})}async setCursorIcon(t){return _("plugin:window|set_cursor_icon",{label:this.label,value:t})}async setCursorPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return _("plugin:window|set_cursor_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setIgnoreCursorEvents(t){return _("plugin:window|set_ignore_cursor_events",{label:this.label,value:t})}async startDragging(){return _("plugin:window|start_dragging",{label:this.label})}async setProgressBar(t){return _("plugin:window|set_progress_bar",{label:this.label,value:t})}async onResized(t){return this.listen(Se.WINDOW_RESIZED,n=>{n.payload=mo(n.payload),t(n)})}async onMoved(t){return this.listen(Se.WINDOW_MOVED,n=>{n.payload=go(n.payload),t(n)})}async onCloseRequested(t){return this.listen(Se.WINDOW_CLOSE_REQUESTED,n=>{const i=new _o(n);Promise.resolve(t(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(t){const n=await this.listen(Se.WINDOW_FOCUS,o=>{t({...o,payload:!0})}),i=await this.listen(Se.WINDOW_BLUR,o=>{t({...o,payload:!1})});return()=>{n(),i()}}async onScaleChanged(t){return this.listen(Se.WINDOW_SCALE_FACTOR_CHANGED,t)}async onMenuClicked(t){return this.listen(Se.MENU,t)}async onFileDropEvent(t){const n=await this.listen(Se.WINDOW_FILE_DROP,r=>{t({...r,payload:{type:"drop",paths:r.payload}})}),i=await this.listen(Se.WINDOW_FILE_DROP_HOVER,r=>{t({...r,payload:{type:"hover",paths:r.payload}})}),o=await this.listen(Se.WINDOW_FILE_DROP_CANCELLED,r=>{t({...r,payload:{type:"cancel"}})});return()=>{n(),i(),o()}}async onThemeChanged(t){return this.listen(Se.WINDOW_THEME_CHANGED,t)}}var Il;(function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"})(Il||(Il={}));var Ml;(function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"})(Ml||(Ml={}));function go(e){return new zt(e.x,e.y)}function mo(e){return new en(e.width,e.height)}function ds(e,t,n){const i=e.slice();return i[105]=t[n],i}function fs(e,t,n){const i=e.slice();return i[108]=t[n],i}function hs(e,t,n){const i=e.slice();return i[111]=t[n],i}function ps(e,t,n){const i=e.slice();return i[114]=t[n],i}function bs(e,t,n){const i=e.slice();return i[117]=t[n],i}function _s(e){let t,n,i,o,r,g,h=ye(Object.keys(e[1])),b=[];for(let d=0;de[59].call(i))},m(d,W){w(d,t,W),w(d,n,W),w(d,i,W),l(i,o);for(let L=0;Le[83].call(Je)),a(ut,"class","input"),a(ut,"type","number"),a(ct,"class","input"),a(ct,"type","number"),a(Ze,"class","flex gap-2"),a(dt,"class","input grow"),a(dt,"id","title"),a(mn,"class","btn"),a(mn,"type","submit"),a(Lt,"class","flex gap-1"),a(gn,"class","flex flex-col gap-1"),a(xe,"class","input"),e[26]===void 0&&ht(()=>e[87].call(xe)),a(Ye,"class","input"),a(Ye,"type","number"),a(Ye,"min","0"),a(Ye,"max","100"),a(Xt,"class","flex gap-2"),a(wn,"class","flex flex-col gap-1")},m(u,f){w(u,t,f),w(u,n,f),w(u,i,f),l(i,o),l(i,r),l(i,g),l(g,h),E(h,e[43]),l(g,b),l(g,d),w(u,W,f),w(u,L,f),w(u,Y,f),w(u,S,f),l(S,I),l(S,M),l(S,D),l(S,ae),l(S,H),l(S,N),l(S,V),w(u,G,f),w(u,O,f),l(O,B),l(B,re),l(B,T),T.checked=e[6],l(O,x),l(O,te),l(te,y),l(te,F),F.checked=e[2],l(O,j),l(O,$),l($,ue),l($,K),K.checked=e[3],l(O,ge),l(O,ke),l(ke,de),l(ke,oe),oe.checked=e[4],l(O,Q),l(O,he),l(he,U),l(he,ne),ne.checked=e[5],l(O,J),l(O,v),l(v,X),l(v,z),z.checked=e[7],l(O,fe),l(O,ze),l(ze,me),l(ze,pe),pe.checked=e[8],l(O,We),l(O,Pe),l(Pe,Ae),l(Pe,be),be.checked=e[9],l(O,_e),l(O,Le),l(Le,Oe),l(Le,ce),ce.checked=e[10],l(O,Ce),l(O,le),l(le,De),l(le,Ne),Ne.checked=e[11],w(u,Ee,f),w(u,ie,f),w(u,C,f),w(u,Z,f),l(Z,P),l(P,Ie),l(Ie,Sn),l(Ie,Te),E(Te,e[18]),l(P,zn),l(P,Et),l(Et,Pn),l(Et,Re),E(Re,e[19]),l(Z,On),l(Z,$e),l($e,It),l(It,En),l(It,He),E(He,e[12]),l($e,In),l($e,Mt),l(Mt,Mn),l(Mt,Fe),E(Fe,e[13]),l(Z,Wn),l(Z,et),l(et,Wt),l(Wt,An),l(Wt,Ve),E(Ve,e[14]),l(et,Dn),l(et,At),l(At,Nn),l(At,Ge),E(Ge,e[15]),l(Z,Tn),l(Z,tt),l(tt,Dt),l(Dt,Rn),l(Dt,Ue),E(Ue,e[16]),l(tt,Hn),l(tt,Nt),l(Nt,Fn),l(Nt,qe),E(qe,e[17]),w(u,ln,f),w(u,sn,f),w(u,on,f),w(u,Me,f),l(Me,nt),l(nt,Xe),l(Xe,A),l(Xe,an),l(Xe,pt),l(pt,rn),l(pt,Tt),l(Xe,un),l(Xe,_t),l(_t,cn),l(_t,Rt),l(nt,dn),l(nt,Be),l(Be,mt),l(Be,fn),l(Be,wt),l(wt,hn),l(wt,Ht),l(Be,pn),l(Be,yt),l(yt,bn),l(yt,Ft),l(Me,Un),l(Me,Ut),l(Ut,lt),l(lt,qn),l(lt,pi),l(lt,Bn),l(Bn,bi),l(Bn,Wl),l(lt,_i),l(lt,Vn),l(Vn,gi),l(Vn,Al),l(Ut,mi),l(Ut,it),l(it,Xn),l(it,wi),l(it,Yn),l(Yn,vi),l(Yn,Dl),l(it,yi),l(it,Qn),l(Qn,ki),l(Qn,Nl),l(Me,Li),l(Me,qt),l(qt,st),l(st,Jn),l(st,Ci),l(st,xn),l(xn,Si),l(xn,Tl),l(st,zi),l(st,el),l(el,Pi),l(el,Rl),l(qt,Oi),l(qt,ot),l(ot,nl),l(ot,Ei),l(ot,ll),l(ll,Ii),l(ll,Hl),l(ot,Mi),l(ot,sl),l(sl,Wi),l(sl,Fl),l(Me,Ai),l(Me,Bt),l(Bt,at),l(at,al),l(at,Di),l(at,rl),l(rl,Ni),l(rl,Ul),l(at,Ti),l(at,cl),l(cl,Ri),l(cl,ql),l(Bt,Hi),l(Bt,rt),l(rt,fl),l(rt,Fi),l(rt,hl),l(hl,Ui),l(hl,Bl),l(rt,qi),l(rt,bl),l(bl,Bi),l(bl,jl),w(u,Vl,f),w(u,Gl,f),w(u,Xl,f),w(u,_n,f),w(u,Yl,f),w(u,Qe,f),l(Qe,gl),l(gl,jt),jt.checked=e[20],l(gl,ji),l(Qe,Vi),l(Qe,ml),l(ml,Vt),Vt.checked=e[21],l(ml,Gi),l(Qe,Xi),l(Qe,wl),l(wl,Gt),Gt.checked=e[25],l(wl,Yi),w(u,Kl,f),w(u,Ze,f),l(Ze,vl),l(vl,Ki),l(vl,Je);for(let R=0;Re[89].call(r)),a(d,"class","input"),e[37]===void 0&&ht(()=>e[90].call(d)),a(S,"class","input"),a(S,"type","number"),a(n,"class","flex"),Qt(N,"max-width","120px"),a(N,"class","input"),a(N,"type","number"),a(N,"placeholder","R"),Qt(G,"max-width","120px"),a(G,"class","input"),a(G,"type","number"),a(G,"placeholder","G"),Qt(B,"max-width","120px"),a(B,"class","input"),a(B,"type","number"),a(B,"placeholder","B"),Qt(T,"max-width","120px"),a(T,"class","input"),a(T,"type","number"),a(T,"placeholder","A"),a(H,"class","flex"),a(M,"class","flex"),a(y,"class","btn"),Qt(y,"width","80px"),a(te,"class","flex"),a(de,"class","btn"),Qt(de,"width","80px"),a(j,"class","flex"),a(t,"class","flex flex-col gap-1")},m(v,X){w(v,t,X),l(t,n),l(n,i),l(i,o),l(i,r);for(let z=0;z=1,W,L,Y,S=d&&_s(e),I=e[1][e[0]]&&ms(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=c(),r=s("button"),r.textContent="New window",g=c(),h=s("br"),b=c(),S&&S.c(),W=c(),I&&I.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(r,"class","btn"),a(n,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(M,D){w(M,t,D),l(t,n),l(n,i),E(i,e[28]),l(n,o),l(n,r),l(t,g),l(t,h),l(t,b),S&&S.m(t,null),l(t,W),I&&I.m(t,null),L||(Y=[k(i,"input",e[58]),k(r,"click",e[53])],L=!0)},p(M,D){D[0]&268435456&&i.value!==M[28]&&E(i,M[28]),D[0]&2&&(d=Object.keys(M[1]).length>=1),d?S?S.p(M,D):(S=_s(M),S.c(),S.m(t,W)):S&&(S.d(1),S=null),M[1][M[0]]?I?I.p(M,D):(I=ms(M),I.c(),I.m(t,null)):I&&(I.d(1),I=null)},i:ee,o:ee,d(M){M&&m(t),S&&S.d(),I&&I.d(),L=!1,je(Y)}}}function yo(e,t,n){const i=Ts();let o=i.label;const r={[i.label]:i},g=["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"],h=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],b=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let W=b?h:Object.keys(Il).map(A=>Il[A]).filter(A=>!h.includes(A));const L=Object.keys(Ml).map(A=>Ml[A]),Y=Object.keys(El).map(A=>El[A]);let{onMessage:S}=t;const I=document.querySelector("main");let M,D=!0,ae=!0,H=!0,N=!0,V=!1,G=!0,O=!1,B=!1,re=!0,T=!1,x=null,te=null,y=null,F=null,j=null,$=null,ue=null,K=null,ge=1,ke=new zt(ue,K),de=new zt(ue,K),oe=new en(x,te),Q=new en(x,te),he,U,ne=!1,J=!0,v=null,X=null,z="default",fe=!1,ze="Awesome Tauri Example!",me=[],pe,We,Pe,Ae,be,_e,Le,Oe="none",ce=0,Ce;function le(){r[o].setTitle(ze)}function De(){r[o].hide(),setTimeout(r[o].show,2e3)}function Ne(){r[o].minimize(),setTimeout(r[o].unminimize,2e3)}function Ee(){if(!M)return;const A=new Cn(M);n(1,r[M]=A,r),A.once("tauri://error",function(){S("Error creating new webview")})}function ie(){r[o].innerSize().then(A=>{n(32,oe=A),n(12,x=oe.width),n(13,te=oe.height)}),r[o].outerSize().then(A=>{n(33,Q=A)})}function C(){r[o].innerPosition().then(A=>{n(30,ke=A)}),r[o].outerPosition().then(A=>{n(31,de=A),n(18,ue=de.x),n(19,K=de.y)})}async function Z(A){A&&(he&&he(),U&&U(),U=await A.listen("tauri://move",C),he=await A.listen("tauri://resize",ie))}async function P(){await r[o].minimize(),await r[o].requestUserAttention(Ol.Critical),await new Promise(A=>setTimeout(A,3e3)),await r[o].requestUserAttention(null)}async function Ie(){me.includes(pe)||n(35,me=[...me,pe]);const A={effects:me,state:We,radius:Pe};Number.isInteger(Ae)&&Number.isInteger(be)&&Number.isInteger(_e)&&Number.isInteger(Le)&&(A.color=[Ae,be,_e,Le]),I.classList.remove("bg-primary"),I.classList.remove("dark:bg-darkPrimary"),await r[o].clearEffects(),await r[o].setEffects(A)}async function Sn(){n(35,me=[]),await r[o].clearEffects(),I.classList.add("bg-primary"),I.classList.add("dark:bg-darkPrimary")}function Te(){M=this.value,n(28,M)}function zn(){o=yn(this),n(0,o),n(1,r)}function Et(){Ce=this.value,n(43,Ce)}const Pn=()=>r[o].center();function Re(){V=this.checked,n(6,V)}function On(){D=this.checked,n(2,D)}function $e(){ae=this.checked,n(3,ae)}function It(){H=this.checked,n(4,H)}function En(){N=this.checked,n(5,N)}function He(){G=this.checked,n(7,G)}function In(){O=this.checked,n(8,O)}function Mt(){B=this.checked,n(9,B)}function Mn(){re=this.checked,n(10,re)}function Fe(){T=this.checked,n(11,T)}function Wn(){ue=q(this.value),n(18,ue)}function et(){K=q(this.value),n(19,K)}function Wt(){x=q(this.value),n(12,x)}function An(){te=q(this.value),n(13,te)}function Ve(){y=q(this.value),n(14,y)}function Dn(){F=q(this.value),n(15,F)}function At(){j=q(this.value),n(16,j)}function Nn(){$=q(this.value),n(17,$)}function Ge(){ne=this.checked,n(20,ne)}function Tn(){J=this.checked,n(21,J)}function tt(){fe=this.checked,n(25,fe)}function Dt(){z=yn(this),n(24,z),n(44,g)}function Rn(){v=q(this.value),n(22,v)}function Ue(){X=q(this.value),n(23,X)}function Hn(){ze=this.value,n(34,ze)}function Nt(){Oe=yn(this),n(26,Oe),n(49,Y)}function Fn(){ce=q(this.value),n(27,ce)}function qe(){pe=yn(this),n(36,pe),n(47,W)}function ln(){We=yn(this),n(37,We),n(48,L)}function sn(){Pe=q(this.value),n(38,Pe)}function on(){Ae=q(this.value),n(39,Ae)}function Me(){be=q(this.value),n(40,be)}function nt(){_e=q(this.value),n(41,_e)}function Xe(){Le=q(this.value),n(42,Le)}return e.$$set=A=>{"onMessage"in A&&n(57,S=A.onMessage)},e.$$.update=()=>{var A,an,pt,rn,bt,Tt,un,_t,cn,gt,Rt,dn,Be,mt,fn,wt,hn,vt,Ht,pn,yt,bn,kt,Ft;e.$$.dirty[0]&3&&(r[o],C(),ie()),e.$$.dirty[0]&7&&((A=r[o])==null||A.setResizable(D)),e.$$.dirty[0]&11&&((an=r[o])==null||an.setMaximizable(ae)),e.$$.dirty[0]&19&&((pt=r[o])==null||pt.setMinimizable(H)),e.$$.dirty[0]&35&&((rn=r[o])==null||rn.setClosable(N)),e.$$.dirty[0]&67&&(V?(bt=r[o])==null||bt.maximize():(Tt=r[o])==null||Tt.unmaximize()),e.$$.dirty[0]&131&&((un=r[o])==null||un.setDecorations(G)),e.$$.dirty[0]&259&&((_t=r[o])==null||_t.setAlwaysOnTop(O)),e.$$.dirty[0]&515&&((cn=r[o])==null||cn.setAlwaysOnBottom(B)),e.$$.dirty[0]&1027&&((gt=r[o])==null||gt.setContentProtected(re)),e.$$.dirty[0]&2051&&((Rt=r[o])==null||Rt.setFullscreen(T)),e.$$.dirty[0]&12291&&x&&te&&((dn=r[o])==null||dn.setSize(new en(x,te))),e.$$.dirty[0]&49155&&(y&&F?(Be=r[o])==null||Be.setMinSize(new di(y,F)):(mt=r[o])==null||mt.setMinSize(null)),e.$$.dirty[0]&196611&&(j>800&&$>400?(fn=r[o])==null||fn.setMaxSize(new di(j,$)):(wt=r[o])==null||wt.setMaxSize(null)),e.$$.dirty[0]&786435&&ue!==null&&K!==null&&((hn=r[o])==null||hn.setPosition(new zt(ue,K))),e.$$.dirty[0]&3&&((vt=r[o])==null||vt.scaleFactor().then(Un=>n(29,ge=Un))),e.$$.dirty[0]&3&&Z(r[o]),e.$$.dirty[0]&1048579&&((Ht=r[o])==null||Ht.setCursorGrab(ne)),e.$$.dirty[0]&2097155&&((pn=r[o])==null||pn.setCursorVisible(J)),e.$$.dirty[0]&16777219&&((yt=r[o])==null||yt.setCursorIcon(z)),e.$$.dirty[0]&12582915&&v!==null&&X!==null&&((bn=r[o])==null||bn.setCursorPosition(new zt(v,X))),e.$$.dirty[0]&33554435&&((kt=r[o])==null||kt.setIgnoreCursorEvents(fe)),e.$$.dirty[0]&201326595&&((Ft=r[o])==null||Ft.setProgressBar({status:Oe,progress:ce}))},[o,r,D,ae,H,N,V,G,O,B,re,T,x,te,y,F,j,$,ue,K,ne,J,v,X,z,fe,Oe,ce,M,ge,ke,de,oe,Q,ze,me,pe,We,Pe,Ae,be,_e,Le,Ce,g,b,d,W,L,Y,le,De,Ne,Ee,P,Ie,Sn,S,Te,zn,Et,Pn,Re,On,$e,It,En,He,In,Mt,Mn,Fe,Wn,et,Wt,An,Ve,Dn,At,Nn,Ge,Tn,tt,Dt,Rn,Ue,Hn,Nt,Fn,qe,ln,sn,on,Me,nt,Xe]}class ko extends nn{constructor(t){super(),tn(this,t,yo,vo,Ot,{onMessage:57},null,[-1,-1,-1,-1])}}function Lo(e){let t;return{c(){t=s("div"),t.innerHTML='
Not available for Linux
',a(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:ee,i:ee,o:ee,d(n){n&&m(t)}}}function Co(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function r(h){const b=document.querySelector("video"),d=h.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${d[0].label}`),window.stream=h,b.srcObject=h}function g(h){if(h.name==="ConstraintNotSatisfiedError"){const b=o.video;i(`The resolution ${b.width.exact}x${b.height.exact} px is not supported by your device.`)}else h.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: ${h.name}`,h)}return Pl(async()=>{try{const h=await navigator.mediaDevices.getUserMedia(o);r(h)}catch(h){g(h)}}),Ws(()=>{window.stream.getTracks().forEach(function(h){h.stop()})}),e.$$set=h=>{"onMessage"in h&&n(0,i=h.onMessage)},[i]}class So extends nn{constructor(t){super(),tn(this,t,Co,Lo,Ot,{onMessage:0})}}function zo(e){let t,n,i,o,r,g;return{c(){t=s("div"),n=s("button"),n.textContent="Show",i=c(),o=s("button"),o.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(o,"class","btn"),a(o,"id","hide")},m(h,b){w(h,t,b),l(t,n),l(t,i),l(t,o),r||(g=[k(n,"click",e[0]),k(o,"click",e[1])],r=!0)},p:ee,i:ee,o:ee,d(h){h&&m(t),r=!1,je(g)}}}function Po(e,t,n){let{onMessage:i}=t;function o(){r().then(()=>{setTimeout(()=>{so().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return oo().then(()=>i("Hide app")).catch(i)}return e.$$set=g=>{"onMessage"in g&&n(2,i=g.onMessage)},[o,r,i]}class Oo extends nn{constructor(t){super(),tn(this,t,Po,zo,Ot,{onMessage:2})}}function Ls(e,t,n){const i=e.slice();return i[25]=t[n],i}function Cs(e,t,n){const i=e.slice();return i[28]=t[n],i}function Eo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function Io(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function Mo(e){let t,n;return{c(){t=p(`Switch to Dark mode + `),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function Wo(e){let t,n;return{c(){t=p(`Switch to Light mode + `),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function Ao(e){let t,n,i,o,r,g,h;function b(){return e[14](e[28])}return{c(){t=s("a"),n=s("div"),i=c(),o=s("p"),o.textContent=`${e[28].label}`,a(n,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,W){w(d,t,W),l(t,n),l(t,i),l(t,o),g||(h=k(t,"click",b),g=!0)},p(d,W){e=d,W&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),g=!1,h()}}}function Ss(e){let t,n=e[28]&&Ao(e);return{c(){n&&n.c(),t=fi()},m(i,o){n&&n.m(i,o),w(i,t,o)},p(i,o){i[28]&&n.p(i,o)},d(i){i&&m(t),n&&n.d(i)}}}function zs(e){let t,n=e[25].html+"",i;return{c(){t=new Gs(!1),i=fi(),t.a=i},m(o,r){t.m(n,o,r),w(o,i,r)},p(o,r){r&16&&n!==(n=o[25].html+"")&&t.p(n)},d(o){o&&(m(i),t.d())}}}function Do(e){let t,n,i,o,r,g,h,b,d,W,L,Y,S,I,M,D,ae,H,N,V,G,O,B,re,T,x,te,y,F,j,$,ue,K=e[1].label+"",ge,ke,de,oe,Q,he,U,ne,J,v,X,z,fe,ze,me,pe,We,Pe;function Ae(C,Z){return C[0]?Io:Eo}let be=Ae(e),_e=be(e);function Le(C,Z){return C[2]?Wo:Mo}let Oe=Le(e),ce=Oe(e),Ce=ye(e[5]),le=[];for(let C=0;C`,ae=c(),H=s("a"),H.innerHTML=`GitHub - `,W=c(),V=s("a"),V.innerHTML=`Source - `,G=c(),P=s("br"),F=c(),re=s("div"),R=c(),x=s("br"),te=c(),y=s("div");for(let L=0;L',Ee=c(),me=s("div");for(let L=0;L{fi(C,1)}),_o()}Oe?(J=fs(Oe,Ne(L)),bs(J.$$.fragment),ci(J.$$.fragment,1),di(J,oe,null)):J=null}if(Q&16){Pe=ye(L[4]);let C;for(C=0;C{y.ctrlKey&&y.key==="b"&&b("toggle_menu")});const o=navigator.userAgent.toLowerCase(),r=o.includes("android")||o.includes("iphone"),_=[{label:"Welcome",component:Ao,icon:"i-ph-hand-waving"},{label:"Communication",component:No,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:Jo,icon:"i-codicon-hubot"},{label:"Window",component:jo,icon:"i-codicon-window"},{label:"WebRTC",component:Xo,icon:"i-ph-broadcast"}];let h=_[0];function g(y){n(1,h=y)}let d;Tl(()=>{n(2,d=localStorage&&localStorage.getItem("theme")=="dark"),Ws(d)});function I(){n(2,d=!d),Ws(d)}let z=vo([]);ao(e,z,y=>n(4,i=y));function Y(y){z.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...U])}function E(y){z.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...U])}function A(){z.update(()=>[])}let M,N,ae;function H(y){ae=y.clientY;const U=window.getComputedStyle(M);N=parseInt(U.height,10);const j=ue=>{const K=ue.clientY-ae,_e=N-K;n(3,M.style.height=`${_e{document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",$),document.addEventListener("mousemove",j)}let W=!1,V,G,P=!1,F=0,re=0;const R=(y,U,j)=>Math.min(Math.max(U,y),j);Tl(()=>{n(13,V=document.querySelector("#sidebar")),G=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{G.contains(y.target)?n(0,W=!W):W&&!V.contains(y.target)&&n(0,W=!1)}),document.addEventListener("touchstart",y=>{if(G.contains(y.target))return;const U=y.touches[0].clientX;(0{if(P){const U=y.touches[0].clientX;re=U;const j=(U-F)/10;V.style.setProperty("--translate-x",`-${R(0,W?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(P){const y=(re-F)/10;n(0,W=W?y>-(18.75/2):y>18.75/2)}P=!1})});const x=y=>{g(y),n(0,W=!1)};function te(y){ri[y?"unshift":"push"](()=>{M=y,n(3,M)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&na(y,W)}},[W,h,d,M,i,_,g,I,z,Y,E,A,H,V,x,te]}class ia extends tn{constructor(t){super(),en(this,t,la,ta,Pt,{})}}new ia({target:document.querySelector("#app")}); + `,N=c(),V=s("a"),V.innerHTML=`Source + `,G=c(),O=s("br"),B=c(),re=s("div"),T=c(),x=s("br"),te=c(),y=s("div");for(let C=0;C',ze=c(),me=s("div");for(let C=0;C{ci(P,1)}),Js()}De?(Q=os(De,Ne(C)),us(Q.$$.fragment),ri(Q.$$.fragment,1),ui(Q,oe,null)):Q=null}if(Z&16){Ee=ye(C[4]);let P;for(P=0;P{y.ctrlKey&&y.key==="b"&&_("toggle_menu")});const o=navigator.userAgent.toLowerCase(),r=o.includes("android")||o.includes("iphone"),g=[{label:"Welcome",component:uo,icon:"i-ph-hand-waving"},{label:"Communication",component:po,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:Oo,icon:"i-codicon-hubot"},{label:"Window",component:ko,icon:"i-codicon-window"},{label:"WebRTC",component:So,icon:"i-ph-broadcast"}];let h=g[0];function b(y){n(1,h=y)}let d;Pl(()=>{n(2,d=localStorage&&localStorage.getItem("theme")=="dark"),Os(d)});function W(){n(2,d=!d),Os(d)}let L=eo([]);Bs(e,L,y=>n(4,i=y));function Y(y){L.update(F=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...F])}function S(y){L.update(F=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...F])}function I(){L.update(()=>[])}let M,D,ae;function H(y){ae=y.clientY;const F=window.getComputedStyle(M);D=parseInt(F.height,10);const j=ue=>{const K=ue.clientY-ae,ge=D-K;n(3,M.style.height=`${ge{document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",$),document.addEventListener("mousemove",j)}let N=!1,V,G,O=!1,B=0,re=0;const T=(y,F,j)=>Math.min(Math.max(F,y),j);Pl(()=>{n(13,V=document.querySelector("#sidebar")),G=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{G.contains(y.target)?n(0,N=!N):N&&!V.contains(y.target)&&n(0,N=!1)}),document.addEventListener("touchstart",y=>{if(G.contains(y.target))return;const F=y.touches[0].clientX;(0{if(O){const F=y.touches[0].clientX;re=F;const j=(F-B)/10;V.style.setProperty("--translate-x",`-${T(0,N?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(O){const y=(re-B)/10;n(0,N=N?y>-(18.75/2):y>18.75/2)}O=!1})});const x=y=>{b(y),n(0,N=!1)};function te(y){oi[y?"unshift":"push"](()=>{M=y,n(3,M)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&No(y,N)}},[N,h,d,M,i,g,b,W,L,Y,S,I,H,V,x,te]}class Ro extends nn{constructor(t){super(),tn(this,t,To,Do,Ot,{})}}new Ro({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 62a76a73e5e7..37336a610d2b 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -480,12 +480,12 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "e3f9629bc6c4388ea699781dc988c2b99766d7679b151c81990b4fa1208fafd3" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.2", ] [[package]] diff --git a/package.json b/package.json index b81d2bb43ada..3c8d8351cac1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "url": "https://github.com/tauri-apps/tauri.git" }, "scripts": { - "format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .prettierignore", + "format": "prettier --write . --config .prettierrc --ignore-path .prettierignore", + "format:check": "prettier --check . --config .prettierrc --ignore-path .prettierignore", "postinstall": "husky install" }, "devDependencies": { diff --git a/tooling/api/.eslintrc b/tooling/api/.eslintrc new file mode 100644 index 000000000000..a996283f9025 --- /dev/null +++ b/tooling/api/.eslintrc @@ -0,0 +1,53 @@ +{ + "root": true, + + "env": { + "node": true, + "jest": true + }, + + "parser": "@typescript-eslint/parser", + + "extends": [ + "standard-with-typescript", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + // TODO: make this work with typescript + // "plugin:node/recommended" + "prettier" + ], + + "plugins": ["@typescript-eslint", "node", "security"], + + "parserOptions": { + "project": "./tsconfig.json" + }, + + "globals": { + "__statics": true, + "process": true + }, + + // add your custom rules here + "rules": { + "no-console": "error", + "no-debugger": "error", + "no-process-exit": "off", + "security/detect-non-literal-fs-filename": "warn", + "security/detect-unsafe-regex": "error", + "security/detect-buffer-noassert": "error", + "security/detect-child-process": "warn", + "security/detect-disable-mustache-escape": "error", + "security/detect-eval-with-expression": "error", + "security/detect-no-csrf-before-method-override": "error", + "security/detect-non-literal-regexp": "error", + "security/detect-non-literal-require": "warn", + "security/detect-object-injection": "warn", + "security/detect-possible-timing-attacks": "error", + "security/detect-pseudoRandomBytes": "error", + "space-before-function-paren": "off", + "@typescript-eslint/default-param-last": "off", + "@typescript-eslint/strict-boolean-expressions": 0, + "no-return-await": "warn", + "@typescript-eslint/return-await": "off" + } +} diff --git a/tooling/api/.eslintrc.cjs b/tooling/api/.eslintrc.cjs deleted file mode 100644 index 15146e7507fb..000000000000 --- a/tooling/api/.eslintrc.cjs +++ /dev/null @@ -1,56 +0,0 @@ -module.exports = { - root: true, - - env: { - node: true, - jest: true - }, - - parser: '@typescript-eslint/parser', - - extends: [ - 'standard-with-typescript', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - // TODO: make this work with typescript - // 'plugin:node/recommended' - 'prettier' - ], - - plugins: ['@typescript-eslint', 'node', 'security'], - - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - }, - - globals: { - __statics: true, - process: true - }, - - // add your custom rules here - rules: { - // allow console.log during development only - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', - // allow debugger during development only - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', - 'no-process-exit': 'off', - 'security/detect-non-literal-fs-filename': 'warn', - 'security/detect-unsafe-regex': 'error', - 'security/detect-buffer-noassert': 'error', - 'security/detect-child-process': 'warn', - 'security/detect-disable-mustache-escape': 'error', - 'security/detect-eval-with-expression': 'error', - 'security/detect-no-csrf-before-method-override': 'error', - 'security/detect-non-literal-regexp': 'error', - 'security/detect-non-literal-require': 'warn', - 'security/detect-object-injection': 'warn', - 'security/detect-possible-timing-attacks': 'error', - 'security/detect-pseudoRandomBytes': 'error', - 'space-before-function-paren': 'off', - '@typescript-eslint/default-param-last': 'off', - '@typescript-eslint/strict-boolean-expressions': 0, - 'no-return-await': 'warn', - '@typescript-eslint/return-await': 'off' - } -} diff --git a/tooling/api/.npmignore b/tooling/api/.npmignore deleted file mode 100644 index e394345d8506..000000000000 --- a/tooling/api/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -babel.config.js -rollup.config.js -tsconfig.json -src/ diff --git a/tooling/api/.prettierrc.cjs b/tooling/api/.prettierrc.cjs deleted file mode 100644 index 2be2f932702c..000000000000 --- a/tooling/api/.prettierrc.cjs +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - singleQuote: true, - semi: false, - trailingComma: 'none' -} diff --git a/tooling/api/package.json b/tooling/api/package.json index e7a576c1c9ef..68c3df03ce6b 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -2,23 +2,10 @@ "name": "@tauri-apps/api", "version": "2.0.0-alpha.9", "description": "Tauri API definitions", - "type": "module", "funding": { "type": "opencollective", "url": "https://opencollective.com/tauri" }, - "exports": { - "./package.json": "./package.json" - }, - "scripts": { - "build": "yarn tsup && node ./scripts/after-build.cjs", - "npm-pack": "yarn build && cd ./dist && npm pack", - "npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly --tag next", - "lint": "eslint --ext ts \"./src/**/*.ts\"", - "lint-fix": "eslint --fix --ext ts \"./src/**/*.ts\"", - "format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path ../../.prettierignore", - "format:check": "prettier --check --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path ../../.prettierignore" - }, "repository": { "type": "git", "url": "git+https://github.com/tauri-apps/tauri.git" @@ -31,34 +18,43 @@ "url": "https://github.com/tauri-apps/tauri/issues" }, "homepage": "https://github.com/tauri-apps/tauri#readme", - "publishConfig": { - "access": "public" - }, - "engines": { - "node": ">= 18", - "npm": ">= 6.6.0", - "yarn": ">= 1.19.1" + "type": "module", + "scripts": { + "build": "yarn rollup --config rollup.config.ts --configPlugin typescript", + "npm-pack": "yarn build && cd ./dist && npm pack", + "npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly --tag next", + "check": "tsc", + "lint": "eslint --ext ts \"./src/**/*.ts\"", + "lint:fix": "eslint --fix --ext ts \"./src/**/*.ts\"", + "format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore", + "format:check": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "6.8.0", - "@typescript-eslint/parser": "6.8.0", - "eslint": "8.51.0", + "@rollup/plugin-terser": "0.4.4", + "@rollup/plugin-typescript": "11.1.5", + "@types/node": "20.8.7", + "@typescript-eslint/eslint-plugin": "6.9.0", + "@typescript-eslint/parser": "6.9.0", + "eslint": "8.52.0", "eslint-config-prettier": "9.0.0", "eslint-config-standard-with-typescript": "39.1.1", - "eslint-plugin-import": "2.28.1", + "eslint-plugin-import": "2.29.0", "eslint-plugin-n": "16.2.0", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", "eslint-plugin-security": "1.7.1", + "fast-glob": "3.3.1", "prettier": "3.0.3", - "tsup": "7.2.0", - "typedoc": "0.25.2", - "typedoc-plugin-markdown": "3.16.0", - "typedoc-plugin-mdn-links": "3.1.0", + "rollup": "4.1.4", + "tslib": "2.6.2", "typescript": "5.2.2" }, - "resolutions": { - "semver": ">=7.5.2", - "optionator": ">=0.9.3" + "exports": { + "./package.json": "./package.json" + }, + "engines": { + "node": ">= 18", + "npm": ">= 6.6.0", + "yarn": ">= 1.19.1" } } diff --git a/tooling/api/rollup.config.ts b/tooling/api/rollup.config.ts new file mode 100644 index 000000000000..e4262a0c1929 --- /dev/null +++ b/tooling/api/rollup.config.ts @@ -0,0 +1,129 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +import { defineConfig, Plugin } from 'rollup' +import typescript from '@rollup/plugin-typescript' +import terser from '@rollup/plugin-terser' +import fg from 'fast-glob' +import { basename, join } from 'path' +import { + writeFileSync, + copyFileSync, + opendirSync, + rmSync, + Dir, + readFileSync +} from 'fs' +import { fileURLToPath } from 'url' + +// cleanup dist dir +const __dirname = fileURLToPath(new URL('.', import.meta.url)) +cleanDir(join(__dirname, './dist')) + +const modules = fg.sync(['!./src/*.d.ts', './src/*.ts']) + +export default defineConfig([ + { + input: Object.fromEntries(modules.map((p) => [basename(p, '.ts'), p])), + output: [ + { + format: 'esm', + dir: './dist', + entryFileNames: '[name].js', + preserveModules: true + }, + { + format: 'cjs', + dir: './dist', + entryFileNames: '[name].cjs', + preserveModules: true + } + ], + plugins: [ + typescript({ + declaration: true, + declarationDir: './dist', + rootDir: 'src' + }), + makeFlatPackageInDist() + ] + }, + + { + input: 'src/index.ts', + output: { + format: 'iife', + name: '__TAURI_IIFE__', + file: '../../core/tauri/scripts/bundle.global.js', + footer: 'window.__TAURI__ = __TAURI_IIFE__' + }, + plugins: [typescript(), terser()] + } +]) + +function makeFlatPackageInDist(): Plugin { + return { + name: 'makeFlatPackageInDist', + writeBundle() { + // append our api modules to `exports` in `package.json` then write it to `./dist` + const pkg = JSON.parse(readFileSync('package.json', 'utf8')) + const mods = modules.map((p) => basename(p).split('.')[0]) + + const outputPkg = { + ...pkg, + devDependencies: {}, + exports: Object.assign( + {}, + ...mods.map((mod) => { + let temp: Record = {} + let key = `./${mod}` + if (mod === 'index') { + key = '.' + } + + temp[key] = { + import: `./${mod}.js`, + require: `./${mod}.cjs` + } + return temp + }), + // if for some reason in the future we manually add something in the `exports` field + // this will ensure it doesn't get overwritten by the logic above + { ...(pkg.exports || {}) } + ) + } + writeFileSync( + 'dist/package.json', + JSON.stringify(outputPkg, undefined, 2) + ) + + // copy necessary files like `CHANGELOG.md` , `README.md` and Licenses to `./dist` + fg.sync('(LICENSE*|*.md)').forEach((f) => copyFileSync(f, `dist/${f}`)) + } + } +} + +function cleanDir(path: string) { + let dir: Dir + try { + dir = opendirSync(path) + } catch (err: any) { + switch (err.code) { + case 'ENOENT': + return // Noop when directory don't exists. + case 'ENOTDIR': + throw new Error(`'${path}' is not a directory.`) + default: + throw err + } + } + + let file = dir.readSync() + while (file) { + const filePath = join(path, file.name) + rmSync(filePath, { recursive: true }) + file = dir.readSync() + } + dir.closeSync() +} diff --git a/tooling/api/scripts/after-build.cjs b/tooling/api/scripts/after-build.cjs deleted file mode 100644 index 5b6d46c2f039..000000000000 --- a/tooling/api/scripts/after-build.cjs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -const { readFileSync, readdirSync, writeFileSync, copyFileSync } = require('fs') - -// append our api modules to `exports` in `package.json` then write it to `./dist` -const pkg = JSON.parse(readFileSync('package.json', 'utf8')) -const modules = readdirSync('src') - .filter((e) => e !== 'helpers') - .map((mod) => mod.replace('.ts', '')) - -const outputPkg = { - ...pkg, - devDependencies: {}, - exports: Object.assign( - {}, - ...modules.map((mod) => { - let temp = {} - let key = `./${mod}` - if (mod === 'index') { - key = '.' - } - - temp[key] = { - import: `./${mod}.js`, - require: `./${mod}.cjs` - } - return temp - }), - // if for some reason in the future we manually add something in the `exports` field - // this will ensure it doesn't get overwritten by the logic above - { ...(pkg.exports || {}) } - ) -} -writeFileSync('dist/package.json', JSON.stringify(outputPkg, undefined, 2)) - -// copy necessary files like `CHANGELOG.md` , `README.md` and Licenses to `./dist` -const dir = readdirSync('.') -const files = [ - ...dir.filter((f) => f.startsWith('LICENSE')), - ...dir.filter((f) => f.endsWith('.md')) -] -files.forEach((f) => copyFileSync(f, `dist/${f}`)) diff --git a/tooling/api/tsconfig.json b/tooling/api/tsconfig.json index 5cf2857b47dd..02145bf4c805 100644 --- a/tooling/api/tsconfig.json +++ b/tooling/api/tsconfig.json @@ -1,14 +1,12 @@ { "compilerOptions": { - "target": "es2020", + "target": "es2021", "module": "esnext", - "strict": true, - "esModuleInterop": true, - "moduleResolution": "node", + "moduleResolution": "bundler", "skipLibCheck": true, + "strict": true, "noUnusedLocals": true, "noImplicitAny": true, - "resolveJsonModule": true, "noEmit": true } } diff --git a/tooling/api/tsup.config.ts b/tooling/api/tsup.config.ts deleted file mode 100644 index 36dbc816bdb4..000000000000 --- a/tooling/api/tsup.config.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -import { defineConfig } from 'tsup' - -export default defineConfig(() => [ - { - entry: ['src/*.ts'], - outDir: 'dist', - format: ['esm', 'cjs'], - clean: true, - minify: true, - platform: 'browser', - dts: { - resolve: true - } - }, - { - entry: { bundle: 'src/index.ts' }, - outDir: '../../core/tauri/scripts', - format: ['iife'], - globalName: '__TAURI_IIFE__', - clean: false, - minify: true, - platform: 'browser', - dts: false, - // esbuild `globalName` option generates `var __TAURI_IIFE__ = (() => {})()` - // and var is not guaranteed to assign to the global `window` object so we make sure to assign it - footer: { - js: 'window.__TAURI__ = __TAURI_IIFE__' - } - } -]) diff --git a/tooling/api/yarn.lock b/tooling/api/yarn.lock index 4a0cbd75b33c..623ee888f303 100644 --- a/tooling/api/yarn.lock +++ b/tooling/api/yarn.lock @@ -7,134 +7,17 @@ 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.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" - integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== - -"@esbuild/android-arm@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" - integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== - -"@esbuild/android-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" - integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== - -"@esbuild/darwin-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" - integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== - -"@esbuild/darwin-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" - integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== - -"@esbuild/freebsd-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" - integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== - -"@esbuild/freebsd-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" - integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== - -"@esbuild/linux-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" - integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== - -"@esbuild/linux-arm@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" - integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== - -"@esbuild/linux-ia32@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" - integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== - -"@esbuild/linux-loong64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" - integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== - -"@esbuild/linux-mips64el@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" - integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== - -"@esbuild/linux-ppc64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" - integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== - -"@esbuild/linux-riscv64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" - integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== - -"@esbuild/linux-s390x@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" - integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== - -"@esbuild/linux-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" - integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== - -"@esbuild/netbsd-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" - integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== - -"@esbuild/openbsd-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" - integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== - -"@esbuild/sunos-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" - integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== - -"@esbuild/win32-arm64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" - integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== - -"@esbuild/win32-ia32@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" - integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== - -"@esbuild/win32-x64@0.18.20": - version "0.18.20" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" - integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== - -"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.4.0": +"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/eslint-utils@^4.2.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz#a556790523a351b4e47e9d385f47265eaaf9780a" - integrity sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA== - dependencies: - eslint-visitor-keys "^3.3.0" - "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.0", "@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== + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" + integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== "@eslint/eslintrc@^2.1.2": version "2.1.2" @@ -151,17 +34,17 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.51.0": - version "8.51.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.51.0.tgz#6d419c240cfb2b66da37df230f7e7eef801c32fa" - integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg== +"@eslint/js@8.52.0": + version "8.52.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c" + integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA== -"@humanwhocodes/config-array@^0.11.11": - version "0.11.11" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" - integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== +"@humanwhocodes/config-array@^0.11.13": + version "0.11.13" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" + integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" + "@humanwhocodes/object-schema" "^2.0.1" debug "^4.1.1" minimatch "^3.0.5" @@ -170,10 +53,50 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/object-schema@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" + integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== + +"@jridgewell/gen-mapping@^0.3.0": + 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.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@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/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/source-map@^0.3.3": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@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/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.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -196,31 +119,129 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@rollup/plugin-terser@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz#15dffdb3f73f121aa4fbb37e7ca6be9aeea91962" + integrity sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A== + dependencies: + serialize-javascript "^6.0.1" + smob "^1.0.0" + terser "^5.17.4" + +"@rollup/plugin-typescript@11.1.5": + version "11.1.5" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz#039c763bf943a5921f3f42be255895e75764cb91" + integrity sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + +"@rollup/pluginutils@^5.0.1": + version "5.0.5" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.5.tgz#bbb4c175e19ebfeeb8c132c2eea0ecb89941a66c" + integrity sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@rollup/rollup-android-arm-eabi@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.1.4.tgz#e9bc2540174972b559ded126e6f9bf12f36c1bb1" + integrity sha512-WlzkuFvpKl6CLFdc3V6ESPt7gq5Vrimd2Yv9IzKXdOpgbH4cdDSS1JLiACX8toygihtH5OlxyQzhXOph7Ovlpw== + +"@rollup/rollup-android-arm64@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.1.4.tgz#50c4e7668cb00a63d9a6810d0a607496ad4f0d09" + integrity sha512-D1e+ABe56T9Pq2fD+R3ybe1ylCDzu3tY4Qm2Mj24R9wXNCq35+JbFbOpc2yrroO2/tGhTobmEl2Bm5xfE/n8RA== + +"@rollup/rollup-darwin-arm64@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.1.4.tgz#96b8ad0c21582fe8223c66ed4b39b30ff592da1c" + integrity sha512-7vTYrgEiOrjxnjsgdPB+4i7EMxbVp7XXtS+50GJYj695xYTTEMn3HZVEvgtwjOUkAP/Q4HDejm4fIAjLeAfhtg== + +"@rollup/rollup-darwin-x64@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.1.4.tgz#5f0f6bd8f0a29e4b2b32ab831e953a6ca2d8f45b" + integrity sha512-eGJVZScKSLZkYjhTAESCtbyTBq9SXeW9+TX36ki5gVhDqJtnQ5k0f9F44jNK5RhAMgIj0Ht9+n6HAgH0gUUyWQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.1.4.tgz#52d706c87a05f91ff6f14f444685b662d3a6f96a" + integrity sha512-HnigYSEg2hOdX1meROecbk++z1nVJDpEofw9V2oWKqOWzTJlJf1UXVbDE6Hg30CapJxZu5ga4fdAQc/gODDkKg== + +"@rollup/rollup-linux-arm64-gnu@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.1.4.tgz#5afa269b26467a7929c23816e3e2cf417b973d3b" + integrity sha512-TzJ+N2EoTLWkaClV2CUhBlj6ljXofaYzF/R9HXqQ3JCMnCHQZmQnbnZllw7yTDp0OG5whP4gIPozR4QiX+00MQ== + +"@rollup/rollup-linux-arm64-musl@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.1.4.tgz#08d30969483a804769deb6e674fe963c21815ad9" + integrity sha512-aVPmNMdp6Dlo2tWkAduAD/5TL/NT5uor290YvjvFvCv0Q3L7tVdlD8MOGDL+oRSw5XKXKAsDzHhUOPUNPRHVTQ== + +"@rollup/rollup-linux-x64-gnu@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.1.4.tgz#e5000b4e6e2a81364083d64a608b915f4e92a9c1" + integrity sha512-77Fb79ayiDad0grvVsz4/OB55wJRyw9Ao+GdOBA9XywtHpuq5iRbVyHToGxWquYWlEf6WHFQQnFEttsAzboyKg== + +"@rollup/rollup-linux-x64-musl@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.1.4.tgz#6f356e16b275287f61c61ce8b9e1718fc5b24d4c" + integrity sha512-/t6C6niEQTqmQTVTD9TDwUzxG91Mlk69/v0qodIPUnjjB3wR4UA3klg+orR2SU3Ux2Cgf2pWPL9utK80/1ek8g== + +"@rollup/rollup-win32-arm64-msvc@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.1.4.tgz#acb619a959c7b03fad63017b328fa60641b75239" + integrity sha512-ZY5BHHrOPkMbCuGWFNpJH0t18D2LU6GMYKGaqaWTQ3CQOL57Fem4zE941/Ek5pIsVt70HyDXssVEFQXlITI5Gg== + +"@rollup/rollup-win32-ia32-msvc@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.1.4.tgz#6aab05c9a60f952cf5a263ebca244aa225fbde63" + integrity sha512-XG2mcRfFrJvYyYaQmvCIvgfkaGinfXrpkBuIbJrTl9SaIQ8HumheWTIwkNz2mktCKwZfXHQNpO7RgXLIGQ7HXA== + +"@rollup/rollup-win32-x64-msvc@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.1.4.tgz#482022c71466e653aa6e1afc7a8323298743609b" + integrity sha512-ANFqWYPwkhIqPmXw8vm0GpBEHiPpqcm99jiiAp71DbCSqLDhrtr019C5vhD0Bw4My+LmMvciZq6IsWHqQpl2ZQ== + +"@types/estree@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.2.tgz#ff02bc3dc8317cd668dfec247b750ba1f1d62453" + integrity sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA== + "@types/json-schema@^7.0.12": - version "7.0.12" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + version "7.0.14" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.14.tgz#74a97a5573980802f32c8e47b663530ab3b6b7d1" + integrity sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw== "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/node@20.8.7": + version "20.8.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25" + integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ== + dependencies: + undici-types "~5.25.1" + "@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + version "7.5.4" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.4.tgz#0a41252ad431c473158b22f9bfb9a63df7541cff" + integrity sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ== -"@typescript-eslint/eslint-plugin@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz#06abe4265e7c82f20ade2dcc0e3403c32d4f148b" - integrity sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw== +"@typescript-eslint/eslint-plugin@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.0.tgz#fdb6f3821c0167e3356e9d89c80e8230b2e401f4" + integrity sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/type-utils" "6.8.0" - "@typescript-eslint/utils" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/scope-manager" "6.9.0" + "@typescript-eslint/type-utils" "6.9.0" + "@typescript-eslint/utils" "6.9.0" + "@typescript-eslint/visitor-keys" "6.9.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -228,80 +249,85 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@6.8.0", "@typescript-eslint/parser@^6.4.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.8.0.tgz#bb2a969d583db242f1ee64467542f8b05c2e28cb" - integrity sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg== +"@typescript-eslint/parser@6.9.0", "@typescript-eslint/parser@^6.4.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.9.0.tgz#2b402cadeadd3f211c25820e5433413347b27391" + integrity sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw== dependencies: - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/scope-manager" "6.9.0" + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/typescript-estree" "6.9.0" + "@typescript-eslint/visitor-keys" "6.9.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz#5cac7977385cde068ab30686889dd59879811efd" - integrity sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g== +"@typescript-eslint/scope-manager@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz#2626e9a7fe0e004c3e25f3b986c75f584431134e" + integrity sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw== dependencies: - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/visitor-keys" "6.9.0" -"@typescript-eslint/type-utils@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz#50365e44918ca0fd159844b5d6ea96789731e11f" - integrity sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g== +"@typescript-eslint/type-utils@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.9.0.tgz#23923c8c9677c2ad41457cf8e10a5f2946be1b04" + integrity sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ== dependencies: - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/utils" "6.8.0" + "@typescript-eslint/typescript-estree" "6.9.0" + "@typescript-eslint/utils" "6.9.0" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded" - integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ== +"@typescript-eslint/types@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.9.0.tgz#86a0cbe7ac46c0761429f928467ff3d92f841098" + integrity sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw== -"@typescript-eslint/typescript-estree@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1" - integrity sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg== +"@typescript-eslint/typescript-estree@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.0.tgz#d0601b245be873d8fe49f3737f93f8662c8693d4" + integrity sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ== dependencies: - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/visitor-keys" "6.9.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.8.0.tgz#d42939c2074c6b59844d0982ce26a51d136c4029" - integrity sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q== +"@typescript-eslint/utils@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.9.0.tgz#5bdac8604fca4823f090e4268e681c84d3597c9f" + integrity sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/typescript-estree" "6.8.0" + "@typescript-eslint/scope-manager" "6.9.0" + "@typescript-eslint/types" "6.9.0" + "@typescript-eslint/typescript-estree" "6.9.0" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz#cffebed56ae99c45eba901c378a6447b06be58b8" - integrity sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg== +"@typescript-eslint/visitor-keys@6.9.0": + version "6.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz#cc69421c10c4ac997ed34f453027245988164e80" + integrity sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg== dependencies: - "@typescript-eslint/types" "6.8.0" + "@typescript-eslint/types" "6.9.0" eslint-visitor-keys "^3.4.1" +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.9.0: +acorn@^8.8.2, 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== @@ -321,11 +347,6 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-sequence-parser@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" - integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== - ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -333,19 +354,6 @@ ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== - -anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -359,15 +367,15 @@ array-buffer-byte-length@^1.0.0: 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" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== +array-includes@^3.1.7: + version "3.1.7" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" + integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" is-string "^1.0.7" array-union@^2.1.0: @@ -375,45 +383,46 @@ 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== +array.prototype.findlastindex@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" - get-intrinsic "^1.1.3" + get-intrinsic "^1.2.1" -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" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== +array.prototype.flat@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" 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== +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== dependencies: array-buffer-byte-length "^1.0.0" call-bind "^1.0.2" define-properties "^1.2.0" + es-abstract "^1.22.1" get-intrinsic "^1.2.1" is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" @@ -428,11 +437,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -441,20 +445,18 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2, braces@~3.0.2: +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" +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + builtins@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" @@ -462,18 +464,6 @@ builtins@^5.0.1: dependencies: semver "^7.0.0" -bundle-require@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.0.0.tgz#99e91aed83fb33041c123b013c356e7b76473e10" - integrity sha512-5xjxGtR06579D7UcTBhcQO7Zg3A7ji5xuIUl7kNHSvVJ7/CmAs3bCosfYWNuD/Xm5k0jS9VFuPipSpm5S+ZlKw== - dependencies: - load-tsconfig "^0.2.3" - -cac@^6.7.12: - version "6.7.12" - resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.12.tgz#6fb5ea2ff50bd01490dbda497f4ae75a99415193" - integrity sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA== - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -495,21 +485,6 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@^3.5.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -522,17 +497,17 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -commander@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 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= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -548,7 +523,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -560,19 +535,21 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-properties@^1.1.3, define-properties@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== +define-data-property@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" 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== +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== dependencies: + define-data-property "^1.0.1" has-property-descriptors "^1.0.0" object-keys "^1.1.1" @@ -597,86 +574,18 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -es-abstract@^1.19.0, es-abstract@^1.19.5: - version "1.20.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" - integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.1" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.4" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - regexp.prototype.flags "^1.4.3" - string.prototype.trimend "^1.0.5" - string.prototype.trimstart "^1.0.5" - unbox-primitive "^1.0.2" - -es-abstract@^1.20.4: - version "1.21.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" - integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - 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.4" - is-array-buffer "^3.0.1" - 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.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.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== +es-abstract@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" + integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== dependencies: array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.1" + arraybuffer.prototype.slice "^1.0.2" 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" + function.prototype.name "^1.1.6" get-intrinsic "^1.2.1" get-symbol-description "^1.0.0" globalthis "^1.0.3" @@ -692,23 +601,23 @@ es-abstract@^1.21.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-typed-array "^1.1.12" 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" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" 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" + which-typed-array "^1.1.11" es-set-tostringtag@^2.0.1: version "2.0.1" @@ -735,34 +644,6 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.18.2: - version "0.18.20" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" - integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== - optionalDependencies: - "@esbuild/android-arm" "0.18.20" - "@esbuild/android-arm64" "0.18.20" - "@esbuild/android-x64" "0.18.20" - "@esbuild/darwin-arm64" "0.18.20" - "@esbuild/darwin-x64" "0.18.20" - "@esbuild/freebsd-arm64" "0.18.20" - "@esbuild/freebsd-x64" "0.18.20" - "@esbuild/linux-arm" "0.18.20" - "@esbuild/linux-arm64" "0.18.20" - "@esbuild/linux-ia32" "0.18.20" - "@esbuild/linux-loong64" "0.18.20" - "@esbuild/linux-mips64el" "0.18.20" - "@esbuild/linux-ppc64" "0.18.20" - "@esbuild/linux-riscv64" "0.18.20" - "@esbuild/linux-s390x" "0.18.20" - "@esbuild/linux-x64" "0.18.20" - "@esbuild/netbsd-x64" "0.18.20" - "@esbuild/openbsd-x64" "0.18.20" - "@esbuild/sunos-x64" "0.18.20" - "@esbuild/win32-arm64" "0.18.20" - "@esbuild/win32-ia32" "0.18.20" - "@esbuild/win32-x64" "0.18.20" - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -786,14 +667,14 @@ eslint-config-standard@17.1.0: resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz#40ffb8595d47a6b242e07cbfd49dc211ed128975" integrity sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q== -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" eslint-module-utils@^2.8.0: version "2.8.0" @@ -818,26 +699,26 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@2.28.1: - version "2.28.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" - integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== +eslint-plugin-import@2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz#8133232e4329ee344f2f612885ac3073b0b7e155" + integrity sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg== dependencies: - array-includes "^3.1.6" - array.prototype.findlastindex "^1.2.2" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" + array-includes "^3.1.7" + array.prototype.findlastindex "^1.2.3" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" + eslint-import-resolver-node "^0.3.9" eslint-module-utils "^2.8.0" - has "^1.0.3" - is-core-module "^2.13.0" + hasown "^2.0.0" + is-core-module "^2.13.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" + object.fromentries "^2.0.7" + object.groupby "^1.0.1" + object.values "^1.1.7" semver "^6.3.1" tsconfig-paths "^3.14.2" @@ -900,33 +781,24 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== - -eslint-visitor-keys@^3.4.1: - version "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-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@8.51.0: - version "8.51.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.51.0.tgz#4a82dae60d209ac89a5cff1604fea978ba4950f3" - integrity sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA== +eslint@8.52.0: + version "8.52.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.52.0.tgz#d0cd4a1fac06427a61ef9242b9353f36ea7062fc" + integrity sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.51.0" - "@humanwhocodes/config-array" "^0.11.11" + "@eslint/js" "8.52.0" + "@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -986,35 +858,25 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== +fast-glob@3.3.1, fast-glob@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -1033,9 +895,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" @@ -1062,17 +924,18 @@ find-up@^5.0.0: path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.1.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.1.tgz#a02a15fdec25a8f844ff7cc658f03dd99eb4609b" + integrity sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: - version "3.2.5" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" - integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== for-each@^0.3.3: version "0.3.3" @@ -1087,49 +950,31 @@ fs.realpath@^1.0.0: 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== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -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== +function-bind@^1.1.1, function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +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== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-intrinsic@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.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== @@ -1139,11 +984,6 @@ get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: 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" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -1159,7 +999,7 @@ get-tsconfig@^4.7.0: dependencies: resolve-pkg-maps "^1.0.0" -glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -1173,18 +1013,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -1198,9 +1026,9 @@ glob@^7.1.3: path-is-absolute "^1.0.0" globals@^13.19.0: - version "13.19.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" - integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== + version "13.23.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== dependencies: type-fest "^0.20.2" @@ -1211,7 +1039,7 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@^11.0.3, globby@^11.1.0: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -1235,18 +1063,6 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -handlebars@^4.7.7: - version "4.7.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -1269,7 +1085,7 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -1282,23 +1098,18 @@ has-tostringtag@^1.0.0: has-symbols "^1.0.2" 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" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== -ignore@^5.1.1, ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" -ignore@^5.2.4: +ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -1329,24 +1140,6 @@ inherits@2: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - -internal-slot@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" - integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ== - dependencies: - get-intrinsic "^1.1.3" - 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" @@ -1356,16 +1149,7 @@ internal-slot@^1.0.5: 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" - integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-typed-array "^1.1.10" - -is-array-buffer@^3.0.2: +is-array-buffer@^3.0.1, 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== @@ -1381,13 +1165,6 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" @@ -1396,23 +1173,11 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.3, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-callable@^1.1.4, is-callable@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" - integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== - -is-core-module@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - 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" @@ -1420,19 +1185,12 @@ is-core-module@^2.12.1, is-core-module@^2.13.0: 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" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== - dependencies: - has "^1.0.3" - -is-core-module@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" - integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== +is-core-module@^2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: - has "^1.0.3" + hasown "^2.0.0" is-date-object@^1.0.1: version "1.0.5" @@ -1446,14 +1204,7 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-glob@^4.0.0, is-glob@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -1497,11 +1248,6 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -1516,16 +1262,12 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== +is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== 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.11" is-weakref@^1.0.2: version "1.0.2" @@ -1544,11 +1286,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -joycon@^3.0.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" - integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== - js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -1556,6 +1293,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -1573,10 +1315,12 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" levn@^0.4.1: version "0.4.1" @@ -1586,21 +1330,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lilconfig@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" - integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -load-tsconfig@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.3.tgz#08af3e7744943caab0c75f8af7f1703639c3ef1f" - integrity sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ== - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -1613,11 +1342,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -1625,21 +1349,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lunr@^2.3.9: - version "2.3.9" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -1653,11 +1362,6 @@ micromatch@^4.0.4: 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, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1665,17 +1369,10 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== ms@2.1.2: version "2.1.2" @@ -1687,72 +1384,21 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mz@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.12.0: - version "1.12.2" - 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.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== - -object-inspect@^1.9.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.0.tgz#42695d3879e1cd5bda6df5062164d80c996e23e2" + integrity sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g== object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" @@ -1763,33 +1409,33 @@ 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== +object.fromentries@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -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== +object.groupby@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" - es-abstract "^1.21.2" + es-abstract "^1.22.1" 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" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== +object.values@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" once@^1.3.0: version "1.4.0" @@ -1798,14 +1444,7 @@ once@^1.3.0: dependencies: wrappy "1" -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -optionator@>=0.9.3, 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== @@ -1848,7 +1487,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^3.0.0, path-key@^3.1.0: +path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -1863,24 +1502,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: +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.1: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== - -postcss-load-config@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.1.tgz#152383f481c2758274404e4962743191d73875bd" - integrity sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA== - dependencies: - lilconfig "^2.0.5" - yaml "^2.1.1" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -1892,44 +1518,35 @@ prettier@3.0.3: integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: - picomatch "^2.2.1" + safe-buffer "^5.1.0" regexp-tree@~0.1.1: - version "0.1.24" - resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" - integrity sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw== - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" + version "0.1.27" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.27.tgz#2198f0ef54518ffa743fe74d983b56ffd631b6cd" + integrity sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA== -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== +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" - functions-have-names "^1.2.3" + set-function-name "^2.0.0" regexpp@^3.0.0: version "3.2.0" @@ -1941,38 +1558,15 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - resolve-pkg-maps@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve@^1.10.1: - version "1.22.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" - integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== - dependencies: - is-core-module "^2.8.1" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.22.2: - version "1.22.4" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" - integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== +resolve@^1.10.1, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4: + 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.13.0" path-parse "^1.0.7" @@ -1990,11 +1584,23 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rollup@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.2.5.tgz#9452168ac083218c8212bf53d2448bdc6b8b0de7" - integrity sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw== +rollup@4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.1.4.tgz#cf0ab00d9183a3d11fcc5d630270463b13831221" + integrity sha512-U8Yk1lQRKqCkDBip/pMYT+IKaN7b7UesK3fLSTuHBoBJacCE+oBqo/dfG/gkUdQNNB2OBmRP98cn2C2bkYZkyw== optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.1.4" + "@rollup/rollup-android-arm64" "4.1.4" + "@rollup/rollup-darwin-arm64" "4.1.4" + "@rollup/rollup-darwin-x64" "4.1.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.1.4" + "@rollup/rollup-linux-arm64-gnu" "4.1.4" + "@rollup/rollup-linux-arm64-musl" "4.1.4" + "@rollup/rollup-linux-x64-gnu" "4.1.4" + "@rollup/rollup-linux-x64-musl" "4.1.4" + "@rollup/rollup-win32-arm64-msvc" "4.1.4" + "@rollup/rollup-win32-ia32-msvc" "4.1.4" + "@rollup/rollup-win32-x64-msvc" "4.1.4" fsevents "~2.3.2" run-parallel@^1.1.9: @@ -2004,16 +1610,21 @@ 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== +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.2.0" + get-intrinsic "^1.2.1" has-symbols "^1.0.3" isarray "^2.0.5" +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + 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" @@ -2030,13 +1641,34 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -semver@>=7.5.2, semver@^6.1.0, semver@^6.3.1, semver@^7.0.0, semver@^7.5.3, semver@^7.5.4: +semver@^6.1.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.0.0, 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== dependencies: lru-cache "^6.0.0" +serialize-javascript@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + dependencies: + randombytes "^2.1.0" + +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2049,16 +1681,6 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shiki@^0.14.1: - version "0.14.5" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.5.tgz#375dd214e57eccb04f0daf35a32aa615861deb93" - integrity sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw== - dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" - side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -2068,72 +1690,55 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map@0.8.0-beta.0: - version "0.8.0-beta.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" - integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== +smob@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/smob/-/smob-1.4.1.tgz#66270e7df6a7527664816c5b577a23f17ba6f5b5" + integrity sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ== + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: - whatwg-url "^7.0.0" + buffer-from "^1.0.0" + source-map "^0.6.0" -source-map@^0.6.1: +source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -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" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" + define-properties "^1.2.0" + es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" strip-ansi@^6.0.1: version "6.0.1" @@ -2145,30 +1750,13 @@ strip-ansi@^6.0.1: strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== 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== -sucrase@^3.20.3: - version "3.21.0" - resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.21.0.tgz#6a5affdbe716b22e4dc99c57d366ad0d216444b9" - integrity sha512-FjAhMJjDcifARI7bZej0Bi1yekjWQHoEvWIXhLPwDhC6O4iZ5PtGb86WV56riW87hzpgB13wwBKO9vKAiWu5VQ== - dependencies: - commander "^4.0.0" - glob "7.1.6" - lines-and-columns "^1.1.6" - mz "^2.7.0" - pirates "^4.0.1" - ts-interface-checker "^0.1.9" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -2181,24 +1769,20 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +terser@^5.17.4: + version "5.22.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.22.0.tgz#4f18103f84c5c9437aafb7a14918273310a8a49d" + integrity sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== to-regex-range@^5.0.1: version "5.0.1" @@ -2207,27 +1791,10 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - ts-api-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" - integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== - -ts-interface-checker@^0.1.9: - version "0.1.13" - resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" - integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== tsconfig-paths@^3.14.2: version "3.14.2" @@ -2239,25 +1806,10 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tsup@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/tsup/-/tsup-7.2.0.tgz#bb24c0d5e436477900c712e42adc67200607303c" - integrity sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ== - dependencies: - bundle-require "^4.0.0" - cac "^6.7.12" - chokidar "^3.5.1" - debug "^4.3.1" - esbuild "^0.18.2" - execa "^5.0.0" - globby "^11.0.3" - joycon "^3.0.1" - postcss-load-config "^4.0.1" - resolve-from "^5.0.0" - rollup "^3.2.5" - source-map "0.8.0-beta.0" - sucrase "^3.20.3" - tree-kill "^1.2.2" +tslib@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" @@ -2310,38 +1862,11 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typedoc-plugin-markdown@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.16.0.tgz#98da250271aafade8b6740a8116a97cd3941abcd" - integrity sha512-eeiC78fDNGFwemPIHiwRC+mEC7W5jwt3fceUev2gJ2nFnXpVHo8eRrpC9BLWZDee6ehnz/sPmNjizbXwpfaTBw== - dependencies: - handlebars "^4.7.7" - -typedoc-plugin-mdn-links@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.0.tgz#45ac9c84ed074d9c2e36703fb8d0d28ce71efffc" - integrity sha512-4uwnkvywPFV3UVx7WXpIWTHJdXH1rlE2e4a1WsSwCFYKqJxgTmyapv3ZxJtbSl1dvnb6jmuMNSqKEPz77Gs2OA== - -typedoc@0.25.2: - version "0.25.2" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.2.tgz#39f525c28b6eb61da54dda4ec6b1500df620bed8" - integrity sha512-286F7BeATBiWe/qC4PCOCKlSTwfnsLbC/4cZ68oGBbvAqb9vV33quEOXx7q176OXotD+JdEerdQ1OZGJ818lnA== - dependencies: - lunr "^2.3.9" - marked "^4.3.0" - minimatch "^9.0.3" - shiki "^0.14.1" - typescript@5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -uglify-js@^3.1.4: - version "3.15.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.5.tgz#2b10f9e0bfb3f5c15a8e8404393b6361eaeb33b3" - integrity sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ== - unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -2352,6 +1877,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +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== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -2359,30 +1889,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -2394,7 +1900,7 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-typed-array@^1.1.10: +which-typed-array@^1.1.11: version "1.1.11" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== @@ -2405,18 +1911,6 @@ which-typed-array@^1.1.10: 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" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - 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" - is-typed-array "^1.1.10" - which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -2424,26 +1918,16 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - 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== 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== -yaml@^2.1.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" - integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 8a4894ac2222..6ec988ef58d3 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -47,8 +47,7 @@ "prettier": "2.8.8" }, "resolutions": { - "json5": "2.2.3", - "semver": ">=7.5.2" + "json5": "2.2.3" }, "engines": { "node": ">= 10" @@ -67,6 +66,5 @@ "tauri": "node ./tauri.js", "format": "prettier --write ./package.json ./tauri.js", "format:check": "prettier --check ./package.json ./tauri.js" - }, - "dependencies": {} + } } diff --git a/tooling/cli/node/yarn.lock b/tooling/cli/node/yarn.lock index 71046a264d5b..a81394fec6a8 100644 --- a/tooling/cli/node/yarn.lock +++ b/tooling/cli/node/yarn.lock @@ -103,7 +103,12 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.20" -"@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": +"@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.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.22.5": 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== @@ -1156,12 +1161,7 @@ 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: - 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: +graceful-fs@^4.1.6, graceful-fs@^4.2.0, 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== @@ -1610,7 +1610,7 @@ jest-snapshot@^29.7.0: jest-transform-toml@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/jest-transform-toml/-/jest-transform-toml-1.0.0.tgz#0a255066d4e59620ec3c3cc5a555321bb05f153d" - integrity sha1-CiVQZtTlliDsPDzFpVUyG7BfFT0= + integrity sha512-S+U7zvCcBgtnwhnjJXYJWVHt7oe7xe3/AuOtVdFrd+YDn1ZXqXuQ6vgM/wFPfblNDUVXJzf9AP/FBGZyLx4/eA== dependencies: toml-loader "^1.0.0" @@ -1971,10 +1971,15 @@ resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -semver@>=7.5.2, semver@^6.3.0, semver@^6.3.1, semver@^7.5.3, semver@^7.5.4: - version "7.5.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" - integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +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== dependencies: lru-cache "^6.0.0" @@ -2124,7 +2129,7 @@ to-regex-range@^5.0.1: toml-loader@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toml-loader/-/toml-loader-1.0.0.tgz#05249b9294b623601148260caa480b22a653a19a" - integrity sha1-BSSbkpS2I2ARSCYMqkgLIqZToZo= + integrity sha512-/1xtg+pmD6IOuJBGtFp75hSofSVx3F8akeOS+31Rk1R5n8mYSZGKuaLM39qcxUm+SEx7zuntWR2puwYSntUKAg== dependencies: toml "^2.2.2" diff --git a/tooling/cli/templates/plugin/.github/workflows/covector-version-or-publish.yml b/tooling/cli/templates/plugin/.github/workflows/covector-version-or-publish.yml index 9b046aa1c1ba..d39e72acf7ba 100644 --- a/tooling/cli/templates/plugin/.github/workflows/covector-version-or-publish.yml +++ b/tooling/cli/templates/plugin/.github/workflows/covector-version-or-publish.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: 18 registry-url: 'https://registry.npmjs.org' From 9580df1d7b027befb9e5f025ea2cbaf2dcc82c8e Mon Sep 17 00:00:00 2001 From: DK Liao Date: Tue, 24 Oct 2023 23:26:24 +0800 Subject: [PATCH 113/122] chore(deps): upgrade gtk to 0.18 (#8084) Co-authored-by: Lucas Nogueira --- .changes/gtk018.md | 7 + .changes/wry-0.34.md | 6 + .github/workflows/lint-core.yml | 5 +- .github/workflows/test-core.yml | 12 +- core/tauri-runtime-wry/Cargo.toml | 10 +- core/tauri-runtime/Cargo.toml | 2 +- core/tauri/Cargo.toml | 11 +- core/tauri/src/lib.rs | 1 - core/tauri/src/test/mod.rs | 4 +- core/tauri/src/window/mod.rs | 6 +- examples/api/src-tauri/Cargo.lock | 213 ++++++++++++++++-------------- 11 files changed, 143 insertions(+), 134 deletions(-) create mode 100644 .changes/gtk018.md create mode 100644 .changes/wry-0.34.md diff --git a/.changes/gtk018.md b/.changes/gtk018.md new file mode 100644 index 000000000000..90ac1404c81b --- /dev/null +++ b/.changes/gtk018.md @@ -0,0 +1,7 @@ +--- +"tauri-runtime": 'minor:deps' +"tauri-runtime-wry": 'minor:deps' +"tauri": 'minor:deps' +--- + +Upgrade `gtk` to 0.18. diff --git a/.changes/wry-0.34.md b/.changes/wry-0.34.md new file mode 100644 index 000000000000..49bc4b68653a --- /dev/null +++ b/.changes/wry-0.34.md @@ -0,0 +1,6 @@ +--- +"tauri": patch:deps +"tauri-runtime-wry": patch:deps +--- + +Updated to wry@0.34, removing the `dox` feature flag. diff --git a/.github/workflows/lint-core.yml b/.github/workflows/lint-core.yml index 97f8f1397966..bb3bde3d6091 100644 --- a/.github/workflows/lint-core.yml +++ b/.github/workflows/lint-core.yml @@ -49,10 +49,7 @@ jobs: matrix: clippy: - { args: '', key: 'empty' } - - { - args: '--features compression,wry,linux-ipc-protocol,isolation,custom-protocol,tray-icon,test', - key: 'all' - } + - { args: '--all-features', key: 'all' } - { args: '--features custom-protocol', key: 'custom-protocol' } steps: diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index c1ef4816d6b7..e199af69c3fe 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -67,14 +67,8 @@ jobs: command: 'build' } features: - - { - args: --no-default-features, - key: no-default - } - - { - args: --features compression,wry,linux-ipc-protocol,isolation,custom-protocol,tray-icon,test, - key: all - } + - { args: --no-default-features, key: no-default } + - { args: --all-features, key: all } steps: - uses: actions/checkout@v4 @@ -91,7 +85,7 @@ jobs: if: contains(matrix.platform.target, 'unknown-linux') run: | sudo apt-get update - sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev + sudo apt-get install -y webkit2gtk-4.1 libxdo-dev libayatana-appindicator3-dev - uses: Swatinem/rust-cache@v2 with: diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index 78a77ba4d48a..c8afa4c4a882 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -12,11 +12,8 @@ license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } -[package.metadata.docs.rs] -features = [ "dox" ] - [dependencies] -wry = { version = "0.33", default-features = false, features = [ "tao", "file-drop", "protocol" ] } +wry = { version = "0.34.1", default-features = false, features = [ "tao", "file-drop", "protocol" ] } tauri-runtime = { version = "1.0.0-alpha.3", path = "../tauri-runtime" } tauri-utils = { version = "2.0.0-alpha.9", path = "../tauri-utils" } raw-window-handle = "0.5" @@ -30,8 +27,8 @@ webview2-com = "0.25" features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -gtk = { version = "0.16", features = [ "v3_24" ] } -webkit2gtk = { version = "1.1", features = [ "v2_38" ] } +gtk = { version = "0.18", features = [ "v3_24" ] } +webkit2gtk = { version = "=2.0", features = [ "v2_38" ] } percent-encoding = "2.1" [target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies] @@ -41,7 +38,6 @@ cocoa = "0.24" jni = "0.21" [features] -dox = [ "wry/dox" ] devtools = [ "wry/devtools", "tauri-runtime/devtools" ] macos-private-api = [ "wry/fullscreen", diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index e9aac20ea36f..aa8f0c430e89 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -38,7 +38,7 @@ version = "0.48" features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -gtk = { version = "0.16", features = [ "v3_24" ] } +gtk = { version = "0.18", features = [ "v3_24" ] } [target."cfg(target_os = \"android\")".dependencies] jni = "0.21" diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 6bee84a33fe6..f726e8172756 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -23,7 +23,6 @@ features = [ "icon-png", "protocol-asset", "test", - "dox" ] rustdoc-args = [ "--cfg", "doc_cfg" ] default-target = "x86_64-unknown-linux-gnu" @@ -73,13 +72,12 @@ ico = { version = "0.3.0", optional = true } http-range = { version = "0.1.4", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] -muda = { version = "0.8", default-features = false } -tray-icon = { version = "0.8", default-features = false, optional = true } +muda = { version = "0.10", default-features = false } +tray-icon = { version = "0.10", default-features = false, optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -gtk = { version = "0.16", features = [ "v3_24" ] } -glib = "0.16" -webkit2gtk = { version = "1.1", features = [ "v2_38" ] } +gtk = { version = "0.18", features = [ "v3_24" ] } +webkit2gtk = { version = "=2.0", features = [ "v2_38" ] } [target."cfg(target_os = \"macos\")".dependencies] embed_plist = "1.2" @@ -145,7 +143,6 @@ native-tls = [ "reqwest/native-tls" ] native-tls-vendored = [ "reqwest/native-tls-vendored" ] rustls-tls = [ "reqwest/rustls-tls" ] devtools = [ "tauri-runtime/devtools", "tauri-runtime-wry/devtools" ] -dox = [ "tauri-runtime-wry/dox" ] process-relaunch-dangerous-allow-symlink-macos = [ "tauri-utils/process-relaunch-dangerous-allow-symlink-macos" ] macos-private-api = [ "tauri-runtime/macos-private-api", diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index fb56aa01e0ea..a3838444a18d 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -14,7 +14,6 @@ //! //! - **wry** *(enabled by default)*: Enables the [wry](https://github.com/tauri-apps/wry) runtime. Only disable it if you want a custom runtime. //! - **test**: Enables the [`test`] module exposing unit test helpers. -//! - **dox**: Internal feature to generate Rust documentation without linking on Linux. //! - **objc-exception**: Wrap each msg_send! in a @try/@catch and panics if an exception is caught, preventing Objective-C from unwinding into Rust. //! - **linux-ipc-protocol**: Use custom protocol for faster IPC on Linux. Requires webkit2gtk v2.40 or above. //! - **linux-libxdo**: Enables linking to libxdo which enables Cut, Copy, Paste and SelectAll menu items to work on Linux. diff --git a/core/tauri/src/test/mod.rs b/core/tauri/src/test/mod.rs index ff163eb2a3fc..62c1c5281106 100644 --- a/core/tauri/src/test/mod.rs +++ b/core/tauri/src/test/mod.rs @@ -27,7 +27,7 @@ //! } //! //! fn main() { -//! let app = create_app(tauri::Builder::default()); +//! // let app = create_app(tauri::Builder::default()); //! // app.run(|_handle, _event| {}); //! } //! @@ -190,7 +190,7 @@ pub fn mock_app() -> App { /// } /// /// fn main() { -/// let app = create_app(tauri::Builder::default()); +/// // let app = create_app(tauri::Builder::default()); /// // app.run(|_handle, _event| {});} /// } /// diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index 52802f797582..aa3122338265 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -1160,9 +1160,9 @@ impl Window { /// main_window.with_webview(|webview| { /// #[cfg(target_os = "linux")] /// { - /// // see https://docs.rs/webkit2gtk/0.18.2/webkit2gtk/struct.WebView.html - /// // and https://docs.rs/webkit2gtk/0.18.2/webkit2gtk/trait.WebViewExt.html - /// use webkit2gtk::traits::WebViewExt; + /// // see https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/struct.WebView.html + /// // and https://docs.rs/webkit2gtk/2.0.0/webkit2gtk/trait.WebViewExt.html + /// use webkit2gtk::WebViewExt; /// webview.inner().set_zoom_level(4.); /// } /// diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 37336a610d2b..5f37c4b02315 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -307,21 +307,20 @@ dependencies = [ [[package]] name = "atk" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "bitflags 1.3.2", "glib", "libc", ] [[package]] name = "atk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", @@ -373,6 +372,9 @@ name = "bitflags" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] [[package]] name = "block" @@ -455,11 +457,11 @@ dependencies = [ [[package]] name = "cairo-rs" -version = "0.16.7" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" +checksum = "1c0466dfa8c0ee78deef390c274ad756801e0a6dbb86c5ef0924a298c5761c4d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "cairo-sys-rs", "glib", "libc", @@ -469,9 +471,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.16.3" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "glib-sys", "libc", @@ -1234,11 +1236,10 @@ dependencies = [ [[package]] name = "gdk" -version = "0.16.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -1250,22 +1251,22 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.16.7" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" +checksum = "bbc9c2ed73a81d556b65d08879ba4ee58808a6b1927ce915262185d6d547c6f3" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", "libc", + "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", @@ -1276,9 +1277,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1293,9 +1294,9 @@ dependencies = [ [[package]] name = "gdkwayland-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4511710212ed3020b61a8622a37aa6f0dd2a84516575da92e9b96928dcbe83ba" +checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" dependencies = [ "gdk-sys", "glib-sys", @@ -1307,9 +1308,9 @@ dependencies = [ [[package]] name = "gdkx11-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa2bf8b5b8c414bc5d05e48b271896d0fd3ddb57464a3108438082da61de6af" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ "gdk-sys", "glib-sys", @@ -1381,11 +1382,10 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gio" -version = "0.16.7" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" +checksum = "57052f84e8e5999b258e8adf8f5f2af0ac69033864936b8b6838321db2f759b1" dependencies = [ - "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -1401,9 +1401,9 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", @@ -1414,11 +1414,11 @@ dependencies = [ [[package]] name = "glib" -version = "0.16.9" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16aa2475c9debed5a32832cb5ff2af5a3f9e1ab9e69df58eaadc1ab2004d6eba" +checksum = "1c316afb01ce8067c5eaab1fc4f2cd47dc21ce7b6296358605e2ffab23ccbd19" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "futures-channel", "futures-core", "futures-executor", @@ -1429,6 +1429,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", + "memchr", "once_cell", "smallvec", "thiserror", @@ -1436,24 +1437,23 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.16.8" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1a9325847aa46f1e96ffea37611b9d51fc4827e67f79e7de502a297560a67b" +checksum = "f8da903822b136d42360518653fcf154455defc437d3e7a81475bf9a95ff1e47" dependencies = [ - "anyhow", "heck", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps", @@ -1467,9 +1467,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", @@ -1478,12 +1478,11 @@ dependencies = [ [[package]] name = "gtk" -version = "0.16.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -1494,16 +1493,15 @@ dependencies = [ "gtk-sys", "gtk3-macros", "libc", - "once_cell", "pango", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -1519,16 +1517,15 @@ dependencies = [ [[package]] name = "gtk3-macros" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096eb63c6fedf03bafe65e5924595785eaf1bcb7200dac0f2cbe9c9738f05ad8" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ - "anyhow", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -1800,9 +1797,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "javascriptcore-rs" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cfcc681b896b083864a4a3c3b3ea196f14ff66b8641a68fde209c6d84434056" +checksum = "c3e411dbc2288d2e66373abb4ebe35e198af770c1c61f795b8fa25a398c24006" dependencies = [ "bitflags 1.3.2", "glib", @@ -1811,9 +1808,9 @@ dependencies = [ [[package]] name = "javascriptcore-rs-sys" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0983ba5b3ab9a0c0918de02c42dc71f795d6de08092f88a98ce9fdfdee4ba91" +checksum = "f3e2b173d4e1f4653dec2ffaf83c7d92842b04573bf04af0e75a086219e45298" dependencies = [ "glib-sys", "gobject-sys", @@ -1866,11 +1863,11 @@ dependencies = [ [[package]] name = "keyboard-types" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7668b7cff6a51fe61cdde64cd27c8a220786f399501b57ebe36f7d8112fd68" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "serde", "unicode-segmentation", ] @@ -1896,9 +1893,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libappindicator" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e1edfdc9b0853358306c6dfb4b77c79c779174256fe93d80c0b5ebca451a2f" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" dependencies = [ "glib", "gtk", @@ -1909,9 +1906,9 @@ dependencies = [ [[package]] name = "libappindicator-sys" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08fcb2bea89cee9613982501ec83eaa2d09256b24540ae463c52a28906163918" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", "libloading", @@ -2083,14 +2080,12 @@ dependencies = [ [[package]] name = "muda" -version = "0.8.7" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe753ec4d3e8137a1d3ecb1aee1192b8f7661fe1247641968f5bf5f2e6ebbe" +checksum = "9767ce3b12d2928f17ff4f91b29e7e872a8594033d82bf00e56017cc23bb8410" dependencies = [ "cocoa 0.25.0", "crossbeam-channel", - "gdk", - "gdk-pixbuf", "gtk", "keyboard-types", "objc", @@ -2291,11 +2286,10 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.16.5" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" +checksum = "06a9e54b831d033206160096b825f2070cf5fda7e35167b1c01e9e774f9202d1" dependencies = [ - "bitflags 1.3.2", "gio", "glib", "libc", @@ -2305,9 +2299,9 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", @@ -3179,24 +3173,22 @@ dependencies = [ [[package]] name = "soup3" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82bc46048125fefd69d30b32b9d263d6556c9ffe82a7a7df181a86d912da5616" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" dependencies = [ - "bitflags 1.3.2", "futures-channel", "gio", "glib", "libc", - "once_cell", "soup3-sys", ] [[package]] name = "soup3-sys" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "014bbeb1c4cdb30739dc181e8d98b7908f124d9555843afa89b5570aaf4ec62b" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" dependencies = [ "gio-sys", "glib-sys", @@ -3333,9 +3325,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.22.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d30690a6746dfbb26d4f41522757da1ebfd277514b58e27a80b7e55e511e52" +checksum = "f130523fee9820ad78141d443e6cef75043acade79107bc483872bc183928c0f" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -3374,8 +3366,8 @@ dependencies = [ "unicode-segmentation", "url", "uuid", - "windows 0.48.0", - "windows-implement 0.48.0", + "windows 0.51.1", + "windows-implement 0.51.1", "x11-dl", "zbus", ] @@ -3408,7 +3400,6 @@ dependencies = [ "embed_plist", "futures-util", "getrandom 0.2.10", - "glib", "glob", "gtk", "heck", @@ -3444,7 +3435,7 @@ dependencies = [ "url", "uuid", "webkit2gtk", - "webview2-com", + "webview2-com 0.25.0", "window-vibrancy", "windows 0.48.0", ] @@ -3559,7 +3550,7 @@ dependencies = [ "tauri-runtime", "tauri-utils", "webkit2gtk", - "webview2-com", + "webview2-com 0.25.0", "windows 0.48.0", "wry", ] @@ -3880,9 +3871,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.8.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b164327e17101c78ba3dfdf879b977027ef1bd7855668ac30063de21fc02447" +checksum = "1a7dce8a4b6d7a566ca78fa43f37efc7a3ec427480828d35fe3474c4f0c75396" dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", @@ -4164,9 +4155,9 @@ dependencies = [ [[package]] name = "webkit2gtk" -version = "1.1.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8db2963d7f1bd4ac2a208ab925881b4779dd20fee853b09a0bbf69289827c2" +checksum = "6acc7a3245bac463799553012b372602aa8ffe9a6a9ce0e71e97a9a47ef8a6b3" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -4188,9 +4179,9 @@ dependencies = [ [[package]] name = "webkit2gtk-sys" -version = "1.1.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864ebc9a39649baf49e46c713cd8b741cca14dd59d24cd77bc611ba9419fa18d" +checksum = "cef00972aada3b33d7ca262219a57bf64eac88731e02e3f5380178816e796f2e" dependencies = [ "bitflags 1.3.2", "cairo-sys-rs", @@ -4213,12 +4204,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79e563ffe8e84d42e43ffacbace8780c0244fc8910346f334613559d92e203ad" dependencies = [ "webview2-com-macros", - "webview2-com-sys", + "webview2-com-sys 0.25.0", "windows 0.48.0", "windows-implement 0.48.0", "windows-interface 0.48.0", ] +[[package]] +name = "webview2-com" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15556ff1d1d6bc850dbb362762bae86069773dd30177c90d3bfa917080dc73" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys 0.27.0", + "windows 0.51.1", + "windows-core", + "windows-implement 0.51.1", + "windows-interface 0.51.1", +] + [[package]] name = "webview2-com-macros" version = "0.7.0" @@ -4245,6 +4250,17 @@ dependencies = [ "windows-metadata", ] +[[package]] +name = "webview2-com-sys" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3775bb005c3170497ec411b36005708b57ad486bfa3d23864c92f5973858ce8d" +dependencies = [ + "thiserror", + "windows 0.51.1", + "windows-core", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4561,19 +4577,16 @@ dependencies = [ [[package]] name = "wry" -version = "0.33.1" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb3bc6ed7e3d905a5a963a3e4e9ee5ede76408e50de42d68e523ee75ab1c78a" +checksum = "91ad4935cc1cbd02e7cfcf41baa44e35f134c108389be3949d8b369eb69e741b" dependencies = [ "base64", "block", - "cocoa 0.24.1", - "core-graphics 0.22.3", + "cocoa 0.25.0", + "core-graphics 0.23.1", "crossbeam-channel", "dunce", - "gdk", - "gio", - "glib", "gtk", "html5ever", "http", @@ -4593,9 +4606,9 @@ dependencies = [ "url", "webkit2gtk", "webkit2gtk-sys", - "webview2-com", - "windows 0.48.0", - "windows-implement 0.48.0", + "webview2-com 0.27.0", + "windows 0.51.1", + "windows-implement 0.51.1", ] [[package]] From c7c2507da16a9beb71bf06745fe7ac1325ab7c2a Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 24 Oct 2023 19:17:06 +0300 Subject: [PATCH 114/122] chore(deps): update windows-rs to 0.51 and webview2-com to 0.27 (#8035) Co-authored-by: Lucas Nogueira --- .changes/windows-rs-0.51.md | 9 +++++++++ core/tauri-runtime-wry/Cargo.toml | 4 ++-- core/tauri-runtime/Cargo.toml | 2 +- core/tauri/Cargo.toml | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .changes/windows-rs-0.51.md diff --git a/.changes/windows-rs-0.51.md b/.changes/windows-rs-0.51.md new file mode 100644 index 000000000000..11916973c3ed --- /dev/null +++ b/.changes/windows-rs-0.51.md @@ -0,0 +1,9 @@ +--- +"tauri": "patch:deps" +"tauri-runtime": "patch:deps" +"tauri-runtime-wry": "patch:deps" +"tauri-utils": "patch:deps" +--- + +Update `windows` to version `0.51` and `webview2-com` to version `0.27` + diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index c8afa4c4a882..4ce11f790e83 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -20,10 +20,10 @@ raw-window-handle = "0.5" http = "0.2" [target."cfg(windows)".dependencies] -webview2-com = "0.25" +webview2-com = "0.27" [target."cfg(windows)".dependencies.windows] - version = "0.48" + version = "0.51" features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index aa8f0c430e89..2a87d555a6ec 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -34,7 +34,7 @@ raw-window-handle = "0.5" url = { version = "2" } [target."cfg(windows)".dependencies.windows] -version = "0.48" +version = "0.51" features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index f726e8172756..9ea0144446a0 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -86,11 +86,11 @@ objc = "0.2" window-vibrancy = "0.4" [target."cfg(windows)".dependencies] -webview2-com = "0.25" +webview2-com = "0.27" window-vibrancy = "0.4" [target."cfg(windows)".dependencies.windows] - version = "0.48" + version = "0.51" features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies] From 6e75863041ae7b4f686b61d9b4490f19d9ee6c96 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 26 Oct 2023 09:28:48 -0300 Subject: [PATCH 115/122] fix(api): adjust documentation for mockConvertFileSrc (#8111) --- tooling/api/src/mocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/api/src/mocks.ts b/tooling/api/src/mocks.ts index fd47796589a2..774d05aa4356 100644 --- a/tooling/api/src/mocks.ts +++ b/tooling/api/src/mocks.ts @@ -141,7 +141,7 @@ export function mockWindows( * @example * ```js * import { mockConvertFileSrc } from "@tauri-apps/api/mocks"; - * import { convertFileSrc } from "@tauri-apps/api/tauri"; + * import { convertFileSrc } from "@tauri-apps/api/primitives"; * * mockConvertFileSrc("windows") * From 407794622992847def5b13f8c76b398940797c32 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:42:30 -0300 Subject: [PATCH 116/122] chore(deps) Update dependency @types/node to v20.8.8 (dev) (#8098) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- tooling/api/package.json | 2 +- tooling/api/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tooling/api/package.json b/tooling/api/package.json index 68c3df03ce6b..8432eb515da0 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@rollup/plugin-terser": "0.4.4", "@rollup/plugin-typescript": "11.1.5", - "@types/node": "20.8.7", + "@types/node": "20.8.8", "@typescript-eslint/eslint-plugin": "6.9.0", "@typescript-eslint/parser": "6.9.0", "eslint": "8.52.0", diff --git a/tooling/api/yarn.lock b/tooling/api/yarn.lock index 623ee888f303..b966e56dd675 100644 --- a/tooling/api/yarn.lock +++ b/tooling/api/yarn.lock @@ -220,10 +220,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node@20.8.7": - version "20.8.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25" - integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ== +"@types/node@20.8.8": + version "20.8.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.8.tgz#adee050b422061ad5255fc38ff71b2bb96ea2a0e" + integrity sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ== dependencies: undici-types "~5.25.1" From 6bc3b0536d030569e7b2642cb8b0cb6734ded6bd Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Thu, 26 Oct 2023 18:58:56 +0200 Subject: [PATCH 117/122] fix(cross): Fix docker image and cross setup (#8094) --- .docker/cross/aarch64.Dockerfile | 2 +- examples/api/.setup-cross.sh | 1 + examples/api/src-tauri/Cross.toml | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.docker/cross/aarch64.Dockerfile b/.docker/cross/aarch64.Dockerfile index 498d055b75f9..c57ec56392c7 100644 --- a/.docker/cross/aarch64.Dockerfile +++ b/.docker/cross/aarch64.Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive COPY common.sh lib.sh / diff --git a/examples/api/.setup-cross.sh b/examples/api/.setup-cross.sh index 22d5ee139bee..109d3f3ab8f9 100644 --- a/examples/api/.setup-cross.sh +++ b/examples/api/.setup-cross.sh @@ -3,3 +3,4 @@ export ICONS_VOLUME="$(realpath ../.icons)" export DIST_VOLUME="$(realpath dist)" export ISOLATION_VOLUME="$(realpath isolation-dist)" +export WORKSPACE_VOLUME="$(realpath ../..)" diff --git a/examples/api/src-tauri/Cross.toml b/examples/api/src-tauri/Cross.toml index a957b1e33881..71676b66a2ed 100644 --- a/examples/api/src-tauri/Cross.toml +++ b/examples/api/src-tauri/Cross.toml @@ -1,10 +1,11 @@ [build.env] -# must set ICONS_VOLUME, DIST_VOLUME and ISOLATION_VOLUME environment variables +# must set ICONS_VOLUME, DIST_VOLUME, ISOLATION_VOLUME and WORKSPACE_VOLUME environment variables # ICONS_VOLUME: absolute path to the .icons folder # DIST_VOLUME: absolute path to the dist folder # ISOLATION_VOLUME: absolute path to the isolation dist folder +# WORKSPACE_VOLUME: absolute path to the workspace # this can be done running `$ . .setup-cross.sh` in the examples/api folder -volumes = ["ICONS_VOLUME", "DIST_VOLUME", "ISOLATION_VOLUME"] +volumes = ["ICONS_VOLUME", "DIST_VOLUME", "ISOLATION_VOLUME","WORKSPACE_VOLUME"] [target.aarch64-unknown-linux-gnu] image = "aarch64-unknown-linux-gnu:latest" From 9ed400a85cbcfbc9e97f7c9a5642fb8166b3acbf Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Thu, 26 Oct 2023 20:27:52 +0200 Subject: [PATCH 118/122] chore(ci): Replace unmaintained actions-rs GH actions, closes #8078 (#8093) Co-authored-by: Lucas Nogueira --- .github/workflows/audit.yml | 2 +- .github/workflows/bench.yml | 9 +- .github/workflows/check-change-tags.yml | 2 +- .github/workflows/check-generated-files.yml | 16 +- .../covector-version-or-publish-v1.yml | 148 ------------------ .../workflows/covector-version-or-publish.yml | 11 +- .github/workflows/docker.yml | 20 +-- .github/workflows/lint-cli.yml | 25 +-- .github/workflows/lint-core.yml | 25 +-- .github/workflows/publish-cli-js.yml | 23 ++- .github/workflows/publish-cli-rs.yml | 9 +- .github/workflows/test-android.yml | 12 +- .github/workflows/test-cli-js.yml | 6 +- .github/workflows/test-cli-rs.yml | 5 +- .github/workflows/test-core.yml | 8 +- .github/workflows/test-lint-bundler.yml | 32 ++-- .github/workflows/udeps.yml | 26 +-- examples/api/src-tauri/Cargo.lock | 100 ++---------- examples/api/src-tauri/src/lib.rs | 7 +- .../ios/Sources/ExamplePlugin.swift | 2 +- 20 files changed, 93 insertions(+), 395 deletions(-) delete mode 100644 .github/workflows/covector-version-or-publish-v1.yml diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index ba7eabfb64a5..2baec425e4f4 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: rust audit - uses: actions-rs/audit-check@v1 + uses: rustsec/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 9e62ee04cf13..5c6b5c407a9c 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -36,14 +36,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install ${{ matrix.rust }} - uses: actions-rs/toolchain@v1 + + - name: install Rust ${{ matrix.rust }} + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - override: true - default: true components: rust-src - target: ${{ matrix.platform.target }} + targets: ${{ matrix.platform.target }} - name: setup python uses: actions/setup-python@v4 diff --git a/.github/workflows/check-change-tags.yml b/.github/workflows/check-change-tags.yml index 6d312c9ef0d4..d3736095757f 100644 --- a/.github/workflows/check-change-tags.yml +++ b/.github/workflows/check-change-tags.yml @@ -17,7 +17,7 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dorny/paths-filter@v2 id: filter diff --git a/.github/workflows/check-generated-files.yml b/.github/workflows/check-generated-files.yml index 69d0ba86004f..e6f2b780fc42 100644 --- a/.github/workflows/check-generated-files.yml +++ b/.github/workflows/check-generated-files.yml @@ -25,7 +25,7 @@ jobs: api: ${{ steps.filter.outputs.api }} schema: ${{ steps.filter.outputs.schema }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dorny/paths-filter@v2 id: filter with: @@ -43,7 +43,7 @@ jobs: needs: changes if: needs.changes.outputs.api == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: build api working-directory: tooling/api @@ -56,13 +56,10 @@ jobs: needs: changes if: needs.changes.outputs.schema == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable - name: install Linux dependencies run: | @@ -74,10 +71,7 @@ jobs: workspaces: core -> ../target - name: generate schema.json - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./core/tauri-config-schema/Cargo.toml + run: cargo build --manifest-path ./core/tauri-config-schema/Cargo.toml - name: check schema run: ./.scripts/ci/has-diff.sh diff --git a/.github/workflows/covector-version-or-publish-v1.yml b/.github/workflows/covector-version-or-publish-v1.yml deleted file mode 100644 index 4be13c600697..000000000000 --- a/.github/workflows/covector-version-or-publish-v1.yml +++ /dev/null @@ -1,148 +0,0 @@ -# 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 8bf43b139724..025e9772166d 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -22,10 +22,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable + - name: install Linux dependencies if: matrix.platform == 'ubuntu-latest' run: | @@ -39,10 +39,7 @@ jobs: tooling/cli - name: build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml + run: cargo build --manifest-path ./tooling/cli/Cargo.toml - name: run integration tests run: cargo test --test '*' -- --ignored diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 54b114d9ba95..06e4fcbfd036 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,12 +17,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: install Linux dependencies run: | @@ -40,10 +38,7 @@ jobs: if-no-files-found: error - name: build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml + run: cargo build --manifest-path ./tooling/cli/Cargo.toml - name: Upload CLI uses: actions/upload-artifact@v3 @@ -64,15 +59,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: install stable - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true - default: true - target: ${{ matrix.target.name }} + targets: ${{ matrix.target.name }} - name: Setup node uses: actions/setup-node@v3 diff --git a/.github/workflows/lint-cli.yml b/.github/workflows/lint-cli.yml index db8e26513a02..eee0d5ab4975 100644 --- a/.github/workflows/lint-cli.yml +++ b/.github/workflows/lint-cli.yml @@ -29,17 +29,13 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - name: install Rust stable and rustfmt + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path ./tooling/cli/Cargo.toml --all -- --check + - name: Run cargo fmt + run: cargo fmt --manifest-path ./tooling/cli/Cargo.toml --all -- --check clippy: runs-on: ubuntu-latest @@ -47,11 +43,9 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - name: install Rust stable and clippy + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: clippy - name: install dependencies @@ -63,8 +57,5 @@ jobs: with: workspaces: tooling/cli - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings - name: cli + - name: run Clippy + run: cargo clippy --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings diff --git a/.github/workflows/lint-core.yml b/.github/workflows/lint-core.yml index bb3bde3d6091..f11543cfa4e0 100644 --- a/.github/workflows/lint-core.yml +++ b/.github/workflows/lint-core.yml @@ -31,17 +31,13 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - name: install Rust stable and rustfmt + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - name: run cargo fmt + run: cargo fmt --all -- --check clippy: runs-on: ubuntu-latest @@ -60,11 +56,9 @@ jobs: sudo apt-get update sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev - - uses: actions-rs/toolchain@v1 + - name: install Rust stable with clippy + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: clippy - uses: Swatinem/rust-cache@v2 @@ -72,8 +66,5 @@ jobs: workspaces: core -> ../target save-if: ${{ matrix.clippy.key == 'all' }} - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./core/tauri/Cargo.toml --all-targets ${{ matrix.clippy.args }} -- -D warnings - name: ${{ matrix.clippy.key }} + - name: Run clippy - ${{ matrix.clippy.key }} + run: cargo clippy --manifest-path ./core/tauri/Cargo.toml --all-targets ${{ matrix.clippy.args }} -- -D warnings diff --git a/.github/workflows/publish-cli-js.yml b/.github/workflows/publish-cli-js.yml index d5e690706dd3..48f7803cf0e0 100644 --- a/.github/workflows/publish-cli-js.yml +++ b/.github/workflows/publish-cli-js.yml @@ -91,7 +91,7 @@ jobs: name: stable - ${{ matrix.settings.target }} - node@16 runs-on: ${{ matrix.settings.host }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 if: ${{ !matrix.settings.docker }} @@ -101,14 +101,11 @@ jobs: cache: yarn cache-dependency-path: 'tooling/cli/node/yarn.lock' architecture: ${{ matrix.settings.architecture }} - - name: Install - uses: actions-rs/toolchain@v1 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable if: ${{ !matrix.settings.docker }} with: - profile: minimal - override: true - toolchain: stable - target: ${{ matrix.settings.target }} + targets: ${{ matrix.settings.target }} - uses: Swatinem/rust-cache@v1 with: key: ${{ matrix.settings.target }} @@ -144,7 +141,7 @@ jobs: # runs-on: macos-10.15 # name: Build FreeBSD # steps: - # - uses: actions/checkout@v3 + # - uses: actions/checkout@v4 # - name: Build # id: build # uses: vmactions/freebsd-vm@v0.1.6 @@ -207,7 +204,7 @@ jobs: - '18' runs-on: ${{ matrix.settings.host }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 with: @@ -240,7 +237,7 @@ jobs: - '18' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 with: @@ -279,7 +276,7 @@ jobs: container: image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 with: @@ -329,7 +326,7 @@ jobs: steps: - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset working-directory: ${{ github.workspace }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: List packages run: ls -R . shell: bash @@ -375,7 +372,7 @@ jobs: - test-linux-x64-musl-binding #- test-linux-arm-bindings steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 with: diff --git a/.github/workflows/publish-cli-rs.yml b/.github/workflows/publish-cli-rs.yml index 57b9a3764034..906456ce303d 100644 --- a/.github/workflows/publish-cli-rs.yml +++ b/.github/workflows/publish-cli-rs.yml @@ -40,7 +40,7 @@ jobs: args: '--no-default-features --features native-tls-vendored' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Setup Rust' uses: dtolnay/rust-toolchain@stable @@ -58,10 +58,7 @@ jobs: sudo apt-get install -y libgtk-3-dev - name: Build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }} + run: cargo build --manifest-path ./tooling/cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }} - name: Upload CLI uses: actions/upload-artifact@v3 @@ -76,7 +73,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download built CLIs uses: actions/download-artifact@v3 diff --git a/.github/workflows/test-android.yml b/.github/workflows/test-android.yml index 0971924f9b99..9f3ad098c2e5 100644 --- a/.github/workflows/test-android.yml +++ b/.github/workflows/test-android.yml @@ -31,13 +31,10 @@ jobs: platform: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: install Rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable - name: install Linux dependencies if: matrix.platform == 'ubuntu-latest' @@ -74,10 +71,7 @@ jobs: examples/api/src-tauri - name: build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml + run: cargo build --manifest-path ./tooling/cli/Cargo.toml - name: build Tauri API working-directory: ./tooling/api diff --git a/.github/workflows/test-cli-js.yml b/.github/workflows/test-cli-js.yml index 9a4cffc16f64..dc9e299effc9 100644 --- a/.github/workflows/test-cli-js.yml +++ b/.github/workflows/test-cli-js.yml @@ -36,10 +36,8 @@ jobs: - uses: actions/checkout@v4 - name: install Rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + uses: dtolnay/rust-toolchain@stable + - name: setup node uses: actions/setup-node@v2 with: diff --git a/.github/workflows/test-cli-rs.yml b/.github/workflows/test-cli-rs.yml index 8a80496cb155..716645fa2c84 100644 --- a/.github/workflows/test-cli-rs.yml +++ b/.github/workflows/test-cli-rs.yml @@ -67,7 +67,4 @@ jobs: workspaces: tooling/cli - name: build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml ${{ matrix.platform.args }} + run: cargo build --manifest-path ./tooling/cli/Cargo.toml ${{ matrix.platform.args }} diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index e199af69c3fe..df256d912ece 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -73,13 +73,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 + - name: install Rust + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.platform.toolchain }} - target: ${{ matrix.platform.target }} - override: true - default: true + targets: ${{ matrix.platform.target }} - name: install Linux dependencies if: contains(matrix.platform.target, 'unknown-linux') diff --git a/.github/workflows/test-lint-bundler.yml b/.github/workflows/test-lint-bundler.yml index bab4f195ee2b..72379e120427 100644 --- a/.github/workflows/test-lint-bundler.yml +++ b/.github/workflows/test-lint-bundler.yml @@ -35,9 +35,7 @@ jobs: - uses: actions/checkout@v4 - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: @@ -54,17 +52,13 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - name: install Rust stable and rustfmt + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path ./tooling/bundler/Cargo.toml --all -- --check + - name: Run cargo fmt + run: cargo fmt --manifest-path ./tooling/bundler/Cargo.toml --all -- --check clippy: runs-on: ubuntu-latest @@ -72,22 +66,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1 + - name: install Rust stable and clippy + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true - default: true - components: rustfmt, clippy + components: clippy - uses: Swatinem/rust-cache@v2 with: workspaces: tooling/bundler - name: clippy check - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./tooling/bundler/Cargo.toml --all-targets -- -D warnings - name: bundler + run: cargo clippy --manifest-path ./tooling/bundler/Cargo.toml --all-targets -- -D warnings diff --git a/.github/workflows/udeps.yml b/.github/workflows/udeps.yml index e856b1a16f2c..ebb2e6076590 100644 --- a/.github/workflows/udeps.yml +++ b/.github/workflows/udeps.yml @@ -74,16 +74,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true + - name: Install Rust nightly + uses: dtolnay/rust-toolchain@nightly - - uses: actions-rs/cargo@v1 - with: - command: install - args: cargo-udeps --locked --force + - name: Install udeps + run: cargo install cargo-udeps --locked --force - name: Upload udeps uses: actions/upload-artifact@v3 @@ -128,11 +123,8 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true + - name: Install Rust nightly + uses: dtolnay/rust-toolchain@nightly - name: install dependencies run: | @@ -159,7 +151,5 @@ jobs: sudo apt-get update sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev - - uses: actions-rs/cargo@v1 - with: - command: udeps - args: --manifest-path ${{ matrix.path }}/Cargo.toml --all-targets --all-features + - name: Run udeps + run: cargo udeps --manifest-path ${{ matrix.path }}/Cargo.toml --all-targets --all-features diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 5f37c4b02315..b66a9dd6bbec 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3367,7 +3367,7 @@ dependencies = [ "url", "uuid", "windows 0.51.1", - "windows-implement 0.51.1", + "windows-implement", "x11-dl", "zbus", ] @@ -3435,9 +3435,9 @@ dependencies = [ "url", "uuid", "webkit2gtk", - "webview2-com 0.25.0", + "webview2-com", "window-vibrancy", - "windows 0.48.0", + "windows 0.51.1", ] [[package]] @@ -3534,7 +3534,7 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "windows 0.48.0", + "windows 0.51.1", ] [[package]] @@ -3550,8 +3550,8 @@ dependencies = [ "tauri-runtime", "tauri-utils", "webkit2gtk", - "webview2-com 0.25.0", - "windows 0.48.0", + "webview2-com", + "windows 0.51.1", "wry", ] @@ -4197,19 +4197,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "webview2-com" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e563ffe8e84d42e43ffacbace8780c0244fc8910346f334613559d92e203ad" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys 0.25.0", - "windows 0.48.0", - "windows-implement 0.48.0", - "windows-interface 0.48.0", -] - [[package]] name = "webview2-com" version = "0.27.0" @@ -4217,11 +4204,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd15556ff1d1d6bc850dbb362762bae86069773dd30177c90d3bfa917080dc73" dependencies = [ "webview2-com-macros", - "webview2-com-sys 0.27.0", + "webview2-com-sys", "windows 0.51.1", "windows-core", - "windows-implement 0.51.1", - "windows-interface 0.51.1", + "windows-implement", + "windows-interface", ] [[package]] @@ -4235,21 +4222,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "webview2-com-sys" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d39576804304cf9ead192467ef47f7859a1a12fec3bd459d5ba34b8cd65ed5" -dependencies = [ - "regex", - "serde", - "serde_json", - "thiserror", - "windows 0.48.0", - "windows-bindgen", - "windows-metadata", -] - [[package]] name = "webview2-com-sys" version = "0.27.0" @@ -4322,8 +4294,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-implement 0.48.0", - "windows-interface 0.48.0", "windows-targets 0.48.5", ] @@ -4334,21 +4304,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ "windows-core", - "windows-implement 0.51.1", - "windows-interface 0.51.1", + "windows-implement", + "windows-interface", "windows-targets 0.48.5", ] -[[package]] -name = "windows-bindgen" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe21a77bc54b7312dbd66f041605e098990c98be48cd52967b85b5e60e75ae6" -dependencies = [ - "windows-metadata", - "windows-tokens", -] - [[package]] name = "windows-core" version = "0.51.1" @@ -4358,17 +4318,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-implement" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "windows-implement" version = "0.51.1" @@ -4380,17 +4329,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "windows-interface" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "windows-interface" version = "0.51.1" @@ -4402,12 +4340,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "windows-metadata" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0e5f0e2cc372bb6addbfff9a8add712155cd743df9c15f6ab000f31432d" - [[package]] name = "windows-sys" version = "0.45.0" @@ -4456,12 +4388,6 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] -[[package]] -name = "windows-tokens" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34c9a3b28cb41db7385546f7f9a8179348dffc89923dde66857b1ba5312f6b4" - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4606,9 +4532,9 @@ dependencies = [ "url", "webkit2gtk", "webkit2gtk-sys", - "webview2-com 0.27.0", + "webview2-com", "windows 0.51.1", - "windows-implement 0.51.1", + "windows-implement", ] [[package]] diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 9c08b55ec587..5c21b0820d17 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -12,12 +12,11 @@ mod cmd; mod tray; use serde::Serialize; -use tauri::{ipc::Channel, window::WindowBuilder, App, AppHandle, RunEvent, Runtime, WindowUrl}; +use tauri::{ + ipc::Channel, window::WindowBuilder, App, AppHandle, Manager, RunEvent, Runtime, WindowUrl, +}; use tauri_plugin_sample::{PingRequest, SampleExt}; -#[cfg(desktop)] -use tauri::Manager; - pub type SetupHook = Box Result<(), Box> + Send>; pub type OnEvent = Box; diff --git a/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift b/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift index b68793867f67..390aa7f7dc38 100644 --- a/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift +++ b/examples/api/src-tauri/tauri-plugin-sample/ios/Sources/ExamplePlugin.swift @@ -15,7 +15,7 @@ class PingArgs: Decodable { class ExamplePlugin: Plugin { @objc public func ping(_ invoke: Invoke) throws { let args = try invoke.parseArgs(PingArgs.self) - args.onEvent?.send(["kind": "ping"]) + try args.onEvent?.send(["kind": "ping"]) invoke.resolve(["value": args.value ?? ""]) } } From 2b6ffe0fd1192c69dbe0af4b89607e262dd3483e Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 27 Oct 2023 00:17:23 -0300 Subject: [PATCH 119/122] chore: update plugins-workspace branch usage from next to v2 (#8120) --- examples/api/src-tauri/Cargo.lock | 4 ++-- examples/api/src-tauri/Cargo.toml | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index b66a9dd6bbec..caa910fd5d64 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3499,8 +3499,8 @@ dependencies = [ [[package]] name = "tauri-plugin-cli" -version = "0.0.0" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=next#4a10f218f0e1fdd66a549dc0bf16be3efb17ea49" +version = "2.0.0-alpha.3" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#76cfdc32b4593acfdfed95bf3028cdba0d83fe61" dependencies = [ "clap", "log", diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index a8c625a387cf..c83ce5c1ce12 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -21,16 +21,12 @@ log = "0.4" tauri-plugin-sample = { path = "./tauri-plugin-sample/" } [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" } +tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } [patch.crates-io] tauri = { path = "../../../core/tauri" } tauri-build = { path = "../../../core/tauri-build" } -[patch.'https://github.com/tauri-apps/tauri'] -tauri = { path = "../../../core/tauri" } -tauri-build = { path = "../../../core/tauri-build" } - [dependencies.tauri] path = "../../../core/tauri" features = [ From 74d2464d0e490fae341ad73bdf2964cf215fe6c5 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 27 Oct 2023 10:00:59 -0300 Subject: [PATCH 120/122] refactor(core): implement on_page_load event using wry hook (#8116) --- .changes/on-page-load-hook.md | 6 + .changes/refactor-on-page-load.md | 6 + core/tauri-config-schema/schema.json | 2 +- core/tauri-runtime-wry/src/lib.rs | 15 ++ core/tauri-runtime/src/window.rs | 25 +- core/tauri-utils/src/config.rs | 2 +- core/tauri/scripts/init.js | 15 +- core/tauri/src/app.rs | 25 +- core/tauri/src/lib.rs | 2 +- core/tauri/src/manager.rs | 49 ++-- core/tauri/src/menu/mod.rs | 2 +- core/tauri/src/plugin.rs | 17 +- core/tauri/src/window/mod.rs | 243 +++++++++++------- examples/api/src-tauri/src/lib.rs | 30 ++- examples/multiwindow/index.html | 12 +- examples/multiwindow/main.rs | 14 +- examples/parent-window/main.rs | 18 +- .../jest/fixtures/app/src-tauri/src/main.rs | 18 +- tooling/cli/schema.json | 2 +- 19 files changed, 305 insertions(+), 198 deletions(-) create mode 100644 .changes/on-page-load-hook.md create mode 100644 .changes/refactor-on-page-load.md diff --git a/.changes/on-page-load-hook.md b/.changes/on-page-load-hook.md new file mode 100644 index 000000000000..340a39bd553d --- /dev/null +++ b/.changes/on-page-load-hook.md @@ -0,0 +1,6 @@ +--- +"tauri-runtime": patch:feat +"tauri-runtime-wry": patch:feat +--- + +Added `on_page_load` hook for `PendingWindow`. diff --git a/.changes/refactor-on-page-load.md b/.changes/refactor-on-page-load.md new file mode 100644 index 000000000000..d241ac25bdd5 --- /dev/null +++ b/.changes/refactor-on-page-load.md @@ -0,0 +1,6 @@ +--- +"tauri": patch:breaking +--- + +Added `WindowBuilder::on_page_load` and refactored the `Builder::on_page_load` handler to take references. +The page load hook is now triggered for load started and finished events, to determine what triggered it see `PageLoadPayload::event`. diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index a91fdf16eed6..b4a96b2847de 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -1198,7 +1198,7 @@ } }, "name": { - "description": "The name. Maps to `CFBundleTypeName` on macOS. Default to ext[0]", + "description": "The name. Maps to `CFBundleTypeName` on macOS. Default to `ext[0]`", "type": [ "string", "null" diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index c9eef74d8f08..38b7abdb2752 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -2725,6 +2725,21 @@ fn create_webview( .unwrap_or(true) }); } + + if let Some(page_load_handler) = pending.on_page_load_handler { + webview_builder = webview_builder.with_on_page_load_handler(move |event, url| { + let _ = Url::parse(&url).map(|url| { + page_load_handler( + url, + match event { + wry::webview::PageLoadEvent::Started => tauri_runtime::window::PageLoadEvent::Started, + wry::webview::PageLoadEvent::Finished => tauri_runtime::window::PageLoadEvent::Finished, + }, + ) + }); + }); + } + if let Some(user_agent) = webview_attributes.user_agent { webview_builder = webview_builder.with_user_agent(&user_agent); } diff --git a/core/tauri-runtime/src/window.rs b/core/tauri-runtime/src/window.rs index 2e15a2c22981..6a436f56eab1 100644 --- a/core/tauri-runtime/src/window.rs +++ b/core/tauri-runtime/src/window.rs @@ -34,6 +34,17 @@ type WebResourceRequestHandler = type NavigationHandler = dyn Fn(&Url) -> bool + Send; +type OnPageLoadHandler = dyn Fn(Url, PageLoadEvent) + Send; + +/// Kind of event for the page load handler. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PageLoadEvent { + /// Page started to load. + Started, + /// Page finished loading. + Finished, +} + /// UI scaling utilities. pub mod dpi; @@ -238,6 +249,8 @@ pub struct PendingWindow> { Option) -> Result<(), jni::errors::Error> + Send>>, pub web_resource_request_handler: Option>, + + pub on_page_load_handler: Option>, } pub fn is_label_valid(label: &str) -> bool { @@ -270,11 +283,12 @@ impl> PendingWindow { uri_scheme_protocols: Default::default(), label, ipc_handler: None, - navigation_handler: Default::default(), + navigation_handler: None, url: "tauri://localhost".to_string(), #[cfg(target_os = "android")] on_webview_created: None, - web_resource_request_handler: Default::default(), + web_resource_request_handler: None, + on_page_load_handler: None, }) } } @@ -298,11 +312,12 @@ impl> PendingWindow { uri_scheme_protocols: Default::default(), label, ipc_handler: None, - navigation_handler: Default::default(), + navigation_handler: None, url: "tauri://localhost".to_string(), #[cfg(target_os = "android")] on_webview_created: None, - web_resource_request_handler: Default::default(), + web_resource_request_handler: None, + on_page_load_handler: None, }) } } @@ -342,7 +357,7 @@ pub struct DetachedWindow> { /// Name of the window pub label: String, - /// The [`Dispatch`](crate::Dispatch) associated with the window. + /// The [`Dispatch`] associated with the window. pub dispatcher: R::Dispatcher, } diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 88d18529ffe5..5d054c9a2f86 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -703,7 +703,7 @@ impl<'d> serde::Deserialize<'d> for AssociationExt { pub struct FileAssociation { /// File extensions to associate with this app. e.g. 'png' pub ext: Vec, - /// The name. Maps to `CFBundleTypeName` on macOS. Default to ext[0] + /// The name. Maps to `CFBundleTypeName` on macOS. Default to `ext[0]` pub name: Option, /// The association description. Windows-only. It is displayed on the `Type` column on Windows Explorer. pub description: Option, diff --git a/core/tauri/scripts/init.js b/core/tauri/scripts/init.js index f9e0e66716e2..2636e666bc0e 100644 --- a/core/tauri/scripts/init.js +++ b/core/tauri/scripts/init.js @@ -12,21 +12,8 @@ __RAW_core_script__ __RAW_event_initialization_script__ - ;(function () { - __RAW_bundle_script__ - })() - if (window.ipc) { - window.__TAURI_INTERNALS__.invoke('__initialized', { - url: window.location.href - }) - } else { - window.addEventListener('DOMContentLoaded', function () { - window.__TAURI_INTERNALS__.invoke('__initialized', { - url: window.location.href - }) - }) - } + __RAW_bundle_script__ __RAW_plugin_initialization_script__ })() diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index fa993606971b..211e3eb9d5f7 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -19,6 +19,7 @@ use crate::{ sealed::{ManagerBase, RuntimeOrDispatch}, utils::config::Config, utils::{assets::Assets, Env}, + window::PageLoadPayload, Context, DeviceEventFilter, EventLoopMessage, Icon, Manager, Monitor, Runtime, Scopes, StateManager, Theme, Window, }; @@ -30,7 +31,6 @@ use crate::tray::{TrayIcon, TrayIconBuilder, TrayIconEvent, TrayIconId}; #[cfg(desktop)] use crate::window::WindowMenu; use raw_window_handle::HasRawDisplayHandle; -use serde::Deserialize; use serialize_to_javascript::{default_template, DefaultTemplate, Template}; use tauri_macros::default_runtime; #[cfg(desktop)] @@ -68,20 +68,7 @@ pub(crate) type GlobalWindowEventListener = Box) pub type SetupHook = Box) -> Result<(), Box> + Send>; /// A closure that is run once every time a window is created and loaded. -pub type OnPageLoad = dyn Fn(Window, PageLoadPayload) + Send + Sync + 'static; - -/// The payload for the [`OnPageLoad`] hook. -#[derive(Debug, Clone, Deserialize)] -pub struct PageLoadPayload { - url: String, -} - -impl PageLoadPayload { - /// The page URL. - pub fn url(&self) -> &str { - &self.url - } -} +pub type OnPageLoad = dyn Fn(&Window, &PageLoadPayload<'_>) + Send + Sync + 'static; /// Api exposed on the `ExitRequested` event. #[derive(Debug)] @@ -982,7 +969,7 @@ pub struct Builder { setup: SetupHook, /// Page load hook. - on_page_load: Box>, + on_page_load: Option>>, /// windows to create when starting up. pending_windows: Vec>, @@ -1040,7 +1027,7 @@ impl Builder { .render_default(&Default::default()) .unwrap() .into_string(), - on_page_load: Box::new(|_, _| ()), + on_page_load: None, pending_windows: Default::default(), plugins: PluginStore::default(), uri_scheme_protocols: Default::default(), @@ -1130,9 +1117,9 @@ impl Builder { #[must_use] pub fn on_page_load(mut self, on_page_load: F) -> Self where - F: Fn(Window, PageLoadPayload) + Send + Sync + 'static, + F: Fn(&Window, &PageLoadPayload<'_>) + Send + Sync + 'static, { - self.on_page_load = Box::new(on_page_load); + self.on_page_load.replace(Arc::new(on_page_load)); self } diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index a3838444a18d..b1297ac975ae 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -696,7 +696,7 @@ pub trait Manager: sealed::ManagerBase { /// 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` + /// [`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`](Self#method.state) can be used to retrieve the value manually. diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 2154b0979e81..e53a5b877f14 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -27,12 +27,8 @@ use tauri_utils::{ html::{SCRIPT_NONCE_TOKEN, STYLE_NONCE_TOKEN}, }; -use crate::event::EmitArgs; use crate::{ - app::{ - AppHandle, GlobalWindowEvent, GlobalWindowEventListener, OnPageLoad, PageLoadPayload, - UriSchemeResponder, - }, + app::{AppHandle, GlobalWindowEvent, GlobalWindowEventListener, OnPageLoad, UriSchemeResponder}, event::{assert_event_name_is_valid, Event, EventId, Listeners}, ipc::{Invoke, InvokeHandler, InvokeResponder}, pattern::PatternJavascript, @@ -52,6 +48,7 @@ use crate::{ Context, EventLoopMessage, Icon, Manager, Pattern, Runtime, Scopes, StateManager, Window, WindowEvent, }; +use crate::{event::EmitArgs, window::PageLoadPayload}; #[cfg(desktop)] use crate::app::GlobalMenuEventListener; @@ -232,7 +229,7 @@ pub struct InnerWindowManager { invoke_handler: Box>, /// The page load hook, invoked when the webview performs a navigation. - on_page_load: Box>, + on_page_load: Option>>, config: Arc, assets: Arc, @@ -339,7 +336,7 @@ impl WindowManager { #[allow(unused_mut)] mut context: Context, plugins: PluginStore, invoke_handler: Box>, - on_page_load: Box>, + on_page_load: Option>>, uri_scheme_protocols: HashMap>>, state: StateManager, window_event_listeners: Vec>, @@ -685,6 +682,32 @@ impl WindowManager { registered_scheme_protocols.push("ipc".into()); } + let label = pending.label.clone(); + let manager = self.clone(); + let on_page_load_handler = pending.on_page_load_handler.take(); + pending + .on_page_load_handler + .replace(Box::new(move |url, event| { + let payload = PageLoadPayload { url: &url, event }; + + if let Some(w) = manager.get_window(&label) { + if let Some(on_page_load) = &manager.inner.on_page_load { + on_page_load(&w, &payload); + } + + manager + .inner + .plugins + .lock() + .unwrap() + .on_page_load(&w, &payload); + } + + if let Some(handler) = &on_page_load_handler { + handler(url, event); + } + })); + #[cfg(feature = "protocol-asset")] if !registered_scheme_protocols.contains(&"asset".into()) { let asset_scope = self.state().get::().asset_protocol.clone(); @@ -869,16 +892,6 @@ impl WindowManager { (self.inner.invoke_handler)(invoke) } - pub fn run_on_page_load(&self, window: Window, payload: PageLoadPayload) { - (self.inner.on_page_load)(window.clone(), payload.clone()); - self - .inner - .plugins - .lock() - .expect("poisoned plugin store") - .on_page_load(window, payload); - } - pub fn extend_api(&self, plugin: &str, invoke: Invoke) -> bool { self .inner @@ -1376,7 +1389,7 @@ mod test { context, PluginStore::default(), Box::new(|_| false), - Box::new(|_, _| ()), + None, Default::default(), StateManager::new(), Default::default(), diff --git a/core/tauri/src/menu/mod.rs b/core/tauri/src/menu/mod.rs index bdfef026836a..eaba4b52e730 100644 --- a/core/tauri/src/menu/mod.rs +++ b/core/tauri/src/menu/mod.rs @@ -47,7 +47,7 @@ impl From for MenuEvent { } } -/// Application metadata for the [`PredefinedMenuItem::about`](crate::PredefinedMenuItem::about). +/// Application metadata for the [`PredefinedMenuItem::about`]. #[derive(Debug, Clone, Default)] pub struct AboutMetadata { /// Sets the application name. diff --git a/core/tauri/src/plugin.rs b/core/tauri/src/plugin.rs index 9f6a14260fd1..9a601f24887c 100644 --- a/core/tauri/src/plugin.rs +++ b/core/tauri/src/plugin.rs @@ -5,11 +5,12 @@ //! The Tauri plugin extension to expand Tauri functionality. use crate::{ - app::{PageLoadPayload, UriSchemeResponder}, + app::UriSchemeResponder, error::Error, ipc::{Invoke, InvokeHandler}, manager::UriSchemeProtocol, utils::config::PluginConfig, + window::PageLoadPayload, AppHandle, RunEvent, Runtime, Window, }; use serde::de::DeserializeOwned; @@ -62,7 +63,7 @@ pub trait Plugin: Send { /// Callback invoked when the webview performs a navigation to a page. #[allow(unused_variables)] - fn on_page_load(&mut self, window: Window, payload: PageLoadPayload) {} + fn on_page_load(&mut self, window: &Window, payload: &PageLoadPayload<'_>) {} /// Callback invoked when the event loop receives a new event. #[allow(unused_variables)] @@ -80,7 +81,7 @@ type SetupHook = type OnWebviewReady = dyn FnMut(Window) + Send; type OnEvent = dyn FnMut(&AppHandle, &RunEvent) + Send; type OnNavigation = dyn Fn(&Window, &Url) -> bool + Send; -type OnPageLoad = dyn FnMut(Window, PageLoadPayload) + Send; +type OnPageLoad = dyn FnMut(&Window, &PageLoadPayload<'_>) + Send; type OnDrop = dyn FnOnce(AppHandle) + Send; /// A handle to a plugin. @@ -368,7 +369,7 @@ impl Builder { /// fn init() -> TauriPlugin { /// Builder::new("example") /// .on_page_load(|window, payload| { - /// println!("Loaded URL {} in window {}", payload.url(), window.label()); + /// println!("{:?} URL {} in window {}", payload.event(), payload.url(), window.label()); /// }) /// .build() /// } @@ -376,7 +377,7 @@ impl Builder { #[must_use] pub fn on_page_load(mut self, on_page_load: F) -> Self where - F: FnMut(Window, PageLoadPayload) + Send + 'static, + F: FnMut(&Window, &PageLoadPayload<'_>) + Send + 'static, { self.on_page_load = Box::new(on_page_load); self @@ -652,7 +653,7 @@ impl Plugin for TauriPlugin { (self.on_navigation)(window, url) } - fn on_page_load(&mut self, window: Window, payload: PageLoadPayload) { + fn on_page_load(&mut self, window: &Window, payload: &PageLoadPayload<'_>) { (self.on_page_load)(window, payload) } @@ -750,11 +751,11 @@ impl PluginStore { } /// Runs the on_page_load hook for all plugins in the store. - pub(crate) fn on_page_load(&mut self, window: Window, payload: PageLoadPayload) { + pub(crate) fn on_page_load(&mut self, window: &Window, payload: &PageLoadPayload<'_>) { self .store .iter_mut() - .for_each(|plugin| plugin.on_page_load(window.clone(), payload.clone())) + .for_each(|plugin| plugin.on_page_load(window, payload)) } /// Runs the on_event hook for all plugins in the store. diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index aa3122338265..38349526efca 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -7,6 +7,7 @@ pub(crate) mod plugin; use http::HeaderMap; +pub use tauri_runtime::window::PageLoadEvent; pub use tauri_utils::{config::Color, WindowEffect as Effect, WindowEffectState as EffectState}; use url::Url; @@ -65,12 +66,32 @@ pub(crate) type WebResourceRequestHandler = pub(crate) type NavigationHandler = dyn Fn(&Url) -> bool + Send; pub(crate) type UriSchemeProtocolHandler = Box>, UriSchemeResponder) + Send + Sync>; +pub(crate) type OnPageLoad = dyn Fn(Window, PageLoadPayload<'_>) + Send + Sync + 'static; #[derive(Clone, Serialize)] struct WindowCreatedEvent { label: String, } +/// The payload for the [`WindowBuilder::on_page_load`] hook. +#[derive(Debug, Clone)] +pub struct PageLoadPayload<'a> { + pub(crate) url: &'a Url, + pub(crate) event: PageLoadEvent, +} + +impl<'a> PageLoadPayload<'a> { + /// The page URL. + pub fn url(&self) -> &'a Url { + self.url + } + + /// The page load event. + pub fn event(&self) -> PageLoadEvent { + self.event + } +} + /// Monitor descriptor. #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] @@ -128,6 +149,7 @@ pub struct WindowBuilder<'a, R: Runtime> { pub(crate) webview_attributes: WebviewAttributes, web_resource_request_handler: Option>, navigation_handler: Option>, + on_page_load_handler: Option>>, #[cfg(desktop)] on_menu_event: Option>>, } @@ -206,6 +228,7 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { webview_attributes: WebviewAttributes::new(url), web_resource_request_handler: None, navigation_handler: None, + on_page_load_handler: None, #[cfg(desktop)] on_menu_event: None, } @@ -250,6 +273,7 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { navigation_handler: None, #[cfg(desktop)] on_menu_event: None, + on_page_load_handler: None, }; builder @@ -329,6 +353,44 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { self } + /// Defines a closure to be executed when a page load event is triggered. + /// The event can be either [`PageLoadEvent::Started`] if the page has started loading + /// or [`PageLoadEvent::Finished`] when the page finishes loading. + /// + /// # Examples + /// + /// ```rust,no_run + /// use tauri::{ + /// utils::config::{Csp, CspDirectiveSources, WindowUrl}, + /// window::{PageLoadEvent, WindowBuilder}, + /// }; + /// use http::header::HeaderValue; + /// use std::collections::HashMap; + /// tauri::Builder::default() + /// .setup(|app| { + /// WindowBuilder::new(app, "core", WindowUrl::App("index.html".into())) + /// .on_page_load(|window, payload| { + /// match payload.event() { + /// PageLoadEvent::Started => { + /// println!("{} finished loading", payload.url()); + /// } + /// PageLoadEvent::Finished => { + /// println!("{} finished loading", payload.url()); + /// } + /// } + /// }) + /// .build()?; + /// Ok(()) + /// }); + /// ``` + pub fn on_page_load, PageLoadPayload<'_>) + Send + Sync + 'static>( + mut self, + f: F, + ) -> Self { + self.on_page_load_handler.replace(Box::new(f)); + self + } + /// Registers a global menu event listener. /// /// Note that this handler is called for any menu event, @@ -381,6 +443,18 @@ 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(); + if let Some(on_page_load_handler) = self.on_page_load_handler.take() { + let label = pending.label.clone(); + let manager = self.app_handle.manager.clone(); + pending + .on_page_load_handler + .replace(Box::new(move |url, event| { + if let Some(w) = manager.get_window(&label) { + on_page_load_handler(w, PageLoadPayload { url: &url, event }); + } + })); + } + let labels = self.manager.labels().into_iter().collect::>(); let pending = self .manager @@ -2155,110 +2229,99 @@ impl Window { request.error, ); - match request.cmd.as_str() { - "__initialized" => match request.body.deserialize() { - Ok(payload) => { - manager.run_on_page_load(self, payload); - resolver.resolve(()); - } - Err(e) => resolver.reject(e.to_string()), - }, - _ => { - #[cfg(mobile)] - let app_handle = self.app_handle.clone(); - - let message = InvokeMessage::new( - self, - manager.state(), - request.cmd.to_string(), - request.body, - request.headers, - ); - - let mut invoke = Invoke { - message, - resolver: resolver.clone(), - }; - - if !is_local && scope.is_none() { - invoke.resolver.reject(scope_not_found_error_message); - } else if request.cmd.starts_with("plugin:") { - let command = invoke.message.command.replace("plugin:", ""); - let mut tokens = command.split('|'); - // safe to unwrap: split always has a least one item - let plugin = tokens.next().unwrap(); - invoke.message.command = tokens - .next() - .map(|c| c.to_string()) - .unwrap_or_else(String::new); - - if !(is_local - || plugin == crate::ipc::channel::CHANNEL_PLUGIN_NAME - || scope - .map(|s| s.plugins().contains(&plugin.into())) - .unwrap_or(true)) - { - invoke.resolver.reject(IPC_SCOPE_DOES_NOT_ALLOW); - return; - } + #[cfg(mobile)] + let app_handle = self.app_handle.clone(); - let command = invoke.message.command.clone(); + let message = InvokeMessage::new( + self, + manager.state(), + request.cmd.to_string(), + request.body, + request.headers, + ); - #[cfg(mobile)] - let message = invoke.message.clone(); + let mut invoke = Invoke { + message, + resolver: resolver.clone(), + }; - #[allow(unused_mut)] - let mut handled = manager.extend_api(plugin, invoke); + if !is_local && scope.is_none() { + invoke.resolver.reject(scope_not_found_error_message); + } else if request.cmd.starts_with("plugin:") { + let command = invoke.message.command.replace("plugin:", ""); + let mut tokens = command.split('|'); + // safe to unwrap: split always has a least one item + let plugin = tokens.next().unwrap(); + invoke.message.command = tokens + .next() + .map(|c| c.to_string()) + .unwrap_or_else(String::new); + + if !(is_local + || plugin == crate::ipc::channel::CHANNEL_PLUGIN_NAME + || scope + .map(|s| s.plugins().contains(&plugin.into())) + .unwrap_or(true)) + { + invoke.resolver.reject(IPC_SCOPE_DOES_NOT_ALLOW); + return; + } + + let command = invoke.message.command.clone(); + + #[cfg(mobile)] + let message = invoke.message.clone(); + + #[allow(unused_mut)] + let mut handled = manager.extend_api(plugin, invoke); - #[cfg(mobile)] - { - if !handled { - handled = true; + #[cfg(mobile)] + { + if !handled { + handled = true; - fn load_channels(payload: &serde_json::Value, window: &Window) { - if let serde_json::Value::Object(map) = payload { - for v in map.values() { - if let serde_json::Value::String(s) = v { - if s.starts_with(crate::ipc::channel::IPC_PAYLOAD_PREFIX) { - crate::ipc::Channel::load_from_ipc(window.clone(), s); - } - } + fn load_channels(payload: &serde_json::Value, window: &Window) { + if let serde_json::Value::Object(map) = payload { + for v in map.values() { + if let serde_json::Value::String(s) = v { + if s.starts_with(crate::ipc::channel::IPC_PAYLOAD_PREFIX) { + crate::ipc::Channel::load_from_ipc(window.clone(), s); } } } - - let payload = message.payload.into_json(); - // initialize channels - load_channels(&payload, &message.window); - - let resolver_ = resolver.clone(); - if let Err(e) = crate::plugin::mobile::run_command( - plugin, - &app_handle, - message.command, - payload, - move |response| match response { - Ok(r) => resolver_.resolve(r), - Err(e) => resolver_.reject(e), - }, - ) { - resolver.reject(e.to_string()); - return; - } } } - if !handled { - resolver.reject(format!("Command {command} not found")); - } - } else { - let command = invoke.message.command.clone(); - let handled = manager.run_invoke_handler(invoke); - if !handled { - resolver.reject(format!("Command {command} not found")); + let payload = message.payload.into_json(); + // initialize channels + load_channels(&payload, &message.window); + + let resolver_ = resolver.clone(); + if let Err(e) = crate::plugin::mobile::run_command( + plugin, + &app_handle, + message.command, + payload, + move |response| match response { + Ok(r) => resolver_.resolve(r), + Err(e) => resolver_.reject(e), + }, + ) { + resolver.reject(e.to_string()); + return; } } } + + if !handled { + resolver.reject(format!("Command {command} not found")); + } + } else { + let command = invoke.message.command.clone(); + let handled = manager.run_invoke_handler(invoke); + if !handled { + resolver.reject(format!("Command {command} not found")); + } } } diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 5c21b0820d17..58e12a291924 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -13,7 +13,9 @@ mod tray; use serde::Serialize; use tauri::{ - ipc::Channel, window::WindowBuilder, App, AppHandle, Manager, RunEvent, Runtime, WindowUrl, + ipc::Channel, + window::{PageLoadEvent, WindowBuilder}, + App, AppHandle, Manager, RunEvent, Runtime, WindowUrl, }; use tauri_plugin_sample::{PingRequest, SampleExt}; @@ -121,18 +123,20 @@ pub fn run_app) + Send + 'static>( Ok(()) }) - .on_page_load(|window, _| { - let window_ = window.clone(); - window.listen("js-event", move |event| { - println!("got js-event with message '{:?}'", event.payload()); - let reply = Reply { - data: "something else".to_string(), - }; - - window_ - .emit("rust-event", Some(reply)) - .expect("failed to emit"); - }); + .on_page_load(|window, payload| { + if payload.event() == PageLoadEvent::Finished { + let window_ = window.clone(); + window.listen("js-event", move |event| { + println!("got js-event with message '{:?}'", event.payload()); + let reply = Reply { + data: "something else".to_string(), + }; + + window_ + .emit("rust-event", Some(reply)) + .expect("failed to emit"); + }); + } }); #[allow(unused_mut)] diff --git a/examples/multiwindow/index.html b/examples/multiwindow/index.html index d415b1ae3322..70a5cb43e450 100644 --- a/examples/multiwindow/index.html +++ b/examples/multiwindow/index.html @@ -14,8 +14,8 @@