From bf8213646689175f8a158b956911f3a43e360690 Mon Sep 17 00:00:00 2001 From: nothingismagick Date: Sun, 11 Apr 2021 00:09:09 +0200 Subject: [PATCH] feat(license): SPDX Headers (#1449) * chore(licenses): api Signed-off-by: Daniel Thompson-Yvetot * chore(licenses): scripts Signed-off-by: Daniel Thompson-Yvetot * chore(license): cli/core Signed-off-by: Daniel Thompson-Yvetot * chore(license): cli/tauri-bundler Signed-off-by: Daniel Thompson-Yvetot * chore(license): workflows Signed-off-by: Daniel Thompson-Yvetot * chore(license): require license_template in rust Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri-api Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri-build Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri-codegen Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri-macros Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri-updater Signed-off-by: Daniel Thompson-Yvetot * chore(license): core/tauri-utils Signed-off-by: Daniel Thompson-Yvetot * chore(license): examples Signed-off-by: Daniel Thompson-Yvetot * chore(license): cli/tauri.js Signed-off-by: Daniel Thompson-Yvetot * chore(license): changefile Signed-off-by: Daniel Thompson-Yvetot * chore(license): place both licenses in root Signed-off-by: Daniel Thompson-Yvetot * chore(license): package.json SPDX Signed-off-by: Daniel Thompson-Yvetot * chore(license): SPDX everywhere Signed-off-by: Daniel Thompson-Yvetot * fix(tauri.js): tests more time for ubuntu Signed-off-by: Daniel Thompson-Yvetot * chore(license): commons conservancy language Signed-off-by: Daniel Thompson-Yvetot * chore(license): add spdx file Signed-off-by: Daniel Thompson-Yvetot * fix(license): clippy Signed-off-by: Daniel Thompson-Yvetot * chore(license): language Signed-off-by: Daniel Thompson-Yvetot --- .changes/license.md | 15 ++ .changes/readme.md | 11 +- .github/workflows/artifacts-updater.yml | 4 + .github/workflows/audit.yml | 4 + .github/workflows/build-smoke-tests.yml | 4 + .github/workflows/change-status-on-PR.yml | 4 + .github/workflows/core-lint-fmt.yml | 4 + .../workflows/covector-version-or-publish.yml | 4 + .github/workflows/js-lint.yml | 4 + .github/workflows/smoke-test-prod.yml | 4 + .github/workflows/test-bundler.yml | 4 + .github/workflows/test-core.yml | 4 + .github/workflows/udeps.yml | 4 + .github/workflows/update-docs.yml | 4 + .license_template | 3 + .scripts/cargo-check.ps1 | 4 + .scripts/cargo-check.sh | 4 + .scripts/setup.ps1 | 4 + .scripts/setup.sh | 4 + LICENSE.spdx | 20 ++ LICENSE_APACHE-2.0 | 177 ++++++++++++++++++ LICENSE => LICENSE_MIT | 0 api/package.json | 2 +- api/rollup.config.js | 4 + api/src/app.ts | 4 + api/src/bundle.ts | 4 + api/src/cli.ts | 4 + api/src/dialog.ts | 4 + api/src/event.ts | 4 + api/src/fs.ts | 4 + api/src/globalShortcut.ts | 4 + api/src/helpers/event.ts | 4 + api/src/helpers/tauri.ts | 4 + api/src/http.ts | 4 + api/src/index.ts | 4 + api/src/notification.ts | 4 + api/src/path.ts | 4 + api/src/shell.ts | 4 + api/src/tauri.ts | 4 + api/src/updater.ts | 4 + api/src/window.ts | 4 + cli/core/.license_template | 1 + cli/core/Cargo.toml | 1 + cli/core/build.rs | 4 + cli/core/config_definition.rs | 4 + cli/core/src/build.rs | 4 + cli/core/src/build/rust.rs | 4 + cli/core/src/dev.rs | 4 + cli/core/src/helpers/app_paths.rs | 4 + cli/core/src/helpers/config.rs | 4 + cli/core/src/helpers/logger.rs | 4 + cli/core/src/helpers/manifest.rs | 4 + cli/core/src/helpers/mod.rs | 4 + cli/core/src/helpers/updater_signature.rs | 4 + cli/core/src/info.rs | 4 + cli/core/src/init.rs | 4 + cli/core/src/main.rs | 4 + cli/core/src/sign.rs | 4 + cli/tauri-bundler/.license_template | 1 + cli/tauri-bundler/Cargo.toml | 2 +- cli/tauri-bundler/src/bundle.rs | 4 + .../src/bundle/appimage_bundle.rs | 4 + cli/tauri-bundler/src/bundle/category.rs | 4 + cli/tauri-bundler/src/bundle/common.rs | 4 + cli/tauri-bundler/src/bundle/deb_bundle.rs | 4 + cli/tauri-bundler/src/bundle/dmg_bundle.rs | 4 + cli/tauri-bundler/src/bundle/ios_bundle.rs | 4 + cli/tauri-bundler/src/bundle/macos_bundle.rs | 4 + cli/tauri-bundler/src/bundle/msi_bundle.rs | 4 + cli/tauri-bundler/src/bundle/path_utils.rs | 4 + cli/tauri-bundler/src/bundle/platform.rs | 4 + cli/tauri-bundler/src/bundle/rpm_bundle.rs | 4 + cli/tauri-bundler/src/bundle/settings.rs | 4 + .../src/bundle/templates/appimage | 3 + .../src/bundle/templates/dmg/bundle_dmg | 3 + .../src/bundle/templates/dmg/dmg-license.py | 4 + .../src/bundle/updater_bundle.rs | 4 + cli/tauri-bundler/src/bundle/wix.rs | 4 + cli/tauri-bundler/src/error.rs | 4 + cli/tauri-bundler/src/lib.rs | 4 + cli/tauri.js/bin/tauri-deps.js | 4 + cli/tauri.js/bin/tauri-icon.js | 4 + cli/tauri.js/bin/tauri.js | 3 + cli/tauri.js/package.json | 2 +- cli/tauri.js/scripts/rustup-init.sh | 4 + cli/tauri.js/src/api/cli.ts | 4 + .../api/dependency-manager/cargo-commands.ts | 4 + .../api/dependency-manager/cargo-crates.ts | 4 + .../src/api/dependency-manager/index.ts | 4 + .../api/dependency-manager/npm-packages.ts | 4 + .../src/api/dependency-manager/rust.ts | 4 + .../src/api/dependency-manager/types.ts | 4 + .../src/api/dependency-manager/util.ts | 4 + cli/tauri.js/src/api/tauricon.ts | 4 + cli/tauri.js/src/helpers/app-paths.ts | 4 + .../src/helpers/get-script-version.ts | 4 + cli/tauri.js/src/helpers/logger.ts | 4 + cli/tauri.js/src/helpers/net.ts | 4 + .../src/helpers/non-webpack-require.ts | 4 + cli/tauri.js/src/helpers/rust-cli.ts | 4 + cli/tauri.js/src/helpers/spawn.ts | 4 + cli/tauri.js/src/helpers/tauricon.config.ts | 4 + cli/tauri.js/src/types/cargo.ts | 4 + cli/tauri.js/src/types/config.ts | 4 + cli/tauri.js/src/types/modules.d.ts | 4 + .../test/jest/fixtures/app-test-setup.js | 2 +- .../test/jest/fixtures/app/package.json | 2 +- cli/tauri.js/test/jest/jest.setup.js | 2 +- core/tauri-api/.license_template | 1 + core/tauri-api/.scripts/loop_qc.sh | 6 +- core/tauri-api/Cargo.toml | 2 +- core/tauri-api/src/app.rs | 4 + core/tauri-api/src/cli.rs | 4 + core/tauri-api/src/cli/macros.rs | 4 + core/tauri-api/src/command.rs | 4 + core/tauri-api/src/dialog.rs | 4 + core/tauri-api/src/dir.rs | 4 + core/tauri-api/src/error.rs | 4 + core/tauri-api/src/file.rs | 4 + core/tauri-api/src/file/extract.rs | 4 + core/tauri-api/src/file/file_move.rs | 4 + core/tauri-api/src/http.rs | 4 + core/tauri-api/src/lib.rs | 4 + core/tauri-api/src/notification.rs | 4 + core/tauri-api/src/path.rs | 4 + core/tauri-api/src/rpc.rs | 4 + core/tauri-api/src/shell.rs | 4 + core/tauri-api/src/shortcuts.rs | 4 + core/tauri-api/src/tcp.rs | 4 + core/tauri-api/src/version.rs | 4 + core/tauri-build/.license_template | 1 + core/tauri-build/Cargo.toml | 2 +- core/tauri-build/src/codegen/context.rs | 4 + core/tauri-build/src/codegen/mod.rs | 4 + core/tauri-build/src/lib.rs | 4 + core/tauri-codegen/.license_template | 1 + core/tauri-codegen/Cargo.toml | 2 +- core/tauri-codegen/src/context.rs | 4 + core/tauri-codegen/src/embedded_assets.rs | 4 + core/tauri-codegen/src/lib.rs | 4 + core/tauri-macros/.license_template | 1 + core/tauri-macros/Cargo.toml | 2 +- core/tauri-macros/src/command.rs | 4 + core/tauri-macros/src/context/mod.rs | 4 + core/tauri-macros/src/lib.rs | 4 + core/tauri-updater/.license_template | 1 + core/tauri-updater/Cargo.toml | 2 +- core/tauri-updater/src/error.rs | 4 + core/tauri-updater/src/lib.rs | 4 + core/tauri-utils/.license_template | 1 + core/tauri-utils/Cargo.toml | 2 +- core/tauri-utils/src/assets.rs | 4 + core/tauri-utils/src/config.rs | 4 + core/tauri-utils/src/lib.rs | 4 + core/tauri-utils/src/platform.rs | 4 + core/tauri-utils/src/process.rs | 4 + core/tauri/.license_template | 1 + core/tauri/Cargo.toml | 2 +- core/tauri/build.rs | 4 + core/tauri/scripts/bundle.js | 2 +- core/tauri/scripts/core.js | 4 + core/tauri/src/endpoints.rs | 4 + core/tauri/src/endpoints/app.rs | 4 + core/tauri/src/endpoints/cli.rs | 4 + core/tauri/src/endpoints/dialog.rs | 4 + core/tauri/src/endpoints/event.rs | 4 + core/tauri/src/endpoints/file_system.rs | 4 + core/tauri/src/endpoints/global_shortcut.rs | 4 + core/tauri/src/endpoints/http.rs | 4 + core/tauri/src/endpoints/internal.rs | 4 + core/tauri/src/endpoints/notification.rs | 4 + core/tauri/src/endpoints/shell.rs | 4 + core/tauri/src/endpoints/window.rs | 4 + core/tauri/src/error.rs | 4 + core/tauri/src/event.rs | 4 + core/tauri/src/hooks.rs | 4 + core/tauri/src/lib.rs | 4 + core/tauri/src/plugin.rs | 4 + core/tauri/src/runtime/app.rs | 4 + core/tauri/src/runtime/flavor/mod.rs | 4 + core/tauri/src/runtime/flavor/wry.rs | 4 + core/tauri/src/runtime/manager.rs | 4 + core/tauri/src/runtime/mod.rs | 4 + core/tauri/src/runtime/tag.rs | 4 + core/tauri/src/runtime/updater.rs | 4 + core/tauri/src/runtime/webview.rs | 4 + core/tauri/src/runtime/window.rs | 4 + core/tauri/src/settings.rs | 4 + examples/api/src-tauri/.license_template | 1 + examples/api/src-tauri/Cargo.toml | 1 + examples/api/src-tauri/build.rs | 4 + examples/api/src-tauri/src/cmd.rs | 4 + examples/api/src-tauri/src/main.rs | 4 + .../helloworld/src-tauri/.license_template | 1 + examples/helloworld/src-tauri/Cargo.toml | 1 + examples/helloworld/src-tauri/build.rs | 4 + examples/helloworld/src-tauri/src/main.rs | 4 + .../multiwindow/src-tauri/.license_template | 1 + examples/multiwindow/src-tauri/Cargo.toml | 1 + examples/multiwindow/src-tauri/build.rs | 4 + examples/multiwindow/src-tauri/src/main.rs | 4 + examples/updater/src-tauri/.license_template | 1 + examples/updater/src-tauri/Cargo.toml | 1 + examples/updater/src-tauri/build.rs | 4 + examples/updater/src-tauri/src/main.rs | 4 + package.json | 2 +- rustfmt.toml | 5 +- 207 files changed, 928 insertions(+), 18 deletions(-) create mode 100644 .changes/license.md create mode 100644 .license_template create mode 100644 LICENSE.spdx create mode 100644 LICENSE_APACHE-2.0 rename LICENSE => LICENSE_MIT (100%) create mode 100644 cli/core/.license_template create mode 100644 cli/tauri-bundler/.license_template create mode 100644 core/tauri-api/.license_template create mode 100644 core/tauri-build/.license_template create mode 100644 core/tauri-codegen/.license_template create mode 100644 core/tauri-macros/.license_template create mode 100644 core/tauri-updater/.license_template create mode 100644 core/tauri-utils/.license_template create mode 100644 core/tauri/.license_template create mode 100644 examples/api/src-tauri/.license_template create mode 100644 examples/helloworld/src-tauri/.license_template create mode 100644 examples/multiwindow/src-tauri/.license_template create mode 100644 examples/updater/src-tauri/.license_template diff --git a/.changes/license.md b/.changes/license.md new file mode 100644 index 000000000..f97b0dcf8 --- /dev/null +++ b/.changes/license.md @@ -0,0 +1,15 @@ +--- +"api": patch +"tauri-bundler": patch +"tauri-cli": patch +"tauri.js": patch +"tauri-utils": patch +"tauri-api": patch +"tauri-macros": patch +"tauri-updater": patch +"tauri-build": patch +"tauri-codegen": patch +"tauri": patch +--- + +Update all code files to have our license header. \ No newline at end of file diff --git a/.changes/readme.md b/.changes/readme.md index bd2080291..86c17abbc 100644 --- a/.changes/readme.md +++ b/.changes/readme.md @@ -10,8 +10,17 @@ Use the following format: ```md --- +"api": patch +"tauri-bundler": patch +"tauri-cli": patch "tauri.js": patch -"tauri": minor +"tauri-utils": patch +"tauri-api": patch +"tauri-macros": patch +"tauri-updater": patch +"tauri-build": patch +"tauri-codegen": patch +"tauri": patch --- Change summary goes here diff --git a/.github/workflows/artifacts-updater.yml b/.github/workflows/artifacts-updater.yml index 90612c57c..daabad910 100644 --- a/.github/workflows/artifacts-updater.yml +++ b/.github/workflows/artifacts-updater.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: updater test artifacts on: pull_request: diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 3d4410036..dadd56de6 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: Audit on: diff --git a/.github/workflows/build-smoke-tests.yml b/.github/workflows/build-smoke-tests.yml index 2c753a438..7c07f5f83 100644 --- a/.github/workflows/build-smoke-tests.yml +++ b/.github/workflows/build-smoke-tests.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: build smoke test with source on: diff --git a/.github/workflows/change-status-on-PR.yml b/.github/workflows/change-status-on-PR.yml index 72f9bee13..c3c7e4fb2 100644 --- a/.github/workflows/change-status-on-PR.yml +++ b/.github/workflows/change-status-on-PR.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: covector status on: [pull_request] diff --git a/.github/workflows/core-lint-fmt.yml b/.github/workflows/core-lint-fmt.yml index 25670a6ed..2758f70a5 100644 --- a/.github/workflows/core-lint-fmt.yml +++ b/.github/workflows/core-lint-fmt.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: clippy and fmt check on: diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index 6b755bb8d..0ff22941a 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: version or publish on: diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml index d65972ed5..454546b57 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/js-lint.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: eslint check on: diff --git a/.github/workflows/smoke-test-prod.yml b/.github/workflows/smoke-test-prod.yml index 0ace79fc2..90ff6dec2 100644 --- a/.github/workflows/smoke-test-prod.yml +++ b/.github/workflows/smoke-test-prod.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: build smoke tests with prod on: diff --git a/.github/workflows/test-bundler.yml b/.github/workflows/test-bundler.yml index f6057ef4e..f21dd1318 100644 --- a/.github/workflows/test-bundler.yml +++ b/.github/workflows/test-bundler.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: test bundler on: diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 4caa65a14..f95e01e2a 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: test core on: diff --git a/.github/workflows/udeps.yml b/.github/workflows/udeps.yml index b4e732c90..34e5c5b3c 100644 --- a/.github/workflows/udeps.yml +++ b/.github/workflows/udeps.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: Udeps on: diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index bd1c21ad8..97b5c9187 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -1,3 +1,7 @@ +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + name: update-docs on: diff --git a/.license_template b/.license_template new file mode 100644 index 000000000..9601f8a1b --- /dev/null +++ b/.license_template @@ -0,0 +1,3 @@ +// Copyright {20\d{2}(-20\d{2})?} Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/.scripts/cargo-check.ps1 b/.scripts/cargo-check.ps1 index 318cc060d..30459bf41 100755 --- a/.scripts/cargo-check.ps1 +++ b/.scripts/cargo-check.ps1 @@ -1,4 +1,8 @@ #!/usr/bin/env pwsh +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + # note: you can pass in the cargo sub-commands used to check manually. # allowed commands: check, clippy, fmt, test # default: clippy, fmt, test diff --git a/.scripts/cargo-check.sh b/.scripts/cargo-check.sh index d59b951c4..0f6a431ed 100755 --- a/.scripts/cargo-check.sh +++ b/.scripts/cargo-check.sh @@ -1,4 +1,8 @@ #!/usr/bin/env sh +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + # note: you can pass in the cargo sub-commands used to check manually. # allowed commands: check, clippy, fmt, test # default: clippy, fmt, test diff --git a/.scripts/setup.ps1 b/.scripts/setup.ps1 index b2670d805..862119a23 100644 --- a/.scripts/setup.ps1 +++ b/.scripts/setup.ps1 @@ -1,4 +1,8 @@ #!/usr/bin/env pwsh +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + echo "Building API definitions..." cd api yarn; yarn build diff --git a/.scripts/setup.sh b/.scripts/setup.sh index f36666e8c..6afeecbbe 100644 --- a/.scripts/setup.sh +++ b/.scripts/setup.sh @@ -1,4 +1,8 @@ #!/usr/bin/env sh +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + echo "Building API definitions..." cd api yarn && yarn build diff --git a/LICENSE.spdx b/LICENSE.spdx new file mode 100644 index 000000000..4a4518460 --- /dev/null +++ b/LICENSE.spdx @@ -0,0 +1,20 @@ +SPDXVersion: SPDX-2.1 +DataLicense: CC0-1.0 +PackageName: tauri +DataFormat: SPDXRef-1 +PackageSupplier: Organization: The Tauri Programme in the Commons Conservancy +PackageHomePage: https://tauri.app +PackageLicenseDeclared: Apache-2.0 +PackageLicenseDeclared: MIT +PackageCopyrightText: 2019-2021, The Tauri Programme in the Commons Conservancy +PackageSummary: Tauri is a rust project that enables developers to make secure +and small desktop applications using a web frontend. + +PackageComment: The package includes the following libraries; see +Relationship information. + +Created: 2019-05-20T09:00:00Z +PackageDownloadLocation: git://github.com/tauri-apps/tauri +PackageDownloadLocation: git+https://github.com/tauri-apps/tauri.git +PackageDownloadLocation: git+ssh://github.com/tauri-apps/tauri.git +Creator: Person: Daniel Thompson-Yvetot \ No newline at end of file diff --git a/LICENSE_APACHE-2.0 b/LICENSE_APACHE-2.0 new file mode 100644 index 000000000..f433b1a53 --- /dev/null +++ b/LICENSE_APACHE-2.0 @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/LICENSE b/LICENSE_MIT similarity index 100% rename from LICENSE rename to LICENSE_MIT diff --git a/api/package.json b/api/package.json index c45a1779a..734f09049 100644 --- a/api/package.json +++ b/api/package.json @@ -41,7 +41,7 @@ "Daniel Thompson-Yvetot ", "Lucas Fernandes Gonçalves Nogueira " ], - "license": "MIT", + "license": "Apache-2.0 OR MIT", "bugs": { "url": "https://github.com/tauri-apps/tauri/issues" }, diff --git a/api/rollup.config.js b/api/rollup.config.js index c8c30fcd7..3c775a208 100644 --- a/api/rollup.config.js +++ b/api/rollup.config.js @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // rollup.config.js import { terser } from 'rollup-plugin-terser' import resolve from '@rollup/plugin-node-resolve' diff --git a/api/src/app.ts b/api/src/app.ts index a55534ea9..d7a2ee955 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' /** diff --git a/api/src/bundle.ts b/api/src/bundle.ts index 651591fa8..4b44a1f8a 100644 --- a/api/src/bundle.ts +++ b/api/src/bundle.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import 'regenerator-runtime/runtime' import * as app from './app' import * as cli from './cli' diff --git a/api/src/cli.ts b/api/src/cli.ts index eea8593d5..21dbc1286 100644 --- a/api/src/cli.ts +++ b/api/src/cli.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' export interface ArgMatch { diff --git a/api/src/dialog.ts b/api/src/dialog.ts index 6d0c92bb1..65e298594 100644 --- a/api/src/dialog.ts +++ b/api/src/dialog.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' export interface DialogFilter { diff --git a/api/src/event.ts b/api/src/event.ts index 640279e70..bcf3c4a21 100644 --- a/api/src/event.ts +++ b/api/src/event.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { emit as emitEvent } from './helpers/event' async function emit(event: string, payload?: string): Promise { diff --git a/api/src/fs.ts b/api/src/fs.ts index 569fc38fe..98f8043f0 100644 --- a/api/src/fs.ts +++ b/api/src/fs.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' export enum BaseDirectory { diff --git a/api/src/globalShortcut.ts b/api/src/globalShortcut.ts index 13a697b7c..33f8a09bc 100644 --- a/api/src/globalShortcut.ts +++ b/api/src/globalShortcut.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' import { transformCallback } from './tauri' diff --git a/api/src/helpers/event.ts b/api/src/helpers/event.ts index 2c13b2172..c5fa31196 100644 --- a/api/src/helpers/event.ts +++ b/api/src/helpers/event.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './tauri' import { transformCallback } from '../tauri' diff --git a/api/src/helpers/tauri.ts b/api/src/helpers/tauri.ts index e7ed6e6d8..fd82fdcef 100644 --- a/api/src/helpers/tauri.ts +++ b/api/src/helpers/tauri.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invoke } from '../tauri' export type TauriModule = diff --git a/api/src/http.ts b/api/src/http.ts index a6ca6536f..ead7f662a 100644 --- a/api/src/http.ts +++ b/api/src/http.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' export interface ClientOptions { diff --git a/api/src/index.ts b/api/src/index.ts index b42a238b9..e99690287 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -1,2 +1,6 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import * as api from './bundle' export default api diff --git a/api/src/notification.ts b/api/src/notification.ts index c566deda3..d3b3d0adf 100644 --- a/api/src/notification.ts +++ b/api/src/notification.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' export interface Options { diff --git a/api/src/path.ts b/api/src/path.ts index 78d1f3de8..26e8f4ff3 100644 --- a/api/src/path.ts +++ b/api/src/path.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' import { BaseDirectory } from './fs' diff --git a/api/src/shell.ts b/api/src/shell.ts index 5f9e9a871..e0c0e9eca 100644 --- a/api/src/shell.ts +++ b/api/src/shell.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' import { transformCallback } from './tauri' diff --git a/api/src/tauri.ts b/api/src/tauri.ts index 38453867b..29f9fd626 100644 --- a/api/src/tauri.ts +++ b/api/src/tauri.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + declare global { // eslint-disable-next-line @typescript-eslint/no-unused-vars interface Window { diff --git a/api/src/updater.ts b/api/src/updater.ts index 48bdfc68c..b686be32f 100644 --- a/api/src/updater.ts +++ b/api/src/updater.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { once, listen, emit, UnlistenFn } from './helpers/event' export type UpdateStatus = 'PENDING' | 'ERROR' | 'DONE' | 'UPTODATE' diff --git a/api/src/window.ts b/api/src/window.ts index 74b6a951a..8b160376f 100644 --- a/api/src/window.ts +++ b/api/src/window.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invokeTauriCommand } from './helpers/tauri' import { EventCallback, UnlistenFn, emit, listen, once } from './helpers/event' diff --git a/cli/core/.license_template b/cli/core/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/cli/core/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/cli/core/Cargo.toml b/cli/core/Cargo.toml index b1ac4dedc..4666d9edd 100644 --- a/cli/core/Cargo.toml +++ b/cli/core/Cargo.toml @@ -5,6 +5,7 @@ name = "tauri-cli" version = "0.1.0" authors = [ "Lucas Nogueira " ] edition = "2018" +license = "Apache-2.0 OR MIT" [[bin]] name = "cargo-tauri" diff --git a/cli/core/build.rs b/cli/core/build.rs index fcb5b2347..919166014 100644 --- a/cli/core/build.rs +++ b/cli/core/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ env::current_dir, error::Error, diff --git a/cli/core/config_definition.rs b/cli/core/config_definition.rs index 9c431ad0a..e9de0162c 100644 --- a/cli/core/config_definition.rs +++ b/cli/core/config_definition.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #![allow(clippy::field_reassign_with_default)] use schemars::JsonSchema; diff --git a/cli/core/src/build.rs b/cli/core/src/build.rs index 9c0c33755..808ae61d6 100644 --- a/cli/core/src/build.rs +++ b/cli/core/src/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use tauri_bundler::bundle::{ bundle_project, common::print_signed_updater_archive, PackageType, SettingsBuilder, }; diff --git a/cli/core/src/build/rust.rs b/cli/core/src/build/rust.rs index ee163f18c..bfde0bbd9 100644 --- a/cli/core/src/build/rust.rs +++ b/cli/core/src/build/rust.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{fs::File, io::Read, path::PathBuf, process::Command, str::FromStr}; use serde::Deserialize; diff --git a/cli/core/src/dev.rs b/cli/core/src/dev.rs index 6a471d067..71ae9660f 100644 --- a/cli/core/src/dev.rs +++ b/cli/core/src/dev.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::helpers::{ app_paths::{app_dir, tauri_dir}, config::{get as get_config, reload as reload_config}, diff --git a/cli/core/src/helpers/app_paths.rs b/cli/core/src/helpers/app_paths.rs index 03445227a..070006bd6 100644 --- a/cli/core/src/helpers/app_paths.rs +++ b/cli/core/src/helpers/app_paths.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{env::current_dir, path::PathBuf}; use once_cell::sync::Lazy; diff --git a/cli/core/src/helpers/config.rs b/cli/core/src/helpers/config.rs index bd66a35c4..f5cf8ab36 100644 --- a/cli/core/src/helpers/config.rs +++ b/cli/core/src/helpers/config.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #[cfg(target_os = "linux")] use heck::KebabCase; use json_patch::merge; diff --git a/cli/core/src/helpers/logger.rs b/cli/core/src/helpers/logger.rs index 8a4c07c79..a90826663 100644 --- a/cli/core/src/helpers/logger.rs +++ b/cli/core/src/helpers/logger.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use colored::Colorize; pub struct Logger<'a> { diff --git a/cli/core/src/helpers/manifest.rs b/cli/core/src/helpers/manifest.rs index 468df9f8f..ed1a83ea2 100644 --- a/cli/core/src/helpers/manifest.rs +++ b/cli/core/src/helpers/manifest.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::{app_paths::tauri_dir, config::ConfigHandle}; use toml_edit::{Array, Document, Value}; diff --git a/cli/core/src/helpers/mod.rs b/cli/core/src/helpers/mod.rs index 5cf76ba33..5d1163771 100644 --- a/cli/core/src/helpers/mod.rs +++ b/cli/core/src/helpers/mod.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + pub mod app_paths; pub mod config; mod logger; diff --git a/cli/core/src/helpers/updater_signature.rs b/cli/core/src/helpers/updater_signature.rs index f151ad875..11830eb5b 100644 --- a/cli/core/src/helpers/updater_signature.rs +++ b/cli/core/src/helpers/updater_signature.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + extern crate minisign; use base64::{decode, encode}; diff --git a/cli/core/src/info.rs b/cli/core/src/info.rs index 317832416..1759fe0a1 100644 --- a/cli/core/src/info.rs +++ b/cli/core/src/info.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::helpers::{ app_paths::{app_dir, tauri_dir}, config::get as get_config, diff --git a/cli/core/src/init.rs b/cli/core/src/init.rs index d3b1fd9cc..a8b73ad53 100644 --- a/cli/core/src/init.rs +++ b/cli/core/src/init.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ collections::BTreeMap, fs::{create_dir_all, remove_dir_all, File}, diff --git a/cli/core/src/main.rs b/cli/core/src/main.rs index 7a6dc9ef6..07861de8e 100644 --- a/cli/core/src/main.rs +++ b/cli/core/src/main.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + pub use anyhow::Result; use clap::{crate_version, load_yaml, App, AppSettings, ArgMatches}; use dialoguer::Input; diff --git a/cli/core/src/sign.rs b/cli/core/src/sign.rs index f8c3cc22c..21b04f907 100644 --- a/cli/core/src/sign.rs +++ b/cli/core/src/sign.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::helpers::updater_signature::{ generate_key, read_key_from_file, save_keypair, sign_file, }; diff --git a/cli/tauri-bundler/.license_template b/cli/tauri-bundler/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/cli/tauri-bundler/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/cli/tauri-bundler/Cargo.toml b/cli/tauri-bundler/Cargo.toml index 392786e51..4321fc815 100644 --- a/cli/tauri-bundler/Cargo.toml +++ b/cli/tauri-bundler/Cargo.toml @@ -10,7 +10,7 @@ authors = [ "Tensor Programming " ] categories = [ "command-line-utilities", "development-tools::cargo-plugins" ] -license = "MIT/Apache-2.0" +license = "Apache-2.0 OR MIT" keywords = [ "bundle", "cargo", "tauri" ] repository = "https://github.com/tauri-apps/tauri" description = "Wrap rust executables in OS-specific app bundles for Tauri" diff --git a/cli/tauri-bundler/src/bundle.rs b/cli/tauri-bundler/src/bundle.rs index 3b83b0888..773530cd3 100644 --- a/cli/tauri-bundler/src/bundle.rs +++ b/cli/tauri-bundler/src/bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + mod appimage_bundle; mod category; pub mod common; diff --git a/cli/tauri-bundler/src/bundle/appimage_bundle.rs b/cli/tauri-bundler/src/bundle/appimage_bundle.rs index 6ce1787f0..51d1b6dd3 100644 --- a/cli/tauri-bundler/src/bundle/appimage_bundle.rs +++ b/cli/tauri-bundler/src/bundle/appimage_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::{common, deb_bundle, path_utils}; use crate::Settings; diff --git a/cli/tauri-bundler/src/bundle/category.rs b/cli/tauri-bundler/src/bundle/category.rs index 7b8423058..634ef2b1e 100644 --- a/cli/tauri-bundler/src/bundle/category.rs +++ b/cli/tauri-bundler/src/bundle/category.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{fmt, str::FromStr}; const CONFIDENCE_THRESHOLD: f64 = 0.8; diff --git a/cli/tauri-bundler/src/bundle/common.rs b/cli/tauri-bundler/src/bundle/common.rs index 6cab2b6dc..a8c8b0cd8 100644 --- a/cli/tauri-bundler/src/bundle/common.rs +++ b/cli/tauri-bundler/src/bundle/common.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::Settings; use std::{ ffi::OsStr, diff --git a/cli/tauri-bundler/src/bundle/deb_bundle.rs b/cli/tauri-bundler/src/bundle/deb_bundle.rs index 809f0c28e..d6efd9fd7 100644 --- a/cli/tauri-bundler/src/bundle/deb_bundle.rs +++ b/cli/tauri-bundler/src/bundle/deb_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // The structure of a Debian package looks something like this: // // foobar_1.2.3_i386.deb # Actually an ar archive diff --git a/cli/tauri-bundler/src/bundle/dmg_bundle.rs b/cli/tauri-bundler/src/bundle/dmg_bundle.rs index ccbc831b5..0a7aaa925 100644 --- a/cli/tauri-bundler/src/bundle/dmg_bundle.rs +++ b/cli/tauri-bundler/src/bundle/dmg_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::{common, macos_bundle}; use crate::{bundle::Bundle, PackageType::MacOSBundle, Settings}; diff --git a/cli/tauri-bundler/src/bundle/ios_bundle.rs b/cli/tauri-bundler/src/bundle/ios_bundle.rs index 3ffca52a2..b01ae91a1 100644 --- a/cli/tauri-bundler/src/bundle/ios_bundle.rs +++ b/cli/tauri-bundler/src/bundle/ios_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // An iOS package is laid out like: // // Foobar.app # Actually a directory diff --git a/cli/tauri-bundler/src/bundle/macos_bundle.rs b/cli/tauri-bundler/src/bundle/macos_bundle.rs index b0516fe01..b55690abc 100644 --- a/cli/tauri-bundler/src/bundle/macos_bundle.rs +++ b/cli/tauri-bundler/src/bundle/macos_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // A macOS application bundle package is laid out like: // // foobar.app # Actually a directory diff --git a/cli/tauri-bundler/src/bundle/msi_bundle.rs b/cli/tauri-bundler/src/bundle/msi_bundle.rs index 0021490e8..f74a34b72 100644 --- a/cli/tauri-bundler/src/bundle/msi_bundle.rs +++ b/cli/tauri-bundler/src/bundle/msi_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::{settings::Settings, wix}; use std::{self, path::PathBuf}; diff --git a/cli/tauri-bundler/src/bundle/path_utils.rs b/cli/tauri-bundler/src/bundle/path_utils.rs index b34889785..f945c2a20 100644 --- a/cli/tauri-bundler/src/bundle/path_utils.rs +++ b/cli/tauri-bundler/src/bundle/path_utils.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ fs::{create_dir, create_dir_all, read_dir, remove_dir_all}, path::{Path, PathBuf}, diff --git a/cli/tauri-bundler/src/bundle/platform.rs b/cli/tauri-bundler/src/bundle/platform.rs index 57c44c3ac..da5b76f16 100644 --- a/cli/tauri-bundler/src/bundle/platform.rs +++ b/cli/tauri-bundler/src/bundle/platform.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + /// Try to determine the current target triple. /// /// Returns a target triple (e.g. `x86_64-unknown-linux-gnu` or `i686-pc-windows-msvc`) or an diff --git a/cli/tauri-bundler/src/bundle/rpm_bundle.rs b/cli/tauri-bundler/src/bundle/rpm_bundle.rs index e9469e1e8..a88547d03 100644 --- a/cli/tauri-bundler/src/bundle/rpm_bundle.rs +++ b/cli/tauri-bundler/src/bundle/rpm_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::Settings; use std::path::PathBuf; diff --git a/cli/tauri-bundler/src/bundle/settings.rs b/cli/tauri-bundler/src/bundle/settings.rs index dd91a0630..1c96c2ae1 100644 --- a/cli/tauri-bundler/src/bundle/settings.rs +++ b/cli/tauri-bundler/src/bundle/settings.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::category::AppCategory; use crate::bundle::{common, platform::target_triple}; diff --git a/cli/tauri-bundler/src/bundle/templates/appimage b/cli/tauri-bundler/src/bundle/templates/appimage index d99f2343c..297d2ffd4 100644 --- a/cli/tauri-bundler/src/bundle/templates/appimage +++ b/cli/tauri-bundler/src/bundle/templates/appimage @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT set -euxo pipefail diff --git a/cli/tauri-bundler/src/bundle/templates/dmg/bundle_dmg b/cli/tauri-bundler/src/bundle/templates/dmg/bundle_dmg index b5b6ec02a..7d17aafc4 100644 --- a/cli/tauri-bundler/src/bundle/templates/dmg/bundle_dmg +++ b/cli/tauri-bundler/src/bundle/templates/dmg/bundle_dmg @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT # Create a read-only disk image of the contents of a folder # forked from https://github.com/andreyvit/create-dmg diff --git a/cli/tauri-bundler/src/bundle/templates/dmg/dmg-license.py b/cli/tauri-bundler/src/bundle/templates/dmg/dmg-license.py index 558bbb96e..2d6d53ab1 100644 --- a/cli/tauri-bundler/src/bundle/templates/dmg/dmg-license.py +++ b/cli/tauri-bundler/src/bundle/templates/dmg/dmg-license.py @@ -1,5 +1,9 @@ #!/usr/bin/env python """ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + This script adds a license file to a DMG. Requires Xcode and a plain ascii text license file. Obviously only runs on a Mac. diff --git a/cli/tauri-bundler/src/bundle/updater_bundle.rs b/cli/tauri-bundler/src/bundle/updater_bundle.rs index 5becdc9a9..900e798d7 100644 --- a/cli/tauri-bundler/src/bundle/updater_bundle.rs +++ b/cli/tauri-bundler/src/bundle/updater_bundle.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::common; use libflate::gzip; use walkdir::WalkDir; diff --git a/cli/tauri-bundler/src/bundle/wix.rs b/cli/tauri-bundler/src/bundle/wix.rs index 85787e29a..1e1a5821b 100644 --- a/cli/tauri-bundler/src/bundle/wix.rs +++ b/cli/tauri-bundler/src/bundle/wix.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::{ common, path_utils::{copy_file, FileOpts}, diff --git a/cli/tauri-bundler/src/error.rs b/cli/tauri-bundler/src/error.rs index 081f8f66c..5ddb0ca4f 100644 --- a/cli/tauri-bundler/src/error.rs +++ b/cli/tauri-bundler/src/error.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{io, num, path}; use thiserror::Error as DeriveError; diff --git a/cli/tauri-bundler/src/lib.rs b/cli/tauri-bundler/src/lib.rs index 4f82ecb8a..1cb3e96f5 100644 --- a/cli/tauri-bundler/src/lib.rs +++ b/cli/tauri-bundler/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + pub mod bundle; mod error; pub use bundle::*; diff --git a/cli/tauri.js/bin/tauri-deps.js b/cli/tauri.js/bin/tauri-deps.js index 652d2aeb6..d21eca26c 100644 --- a/cli/tauri.js/bin/tauri-deps.js +++ b/cli/tauri.js/bin/tauri-deps.js @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + async function run() { const { installDependencies, diff --git a/cli/tauri.js/bin/tauri-icon.js b/cli/tauri.js/bin/tauri-icon.js index 51a49455c..d3400044e 100644 --- a/cli/tauri.js/bin/tauri-icon.js +++ b/cli/tauri.js/bin/tauri-icon.js @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + const parseArgs = require('minimist') const { tauricon } = require('../dist/api/tauricon') diff --git a/cli/tauri.js/bin/tauri.js b/cli/tauri.js/bin/tauri.js index 9aba84c90..58615668e 100755 --- a/cli/tauri.js/bin/tauri.js +++ b/cli/tauri.js/bin/tauri.js @@ -1,4 +1,7 @@ #!/usr/bin/env node +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT const cmds = ['icon', 'deps'] const rustCliCmds = ['dev', 'build', 'init', 'info', 'sign'] diff --git a/cli/tauri.js/package.json b/cli/tauri.js/package.json index 802dc05e2..3bb51d4f2 100644 --- a/cli/tauri.js/package.json +++ b/cli/tauri.js/package.json @@ -36,7 +36,7 @@ "Daniel Thompson-Yvetot ", "Lucas Fernandes Gonçalves Nogueira " ], - "license": "MIT", + "license": "Apache-2.0 OR MIT", "bugs": { "url": "https://github.com/tauri-apps/tauri/issues" }, diff --git a/cli/tauri.js/scripts/rustup-init.sh b/cli/tauri.js/scripts/rustup-init.sh index 5b7c9d27b..bcbe1129e 100644 --- a/cli/tauri.js/scripts/rustup-init.sh +++ b/cli/tauri.js/scripts/rustup-init.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + # shellcheck shell=dash # This is just a little script that can be downloaded from the internet to diff --git a/cli/tauri.js/src/api/cli.ts b/cli/tauri.js/src/api/cli.ts index f9e2a9c52..58c5e0aa3 100644 --- a/cli/tauri.js/src/api/cli.ts +++ b/cli/tauri.js/src/api/cli.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { runOnRustCli } from '../helpers/rust-cli' interface Args { diff --git a/cli/tauri.js/src/api/dependency-manager/cargo-commands.ts b/cli/tauri.js/src/api/dependency-manager/cargo-commands.ts index 30ece9941..3b7b35c66 100644 --- a/cli/tauri.js/src/api/dependency-manager/cargo-commands.ts +++ b/cli/tauri.js/src/api/dependency-manager/cargo-commands.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { ManagementType, Result } from './types' import { getCrateLatestVersion, semverLt } from './util' import getScriptVersion from '../../helpers/get-script-version' diff --git a/cli/tauri.js/src/api/dependency-manager/cargo-crates.ts b/cli/tauri.js/src/api/dependency-manager/cargo-crates.ts index 3f2bb16f6..bca6a0c85 100644 --- a/cli/tauri.js/src/api/dependency-manager/cargo-crates.ts +++ b/cli/tauri.js/src/api/dependency-manager/cargo-crates.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { spawnSync } from './../../helpers/spawn' import { CargoManifest, diff --git a/cli/tauri.js/src/api/dependency-manager/index.ts b/cli/tauri.js/src/api/dependency-manager/index.ts index be1a8d480..9b350975e 100644 --- a/cli/tauri.js/src/api/dependency-manager/index.ts +++ b/cli/tauri.js/src/api/dependency-manager/index.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import logger from '../../helpers/logger' import * as rust from './rust' import * as cargoCommands from './cargo-commands' diff --git a/cli/tauri.js/src/api/dependency-manager/npm-packages.ts b/cli/tauri.js/src/api/dependency-manager/npm-packages.ts index 11acc6de6..aeb87eecf 100644 --- a/cli/tauri.js/src/api/dependency-manager/npm-packages.ts +++ b/cli/tauri.js/src/api/dependency-manager/npm-packages.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { ManagementType, Result } from './types' import { getNpmLatestVersion, diff --git a/cli/tauri.js/src/api/dependency-manager/rust.ts b/cli/tauri.js/src/api/dependency-manager/rust.ts index 72187aa76..e112b2180 100644 --- a/cli/tauri.js/src/api/dependency-manager/rust.ts +++ b/cli/tauri.js/src/api/dependency-manager/rust.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { ManagementType } from './types' import { spawnSync } from '../../helpers/spawn' import getScriptVersion from '../../helpers/get-script-version' diff --git a/cli/tauri.js/src/api/dependency-manager/types.ts b/cli/tauri.js/src/api/dependency-manager/types.ts index 28873f548..15a525bae 100644 --- a/cli/tauri.js/src/api/dependency-manager/types.ts +++ b/cli/tauri.js/src/api/dependency-manager/types.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + export enum ManagementType { Install, InstallDev, diff --git a/cli/tauri.js/src/api/dependency-manager/util.ts b/cli/tauri.js/src/api/dependency-manager/util.ts index e3607dc1b..d22e3fd2b 100644 --- a/cli/tauri.js/src/api/dependency-manager/util.ts +++ b/cli/tauri.js/src/api/dependency-manager/util.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import https from 'https' import { IncomingMessage } from 'http' import { spawnSync } from '../../helpers/spawn' diff --git a/cli/tauri.js/src/api/tauricon.ts b/cli/tauri.js/src/api/tauricon.ts index c6d2f80f4..541e05879 100644 --- a/cli/tauri.js/src/api/tauricon.ts +++ b/cli/tauri.js/src/api/tauricon.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + 'use strict' /* eslint-disable @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call */ diff --git a/cli/tauri.js/src/helpers/app-paths.ts b/cli/tauri.js/src/helpers/app-paths.ts index 74e4a007a..f0c6281b8 100644 --- a/cli/tauri.js/src/helpers/app-paths.ts +++ b/cli/tauri.js/src/helpers/app-paths.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { existsSync } from 'fs' import { join, normalize, resolve, sep, isAbsolute } from 'path' import logger from './logger' diff --git a/cli/tauri.js/src/helpers/get-script-version.ts b/cli/tauri.js/src/helpers/get-script-version.ts index 63d7cb65e..85db818a9 100644 --- a/cli/tauri.js/src/helpers/get-script-version.ts +++ b/cli/tauri.js/src/helpers/get-script-version.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { sync as spawn } from 'cross-spawn' export default function getVersion( diff --git a/cli/tauri.js/src/helpers/logger.ts b/cli/tauri.js/src/helpers/logger.ts index f0b6d9c46..0df64b517 100644 --- a/cli/tauri.js/src/helpers/logger.ts +++ b/cli/tauri.js/src/helpers/logger.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import chalk from 'chalk' import ms from 'ms' diff --git a/cli/tauri.js/src/helpers/net.ts b/cli/tauri.js/src/helpers/net.ts index 474927f55..ff55d6b5c 100644 --- a/cli/tauri.js/src/helpers/net.ts +++ b/cli/tauri.js/src/helpers/net.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // forked from https://github.com/quasarframework/quasar/blob/dev/app/lib/helpers/net.js import net from 'net' diff --git a/cli/tauri.js/src/helpers/non-webpack-require.ts b/cli/tauri.js/src/helpers/non-webpack-require.ts index 456a0c5e2..bf698cb51 100644 --- a/cli/tauri.js/src/helpers/non-webpack-require.ts +++ b/cli/tauri.js/src/helpers/non-webpack-require.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // this function has been moved to a module so we can mock it export default (path: string): any => { // eslint-disable-next-line @typescript-eslint/no-unsafe-return diff --git a/cli/tauri.js/src/helpers/rust-cli.ts b/cli/tauri.js/src/helpers/rust-cli.ts index bcbe224ba..390cbc93e 100644 --- a/cli/tauri.js/src/helpers/rust-cli.ts +++ b/cli/tauri.js/src/helpers/rust-cli.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { existsSync } from 'fs' import { resolve, join } from 'path' import { spawnSync, spawn } from './spawn' diff --git a/cli/tauri.js/src/helpers/spawn.ts b/cli/tauri.js/src/helpers/spawn.ts index cbcc7c98c..d55669c4f 100644 --- a/cli/tauri.js/src/helpers/spawn.ts +++ b/cli/tauri.js/src/helpers/spawn.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import crossSpawn from 'cross-spawn' import logger from './logger' import chalk from 'chalk' diff --git a/cli/tauri.js/src/helpers/tauricon.config.ts b/cli/tauri.js/src/helpers/tauricon.config.ts index bebc53e96..4af0f2d95 100644 --- a/cli/tauri.js/src/helpers/tauricon.config.ts +++ b/cli/tauri.js/src/helpers/tauricon.config.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + export const options = { // folder determines in which path to drop the generated file // prefix is the first part of the generated file's name diff --git a/cli/tauri.js/src/types/cargo.ts b/cli/tauri.js/src/types/cargo.ts index 16999fa8e..5f9e7e351 100644 --- a/cli/tauri.js/src/types/cargo.ts +++ b/cli/tauri.js/src/types/cargo.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + export interface CargoManifest { dependencies: { [k: string]: string | CargoManifestDependency } package: { version: string; name: string; 'default-run': string } diff --git a/cli/tauri.js/src/types/config.ts b/cli/tauri.js/src/types/config.ts index 343aea120..9054765e9 100644 --- a/cli/tauri.js/src/types/config.ts +++ b/cli/tauri.js/src/types/config.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + export interface TauriBuildConfig { /** * the path to the app's dist dir diff --git a/cli/tauri.js/src/types/modules.d.ts b/cli/tauri.js/src/types/modules.d.ts index 9f9ca80d4..242d7dc64 100644 --- a/cli/tauri.js/src/types/modules.d.ts +++ b/cli/tauri.js/src/types/modules.d.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + declare module 'imagemin-zopfli' // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars diff --git a/cli/tauri.js/test/jest/fixtures/app-test-setup.js b/cli/tauri.js/test/jest/fixtures/app-test-setup.js index b8fc25be9..e11c8c842 100644 --- a/cli/tauri.js/test/jest/fixtures/app-test-setup.js +++ b/cli/tauri.js/test/jest/fixtures/app-test-setup.js @@ -10,7 +10,7 @@ function mockResolvePath(basePath, dir) { } module.exports.initJest = (mockFixture) => { - jest.setTimeout(720000) + jest.setTimeout(1200000) jest.mock('helpers/non-webpack-require', () => { return (path) => { const value = require('fs').readFileSync(path).toString() diff --git a/cli/tauri.js/test/jest/fixtures/app/package.json b/cli/tauri.js/test/jest/fixtures/app/package.json index dba216389..201e2725a 100644 --- a/cli/tauri.js/test/jest/fixtures/app/package.json +++ b/cli/tauri.js/test/jest/fixtures/app/package.json @@ -14,7 +14,7 @@ "tauri:prod:build": "yarn tauri:prod build" }, "author": "", - "license": "ISC", + "license": "Apache-2.0 OR MIT", "dependencies": { "cors": "^2.8.5", "express": "^4.17.1" diff --git a/cli/tauri.js/test/jest/jest.setup.js b/cli/tauri.js/test/jest/jest.setup.js index ed9bfda46..b9ee4d5b2 100644 --- a/cli/tauri.js/test/jest/jest.setup.js +++ b/cli/tauri.js/test/jest/jest.setup.js @@ -1,4 +1,4 @@ -jest.setTimeout(50000) +jest.setTimeout(1200000) global.Promise = require('promise') diff --git a/core/tauri-api/.license_template b/core/tauri-api/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri-api/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri-api/.scripts/loop_qc.sh b/core/tauri-api/.scripts/loop_qc.sh index 8b62ffef7..e19f5a92b 100644 --- a/core/tauri-api/.scripts/loop_qc.sh +++ b/core/tauri-api/.scripts/loop_qc.sh @@ -1,4 +1,8 @@ #!/bin/bash +# Copyright 2019-2021 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + # Loop all quickcheck tests for tauri-api. while true @@ -7,4 +11,4 @@ do if [[ x$? != x0 ]] ; then exit $? fi -done \ No newline at end of file +done diff --git a/core/tauri-api/Cargo.toml b/core/tauri-api/Cargo.toml index 84deb506b..1fec6a470 100644 --- a/core/tauri-api/Cargo.toml +++ b/core/tauri-api/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "Tensor Programming " ] categories = [ "gui", "os", "filesystem", "web-programming" ] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri" description = "Make tiny, secure apps for all desktop platforms with Tauri" diff --git a/core/tauri-api/src/app.rs b/core/tauri-api/src/app.rs index 35b898d42..566ed8303 100644 --- a/core/tauri-api/src/app.rs +++ b/core/tauri-api/src/app.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ env, path::PathBuf, diff --git a/core/tauri-api/src/cli.rs b/core/tauri-api/src/cli.rs index 005a0fc00..78076d141 100644 --- a/core/tauri-api/src/cli.rs +++ b/core/tauri-api/src/cli.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::config::{CliArg, CliConfig}; use clap::{App, Arg, ArgMatches, ErrorKind}; diff --git a/core/tauri-api/src/cli/macros.rs b/core/tauri-api/src/cli/macros.rs index 0118d3270..74483e3ec 100644 --- a/core/tauri-api/src/cli/macros.rs +++ b/core/tauri-api/src/cli/macros.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + macro_rules! bind_string_arg { ($arg:expr, $clap_arg:expr, $arg_name:ident, $clap_field:ident) => {{ let arg = $arg; diff --git a/core/tauri-api/src/command.rs b/core/tauri-api/src/command.rs index b36cdce99..9296130c6 100644 --- a/core/tauri-api/src/command.rs +++ b/core/tauri-api/src/command.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ io::{BufRead, BufReader, Write}, process::{Command as StdCommand, Stdio}, diff --git a/core/tauri-api/src/dialog.rs b/core/tauri-api/src/dialog.rs index 29b6d99e0..589578810 100644 --- a/core/tauri-api/src/dialog.rs +++ b/core/tauri-api/src/dialog.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::path::{Path, PathBuf}; use rfd::FileDialog; diff --git a/core/tauri-api/src/dir.rs b/core/tauri-api/src/dir.rs index 1c784c44b..c2d29e44f 100644 --- a/core/tauri-api/src/dir.rs +++ b/core/tauri-api/src/dir.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use serde::Serialize; use std::{ fs::{self, metadata}, diff --git a/core/tauri-api/src/error.rs b/core/tauri-api/src/error.rs index 1a6b1c4be..1ee5c39d2 100644 --- a/core/tauri-api/src/error.rs +++ b/core/tauri-api/src/error.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + /// The error types. #[derive(thiserror::Error, Debug)] pub enum Error { diff --git a/core/tauri-api/src/file.rs b/core/tauri-api/src/file.rs index 88d58dc9f..4825a2be2 100644 --- a/core/tauri-api/src/file.rs +++ b/core/tauri-api/src/file.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + mod extract; mod file_move; diff --git a/core/tauri-api/src/file/extract.rs b/core/tauri-api/src/file/extract.rs index 4ad67a3c8..33609de00 100644 --- a/core/tauri-api/src/file/extract.rs +++ b/core/tauri-api/src/file/extract.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use either::{self, Either}; use std::{fs, io, path}; diff --git a/core/tauri-api/src/file/file_move.rs b/core/tauri-api/src/file/file_move.rs index e583f04fe..05555645f 100644 --- a/core/tauri-api/src/file/file_move.rs +++ b/core/tauri-api/src/file/file_move.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use ignore::WalkBuilder; use std::{fs, path}; diff --git a/core/tauri-api/src/http.rs b/core/tauri-api/src/http.rs index 61e2e9677..94b9ff166 100644 --- a/core/tauri-api/src/http.rs +++ b/core/tauri-api/src/http.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use bytes::Bytes; use reqwest::{header::HeaderName, redirect::Policy, Method}; use serde::{Deserialize, Serialize}; diff --git a/core/tauri-api/src/lib.rs b/core/tauri-api/src/lib.rs index 436a079be..826fff2ac 100644 --- a/core/tauri-api/src/lib.rs +++ b/core/tauri-api/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! The Tauri API interface. #![warn(missing_docs, rust_2018_idioms)] diff --git a/core/tauri-api/src/notification.rs b/core/tauri-api/src/notification.rs index 4751868ea..a642cd4f0 100644 --- a/core/tauri-api/src/notification.rs +++ b/core/tauri-api/src/notification.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #[cfg(windows)] use std::path::MAIN_SEPARATOR; diff --git a/core/tauri-api/src/path.rs b/core/tauri-api/src/path.rs index d5fe8e48d..b42fe67fd 100644 --- a/core/tauri-api/src/path.rs +++ b/core/tauri-api/src/path.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ env, path::{Path, PathBuf}, diff --git a/core/tauri-api/src/rpc.rs b/core/tauri-api/src/rpc.rs index 5f56ea869..744dd2d06 100644 --- a/core/tauri-api/src/rpc.rs +++ b/core/tauri-api/src/rpc.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use serde::Serialize; use serde_json::value::RawValue; diff --git a/core/tauri-api/src/shell.rs b/core/tauri-api/src/shell.rs index 34c69d37a..01939eab1 100644 --- a/core/tauri-api/src/shell.rs +++ b/core/tauri-api/src/shell.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + /// Open path or URL with `with`, or system default pub fn open(path: String, with: Option) -> crate::Result<()> { { diff --git a/core/tauri-api/src/shortcuts.rs b/core/tauri-api/src/shortcuts.rs index ac4f161db..67631ce19 100644 --- a/core/tauri-api/src/shortcuts.rs +++ b/core/tauri-api/src/shortcuts.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use tauri_hotkey::{parse_hotkey, HotkeyManager}; /// The shortcut manager builder. diff --git a/core/tauri-api/src/tcp.rs b/core/tauri-api/src/tcp.rs index 41ea1d393..2ed62c382 100644 --- a/core/tauri-api/src/tcp.rs +++ b/core/tauri-api/src/tcp.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::net::TcpListener; use rand::distributions::{Distribution, Uniform}; diff --git a/core/tauri-api/src/version.rs b/core/tauri-api/src/version.rs index d08010c5d..cf590002e 100644 --- a/core/tauri-api/src/version.rs +++ b/core/tauri-api/src/version.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use semver::Version; use std::cmp::Ordering; diff --git a/core/tauri-build/.license_template b/core/tauri-build/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri-build/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 11d096313..21f61ecac 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -3,7 +3,7 @@ name = "tauri-build" version = "0.1.0" authors = [ "Tauri Community" ] categories = [ "gui", "web-programming" ] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-build" description = "build time code to pair with https://crates.io/crates/tauri" diff --git a/core/tauri-build/src/codegen/context.rs b/core/tauri-build/src/codegen/context.rs index 57c85db84..fac5332b4 100644 --- a/core/tauri-build/src/codegen/context.rs +++ b/core/tauri-build/src/codegen/context.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use anyhow::{Context, Result}; use std::{ env::var, diff --git a/core/tauri-build/src/codegen/mod.rs b/core/tauri-build/src/codegen/mod.rs index e3c01fd8b..6fa87bc23 100644 --- a/core/tauri-build/src/codegen/mod.rs +++ b/core/tauri-build/src/codegen/mod.rs @@ -1 +1,5 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + pub(crate) mod context; diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 91d00766a..4ff1aa607 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #![cfg_attr(doc_cfg, feature(doc_cfg))] pub use anyhow::Result; diff --git a/core/tauri-codegen/.license_template b/core/tauri-codegen/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri-codegen/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri-codegen/Cargo.toml b/core/tauri-codegen/Cargo.toml index 6dedad9d8..abd443c5c 100644 --- a/core/tauri-codegen/Cargo.toml +++ b/core/tauri-codegen/Cargo.toml @@ -3,7 +3,7 @@ name = "tauri-codegen" version = "0.1.0" authors = [ "Tauri Community" ] categories = [ "gui", "web-programming" ] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen" description = "code generation meant to be consumed inside of `tauri` through `tauri-build` or `tauri-macros`" diff --git a/core/tauri-codegen/src/context.rs b/core/tauri-codegen/src/context.rs index d1341ef22..70f47a3d4 100644 --- a/core/tauri-codegen/src/context.rs +++ b/core/tauri-codegen/src/context.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::embedded_assets::{EmbeddedAssets, EmbeddedAssetsError}; use proc_macro2::TokenStream; use quote::quote; diff --git a/core/tauri-codegen/src/embedded_assets.rs b/core/tauri-codegen/src/embedded_assets.rs index 3ebd6302a..5f41522f2 100644 --- a/core/tauri-codegen/src/embedded_assets.rs +++ b/core/tauri-codegen/src/embedded_assets.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use proc_macro2::TokenStream; use quote::{quote, ToTokens, TokenStreamExt}; use std::{ diff --git a/core/tauri-codegen/src/lib.rs b/core/tauri-codegen/src/lib.rs index 6732865ba..c9779f01b 100644 --- a/core/tauri-codegen/src/lib.rs +++ b/core/tauri-codegen/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + pub use context::{context_codegen, ContextData}; use std::{ borrow::Cow, diff --git a/core/tauri-macros/.license_template b/core/tauri-macros/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri-macros/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri-macros/Cargo.toml b/core/tauri-macros/Cargo.toml index e4de8f0b1..eac9473ac 100644 --- a/core/tauri-macros/Cargo.toml +++ b/core/tauri-macros/Cargo.toml @@ -3,7 +3,7 @@ name = "tauri-macros" version = "0.1.0" authors = [ "Tauri Community" ] categories = [ "gui", "os", "filesystem", "web-programming" ] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri" description = "Macros for the tauri crate." diff --git a/core/tauri-macros/src/command.rs b/core/tauri-macros/src/command.rs index aefde244b..de80346b4 100644 --- a/core/tauri-macros/src/command.rs +++ b/core/tauri-macros/src/command.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use proc_macro2::TokenStream; use quote::{format_ident, quote}; use syn::{ diff --git a/core/tauri-macros/src/context/mod.rs b/core/tauri-macros/src/context/mod.rs index c8d138e7f..752e77d21 100644 --- a/core/tauri-macros/src/context/mod.rs +++ b/core/tauri-macros/src/context/mod.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use proc_macro2::{Ident, Span, TokenStream}; use quote::{quote, ToTokens}; use std::{env::VarError, path::PathBuf}; diff --git a/core/tauri-macros/src/lib.rs b/core/tauri-macros/src/lib.rs index 6ab40bf14..122da6cdc 100644 --- a/core/tauri-macros/src/lib.rs +++ b/core/tauri-macros/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + extern crate proc_macro; use crate::context::ContextItems; use proc_macro::TokenStream; diff --git a/core/tauri-updater/.license_template b/core/tauri-updater/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri-updater/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri-updater/Cargo.toml b/core/tauri-updater/Cargo.toml index d69e927f5..4afc69d48 100644 --- a/core/tauri-updater/Cargo.toml +++ b/core/tauri-updater/Cargo.toml @@ -2,7 +2,7 @@ name = "tauri-updater" version = "0.4.2" authors = ["Lucas Fernandes Gonçalves Nogueira ", "Daniel Thompson-Yvetot ", "Tensor Programming ", "David Lemarier "] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri" description = "Updater for Tauri" diff --git a/core/tauri-updater/src/error.rs b/core/tauri-updater/src/error.rs index e7ec8b101..28fc1455a 100644 --- a/core/tauri-updater/src/error.rs +++ b/core/tauri-updater/src/error.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use thiserror::Error as DeriveError; #[derive(Debug, DeriveError)] diff --git a/core/tauri-updater/src/lib.rs b/core/tauri-updater/src/lib.rs index a91119adb..d942975c8 100644 --- a/core/tauri-updater/src/lib.rs +++ b/core/tauri-updater/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #[macro_use] pub mod error; use base64::decode; diff --git a/core/tauri-utils/.license_template b/core/tauri-utils/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri-utils/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index a194ac00b..1245b5c96 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -2,7 +2,7 @@ name = "tauri-utils" version = "0.5.1" authors = ["Lucas Fernandes Gonçalves Nogueira ", "Daniel Thompson-Yvetot ", "Tensor Programming "] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri" description = "Utilities for Tauri" diff --git a/core/tauri-utils/src/assets.rs b/core/tauri-utils/src/assets.rs index af9ca93a6..d4f9535b3 100644 --- a/core/tauri-utils/src/assets.rs +++ b/core/tauri-utils/src/assets.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! Assets handled by Tauri during compile time and runtime. pub use phf; diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 0425578d8..7566d2388 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{collections::HashMap, path::PathBuf}; use serde::Deserialize; diff --git a/core/tauri-utils/src/lib.rs b/core/tauri-utils/src/lib.rs index d360301fd..84778e07f 100644 --- a/core/tauri-utils/src/lib.rs +++ b/core/tauri-utils/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! Tauri utility helpers #![warn(missing_docs, rust_2018_idioms)] diff --git a/core/tauri-utils/src/platform.rs b/core/tauri-utils/src/platform.rs index 8afdc34f4..d8844d38c 100644 --- a/core/tauri-utils/src/platform.rs +++ b/core/tauri-utils/src/platform.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::{ env, path::{PathBuf, MAIN_SEPARATOR}, diff --git a/core/tauri-utils/src/process.rs b/core/tauri-utils/src/process.rs index a9ffedc99..10f22d728 100644 --- a/core/tauri-utils/src/process.rs +++ b/core/tauri-utils/src/process.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::Error; pub use sysinfo::{Process, ProcessExt, Signal, System, SystemExt}; diff --git a/core/tauri/.license_template b/core/tauri/.license_template new file mode 100644 index 000000000..6641e11a1 --- /dev/null +++ b/core/tauri/.license_template @@ -0,0 +1 @@ +../../.license_template \ No newline at end of file diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 222b58a0f..2aed0e147 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -7,7 +7,7 @@ authors = [ "Tensor Programming " ] categories = [ "gui", "web-programming" ] -license = "MIT" +license = "Apache-2.0 OR MIT" homepage = "https://tauri.studio" repository = "https://github.com/tauri-apps/tauri" description = "Make tiny, secure apps for all desktop platforms with Tauri" diff --git a/core/tauri/build.rs b/core/tauri/build.rs index 3818004b5..280766318 100644 --- a/core/tauri/build.rs +++ b/core/tauri/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use cfg_aliases::cfg_aliases; fn main() { diff --git a/core/tauri/scripts/bundle.js b/core/tauri/scripts/bundle.js index 0c74e8714..d6f6748a3 100644 --- a/core/tauri/scripts/bundle.js +++ b/core/tauri/scripts/bundle.js @@ -1 +1 @@ -function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_setPrototypeOf(e,r)}function _setPrototypeOf(e,r){return(_setPrototypeOf=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function _createSuper(e){var r=_isNativeReflectConstruct();return function(){var t,n=_getPrototypeOf(e);if(r){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return _possibleConstructorReturn(this,t)}}function _possibleConstructorReturn(e,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?_assertThisInitialized(e):r}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,i=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return u=e.done,e},e:function(e){i=!0,o=e},f:function(){try{u||null==t.return||t.return()}finally{if(i)throw o}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=0;--o){var u=this.tryEntries[o],i=u.completion;if("root"===u.tryLoc)return a("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--t){var a=this.tryEntries[t];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),O(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var a=n.arg;O(t)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),d}},e}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}function t(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]&&arguments[1],a=n();return Object.defineProperty(window,a,{value:function(n){return r&&Reflect.deleteProperty(window,a),t([e,"optionalCall",function(e){return e(n)}])},writable:!1,configurable:!0}),a}function o(e){return u.apply(this,arguments)}function u(){return(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",new Promise((function(e,n){var o=a((function(r){e(r),Reflect.deleteProperty(window,u)}),!0),u=a((function(e){n(e),Reflect.deleteProperty(window,o)}),!0);window.rpc.notify(r,_objectSpread({callback:o,error:u},t))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var i=Object.freeze({__proto__:null,transformCallback:a,invoke:o});function c(e){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o("tauri",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(){return(p=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"getAppVersion"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(){return(l=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"getAppName"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(){return(f=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"getTauriVersion"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:0,e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"exit",exitCode:r}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"relaunch"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var d=Object.freeze({__proto__:null,getName:function(){return l.apply(this,arguments)},getVersion:function(){return p.apply(this,arguments)},getTauriVersion:function(){return f.apply(this,arguments)},relaunch:function(){return m.apply(this,arguments)},exit:function(){return h.apply(this,arguments)}});function y(){return(y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Cli",message:{cmd:"cliMatches"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _=Object.freeze({__proto__:null,getMatches:function(){return y.apply(this,arguments)}});function g(){return(g=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(){return(v=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var w=Object.freeze({__proto__:null,open:function(){return g.apply(this,arguments)},save:function(){return v.apply(this,arguments)}});function b(e,r){return R.apply(this,arguments)}function R(){return(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"listen",event:r,handler:a(t)}}).then((function(e){return _asyncToGenerator(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",k(e));case 1:case"end":return r.stop()}}),r)})))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e){return x.apply(this,arguments)}function x(){return(x=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"unlisten",eventId:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e,r){return G.apply(this,arguments)}function G(){return(G=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",b(r,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e,r){return P.apply(this,arguments)}function P(){return(P=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",b(r,(function(e){t(e),k(e.id).catch((function(){}))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,r,t){return j.apply(this,arguments)}function j(){return(j=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c({__tauriModule:"Event",message:{cmd:"emit",event:r,windowLabel:t,payload:n}});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",M(r,void 0,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var F=Object.freeze({__proto__:null,emit:function(e,r){return C.apply(this,arguments)},listen:T,once:O});function A(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readTextFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(){return(W=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(){return(I=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=n.length>1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:r.contents,options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!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.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.Current=19]="Current"}(E||(E={}));var N=65536;function H(e){var r=function(e){if(e.length1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:r.path,contents:H(r.contents),options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(){return(U=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"createDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return(V=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"copyFile",source:r,destination:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(){return(J=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:r,newPath:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var X=Object.freeze({__proto__:null,get BaseDirectory(){return E},get Dir(){return E},readTextFile:function(e){return z.apply(this,arguments)},readBinaryFile:function(e){return W.apply(this,arguments)},writeFile:function(e){return I.apply(this,arguments)},writeBinaryFile:function(e){return B.apply(this,arguments)},readDir:function(e){return U.apply(this,arguments)},createDir:function(e){return q.apply(this,arguments)},removeDir:function(e){return V.apply(this,arguments)},copyFile:function(e,r){return Y.apply(this,arguments)},removeFile:function(e){return J.apply(this,arguments)},renameFile:function(e,r){return K.apply(this,arguments)}});function $(){return($=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.App}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(){return(Q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Audio}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(){return(Z=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Cache}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Config}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return(re=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Data}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(){return(te=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Desktop}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Document}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return(ae=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Download}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Executable}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(){return(ue=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Font}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(){return(ie=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Home}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ce(){return(ce=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.LocalData}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){return(se=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Picture}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(){return(pe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Public}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(){return(le=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Resource}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(){return(fe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Runtime}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(){return(he=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Template}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function me(){return(me=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Video}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(){return(de=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Current}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ye(){return(ye=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:r,directory:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _e,ge=Object.freeze({__proto__:null,appDir:function(){return $.apply(this,arguments)},audioDir:function(){return Q.apply(this,arguments)},cacheDir:function(){return Z.apply(this,arguments)},configDir:function(){return ee.apply(this,arguments)},dataDir:function(){return re.apply(this,arguments)},desktopDir:function(){return te.apply(this,arguments)},documentDir:function(){return ne.apply(this,arguments)},downloadDir:function(){return ae.apply(this,arguments)},executableDir:function(){return oe.apply(this,arguments)},fontDir:function(){return ue.apply(this,arguments)},homeDir:function(){return ie.apply(this,arguments)},localDataDir:function(){return ce.apply(this,arguments)},pictureDir:function(){return se.apply(this,arguments)},publicDir:function(){return pe.apply(this,arguments)},resourceDir:function(){return le.apply(this,arguments)},runtimeDir:function(){return fe.apply(this,arguments)},templateDir:function(){return he.apply(this,arguments)},videoDir:function(){return me.apply(this,arguments)},currentDir:function(){return de.apply(this,arguments)},resolvePath:function(e,r){return ye.apply(this,arguments)}});function ve(e,r){return null!=e?e:r()}function we(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]?arguments[1]:[];return _classCallCheck(this,a),r=n.call(this),a.prototype.__init2.call(_assertThisInitialized(r)),a.prototype.__init3.call(_assertThisInitialized(r)),a.prototype.__init4.call(_assertThisInitialized(r)),a.prototype.__init5.call(_assertThisInitialized(r)),r.program=e,r.args="string"==typeof t?[t]:t,r}return _createClass(a,[{key:"__init2",value:function(){this.sidecar=!1}},{key:"__init3",value:function(){this.stdout=new je}},{key:"__init4",value:function(){this.stderr=new je}},{key:"__init5",value:function(){this.pid=null}},{key:"spawn",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Pe(this.program,this.sidecar,(function(e){switch(e.event){case"Error":r._emit("error",e.payload);break;case"Terminated":r._emit("close",e.payload);break;case"Stdout":r.stdout._emit("data",e.payload);break;case"Stderr":r.stderr._emit("data",e.payload)}}),this.args).then((function(e){return new Ce(e)})));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"execute",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,t){r.on("error",t);var n=[],a=[];r.stdout.on("data",(function(e){n.push(e)})),r.stderr.on("data",(function(e){a.push(e)})),r.on("close",(function(r){e({code:r.code,signal:r.signal,stdout:n.join("\n"),stderr:a.join("\n")})})),r.spawn().catch(t)})));case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}],[{key:"sidecar",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new a(e,r);return t.sidecar=!0,t}}]),a}(je);function Ae(){return(Ae=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Shell",message:{cmd:"open",path:r,with:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var De=Object.freeze({__proto__:null,Command:Fe,Child:Ce,open:function(e,r){return Ae.apply(this,arguments)}});function Se(){return window.__TAURI__.__windows}var Ee=["tauri://created","tauri://error"],Le=function(){function e(r){_classCallCheck(this,e),this.label=r,this.listeners=Object.create(null)}var r,t,n;return _createClass(e,[{key:"listen",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._handleTauriEvent(r,t)){e.next=2;break}return e.abrupt("return",Promise.resolve((function(){var e=n.listeners[r];e.splice(e.indexOf(t),1)})));case 2:return e.abrupt("return",T(r,t));case 3:case"end":return e.stop()}}),e,this)}))),function(e,r){return n.apply(this,arguments)})},{key:"once",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._handleTauriEvent(r,t)){e.next=2;break}return e.abrupt("return",Promise.resolve((function(){var e=n.listeners[r];e.splice(e.indexOf(t),1)})));case 2:return e.abrupt("return",O(r,t));case 3:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"emit",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ee.includes(r)){e.next=4;break}n=_createForOfIteratorHelper(this.listeners[r]||[]);try{for(n.s();!(a=n.n()).done;)(0,a.value)({event:r,id:-1,payload:t})}catch(e){n.e(e)}finally{n.f()}return e.abrupt("return",Promise.resolve());case 4:return e.abrupt("return",M(r,this.label,t));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_handleTauriEvent",value:function(e,r){return!!Ee.includes(e)&&(e in this.listeners?this.listeners[e].push(r):this.listeners[e]=[r],!0)}}]),e}(),ze=function(e){_inherits(t,e);var r=_createSuper(t);function t(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,t),n=r.call(this,e),c({__tauriModule:"Window",message:{cmd:"createWebview",options:_objectSpread({label:e},a)}}).then(_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://created"));case 1:case"end":return e.stop()}}),e)})))).catch(function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://error",r));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),n}return _createClass(t,null,[{key:"getByLabel",value:function(e){return Se().some((function(r){return r.label===e}))?new Le(e):null}}]),t}(Le),We=new(function(){function e(){_classCallCheck(this,e)}var r,t,n,a,o,u,i,s,p,l,f,h,m,d,y,_,g,v,w,b,R;return _createClass(e,[{key:"setResizable",value:(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setResizable",resizable:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return R.apply(this,arguments)})},{key:"setTitle",value:(b=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setTitle",title:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"maximize",value:(w=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"maximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return w.apply(this,arguments)})},{key:"unmaximize",value:(v=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unmaximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return v.apply(this,arguments)})},{key:"minimize",value:(g=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"minimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return g.apply(this,arguments)})},{key:"unminimize",value:(_=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unminimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return _.apply(this,arguments)})},{key:"show",value:(y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"show"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return y.apply(this,arguments)})},{key:"hide",value:(d=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"hide"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return d.apply(this,arguments)})},{key:"close",value:(m=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"close"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return m.apply(this,arguments)})},{key:"setDecorations",value:(h=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setDecorations",decorations:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)})},{key:"setAlwaysOnTop",value:(f=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setAlwaysOnTop",alwaysOnTop:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"setWidth",value:(l=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setWidth",width:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"setHeight",value:(p=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setHeight",height:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)})},{key:"resize",value:(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"resize",width:r,height:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return s.apply(this,arguments)})},{key:"setMinSize",value:(i=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMinSize",minWidth:r,minHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return i.apply(this,arguments)})},{key:"setMaxSize",value:(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMaxSize",maxWidth:r,maxHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return u.apply(this,arguments)})},{key:"setX",value:(o=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setX",x:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"setY",value:(a=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setY",y:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"setPosition",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setPosition",x:r,y:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return n.apply(this,arguments)})},{key:"setFullscreen",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setFullscreen",fullscreen:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"setIcon",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setIcon",icon:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})}]),e}()),Ie=Object.freeze({__proto__:null,WebviewWindow:ze,getCurrent:function(){return new Le(window.__TAURI__.__currentWindow.label)},getAll:Se,appWindow:We});function Ne(){return(Ne=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("default"===window.Notification.permission){e.next=2;break}return e.abrupt("return",Promise.resolve("granted"===window.Notification.permission));case 2:return e.abrupt("return",c({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(){return(He=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.Notification.requestPermission());case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Be=Object.freeze({__proto__:null,sendNotification:function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},requestPermission:function(){return He.apply(this,arguments)},isPermissionGranted:function(){return Ne.apply(this,arguments)}});function Ue(){return(Ue=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:r,handler:a(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(){return(qe=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:r,handler:a(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ve(){return(Ve=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(){return(Ye=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Je(){return(Je=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ke=Object.freeze({__proto__:null,register:function(e,r){return Ue.apply(this,arguments)},registerAll:function(e,r){return qe.apply(this,arguments)},isRegistered:function(e){return Ve.apply(this,arguments)},unregister:function(e){return Ye.apply(this,arguments)},unregisterAll:function(){return Je.apply(this,arguments)}});e.app=d,e.cli=_,e.dialog=w,e.event=F,e.fs=X,e.globalShortcut=Ke,e.http=Oe,e.notification=Be,e.path=ge,e.shell=De,e.tauri=i,e.updater=L,e.window=Ie,Object.defineProperty(e,"__esModule",{value:!0})})); +/* SPDX-License-Identifier: Apache-2.0 OR MIT */function _inherits(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_setPrototypeOf(e,r)}function _setPrototypeOf(e,r){return(_setPrototypeOf=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function _createSuper(e){var r=_isNativeReflectConstruct();return function(){var t,n=_getPrototypeOf(e);if(r){var a=_getPrototypeOf(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return _possibleConstructorReturn(this,t)}}function _possibleConstructorReturn(e,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?_assertThisInitialized(e):r}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,i=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return u=e.done,e},e:function(e){i=!0,o=e},f:function(){try{u||null==t.return||t.return()}finally{if(i)throw o}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=0;--o){var u=this.tryEntries[o],i=u.completion;if("root"===u.tryLoc)return a("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev=0;--t){var a=this.tryEntries[t];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--r){var t=this.tryEntries[r];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),O(t),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var t=this.tryEntries[r];if(t.tryLoc===e){var n=t.completion;if("throw"===n.type){var a=n.arg;O(t)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),d}},e}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}function t(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]&&arguments[1],a=n();return Object.defineProperty(window,a,{value:function(n){return r&&Reflect.deleteProperty(window,a),t([e,"optionalCall",function(e){return e(n)}])},writable:!1,configurable:!0}),a}function o(e){return u.apply(this,arguments)}function u(){return(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",new Promise((function(e,n){var o=a((function(r){e(r),Reflect.deleteProperty(window,u)}),!0),u=a((function(e){n(e),Reflect.deleteProperty(window,o)}),!0);window.rpc.notify(r,_objectSpread({callback:o,error:u},t))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var i=Object.freeze({__proto__:null,transformCallback:a,invoke:o});function c(e){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",o("tauri",r));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(){return(p=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"getAppVersion"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(){return(l=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"getAppName"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(){return(f=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"getTauriVersion"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:0,e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"exit",exitCode:r}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"App",mainThread:!0,message:{cmd:"relaunch"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var d=Object.freeze({__proto__:null,getName:function(){return l.apply(this,arguments)},getVersion:function(){return p.apply(this,arguments)},getTauriVersion:function(){return f.apply(this,arguments)},relaunch:function(){return m.apply(this,arguments)},exit:function(){return h.apply(this,arguments)}});function y(){return(y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Cli",message:{cmd:"cliMatches"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _=Object.freeze({__proto__:null,getMatches:function(){return y.apply(this,arguments)}});function g(){return(g=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"openDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(){return(v=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r,t=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=t.length>0&&void 0!==t[0]?t[0]:{})&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Dialog",mainThread:!0,message:{cmd:"saveDialog",options:r}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var w=Object.freeze({__proto__:null,open:function(){return g.apply(this,arguments)},save:function(){return v.apply(this,arguments)}});function b(e,r){return R.apply(this,arguments)}function R(){return(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"listen",event:r,handler:a(t)}}).then((function(e){return _asyncToGenerator(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",k(e));case 1:case"end":return r.stop()}}),r)})))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e){return x.apply(this,arguments)}function x(){return(x=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Event",message:{cmd:"unlisten",eventId:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e,r){return G.apply(this,arguments)}function G(){return(G=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",b(r,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e,r){return P.apply(this,arguments)}function P(){return(P=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",b(r,(function(e){t(e),k(e.id).catch((function(){}))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,r,t){return j.apply(this,arguments)}function j(){return(j=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c({__tauriModule:"Event",message:{cmd:"emit",event:r,windowLabel:t,payload:n}});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",M(r,void 0,t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var F=Object.freeze({__proto__:null,emit:function(e,r){return C.apply(this,arguments)},listen:T,once:O});function A(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readTextFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(){return(W=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(){return(I=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=n.length>1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeFile",path:r.path,contents:r.contents,options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!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.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.Current=19]="Current"}(E||(E={}));var N=65536;function H(e){var r=function(e){if(e.length1&&void 0!==n[1]?n[1]:{})&&Object.freeze(t),"object"===_typeof(r)&&Object.freeze(r),e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:r.path,contents:H(r.contents),options:t}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(){return(U=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"readDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"createDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return(V=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeDir",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"copyFile",source:r,destination:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(){return(J=_asyncToGenerator(regeneratorRuntime.mark((function e(r){var t,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>1&&void 0!==n[1]?n[1]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"removeFile",path:r,options:t}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>2&&void 0!==a[2]?a[2]:{},e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:r,newPath:t,options:n}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var X=Object.freeze({__proto__:null,get BaseDirectory(){return E},get Dir(){return E},readTextFile:function(e){return z.apply(this,arguments)},readBinaryFile:function(e){return W.apply(this,arguments)},writeFile:function(e){return I.apply(this,arguments)},writeBinaryFile:function(e){return B.apply(this,arguments)},readDir:function(e){return U.apply(this,arguments)},createDir:function(e){return q.apply(this,arguments)},removeDir:function(e){return V.apply(this,arguments)},copyFile:function(e,r){return Y.apply(this,arguments)},removeFile:function(e){return J.apply(this,arguments)},renameFile:function(e,r){return K.apply(this,arguments)}});function $(){return($=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.App}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(){return(Q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Audio}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(){return(Z=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Cache}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Config}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return(re=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Data}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(){return(te=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Desktop}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Document}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return(ae=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Download}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Executable}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(){return(ue=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Font}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(){return(ie=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Home}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ce(){return(ce=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.LocalData}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){return(se=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Picture}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(){return(pe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Public}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(){return(le=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Resource}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(){return(fe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Runtime}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(){return(he=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Template}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function me(){return(me=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Video}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(){return(de=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:"",directory:E.Current}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ye(){return(ye=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Fs",message:{cmd:"resolvePath",path:r,directory:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _e,ge=Object.freeze({__proto__:null,appDir:function(){return $.apply(this,arguments)},audioDir:function(){return Q.apply(this,arguments)},cacheDir:function(){return Z.apply(this,arguments)},configDir:function(){return ee.apply(this,arguments)},dataDir:function(){return re.apply(this,arguments)},desktopDir:function(){return te.apply(this,arguments)},documentDir:function(){return ne.apply(this,arguments)},downloadDir:function(){return ae.apply(this,arguments)},executableDir:function(){return oe.apply(this,arguments)},fontDir:function(){return ue.apply(this,arguments)},homeDir:function(){return ie.apply(this,arguments)},localDataDir:function(){return ce.apply(this,arguments)},pictureDir:function(){return se.apply(this,arguments)},publicDir:function(){return pe.apply(this,arguments)},resourceDir:function(){return le.apply(this,arguments)},runtimeDir:function(){return fe.apply(this,arguments)},templateDir:function(){return he.apply(this,arguments)},videoDir:function(){return me.apply(this,arguments)},currentDir:function(){return de.apply(this,arguments)},resolvePath:function(e,r){return ye.apply(this,arguments)}});function ve(e,r){return null!=e?e:r()}function we(e){for(var r=void 0,t=e[0],n=1;n1&&void 0!==arguments[1]?arguments[1]:[];return _classCallCheck(this,a),r=n.call(this),a.prototype.__init2.call(_assertThisInitialized(r)),a.prototype.__init3.call(_assertThisInitialized(r)),a.prototype.__init4.call(_assertThisInitialized(r)),a.prototype.__init5.call(_assertThisInitialized(r)),r.program=e,r.args="string"==typeof t?[t]:t,r}return _createClass(a,[{key:"__init2",value:function(){this.sidecar=!1}},{key:"__init3",value:function(){this.stdout=new je}},{key:"__init4",value:function(){this.stderr=new je}},{key:"__init5",value:function(){this.pid=null}},{key:"spawn",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Pe(this.program,this.sidecar,(function(e){switch(e.event){case"Error":r._emit("error",e.payload);break;case"Terminated":r._emit("close",e.payload);break;case"Stdout":r.stdout._emit("data",e.payload);break;case"Stderr":r.stderr._emit("data",e.payload)}}),this.args).then((function(e){return new Ce(e)})));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"execute",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,t){r.on("error",t);var n=[],a=[];r.stdout.on("data",(function(e){n.push(e)})),r.stderr.on("data",(function(e){a.push(e)})),r.on("close",(function(r){e({code:r.code,signal:r.signal,stdout:n.join("\n"),stderr:a.join("\n")})})),r.spawn().catch(t)})));case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})}],[{key:"sidecar",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new a(e,r);return t.sidecar=!0,t}}]),a}(je);function Ae(){return(Ae=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Shell",message:{cmd:"open",path:r,with:t}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var De=Object.freeze({__proto__:null,Command:Fe,Child:Ce,open:function(e,r){return Ae.apply(this,arguments)}});function Se(){return window.__TAURI__.__windows}var Ee=["tauri://created","tauri://error"],Le=function(){function e(r){_classCallCheck(this,e),this.label=r,this.listeners=Object.create(null)}var r,t,n;return _createClass(e,[{key:"listen",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._handleTauriEvent(r,t)){e.next=2;break}return e.abrupt("return",Promise.resolve((function(){var e=n.listeners[r];e.splice(e.indexOf(t),1)})));case 2:return e.abrupt("return",T(r,t));case 3:case"end":return e.stop()}}),e,this)}))),function(e,r){return n.apply(this,arguments)})},{key:"once",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._handleTauriEvent(r,t)){e.next=2;break}return e.abrupt("return",Promise.resolve((function(){var e=n.listeners[r];e.splice(e.indexOf(t),1)})));case 2:return e.abrupt("return",O(r,t));case 3:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"emit",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ee.includes(r)){e.next=4;break}n=_createForOfIteratorHelper(this.listeners[r]||[]);try{for(n.s();!(a=n.n()).done;)(0,a.value)({event:r,id:-1,payload:t})}catch(e){n.e(e)}finally{n.f()}return e.abrupt("return",Promise.resolve());case 4:return e.abrupt("return",M(r,this.label,t));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_handleTauriEvent",value:function(e,r){return!!Ee.includes(e)&&(e in this.listeners?this.listeners[e].push(r):this.listeners[e]=[r],!0)}}]),e}(),ze=function(e){_inherits(t,e);var r=_createSuper(t);function t(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,t),n=r.call(this,e),c({__tauriModule:"Window",message:{cmd:"createWebview",options:_objectSpread({label:e},a)}}).then(_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://created"));case 1:case"end":return e.stop()}}),e)})))).catch(function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.emit("tauri://error",r));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),n}return _createClass(t,null,[{key:"getByLabel",value:function(e){return Se().some((function(r){return r.label===e}))?new Le(e):null}}]),t}(Le),We=new(function(){function e(){_classCallCheck(this,e)}var r,t,n,a,o,u,i,s,p,l,f,h,m,d,y,_,g,v,w,b,R;return _createClass(e,[{key:"setResizable",value:(R=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setResizable",resizable:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return R.apply(this,arguments)})},{key:"setTitle",value:(b=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setTitle",title:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"maximize",value:(w=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"maximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return w.apply(this,arguments)})},{key:"unmaximize",value:(v=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unmaximize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return v.apply(this,arguments)})},{key:"minimize",value:(g=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"minimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return g.apply(this,arguments)})},{key:"unminimize",value:(_=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"unminimize"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return _.apply(this,arguments)})},{key:"show",value:(y=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"show"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return y.apply(this,arguments)})},{key:"hide",value:(d=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"hide"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return d.apply(this,arguments)})},{key:"close",value:(m=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"close"}}));case 1:case"end":return e.stop()}}),e)}))),function(){return m.apply(this,arguments)})},{key:"setDecorations",value:(h=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setDecorations",decorations:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)})},{key:"setAlwaysOnTop",value:(f=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setAlwaysOnTop",alwaysOnTop:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"setWidth",value:(l=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setWidth",width:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"setHeight",value:(p=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setHeight",height:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)})},{key:"resize",value:(s=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"resize",width:r,height:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return s.apply(this,arguments)})},{key:"setMinSize",value:(i=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMinSize",minWidth:r,minHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return i.apply(this,arguments)})},{key:"setMaxSize",value:(u=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setMaxSize",maxWidth:r,maxHeight:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return u.apply(this,arguments)})},{key:"setX",value:(o=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setX",x:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"setY",value:(a=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setY",y:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"setPosition",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setPosition",x:r,y:t}}));case 1:case"end":return e.stop()}}),e)}))),function(e,r){return n.apply(this,arguments)})},{key:"setFullscreen",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setFullscreen",fullscreen:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"setIcon",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"Window",message:{cmd:"setIcon",icon:r}}));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})}]),e}()),Ie=Object.freeze({__proto__:null,WebviewWindow:ze,getCurrent:function(){return new Le(window.__TAURI__.__currentWindow.label)},getAll:Se,appWindow:We});function Ne(){return(Ne=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("default"===window.Notification.permission){e.next=2;break}return e.abrupt("return",Promise.resolve("granted"===window.Notification.permission));case 2:return e.abrupt("return",c({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function He(){return(He=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.Notification.requestPermission());case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Be=Object.freeze({__proto__:null,sendNotification:function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},requestPermission:function(){return He.apply(this,arguments)},isPermissionGranted:function(){return Ne.apply(this,arguments)}});function Ue(){return(Ue=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:r,handler:a(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(){return(qe=_asyncToGenerator(regeneratorRuntime.mark((function e(r,t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:r,handler:a(t)}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ve(){return(Ve=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ye(){return(Ye=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Je(){return(Je=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ke=Object.freeze({__proto__:null,register:function(e,r){return Ue.apply(this,arguments)},registerAll:function(e,r){return qe.apply(this,arguments)},isRegistered:function(e){return Ve.apply(this,arguments)},unregister:function(e){return Ye.apply(this,arguments)},unregisterAll:function(){return Je.apply(this,arguments)}});e.app=d,e.cli=_,e.dialog=w,e.event=F,e.fs=X,e.globalShortcut=Ke,e.http=Oe,e.notification=Be,e.path=ge,e.shell=De,e.tauri=i,e.updater=L,e.window=Ie,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index 4b5f2358e..ad16cd915 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + // polyfills if (!String.prototype.startsWith) { String.prototype.startsWith = function (searchString, position) { diff --git a/core/tauri/src/endpoints.rs b/core/tauri/src/endpoints.rs index 07b06cb6e..ca5e7457f 100644 --- a/core/tauri/src/endpoints.rs +++ b/core/tauri/src/endpoints.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::{config::Config, PackageInfo}, hooks::InvokeMessage, diff --git a/core/tauri/src/endpoints/app.rs b/core/tauri/src/endpoints/app.rs index d5daaff6e..7f7fb37d7 100644 --- a/core/tauri/src/endpoints/app.rs +++ b/core/tauri/src/endpoints/app.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use std::process::exit; use super::InvokeResponse; diff --git a/core/tauri/src/endpoints/cli.rs b/core/tauri/src/endpoints/cli.rs index 82b1d46df..40c89a958 100644 --- a/core/tauri/src/endpoints/cli.rs +++ b/core/tauri/src/endpoints/cli.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; use crate::api::config::CliConfig; use serde::Deserialize; diff --git a/core/tauri/src/endpoints/dialog.rs b/core/tauri/src/endpoints/dialog.rs index edc9d7956..617422cfb 100644 --- a/core/tauri/src/endpoints/dialog.rs +++ b/core/tauri/src/endpoints/dialog.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; #[cfg(any(dialog_open, dialog_save))] use crate::api::dialog::FileDialogBuilder; diff --git a/core/tauri/src/endpoints/event.rs b/core/tauri/src/endpoints/event.rs index 62d9b73da..4afab8e7a 100644 --- a/core/tauri/src/endpoints/event.rs +++ b/core/tauri/src/endpoints/event.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ endpoints::InvokeResponse, runtime::{sealed::ManagerPrivate, window::Window, Manager, Params}, diff --git a/core/tauri/src/endpoints/file_system.rs b/core/tauri/src/endpoints/file_system.rs index b6e0b83bb..4b7ff884d 100644 --- a/core/tauri/src/endpoints/file_system.rs +++ b/core/tauri/src/endpoints/file_system.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; use crate::api::path::BaseDirectory; diff --git a/core/tauri/src/endpoints/global_shortcut.rs b/core/tauri/src/endpoints/global_shortcut.rs index ecca00cc6..c9803493f 100644 --- a/core/tauri/src/endpoints/global_shortcut.rs +++ b/core/tauri/src/endpoints/global_shortcut.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; use crate::runtime::{window::Window, Dispatch, Params}; use once_cell::sync::Lazy; diff --git a/core/tauri/src/endpoints/http.rs b/core/tauri/src/endpoints/http.rs index 8387e1ccc..531798d37 100644 --- a/core/tauri/src/endpoints/http.rs +++ b/core/tauri/src/endpoints/http.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; use once_cell::sync::Lazy; diff --git a/core/tauri/src/endpoints/internal.rs b/core/tauri/src/endpoints/internal.rs index 21d09c42e..872f75ee3 100644 --- a/core/tauri/src/endpoints/internal.rs +++ b/core/tauri/src/endpoints/internal.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; use crate::{runtime::window::Window, Params}; use serde::Deserialize; diff --git a/core/tauri/src/endpoints/notification.rs b/core/tauri/src/endpoints/notification.rs index afdd767e8..f1a96fa60 100644 --- a/core/tauri/src/endpoints/notification.rs +++ b/core/tauri/src/endpoints/notification.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use super::InvokeResponse; use serde::Deserialize; #[cfg(notification_all)] diff --git a/core/tauri/src/endpoints/shell.rs b/core/tauri/src/endpoints/shell.rs index 240271ca4..20a5ec6d2 100644 --- a/core/tauri/src/endpoints/shell.rs +++ b/core/tauri/src/endpoints/shell.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::{ command::{Command, CommandChild, CommandEvent}, diff --git a/core/tauri/src/endpoints/window.rs b/core/tauri/src/endpoints/window.rs index fb087a2f5..cf83974b0 100644 --- a/core/tauri/src/endpoints/window.rs +++ b/core/tauri/src/endpoints/window.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ endpoints::InvokeResponse, runtime::{ diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index 6750b5602..20ac9ff4e 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + /// The plugin error type. #[derive(Debug, thiserror::Error)] pub enum Error { diff --git a/core/tauri/src/event.rs b/core/tauri/src/event.rs index ddf6e8c9b..0f3980790 100644 --- a/core/tauri/src/event.rs +++ b/core/tauri/src/event.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::runtime::tag::Tag; use std::{ boxed::Box, diff --git a/core/tauri/src/hooks.rs b/core/tauri/src/hooks.rs index da225ac9f..1ac5cc323 100644 --- a/core/tauri/src/hooks.rs +++ b/core/tauri/src/hooks.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::rpc::{format_callback, format_callback_result}, runtime::{app::App, window::Window, Params}, diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index f0858c818..a96e23598 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! Tauri is a framework for building tiny, blazing fast binaries for all major desktop platforms. //! Developers can integrate any front-end framework that compiles to HTML, JS and CSS for building their user interface. //! The backend of the application is a rust-sourced binary with an API that the front-end can interact with. diff --git a/core/tauri/src/plugin.rs b/core/tauri/src/plugin.rs index 8f0c23211..2e78571a4 100644 --- a/core/tauri/src/plugin.rs +++ b/core/tauri/src/plugin.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::config::PluginConfig, hooks::{InvokeMessage, PageLoadPayload}, diff --git a/core/tauri/src/runtime/app.rs b/core/tauri/src/runtime/app.rs index cc8a67ed7..068820b26 100644 --- a/core/tauri/src/runtime/app.rs +++ b/core/tauri/src/runtime/app.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::{assets::Assets, config::WindowUrl}, hooks::{InvokeHandler, InvokeMessage, OnPageLoad, PageLoadPayload, SetupHook}, diff --git a/core/tauri/src/runtime/flavor/mod.rs b/core/tauri/src/runtime/flavor/mod.rs index 4ccc720f9..d9a8f7b40 100644 --- a/core/tauri/src/runtime/flavor/mod.rs +++ b/core/tauri/src/runtime/flavor/mod.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! Officially supported webview runtimes. pub mod wry; diff --git a/core/tauri/src/runtime/flavor/wry.rs b/core/tauri/src/runtime/flavor/wry.rs index 8b53fb942..f55af3f15 100644 --- a/core/tauri/src/runtime/flavor/wry.rs +++ b/core/tauri/src/runtime/flavor/wry.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! The [`wry`] webview runtime. use crate::runtime::{ diff --git a/core/tauri/src/runtime/manager.rs b/core/tauri/src/runtime/manager.rs index 1c3ca69f0..50c2228da 100644 --- a/core/tauri/src/runtime/manager.rs +++ b/core/tauri/src/runtime/manager.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::{ assets::Assets, diff --git a/core/tauri/src/runtime/mod.rs b/core/tauri/src/runtime/mod.rs index dfbb3cc88..b4f98984a 100644 --- a/core/tauri/src/runtime/mod.rs +++ b/core/tauri/src/runtime/mod.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::{assets::Assets, config::Config}, event::{Event, EventHandler}, diff --git a/core/tauri/src/runtime/tag.rs b/core/tauri/src/runtime/tag.rs index 232a5ae69..817e51576 100644 --- a/core/tauri/src/runtime/tag.rs +++ b/core/tauri/src/runtime/tag.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + //! Working with "string-able" types. use std::{ diff --git a/core/tauri/src/runtime/updater.rs b/core/tauri/src/runtime/updater.rs index 911bf8f65..2df437f1d 100644 --- a/core/tauri/src/runtime/updater.rs +++ b/core/tauri/src/runtime/updater.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::{ app::restart_application, diff --git a/core/tauri/src/runtime/webview.rs b/core/tauri/src/runtime/webview.rs index 6c5abba89..d2f5c767e 100644 --- a/core/tauri/src/runtime/webview.rs +++ b/core/tauri/src/runtime/webview.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::runtime::window::DetachedWindow; use serde_json::Value as JsonValue; use std::{convert::TryFrom, path::PathBuf}; diff --git a/core/tauri/src/runtime/window.rs b/core/tauri/src/runtime/window.rs index f6591a85d..fb5a9538c 100644 --- a/core/tauri/src/runtime/window.rs +++ b/core/tauri/src/runtime/window.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ api::config::WindowUrl, event::{Event, EventHandler}, diff --git a/core/tauri/src/settings.rs b/core/tauri/src/settings.rs index ba257a655..8f9fe62aa 100644 --- a/core/tauri/src/settings.rs +++ b/core/tauri/src/settings.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use serde::{Deserialize, Serialize}; use std::{ fs::File, diff --git a/examples/api/src-tauri/.license_template b/examples/api/src-tauri/.license_template new file mode 100644 index 000000000..860f08256 --- /dev/null +++ b/examples/api/src-tauri/.license_template @@ -0,0 +1 @@ +../../../.license_template \ No newline at end of file diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 19e38a0f4..9f9b07943 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -3,6 +3,7 @@ name = "api" version = "0.1.0" description = "An example Tauri Application showcasing the api" edition = "2018" +license = "Apache-2.0 OR MIT" [build-dependencies] tauri-build = { path = "../../../core/tauri-build" } diff --git a/examples/api/src-tauri/build.rs b/examples/api/src-tauri/build.rs index 795b9b7c8..71557e5b9 100644 --- a/examples/api/src-tauri/build.rs +++ b/examples/api/src-tauri/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + fn main() { tauri_build::build() } diff --git a/examples/api/src-tauri/src/cmd.rs b/examples/api/src-tauri/src/cmd.rs index 2ecabe444..8bb335102 100644 --- a/examples/api/src-tauri/src/cmd.rs +++ b/examples/api/src-tauri/src/cmd.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use serde::Deserialize; use tauri::command; diff --git a/examples/api/src-tauri/src/main.rs b/examples/api/src-tauri/src/main.rs index 9477db19a..e80773f00 100644 --- a/examples/api/src-tauri/src/main.rs +++ b/examples/api/src-tauri/src/main.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #![cfg_attr( all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows" diff --git a/examples/helloworld/src-tauri/.license_template b/examples/helloworld/src-tauri/.license_template new file mode 100644 index 000000000..860f08256 --- /dev/null +++ b/examples/helloworld/src-tauri/.license_template @@ -0,0 +1 @@ +../../../.license_template \ No newline at end of file diff --git a/examples/helloworld/src-tauri/Cargo.toml b/examples/helloworld/src-tauri/Cargo.toml index a0288cb0c..9d12b2a84 100644 --- a/examples/helloworld/src-tauri/Cargo.toml +++ b/examples/helloworld/src-tauri/Cargo.toml @@ -3,6 +3,7 @@ name = "helloworld" version = "0.1.0" description = "A very simple Tauri Appplication" edition = "2018" +license = "Apache-2.0 OR MIT" [build-dependencies] tauri-build = { path = "../../../core/tauri-build", features = [ "codegen" ]} diff --git a/examples/helloworld/src-tauri/build.rs b/examples/helloworld/src-tauri/build.rs index 311900de5..a9dd7264f 100644 --- a/examples/helloworld/src-tauri/build.rs +++ b/examples/helloworld/src-tauri/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + fn main() { tauri_build::build(); } diff --git a/examples/helloworld/src-tauri/src/main.rs b/examples/helloworld/src-tauri/src/main.rs index 3ef55c848..e5becf91d 100644 --- a/examples/helloworld/src-tauri/src/main.rs +++ b/examples/helloworld/src-tauri/src/main.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #![cfg_attr( all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows" diff --git a/examples/multiwindow/src-tauri/.license_template b/examples/multiwindow/src-tauri/.license_template new file mode 100644 index 000000000..860f08256 --- /dev/null +++ b/examples/multiwindow/src-tauri/.license_template @@ -0,0 +1 @@ +../../../.license_template \ No newline at end of file diff --git a/examples/multiwindow/src-tauri/Cargo.toml b/examples/multiwindow/src-tauri/Cargo.toml index 1e42a40bd..4e74db8c2 100644 --- a/examples/multiwindow/src-tauri/Cargo.toml +++ b/examples/multiwindow/src-tauri/Cargo.toml @@ -3,6 +3,7 @@ name = "multiwindow" version = "0.1.0" description = "An example Tauri Multi-Window Application" edition = "2018" +license = "Apache-2.0 OR MIT" [build-dependencies] tauri-build = { path = "../../../core/tauri-build" } diff --git a/examples/multiwindow/src-tauri/build.rs b/examples/multiwindow/src-tauri/build.rs index 311900de5..a9dd7264f 100644 --- a/examples/multiwindow/src-tauri/build.rs +++ b/examples/multiwindow/src-tauri/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + fn main() { tauri_build::build(); } diff --git a/examples/multiwindow/src-tauri/src/main.rs b/examples/multiwindow/src-tauri/src/main.rs index 717621850..777677540 100644 --- a/examples/multiwindow/src-tauri/src/main.rs +++ b/examples/multiwindow/src-tauri/src/main.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #![cfg_attr( all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows" diff --git a/examples/updater/src-tauri/.license_template b/examples/updater/src-tauri/.license_template new file mode 100644 index 000000000..860f08256 --- /dev/null +++ b/examples/updater/src-tauri/.license_template @@ -0,0 +1 @@ +../../../.license_template \ No newline at end of file diff --git a/examples/updater/src-tauri/Cargo.toml b/examples/updater/src-tauri/Cargo.toml index 30cb9ff76..e3c06082e 100644 --- a/examples/updater/src-tauri/Cargo.toml +++ b/examples/updater/src-tauri/Cargo.toml @@ -3,6 +3,7 @@ name = "updater-example" version = "0.1.0" description = "A very simple Tauri Appplication" edition = "2018" +license = "Apache-2.0 OR MIT" [build-dependencies] tauri-build = { path = "../../../core/tauri-build", features = [ "codegen" ]} diff --git a/examples/updater/src-tauri/build.rs b/examples/updater/src-tauri/build.rs index 311900de5..a9dd7264f 100644 --- a/examples/updater/src-tauri/build.rs +++ b/examples/updater/src-tauri/build.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + fn main() { tauri_build::build(); } diff --git a/examples/updater/src-tauri/src/main.rs b/examples/updater/src-tauri/src/main.rs index 3ef55c848..e5becf91d 100644 --- a/examples/updater/src-tauri/src/main.rs +++ b/examples/updater/src-tauri/src/main.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2021 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + #![cfg_attr( all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows" diff --git a/package.json b/package.json index 2776170bb..62815a8b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tauri-workspace", "version": "0.0.0", - "license": "MIT", + "license": "Apache-2.0 OR MIT", "private": true, "repository": { "type": "git", diff --git a/rustfmt.toml b/rustfmt.toml index a37d2e4cc..49c6abc12 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -11,4 +11,7 @@ merge_derives = true use_try_shorthand = false use_field_init_shorthand = false force_explicit_abi = true -imports_granularity = "Crate" +# normalize_comments = true +normalize_doc_attributes = true +# wrap_comments = true +license_template_path = ".license_template"