diff --git a/.changes/remove-no-server.md b/.changes/remove-no-server.md new file mode 100644 index 000000000..0fb98de60 --- /dev/null +++ b/.changes/remove-no-server.md @@ -0,0 +1,6 @@ +--- +"tauri": minor +"tauri.js": minor +--- + +Removed the `no-server` mode, the `inliner`, the `dev` server proxy and the `loadAsset` API. diff --git a/.github/workflows/core-lint-fmt.yml b/.github/workflows/core-lint-fmt.yml index 3adfab272..e06c60825 100644 --- a/.github/workflows/core-lint-fmt.yml +++ b/.github/workflows/core-lint-fmt.yml @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - feature: [embedded-server, no-server, all-api] + feature: [embedded-server, all-api] steps: - uses: actions/checkout@v2 diff --git a/api/.eslintignore b/api/.eslintignore deleted file mode 100644 index 4a0073aa3..000000000 --- a/api/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -/src/types/config.validator.ts diff --git a/api/package.json b/api/package.json index 16b5303ef..578046cbc 100644 --- a/api/package.json +++ b/api/package.json @@ -55,7 +55,6 @@ "@babel/preset-typescript": "7.12.13", "@rollup/plugin-babel": "5.2.3", "@rollup/plugin-commonjs": "17.1.0", - "@rollup/plugin-json": "4.1.0", "@rollup/plugin-node-resolve": "11.1.1", "@rollup/plugin-sucrase": "3.1.0", "@rollup/plugin-typescript": "8.1.1", @@ -69,15 +68,14 @@ "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "4.3.1", "eslint-plugin-security": "1.4.0", - "eslint-plugin-standard": "4.1.0", "husky": "4.3.8", "lint-staged": "10.5.4", "lockfile-lint": "4.3.7", "prettier": "2.2.1", + "regenerator-runtime": "^0.13.7", "rimraf": "3.0.2", "rollup": "2.38.5", "rollup-plugin-terser": "7.0.2", - "rollup-plugin-typescript2": "0.29.0", "typescript": "4.1.5" }, "resolutions": { diff --git a/api/rollup.config.js b/api/rollup.config.js index 5f8cf90c6..e5de28854 100644 --- a/api/rollup.config.js +++ b/api/rollup.config.js @@ -60,12 +60,7 @@ export default [ external: [ ...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {}) - ], - watch: { - chokidar: true, - include: 'src/**', - exclude: 'node_modules/**' - } + ] }, { input: { diff --git a/api/yarn.lock b/api/yarn.lock index 684af15fd..bcc31debc 100644 --- a/api/yarn.lock +++ b/api/yarn.lock @@ -960,13 +960,6 @@ magic-string "^0.25.7" resolve "^1.17.0" -"@rollup/plugin-json@4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" - integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== - dependencies: - "@rollup/pluginutils" "^3.0.8" - "@rollup/plugin-node-resolve@11.1.1": version "11.1.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.1.tgz#47bc34252914794a1b06fb50371d7520a03f91f3" @@ -995,7 +988,7 @@ "@rollup/pluginutils" "^3.1.0" resolve "^1.17.0" -"@rollup/pluginutils@^3.0.1", "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": +"@rollup/pluginutils@^3.0.1", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== @@ -1749,11 +1742,6 @@ eslint-plugin-security@1.4.0: dependencies: safe-regex "^1.1.0" -eslint-plugin-standard@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -1945,15 +1933,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" - integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -1961,7 +1940,7 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" -find-up@^4.0.0, find-up@^4.1.0: +find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -1997,15 +1976,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== -fs-extra@8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2100,7 +2070,7 @@ globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: +graceful-fs@^4.1.2: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -2365,13 +2335,6 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -2507,13 +2470,6 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" -make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -2830,13 +2786,6 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - pkg-dir@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" @@ -2915,7 +2864,7 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.4: +regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== @@ -2976,13 +2925,6 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" @@ -3026,16 +2968,6 @@ rollup-plugin-terser@7.0.2: serialize-javascript "^4.0.0" terser "^5.0.0" -rollup-plugin-typescript2@0.29.0: - version "0.29.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.29.0.tgz#b7ad83f5241dbc5bdf1e98d9c3fca005ffe39e1a" - integrity sha512-YytahBSZCIjn/elFugEGQR5qTsVhxhUwGZIsA9TmrSsC88qroGo65O5HZP/TTArH2dm0vUmYWhKchhwi2wL9bw== - dependencies: - "@rollup/pluginutils" "^3.1.0" - find-cache-dir "^3.3.1" - fs-extra "8.1.0" - resolve "1.17.0" - tslib "2.0.1" rollup@2.38.5: version "2.38.5" @@ -3093,7 +3025,7 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.1.0: +semver@^6.1.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -3373,11 +3305,6 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" - integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== - tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -3435,11 +3362,6 @@ unicode-property-aliases-ecmascript@^1.0.4: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - uri-js@^4.2.2: version "4.4.0" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" diff --git a/cli/core/Cargo.lock b/cli/core/Cargo.lock index 0bf438c49..af661cf14 100755 --- a/cli/core/Cargo.lock +++ b/cli/core/Cargo.lock @@ -57,12 +57,6 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" -[[package]] -name = "ascii" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf56136a5198c7b01a49e3afcbef6cf84597273d298f54432926024107b0109" - [[package]] name = "attohttpc" version = "0.16.1" @@ -115,12 +109,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - [[package]] name = "bitflags" version = "1.2.1" @@ -157,12 +145,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "bumpalo" -version = "3.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" - [[package]] name = "byte-tools" version = "0.3.1" @@ -239,12 +221,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "chunked_transfer" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" - [[package]] name = "clap" version = "2.33.3" @@ -325,7 +301,7 @@ version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" dependencies = [ - "ascii 0.9.3", + "ascii", "byteorder", "either", "memchr", @@ -421,33 +397,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "cssparser" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa 0.4.7", - "matches", - "phf 0.8.0", - "proc-macro2", - "quote", - "smallvec", - "syn", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "deflate" version = "0.8.6" @@ -458,17 +407,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "derive_more" -version = "0.99.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "digest" version = "0.8.1" @@ -514,30 +452,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" -[[package]] -name = "dtoa-short" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" -dependencies = [ - "dtoa", -] - [[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -[[package]] -name = "encoding_rs" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" -dependencies = [ - "cfg-if 1.0.0", -] - [[package]] name = "failure" version = "0.1.8" @@ -649,76 +569,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -[[package]] -name = "futf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures-channel" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" - -[[package]] -name = "futures-io" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" - -[[package]] -name = "futures-sink" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" - -[[package]] -name = "futures-task" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" -dependencies = [ - "once_cell", -] - -[[package]] -name = "futures-util" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.12.3" @@ -738,17 +588,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.2" @@ -757,7 +596,7 @@ checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -782,26 +621,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -[[package]] -name = "h2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", - "tracing-futures", -] - [[package]] name = "handlebars" version = "3.5.2" @@ -813,7 +632,7 @@ dependencies = [ "pest_derive", "quick-error", "serde 1.0.123", - "serde_json 1.0.61", + "serde_json 1.0.62", ] [[package]] @@ -846,20 +665,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" -[[package]] -name = "html5ever" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "http" version = "0.2.3" @@ -871,65 +676,6 @@ dependencies = [ "itoa 0.4.7", ] -[[package]] -name = "http-body" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" - -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - -[[package]] -name = "hyper" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa 0.4.7", - "pin-project 1.0.4", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "icns" version = "0.3.1" @@ -942,9 +688,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" dependencies = [ "matches", "unicode-bidi", @@ -953,9 +699,9 @@ dependencies = [ [[package]] name = "image" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce04077ead78e39ae8610ad26216aed811996b043d47beed5090db674f9e9b5" +checksum = "293f07a1875fa7e9c5897b51aa68b2d8ed8271b87e1a44cb64b9c3d98aabbc0d" dependencies = [ "bytemuck", "byteorder", @@ -1009,12 +755,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ipnet" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - [[package]] name = "itoa" version = "0.3.4" @@ -1036,15 +776,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "js-sys" -version = "0.3.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" -dependencies = [ - "wasm-bindgen", -] - [[package]] name = "json-patch" version = "0.2.6" @@ -1052,7 +783,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f995a3c8f2bc3dd52a18a583e90f9ec109c047fa1603a853e46bcda14d2e279d" dependencies = [ "serde 1.0.123", - "serde_json 1.0.61", + "serde_json 1.0.62", "treediff", ] @@ -1066,18 +797,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "kuchiki" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" -dependencies = [ - "cssparser", - "html5ever", - "matches", - "selectors", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -1092,9 +811,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.85" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3" +checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" [[package]] name = "libflate" @@ -1129,35 +848,12 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - [[package]] name = "maplit" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" -[[package]] -name = "markup5ever" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae38d669396ca9b707bfc3db254bc382ddb94f57cc5c235f34623a669a01dab" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen 0.8.0", - "serde 1.0.123", - "serde_derive", - "serde_json 1.0.61", - "string_cache", - "string_cache_codegen", - "tendril", -] - [[package]] name = "matches" version = "0.1.8" @@ -1185,12 +881,6 @@ dependencies = [ "autocfg 1.0.1", ] -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - [[package]] name = "miniz_oxide" version = "0.3.7" @@ -1223,25 +913,12 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.2", + "miow", "net2", "slab", "winapi 0.2.8", ] -[[package]] -name = "mio" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" -dependencies = [ - "libc", - "log", - "miow 0.3.6", - "ntapi", - "winapi 0.3.9", -] - [[package]] name = "mio-extras" version = "2.0.6" @@ -1250,7 +927,7 @@ checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ "lazycell", "log", - "mio 0.6.23", + "mio", "slab", ] @@ -1266,16 +943,6 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "miow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" -dependencies = [ - "socket2", - "winapi 0.3.9", -] - [[package]] name = "native-tls" version = "0.2.7" @@ -1305,18 +972,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "notify" version = "4.0.15" @@ -1329,21 +984,12 @@ dependencies = [ "fsevent-sys", "inotify", "libc", - "mio 0.6.23", + "mio", "mio-extras", "walkdir", "winapi 0.3.9", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "num-integer" version = "0.1.44" @@ -1522,18 +1168,7 @@ version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" dependencies = [ - "phf_shared 0.7.24", -] - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_macros", - "phf_shared 0.8.0", - "proc-macro-hack", + "phf_shared", ] [[package]] @@ -1542,18 +1177,8 @@ version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" dependencies = [ - "phf_generator 0.7.24", - "phf_shared 0.7.24", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", + "phf_generator", + "phf_shared", ] [[package]] @@ -1562,104 +1187,19 @@ version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" dependencies = [ - "phf_shared 0.7.24", + "phf_shared", "rand 0.6.5", ] -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "phf_shared" version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" dependencies = [ - "siphasher 0.2.3", + "siphasher", ] -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher 0.3.3", -] - -[[package]] -name = "pin-project" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" -dependencies = [ - "pin-project-internal 0.4.27", -] - -[[package]] -name = "pin-project" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" -dependencies = [ - "pin-project-internal 1.0.4", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa25a6393f22ce819b0f50e0be89287292fda8d425be38ee0ca14c4931d9e71" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "pkg-config" version = "0.3.19" @@ -1684,12 +1224,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1714,12 +1248,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.24" @@ -1758,25 +1286,11 @@ dependencies = [ "rand_isaac", "rand_jitter", "rand_os", - "rand_pcg 0.1.2", + "rand_pcg", "rand_xorshift", "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", - "rand_pcg 0.2.1", -] - [[package]] name = "rand" version = "0.8.3" @@ -1799,16 +1313,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.0" @@ -1834,22 +1338,13 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" dependencies = [ - "getrandom 0.2.2", + "getrandom", ] [[package]] @@ -1861,15 +1356,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_hc" version = "0.3.0" @@ -1923,15 +1409,6 @@ dependencies = [ "rand_core 0.4.2", ] -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_xorshift" version = "0.1.1" @@ -1990,7 +1467,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.2", + "getrandom", "redox_syscall", ] @@ -2021,40 +1498,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "reqwest" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "serde 1.0.123", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - [[package]] name = "rle-decode-fast" version = "1.0.1" @@ -2137,26 +1580,6 @@ dependencies = [ "libc", ] -[[package]] -name = "selectors" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" -dependencies = [ - "bitflags", - "cssparser", - "derive_more", - "fxhash", - "log", - "matches", - "phf 0.8.0", - "phf_codegen 0.8.0", - "precomputed-hash", - "servo_arc", - "smallvec", - "thin-slice", -] - [[package]] name = "serde" version = "0.9.15" @@ -2197,37 +1620,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" +checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" dependencies = [ "itoa 0.4.7", "ryu", "serde 1.0.123", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -dependencies = [ - "form_urlencoded", - "itoa 0.4.7", - "ryu", - "serde 1.0.123", -] - -[[package]] -name = "servo_arc" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" -dependencies = [ - "nodrop", - "stable_deref_trait", -] - [[package]] name = "sha-1" version = "0.8.2" @@ -2275,66 +1676,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" -[[package]] -name = "siphasher" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" - [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -[[package]] -name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "string_cache" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a" -dependencies = [ - "lazy_static", - "new_debug_unreachable", - "phf_shared 0.8.0", - "precomputed-hash", - "serde 1.0.123", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24c8e5e19d22a726626f1a5e16fe15b132dcf21d10177fa5a45ce7962996b97" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro2", - "quote", -] - [[package]] name = "strsim" version = "0.8.0" @@ -2375,8 +1722,8 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "013d134ae4a25ee744ad6129db589018558f620ddfa44043887cdd45fa08e75c" dependencies = [ - "phf 0.7.24", - "phf_codegen 0.7.24", + "phf", + "phf_codegen", "serde_json 0.9.10", ] @@ -2401,7 +1748,7 @@ dependencies = [ "regex", "runas", "serde 1.0.123", - "serde_json 1.0.61", + "serde_json 1.0.62", "sha2", "strsim 0.10.0", "tar", @@ -2419,43 +1766,17 @@ name = "tauri-cli" version = "0.1.0" dependencies = [ "anyhow", - "attohttpc", "clap 3.0.0-beta.2", "colored", "convert_case", - "html5ever", - "http", "json-patch", - "kuchiki", "notify", "once_cell", "serde 1.0.123", - "serde_json 1.0.61", + "serde_json 1.0.62", "shared_child", "tauri-bundler", - "tauri-inliner", - "tiny_http", "toml_edit", - "url", -] - -[[package]] -name = "tauri-inliner" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49de4aaeb4ea3f7ee03ab8e06a8a5529baaa2d75480080d40649e9c7cda78550" -dependencies = [ - "base64", - "derive_more", - "html5ever", - "kuchiki", - "log", - "once_cell", - "regex", - "reqwest", - "serde_json 1.0.61", - "thiserror", - "url", ] [[package]] @@ -2472,17 +1793,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "tendril" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ef557cb397a4f0a5a3a628f06515f78563f2209e64d47055d9dc6052bf5e33" -dependencies = [ - "futf", - "mac", - "utf-8", -] - [[package]] name = "termcolor" version = "1.1.2" @@ -2510,12 +1820,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - [[package]] name = "thiserror" version = "1.0.23" @@ -2538,9 +1842,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" dependencies = [ "once_cell", ] @@ -2566,19 +1870,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "tiny_http" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded47106b8e52d8ed8119f0ea6e8c0f5881e69783e0297b5a8462958f334bc1" -dependencies = [ - "ascii 1.0.0", - "chrono", - "chunked_transfer", - "log", - "url", -] - [[package]] name = "tinyvec" version = "1.1.1" @@ -2594,45 +1885,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" -[[package]] -name = "tokio" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6714d663090b6b0acb0fa85841c6d66233d150cdb2602c8f9b8abb03370beb3f" -dependencies = [ - "autocfg 1.0.1", - "bytes", - "libc", - "memchr", - "mio 0.7.7", - "num_cpus", - "pin-project-lite", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - [[package]] name = "toml" version = "0.5.8" @@ -2653,57 +1905,15 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "tower-service" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" - -[[package]] -name = "tracing" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" -dependencies = [ - "cfg-if 1.0.0", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -dependencies = [ - "pin-project 0.4.27", - "tracing", -] - [[package]] name = "treediff" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "761e8d5ad7ce14bb82b7e61ccc0ca961005a275a060b9644a2431aa11553c2ff" dependencies = [ - "serde_json 1.0.61", + "serde_json 1.0.62", ] -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - [[package]] name = "typenum" version = "1.12.0" @@ -2727,9 +1937,9 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" dependencies = [ "tinyvec", ] @@ -2773,12 +1983,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf-8" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" - [[package]] name = "uuid" version = "0.8.2" @@ -2823,106 +2027,12 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" -[[package]] -name = "wasm-bindgen" -version = "0.2.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" -dependencies = [ - "cfg-if 1.0.0", - "serde 1.0.123", - "serde_json 1.0.61", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" - -[[package]] -name = "web-sys" -version = "0.3.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "weezl" version = "0.1.4" @@ -2988,15 +2098,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "ws2_32-sys" version = "0.2.1" diff --git a/cli/core/Cargo.toml b/cli/core/Cargo.toml index 057fcc614..7ebd41c6c 100644 --- a/cli/core/Cargo.toml +++ b/cli/core/Cargo.toml @@ -18,13 +18,6 @@ colored = "2.0" once_cell = "1.5" serde = { version = "1.0", features = [ "derive" ] } serde_json = "1.0" -tauri-inliner = "0.0.1" -kuchiki = "0.8" -html5ever = "0.25" -tiny_http = "0.8" -attohttpc = "0.16" -url = "2.2" -http = "0.2" notify = "4.0" shared_child = "0.3" toml_edit = "0.2" diff --git a/cli/core/src/build.rs b/cli/core/src/build.rs index 013554e61..0c82965a1 100644 --- a/cli/core/src/build.rs +++ b/cli/core/src/build.rs @@ -8,10 +8,9 @@ use crate::helpers::{ config::get as get_config, execute_with_output, manifest::rewrite_manifest, - TauriHtml, TauriScript, + TauriScript, }; use std::env::{set_current_dir, set_var}; -use std::fs::read_to_string; use std::fs::File; use std::io::Write; use std::path::PathBuf; @@ -55,13 +54,7 @@ impl Build { let config_guard = config.lock().unwrap(); let config_ = config_guard.as_ref().unwrap(); - let feature = if config_.tauri.embedded_server.active { - "embedded-server" - } else { - "no-server" - }; - - let mut settings_builder = SettingsBuilder::new().features(vec![feature.to_string()]); + let mut settings_builder = SettingsBuilder::new().features(vec!["embedded-server".to_string()]); if !self.debug { settings_builder = settings_builder.release(); } @@ -100,15 +93,6 @@ impl Build { let config_guard = config.lock().unwrap(); let config_ = config_guard.as_ref().unwrap(); - // index.tauri.html - let index_html_path = PathBuf::from(&config_.build.dist_dir).join("index.html"); - let tauri_html = TauriHtml::new(&config_.build.dist_dir, read_to_string(index_html_path)?) - .inliner_enabled(config_.tauri.inliner.active && !config_.tauri.embedded_server.active) - .get()?; - let tauri_index_html_path = PathBuf::from(&config_.build.dist_dir).join("index.tauri.html"); - let mut tauri_index_html_file = File::create(tauri_index_html_path)?; - tauri_index_html_file.write_all(tauri_html.as_bytes())?; - // __tauri.js let tauri_script = TauriScript::new() .global_tauri(config_.build.with_global_tauri) diff --git a/cli/core/src/dev.rs b/cli/core/src/dev.rs index bd0e2eb31..34c41f1c1 100644 --- a/cli/core/src/dev.rs +++ b/cli/core/src/dev.rs @@ -1,18 +1,14 @@ use crate::helpers::{ app_paths::{app_dir, tauri_dir}, - config::{get as get_config, reload as reload_config, ConfigHandle}, + config::{get as get_config, reload as reload_config}, manifest::rewrite_manifest, - Logger, TauriHtml, TauriScript, + Logger, TauriScript, }; -use attohttpc::{Method, RequestBuilder}; -use http::header::HeaderName; use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; use shared_child::SharedChild; -use tiny_http::{Response, Server}; -use url::Url; -use std::env::set_var; +use std::env::{set_current_dir, set_var}; use std::ffi::OsStr; use std::fs::File; use std::io::Write; @@ -20,7 +16,6 @@ use std::path::PathBuf; use std::process::{exit, Command}; use std::sync::mpsc::{channel, Receiver}; use std::sync::{Arc, Mutex}; -use std::thread::sleep; use std::time::Duration; #[derive(Default)] @@ -47,6 +42,7 @@ impl Dev { pub fn run(self) -> crate::Result<()> { let logger = Logger::new("tauri:dev"); let tauri_path = tauri_dir(); + set_current_dir(&tauri_path)?; let merge_config = self.config.clone(); let config = get_config(merge_config.as_deref())?; let mut _guard = None; @@ -78,57 +74,26 @@ impl Dev { } } - let running_dev_server = config + let dev_path = config .lock() .unwrap() .as_ref() .unwrap() .build .dev_path - .starts_with("http"); + .to_string(); - let new_dev_path = if running_dev_server { - let dev_path = Url::parse(&config.lock().unwrap().as_ref().unwrap().build.dev_path)?; - let dev_port = dev_path.port().unwrap_or(80); - - let timeout = Duration::from_secs(3); - let wait_time = Duration::from_secs(30); - let mut total_time = timeout; - while RequestBuilder::new(Method::GET, &dev_path).send().is_err() { - logger.warn("Waiting for your dev server to start..."); - sleep(timeout); - total_time += timeout; - if total_time == wait_time { - logger.error(format!( - "Couldn't connect to {} after {}s. Please make sure that's the URL to your dev server.", - dev_path, - total_time.as_secs() - )); - exit(1); - } - } - - let proxy_path = dev_path.clone(); - let proxy_port = dev_port + 1; - - logger.log(format!("starting dev proxy on port {}", proxy_port)); - let config_ = config.clone(); - std::thread::spawn(move || proxy_dev_server(config_, &proxy_path, proxy_port)); - - format!( - "http://{}:{}", - dev_path.host_str().expect("failed to read dev_path host"), - proxy_port - ) + let dev_path = if dev_path.starts_with("http") { + dev_path } else { - tauri_dir() + let absolute_dev_path = tauri_dir() .join(&config.lock().unwrap().as_ref().unwrap().build.dev_path) .to_string_lossy() - .to_string() + .to_string(); + (*config.lock().unwrap()).as_mut().unwrap().build.dev_path = absolute_dev_path.to_string(); + absolute_dev_path }; - (*config.lock().unwrap()).as_mut().unwrap().build.dev_path = new_dev_path.to_string(); - set_var("TAURI_DIR", &tauri_path); set_var( "TAURI_DIST_DIR", @@ -164,7 +129,7 @@ impl Dev { watcher.watch(tauri_path.join("src"), RecursiveMode::Recursive)?; watcher.watch(tauri_path.join("Cargo.toml"), RecursiveMode::Recursive)?; watcher.watch(tauri_path.join("tauri.conf.json"), RecursiveMode::Recursive)?; - if !running_dev_server { + if !dev_path.starts_with("http") { watcher.watch( config .lock() @@ -191,7 +156,7 @@ impl Dev { if let Some(event_path) = event_path { if event_path.file_name() == Some(OsStr::new("tauri.conf.json")) { reload_config(merge_config.as_deref())?; - (*config.lock().unwrap()).as_mut().unwrap().build.dev_path = new_dev_path.to_string(); + (*config.lock().unwrap()).as_mut().unwrap().build.dev_path = dev_path.to_string(); rewrite_manifest(config.clone())?; set_var("TAURI_CONFIG", serde_json::to_string(&*config)?); } else { @@ -209,7 +174,7 @@ impl Dev { fn start_app(&self, child_wait_rx: Arc>>) -> Arc { let mut command = Command::new("cargo"); - command.arg("run").current_dir(tauri_dir()); + command.arg("run"); let child = SharedChild::spawn(&mut command).expect("failed to run cargo"); let child_arc = Arc::new(child); @@ -239,38 +204,3 @@ impl Dev { child_arc } } - -fn proxy_dev_server(config: ConfigHandle, dev_path: &Url, dev_port: u16) -> crate::Result<()> { - let server_url = format!( - "{}:{}", - dev_path.host_str().expect("failed to read dev_path host"), - dev_port, - ); - let server = Server::http(server_url).expect("failed to create proxy server"); - for request in server.incoming_requests() { - let request_url = request.url(); - let mut request_builder = RequestBuilder::new( - Method::from_bytes(request.method().to_string().as_bytes()).unwrap(), - dev_path.join(&request_url)?.to_string(), - ); - - for header in request.headers() { - request_builder = request_builder.header( - HeaderName::from_bytes(header.field.as_str().as_bytes())?, - header.value.as_str(), - ); - } - - if request_url == "/" { - let config_guard = config.lock().unwrap(); - let config = config_guard.as_ref().unwrap(); - let response = request_builder.send()?.text()?; - let tauri_html = TauriHtml::new(&config.build.dist_dir, response).get()?; - request.respond(Response::from_data(tauri_html))?; - } else { - let response = request_builder.send()?.bytes()?; - request.respond(Response::from_data(response))?; - } - } - Ok(()) -} diff --git a/cli/core/src/helpers/config.rs b/cli/core/src/helpers/config.rs index 6ee0515b1..d1f251fe8 100644 --- a/cli/core/src/helpers/config.rs +++ b/cli/core/src/helpers/config.rs @@ -77,8 +77,6 @@ pub enum Port { #[derive(PartialEq, Clone, Deserialize, Serialize, Debug)] #[serde(tag = "embeddedServer", rename_all = "camelCase")] pub struct EmbeddedServerConfig { - /// Whether the embeddedServer is active or not - pub active: bool, /// The embedded server host. #[serde(default = "default_host")] pub host: String, @@ -148,7 +146,6 @@ fn default_port() -> Port { fn default_embedded_server() -> EmbeddedServerConfig { EmbeddedServerConfig { - active: false, host: default_host(), port: default_port(), } @@ -324,16 +321,9 @@ pub struct TauriConfig { #[serde(default = "default_bundle")] pub bundle: BundleConfig, #[serde(default)] - pub inliner: InlinerConfig, - #[serde(default)] pub allowlist: HashMap, } -#[derive(Default, PartialEq, Clone, Deserialize, Serialize, Debug)] -pub struct InlinerConfig { - pub active: bool, -} - /// The Build configuration object. #[derive(PartialEq, Clone, Deserialize, Serialize, Debug)] #[serde(tag = "build", rename_all = "camelCase")] @@ -380,7 +370,6 @@ fn default_tauri() -> TauriConfig { embedded_server: default_embedded_server(), cli: None, bundle: default_bundle(), - inliner: Default::default(), allowlist: Default::default(), } } diff --git a/cli/core/src/helpers/mod.rs b/cli/core/src/helpers/mod.rs index a4b954048..17ad8193f 100644 --- a/cli/core/src/helpers/mod.rs +++ b/cli/core/src/helpers/mod.rs @@ -5,7 +5,7 @@ pub mod manifest; mod tauri_entry; pub use logger::Logger; -pub use tauri_entry::{TauriHtml, TauriScript}; +pub use tauri_entry::TauriScript; use std::io::{BufRead, BufReader}; use std::process::{Command, Stdio}; diff --git a/cli/core/src/helpers/tauri_entry.rs b/cli/core/src/helpers/tauri_entry.rs index 6abeec201..d7cea6a5a 100644 --- a/cli/core/src/helpers/tauri_entry.rs +++ b/cli/core/src/helpers/tauri_entry.rs @@ -1,41 +1,3 @@ -use kuchiki::traits::*; -use tauri_inliner::inline_html_string; - -use std::path::PathBuf; - -pub struct TauriHtml { - original: String, - html_dir: PathBuf, - inliner_enabled: bool, -} - -impl TauriHtml { - pub fn new(html_dir: impl Into, html: String) -> Self { - Self { - original: html, - html_dir: html_dir.into(), - inliner_enabled: false, - } - } - - pub fn inliner_enabled(mut self, enabled: bool) -> Self { - self.inliner_enabled = enabled; - self - } - - pub fn get(self) -> crate::Result { - let html = if self.inliner_enabled { - inline_html_string(&self.original, self.html_dir, Default::default())? - } else { - self.original - }; - - let new_html = kuchiki::parse_html().one(html).to_string(); - - Ok(new_html) - } -} - #[derive(Default)] pub struct TauriScript { global_tauri: bool, @@ -54,7 +16,6 @@ impl TauriScript { pub fn get(self) -> String { let mut scripts = Vec::new(); scripts.push(include_str!("../templates/tauri.js")); - scripts.push(include_str!("../templates/mutation-observer.js")); if self.global_tauri { scripts.insert( diff --git a/cli/core/src/templates/mutation-observer.js b/cli/core/src/templates/mutation-observer.js deleted file mode 100644 index 758a4fd4d..000000000 --- a/cli/core/src/templates/mutation-observer.js +++ /dev/null @@ -1,47 +0,0 @@ -function __tauri_mutation_observer (target) { - function loadAsset(path, type) { - if (path) { - window.__TAURI__.loadAsset(path, type) - } - } - - var observer = new MutationObserver(mutation => { - mutation.forEach(function (mutationRecord) { - var addedNodes = mutationRecord.addedNodes - addedNodes.forEach(function (node) { - if (node.nodeType === 1) { - if (node.tagName === 'SCRIPT') { - node.onload = node.onerror = null - loadAsset(node.src) - } else if (node.tagName === 'LINK') { - if (node.type === 'text/css' || (node.href && node.href.endsWith('.css'))) { - loadAsset(node.href, 'stylesheet') - } - } - } - }) - }) - }) - - observer.observe(target, { - childList: true, - subtree: true - }) -} - -__tauri_mutation_observer(document.documentElement) -if ( - document.readyState === 'complete' || - document.readyState === 'interactive' -) { - __tauri_mutation_observer(document.head) -} else { - window.addEventListener( - 'DOMContentLoaded', - function () { - __tauri_mutation_observer(document.head) - }, - true - ) -} - diff --git a/cli/core/src/templates/tauri.js b/cli/core/src/templates/tauri.js index 938be9bb4..ddce7dba4 100644 --- a/cli/core/src/templates/tauri.js +++ b/cli/core/src/templates/tauri.js @@ -142,31 +142,6 @@ if (!String.prototype.startsWith) { }) } - window.__TAURI__.loadAsset = function loadAsset(assetName, assetType) { - return this.promisified({ - cmd: 'loadAsset', - asset: assetName, - assetType: assetType || 'unknown' - }) - } - - document.addEventListener( - 'error', - function (e) { - var target = e.target - while (target != null) { - if (target.matches('img')) { - window.__TAURI__.loadAsset(target.src, 'image').then(function (img) { - target.src = img - }) - break - } - target = target.parentElement - } - }, - true - ) - // open links with the Tauri API function __openLinks() { document.querySelector('body').addEventListener( diff --git a/cli/tauri-bundler/src/bundle.rs b/cli/tauri-bundler/src/bundle.rs index 188f3c4bc..6df85db29 100644 --- a/cli/tauri-bundler/src/bundle.rs +++ b/cli/tauri-bundler/src/bundle.rs @@ -65,27 +65,25 @@ pub fn bundle_project(settings: Settings) -> crate::Result> { #[cfg(windows)] { if let Ok(tauri_config) = get_tauri_config() { - if tauri_config.tauri.embedded_server.active { - let exempt_output = Command::new("CheckNetIsolation") - .args(&vec!["LoopbackExempt", "-s"]) - .output() - .expect("failed to read LoopbackExempt -s"); + let exempt_output = Command::new("CheckNetIsolation") + .args(&vec!["LoopbackExempt", "-s"]) + .output() + .expect("failed to read LoopbackExempt -s"); - if !exempt_output.status.success() { - panic!("Failed to execute CheckNetIsolation LoopbackExempt -s"); - } + if !exempt_output.status.success() { + panic!("Failed to execute CheckNetIsolation LoopbackExempt -s"); + } - let output_str = String::from_utf8_lossy(&exempt_output.stdout).to_lowercase(); - if !output_str.contains("win32webviewhost_cw5n1h2txyewy") { - println!("Running Loopback command"); - runas::Command::new("powershell") - .args(&[ - "CheckNetIsolation LoopbackExempt -a -n=\"Microsoft.Win32WebViewHost_cw5n1h2txyewy\"", - ]) - .force_prompt(true) - .status() - .expect("failed to run Loopback command"); - } + let output_str = String::from_utf8_lossy(&exempt_output.stdout).to_lowercase(); + if !output_str.contains("win32webviewhost_cw5n1h2txyewy") { + println!("Running Loopback command"); + runas::Command::new("powershell") + .args(&[ + "CheckNetIsolation LoopbackExempt -a -n=\"Microsoft.Win32WebViewHost_cw5n1h2txyewy\"", + ]) + .force_prompt(true) + .status() + .expect("failed to run Loopback command"); } } } diff --git a/cli/tauri-bundler/src/bundle/tauri_config.rs b/cli/tauri-bundler/src/bundle/tauri_config.rs index fcf85ab3c..7af3f173d 100644 --- a/cli/tauri-bundler/src/bundle/tauri_config.rs +++ b/cli/tauri-bundler/src/bundle/tauri_config.rs @@ -43,19 +43,11 @@ pub struct BundleConfig { pub external_bin: Option>, } -#[derive(PartialEq, Deserialize, Clone, Debug, Default)] -#[serde(tag = "embeddedServer", rename_all = "camelCase")] -pub struct EmbeddedServerConfig { - pub active: bool, -} - #[derive(PartialEq, Deserialize, Clone, Debug, Default)] #[serde(tag = "tauri", rename_all = "camelCase")] pub struct TauriConfig { #[serde(default)] pub bundle: BundleConfig, - #[serde(default)] - pub embedded_server: EmbeddedServerConfig, } #[derive(PartialEq, Deserialize, Clone, Debug)] diff --git a/cli/tauri-bundler/src/bundle/wix.rs b/cli/tauri-bundler/src/bundle/wix.rs index bf648d2e9..44f314a99 100644 --- a/cli/tauri-bundler/src/bundle/wix.rs +++ b/cli/tauri-bundler/src/bundle/wix.rs @@ -446,10 +446,7 @@ pub fn build_wix_app_installer( let mut data = BTreeMap::new(); if let Ok(tauri_config) = crate::bundle::tauri_config::get() { - data.insert( - "embedded_server", - to_json(tauri_config.tauri.embedded_server.active), - ); + data.insert("embedded_server", to_json(true)); } data.insert("product_name", to_json(settings.bundle_name())); diff --git a/cli/tauri.js/package.json b/cli/tauri.js/package.json index fcad81eeb..0176defbb 100644 --- a/cli/tauri.js/package.json +++ b/cli/tauri.js/package.json @@ -48,20 +48,16 @@ "dependencies": { "@tauri-apps/toml": "2.2.4", "chalk": "4.1.0", - "chokidar": "3.5.1", "cross-spawn": "7.0.3", "fast-glob": "3.2.5", "fs-extra": "9.1.0", - "http-proxy": "1.18.1", "imagemin": "7.0.1", "imagemin-optipng": "8.0.0", "imagemin-pngquant": "9.0.1", "imagemin-zopfli": "7.0.0", "inquirer": "7.3.3", "is-png": "2.0.0", - "is-reachable": "5.0.0", "isbinaryfile": "4.0.6", - "jsdom": "16.4.0", "lodash": "4.17.20", "minimist": "1.2.5", "ms": "2.1.3", @@ -69,8 +65,7 @@ "read-chunk": "3.2.0", "semver": "7.3.4", "sharp": "0.27.1", - "webpack-merge": "5.7.3", - "webpack-shell-plugin": "0.5.0" + "webpack-merge": "5.7.3" }, "devDependencies": { "@babel/core": "7.12.13", @@ -78,11 +73,9 @@ "@babel/preset-typescript": "7.12.13", "@types/cross-spawn": "6.0.2", "@types/fs-extra": "9.0.6", - "@types/http-proxy": "1.17.5", "@types/imagemin": "7.0.0", "@types/imagemin-optipng": "5.2.0", "@types/inquirer": "7.3.1", - "@types/jsdom": "16.2.6", "@types/lodash": "4.14.168", "@types/ms": "0.7.31", "@types/semver": "7.3.4", @@ -100,11 +93,9 @@ "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "4.3.1", "eslint-plugin-security": "1.4.0", - "eslint-plugin-standard": "4.1.0", "husky": "4.3.8", "is-running": "2.1.0", "jest": "26.6.3", - "jest-mock-process": "1.4.0", "lint-staged": "10.5.4", "lockfile-lint": "4.3.7", "prettier": "2.2.1", @@ -113,11 +104,10 @@ "rimraf": "3.0.2", "toml-loader": "1.0.0", "ts-loader": "8.0.17", - "tslib": "2.1.0", "typescript": "4.1.5", "typescript-json-validator": "2.4.2", "webpack": "5.21.2", - "webpack-cli": "4.5.0", + "webpack-cli": "^4.5.0", "webpack-node-externals": "2.5.2" }, "resolutions": { diff --git a/cli/tauri.js/src/api/info.ts b/cli/tauri.js/src/api/info.ts index 9bf24d091..365940766 100644 --- a/cli/tauri.js/src/api/info.ts +++ b/cli/tauri.js/src/api/info.ts @@ -197,17 +197,8 @@ async function printAppInfo(tauriDir: string): Promise { }) try { - const tauriMode = (config: TauriConfig): string => { - if (config.tauri.embeddedServer) { - return chalk.green( - config.tauri.embeddedServer.active ? 'embedded-server' : 'no-server' - ) - } - return chalk.red('unset') - } const configPath = path.join(tauriDir, 'tauri.conf.json') const config = nonWebpackRequire(configPath) as TauriConfig - printInfo({ key: ' mode', value: tauriMode(config) }) printInfo({ key: ' build-type', value: config.tauri.bundle?.active ? 'bundle' : 'build' diff --git a/cli/tauri.js/src/template/defaultConfig.ts b/cli/tauri.js/src/template/defaultConfig.ts index 91c1de100..8293f62e3 100644 --- a/cli/tauri.js/src/template/defaultConfig.ts +++ b/cli/tauri.js/src/template/defaultConfig.ts @@ -7,9 +7,6 @@ export default { }, ctx: {}, tauri: { - embeddedServer: { - active: true - }, bundle: { active: true, targets: 'all', // or an array of targets @@ -51,9 +48,6 @@ export default { security: { csp: "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'" - }, - inliner: { - active: true } } } diff --git a/cli/tauri.js/src/types/config.schema.json b/cli/tauri.js/src/types/config.schema.json index 656583d97..9572f4781 100644 --- a/cli/tauri.js/src/types/config.schema.json +++ b/cli/tauri.js/src/types/config.schema.json @@ -391,10 +391,6 @@ "defaultProperties": [], "description": "the embedded server configuration", "properties": { - "active": { - "description": "whether we should use the embedded-server or the no-server mode", - "type": "boolean" - }, "port": { "anyOf": [ { @@ -414,16 +410,6 @@ }, "type": "object" }, - "inliner": { - "additionalProperties": false, - "defaultProperties": [], - "properties": { - "active": { - "type": "boolean" - } - }, - "type": "object" - }, "security": { "additionalProperties": false, "defaultProperties": [], @@ -461,8 +447,6 @@ "required": [ "allowlist", "bundle", - "embeddedServer", - "inliner", "security", "window" ], diff --git a/cli/tauri.js/src/types/config.ts b/cli/tauri.js/src/types/config.ts index ce081f5c3..2255ebaec 100644 --- a/cli/tauri.js/src/types/config.ts +++ b/cli/tauri.js/src/types/config.ts @@ -220,11 +220,7 @@ export interface TauriConfig { /** * the embedded server configuration */ - embeddedServer: { - /** - * whether we should use the embedded-server or the no-server mode - */ - active?: boolean + embeddedServer?: { /** * the embedded server port number or the 'random' string to generate one at runtime */ @@ -291,9 +287,6 @@ export interface TauriConfig { security: { csp?: string } - inliner: { - active?: boolean - } } plugins?: { [name: string]: { diff --git a/cli/tauri.js/src/types/config.validator.ts b/cli/tauri.js/src/types/config.validator.ts index 3a01d4402..8250d9ea0 100644 --- a/cli/tauri.js/src/types/config.validator.ts +++ b/cli/tauri.js/src/types/config.validator.ts @@ -441,11 +441,6 @@ export const TauriConfigSchema = { defaultProperties: [], description: 'the embedded server configuration', properties: { - active: { - description: - 'whether we should use the embedded-server or the no-server mode', - type: 'boolean' - }, port: { anyOf: [ { @@ -461,22 +456,12 @@ export const TauriConfigSchema = { }, publicPath: { description: - 'The base path for all the assets within your application.', + 'The base path for all the assets within your application', type: 'string' } }, type: 'object' }, - inliner: { - additionalProperties: false, - defaultProperties: [], - properties: { - active: { - type: 'boolean' - } - }, - type: 'object' - }, security: { additionalProperties: false, defaultProperties: [], @@ -511,14 +496,7 @@ export const TauriConfigSchema = { type: 'object' } }, - required: [ - 'allowlist', - 'bundle', - 'embeddedServer', - 'inliner', - 'security', - 'window' - ], + required: ['allowlist', 'bundle', 'security', 'window'], type: 'object' }, verbose: { diff --git a/cli/tauri.js/templates/src-tauri/Cargo.toml b/cli/tauri.js/templates/src-tauri/Cargo.toml index 30bf04007..f28d0d543 100755 --- a/cli/tauri.js/templates/src-tauri/Cargo.toml +++ b/cli/tauri.js/templates/src-tauri/Cargo.toml @@ -21,7 +21,6 @@ winres = "0.1" [features] embedded-server = [ "tauri/embedded-server" ] -no-server = [ "tauri/no-server" ] [[bin]] name = "app" diff --git a/cli/tauri.js/test/jest/__tests__/build.spec.js b/cli/tauri.js/test/jest/__tests__/build.spec.js index 087dcf9a7..207984dd4 100644 --- a/cli/tauri.js/test/jest/__tests__/build.spec.js +++ b/cli/tauri.js/test/jest/__tests__/build.spec.js @@ -69,8 +69,6 @@ describe('Tauri Build', () => { mode | flag ${'embedded-server'} | ${'debug'} ${'embedded-server'} | ${'release'} - ${'no-server'} | ${'debug'} - ${'no-server'} | ${'release'} `('works with the $mode $flag mode', ({ mode, flag }) => { return runBuildTest({ debug: flag === 'debug', @@ -79,9 +77,6 @@ describe('Tauri Build', () => { tauri: { allowlist: { all: true - }, - embeddedServer: { - active: mode === 'embedded-server' } } } diff --git a/cli/tauri.js/test/jest/fixtures/app/.gitignore b/cli/tauri.js/test/jest/fixtures/app/.gitignore index de9dd9dcb..02966913a 100644 --- a/cli/tauri.js/test/jest/fixtures/app/.gitignore +++ b/cli/tauri.js/test/jest/fixtures/app/.gitignore @@ -1,2 +1 @@ -dist/index.tauri.html dist/__tauri.js diff --git a/cli/tauri.js/test/jest/fixtures/app/index.js b/cli/tauri.js/test/jest/fixtures/app/index.js index c930b879f..8ebbac0f1 100644 --- a/cli/tauri.js/test/jest/fixtures/app/index.js +++ b/cli/tauri.js/test/jest/fixtures/app/index.js @@ -34,11 +34,6 @@ build({ }, ctx: { debug: true - }, - tauri: { - embeddedServer: { - active: true - } } }).then(() => { const spawn = require('../cli/tauri.js/dist/helpers/spawn').spawn diff --git a/cli/tauri.js/test/jest/fixtures/app/src-tauri/Cargo.toml b/cli/tauri.js/test/jest/fixtures/app/src-tauri/Cargo.toml index 5d97cbbe9..acd2319a6 100644 --- a/cli/tauri.js/test/jest/fixtures/app/src-tauri/Cargo.toml +++ b/cli/tauri.js/test/jest/fixtures/app/src-tauri/Cargo.toml @@ -28,7 +28,6 @@ tauri = { path = "../../../../../../../tauri", features =["all-api"]} [features] embedded-server = [ "tauri/embedded-server" ] -no-server = [ "tauri/no-server" ] [[bin]] name = "app" diff --git a/cli/tauri.js/test/jest/fixtures/empty/.gitignore b/cli/tauri.js/test/jest/fixtures/empty/.gitignore index 01fab07b0..ea16b7613 100644 --- a/cli/tauri.js/test/jest/fixtures/empty/.gitignore +++ b/cli/tauri.js/test/jest/fixtures/empty/.gitignore @@ -1,3 +1,2 @@ src-tauri -dist/index.tauri.html dist/__tauri.js diff --git a/cli/tauri.js/yarn.lock b/cli/tauri.js/yarn.lock index b5aa80c6e..5a2891d9a 100644 --- a/cli/tauri.js/yarn.lock +++ b/cli/tauri.js/yarn.lock @@ -1309,11 +1309,6 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== -"@sindresorhus/is@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" - integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== - "@sinonjs/commons@^1.7.0": version "1.8.2" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" @@ -1328,13 +1323,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@szmarczak/http-timer@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" - integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== - dependencies: - defer-to-connect "^2.0.0" - "@tauri-apps/toml@2.2.4": version "2.2.4" resolved "https://registry.yarnpkg.com/@tauri-apps/toml/-/toml-2.2.4.tgz#2b4f637aded7fc3a7302724605682c8fa3ac7505" @@ -1380,16 +1368,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/cacheable-request@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" - integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "*" - "@types/node" "*" - "@types/responselike" "*" - "@types/cross-spawn@6.0.2", "@types/cross-spawn@^6.0.0": version "6.0.2" resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.2.tgz#168309de311cd30a2b8ae720de6475c2fbf33ac7" @@ -1440,18 +1418,6 @@ dependencies: "@types/node" "*" -"@types/http-cache-semantics@*": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" - integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== - -"@types/http-proxy@1.17.5": - version "1.17.5" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.5.tgz#c203c5e6e9dc6820d27a40eb1e511c70a220423d" - integrity sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q== - dependencies: - "@types/node" "*" - "@types/imagemin-optipng@5.2.0": version "5.2.0" resolved "https://registry.yarnpkg.com/@types/imagemin-optipng/-/imagemin-optipng-5.2.0.tgz#83046e0695739661fa738ad253bdbf51bc4f9e9d" @@ -1493,15 +1459,6 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jsdom@16.2.6": - version "16.2.6" - resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.6.tgz#9ddf0521e49be5365797e690c3ba63148e562c29" - integrity sha512-yQA+HxknGtW9AkRTNyiSH3OKW5V+WzO8OPTdne99XwJkYC+KYxfNIcoJjeiSqP3V00PUUpFP6Myoo9wdIu78DQ== - dependencies: - "@types/node" "*" - "@types/parse5" "*" - "@types/tough-cookie" "*" - "@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" @@ -1517,13 +1474,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/keyv@*": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" - integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== - dependencies: - "@types/node" "*" - "@types/lodash@4.14.168": version "4.14.168" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008" @@ -1554,23 +1504,11 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/parse5@*": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.0.tgz#38590dc2c3cf5717154064e3ee9b6947ee21b299" - integrity sha512-oPwPSj4a1wu9rsXTEGIJz91ISU725t0BmSnUhb57sI+M8XEmvUop84lzuiYdq0Y5M6xLY8DBPg0C2xEQKLyvBA== - "@types/prettier@^2.0.0": version "2.1.6" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.6.tgz#f4b1efa784e8db479cdb8b14403e2144b1e9ff03" integrity sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA== -"@types/responselike@*", "@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - "@types/semver@7.3.4": version "7.3.4" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" @@ -1595,11 +1533,6 @@ dependencies: "@types/node" "*" -"@types/tough-cookie@*": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.0.tgz#fef1904e4668b6e5ecee60c52cc6a078ffa6697d" - integrity sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A== - "@types/yargs-parser@*": version "20.2.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" @@ -2005,7 +1938,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.3, anymatch@~3.1.1: +anymatch@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== @@ -2100,11 +2033,6 @@ array.prototype.flat@^1.2.3: define-properties "^1.1.3" es-abstract "^1.18.0-next.1" -arrify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -2308,11 +2236,6 @@ bin-wrapper@^4.0.0, bin-wrapper@^4.0.1: os-filter-obj "^2.0.0" pify "^4.0.1" -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -2354,7 +2277,7 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1, braces@~3.0.2: +braces@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2435,11 +2358,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - cacheable-request@^2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" @@ -2453,19 +2371,6 @@ cacheable-request@^2.1.1: normalize-url "2.0.1" responselike "1.0.2" -cacheable-request@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" - integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^2.0.0" - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -2567,21 +2472,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chokidar@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.3.1" - chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -2666,7 +2556,7 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clone-response@1.0.2, clone-response@^1.0.2: +clone-response@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= @@ -3061,11 +2951,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -defer-to-connect@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.0.tgz#83d6b199db041593ac84d781b5222308ccf4c2c1" - integrity sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg== - define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3259,9 +3144,9 @@ enquirer@^2.3.5, enquirer@^2.3.6: ansi-colors "^4.1.1" envinfo@^7.7.3: - version "7.7.3" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc" - integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA== + version "7.7.4" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" + integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== errno@^0.1.3: version "0.1.8" @@ -3431,11 +3316,6 @@ eslint-plugin-security@1.4.0: dependencies: safe-regex "^1.1.0" -eslint-plugin-standard@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== - eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -3547,11 +3427,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - events@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" @@ -3940,11 +3815,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== -follow-redirects@^1.0.0: - version "1.13.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" - integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== - for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3999,7 +3869,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.1.2, fsevents@~2.3.1: +fsevents@^2.1.2: version "2.3.1" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== @@ -4089,7 +3959,7 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0, get-stream@^5.1.0: +get-stream@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== @@ -4118,7 +3988,7 @@ github-from-package@0.0.0: resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -4180,23 +4050,6 @@ globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" -got@^11.7.0: - version "11.8.1" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.1.tgz#df04adfaf2e782babb3daabc79139feec2f7e85d" - integrity sha512-9aYdZL+6nHmvJwHALLwKSUZ0hMwGaJGYv3hoPLPgnT8BoBXm1SjnZeky+91tfwJaDzun2s4RsBRy48IEYv2q2Q== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - got@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" @@ -4362,20 +4215,6 @@ http-cache-semantics@3.8.1: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-proxy@1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4385,14 +4224,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.0-beta.5.2" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz#8b923deb90144aea65cf834b016a340fc98556f3" - integrity sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -4600,13 +4431,6 @@ is-arrayish@^0.3.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4717,7 +4541,7 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -4773,30 +4597,11 @@ is-png@2.0.0, is-png@^2.0.0: resolved "https://registry.yarnpkg.com/is-png/-/is-png-2.0.0.tgz#ee8cbc9e9b050425cedeeb4a6fb74a649b0a4a8d" integrity sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g== -is-port-reachable@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-port-reachable/-/is-port-reachable-3.0.0.tgz#edf721e7d354e6e00cbeb0fc174ad89bdf6056b3" - integrity sha512-056IzLiWHdgVd6Eq1F9HtJl+cIkvi5X2MJ/A1fjQtByHkzQE1wGardnPhqrarOGDF88BOW+297X7PDvZ2vcyVg== - is-potential-custom-element-name@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-reachable@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-reachable/-/is-reachable-5.0.0.tgz#caa3a4d1c6368fdafb85cdb7d1e219e5b8fded6b" - integrity sha512-frRPbdrQWEqbnF1il9Dyrf52Q40exkHdo4/grWMjHrBn4G1DKC9sbuQihgANkJPNi2eosU4AXBsrITdXmc3IQg== - dependencies: - arrify "^2.0.1" - got "^11.7.0" - is-port-reachable "^3.0.0" - p-any "^3.0.0" - p-timeout "^3.2.0" - prepend-http "^3.0.1" - router-ips "^1.0.0" - url-parse "^1.4.7" - is-regex@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" @@ -5132,11 +4937,6 @@ jest-message-util@^26.6.2: slash "^3.0.0" stack-utils "^2.0.2" -jest-mock-process@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jest-mock-process/-/jest-mock-process-1.4.0.tgz#7031384115a2d678ee54761356cfcfdc2a34e493" - integrity sha512-3LM1TyEaRKRjh/x9rZPmuy28r7q8cgNkHYcrPWtxXT3ZzPPS+bKNs2ysb8BJPVB41X5yM1sMtatvE5z2XJ0S/w== - jest-mock@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" @@ -5340,7 +5140,7 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@16.4.0, jsdom@^16.4.0: +jsdom@^16.4.0: version "16.4.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.4.0.tgz#36005bde2d136f73eee1a830c6d45e55408edddb" integrity sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w== @@ -5387,11 +5187,6 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -5484,13 +5279,6 @@ keyv@3.0.0: dependencies: json-buffer "3.0.0" -keyv@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.3.tgz#4f3aa98de254803cafcd2896734108daa35e4254" - integrity sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== - dependencies: - json-buffer "3.0.1" - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -5724,11 +5512,6 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - lpad-align@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" @@ -6028,7 +5811,7 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" -normalize-path@^3.0.0, normalize-path@~3.0.0: +normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -6042,11 +5825,6 @@ normalize-url@2.0.1: query-string "^5.0.1" sort-keys "^2.0.0" -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - npm-conf@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" @@ -6228,14 +6006,6 @@ ow@^0.17.0: dependencies: type-fest "^0.11.0" -p-any@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-any/-/p-any-3.0.0.tgz#79847aeed70b5d3a10ea625296c0c3d2e90a87b9" - integrity sha512-5rqbqfsRWNb0sukt0awwgJMlaep+8jV45S15SKKB34z4UuzjcofIfnriCBhWjZP2jbVtjt9yRl7buB6RlKsu9w== - dependencies: - p-cancelable "^2.0.0" - p-some "^5.0.0" - p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -6246,11 +6016,6 @@ p-cancelable@^0.4.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== -p-cancelable@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" - integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== - p-each-series@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" @@ -6353,14 +6118,6 @@ p-reduce@^1.0.0: resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= -p-some@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-some/-/p-some-5.0.0.tgz#8b730c74b4fe5169d7264a240ad010b6ebc686a4" - integrity sha512-Js5XZxo6vHjB9NOYAzWDYAIyyiPvva0DWESAIWIK7uhSpGsyg5FwUPxipU/SOQx5x9EqhOh545d1jo6cVkitig== - dependencies: - aggregate-error "^3.0.0" - p-cancelable "^2.0.0" - p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" @@ -6375,13 +6132,6 @@ p-timeout@^2.0.1: dependencies: p-finally "^1.0.0" -p-timeout@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -6627,11 +6377,6 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prepend-http@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-3.0.1.tgz#3e724d58fd5867465b300bb9615009fa2f8ee3b6" - integrity sha512-BLxfZh+m6UiAiCPZFJ4+vYoL7NrRs5XgCTRrjseATAggXhdZKKxn+JUNmuVYWY23bDHgaEHodxw8mnmtVEDtHw== - prettier@2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" @@ -6719,16 +6464,6 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -querystringify@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" - integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -6842,13 +6577,6 @@ readable-stream@^3.1.1, readable-stream@^3.4.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - rechoir@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" @@ -7009,16 +6737,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-alpn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.0.0.tgz#745ad60b3d6aff4b4a48e01b8c0bdc70959e0e8c" - integrity sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -7056,13 +6774,6 @@ responselike@1.0.2: dependencies: lowercase-keys "^1.0.0" -responselike@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" - integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== - dependencies: - lowercase-keys "^2.0.0" - restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -7095,11 +6806,6 @@ rimraf@^2.5.4: dependencies: glob "^7.1.3" -router-ips@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/router-ips/-/router-ips-1.0.0.tgz#44e00858ebebc0133d58e40b2cd8a1fbb04203f5" - integrity sha1-ROAIWOvrwBM9WOQLLNih+7BCA/U= - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -8008,11 +7714,6 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -8196,14 +7897,6 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" - integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - url-to-options@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" @@ -8299,7 +7992,7 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== -webpack-cli@4.5.0: +webpack-cli@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.5.0.tgz#b5213b84adf6e1f5de6391334c9fa53a48850466" integrity sha512-wXg/ef6Ibstl2f50mnkcHblRPN/P9J4Nlod5Hg9HGFgSeF8rsqDGHJeVe4aR26q9l62TUJi6vmvC2Qz96YJw1Q== @@ -8332,11 +8025,6 @@ webpack-node-externals@2.5.2: resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-2.5.2.tgz#178e017a24fec6015bc9e672c77958a6afac861d" integrity sha512-aHdl/y2N7PW2Sx7K+r3AxpJO+aDMcYzMQd60Qxefq3+EwhewSbTBqNumOsCE1JsCUNoyfGj5465N0sSf6hc/5w== -webpack-shell-plugin@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/webpack-shell-plugin/-/webpack-shell-plugin-0.5.0.tgz#29b8a1d80ddeae0ddb10e729667f728653c2c742" - integrity sha1-Kbih2A3erg3bEOcpZn9yhlPCx0I= - webpack-sources@^2.1.1: version "2.2.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" diff --git a/tauri-api/src/lib.rs b/tauri-api/src/lib.rs index 48710ac70..e829a033c 100644 --- a/tauri-api/src/lib.rs +++ b/tauri-api/src/lib.rs @@ -50,7 +50,6 @@ pub mod private { fn config_path() -> &'static std::path::Path; fn raw_config() -> &'static str; fn assets() -> &'static crate::assets::Assets; - fn raw_index() -> &'static str; fn raw_tauri_script() -> &'static str; } } diff --git a/tauri-macros/src/error.rs b/tauri-macros/src/error.rs index 0577a3a38..5f5e48e19 100644 --- a/tauri-macros/src/error.rs +++ b/tauri-macros/src/error.rs @@ -60,11 +60,6 @@ impl Error { unimplemented!() } - /// Make the index.tauri.html a dependency for the compiler - fn raw_index() -> &'static str { - unimplemented!() - } - /// Make the __tauri.js a dependency for the compiler fn raw_tauri_script() -> &'static str { unimplemented!() diff --git a/tauri-macros/src/expand.rs b/tauri-macros/src/expand.rs index fdf45807d..db250b535 100644 --- a/tauri-macros/src/expand.rs +++ b/tauri-macros/src/expand.rs @@ -39,13 +39,10 @@ pub(crate) fn load_context(input: DeriveInput) -> Result { // generate the assets into a perfect hash function let assets = generate_asset_map(&dist_dir)?; - // should be possible to do the index.tauri.hmtl manipulations during this macro too in the future - let tauri_index_html_path = dist_dir.join("index.tauri.html"); let tauri_script_path = dist_dir.join("__tauri.js"); // format paths into a string to use them in quote! let tauri_config_path = full_config_path.display().to_string(); - let tauri_index_html_path = tauri_index_html_path.display().to_string(); let tauri_script_path = tauri_script_path.display().to_string(); Ok(quote! { @@ -65,11 +62,6 @@ pub(crate) fn load_context(input: DeriveInput) -> Result { &ASSETS } - /// Make the index.tauri.html a dependency for the compiler - fn raw_index() -> &'static str { - include_str!(#tauri_index_html_path) - } - /// Make the __tauri.js a dependency for the compiler fn raw_tauri_script() -> &'static str { include_str!(#tauri_script_path) @@ -108,9 +100,6 @@ fn generate_asset_map(dist: &Path) -> Result { }) } - // the index.html is parsed so we always ignore it - inline_assets.insert("/index.html".into()); - IncludeDir::new(&dist) .dir(&dist, AssetCompression::Gzip)? .set_filter(inline_assets)? diff --git a/tauri/Cargo.toml b/tauri/Cargo.toml index 2210bcd06..996e3c012 100644 --- a/tauri/Cargo.toml +++ b/tauri/Cargo.toml @@ -32,7 +32,6 @@ thiserror = "1.0.23" once_cell = "1.5.2" tauri-api = { version = "0.7.5", path = "../tauri-api" } tauri-macros = { version = "0.1", path = "../tauri-macros" } -urlencoding = "1.1.1" wry = { git = "https://github.com/tauri-apps/wry", rev = "42f4f2133f7921ed5adc47908787094da8abeac5" } [target."cfg(target_os = \"windows\")".dependencies] @@ -50,7 +49,6 @@ serde = { version = "1.0", features = [ "derive" ] } [features] cli = [ "tauri-api/cli" ] embedded-server = [ "tiny_http" ] -no-server = [ ] all-api = [ "tauri-api/notification" ] read-text-file = [ ] read-binary-file = [ ] diff --git a/tauri/build.rs b/tauri/build.rs index 084be3369..b21b6da74 100644 --- a/tauri/build.rs +++ b/tauri/build.rs @@ -3,9 +3,7 @@ use cfg_aliases::cfg_aliases; fn main() { cfg_aliases! { embedded_server: { feature = "embedded-server" }, - no_server: { feature = "no-server" }, - assets: { any(feature = "embedded-server", feature = "no-server") }, - dev: { not(any(feature = "embedded-server", feature = "no-server")) }, + dev: { not(feature = "embedded-server") }, all_api: { feature = "all-api" }, diff --git a/tauri/examples/api/.gitignore b/tauri/examples/api/.gitignore index a48534bfa..f508ced26 100644 --- a/tauri/examples/api/.gitignore +++ b/tauri/examples/api/.gitignore @@ -1,6 +1,5 @@ /node_modules/ /public/build/ -/public/index.tauri.html /public/__tauri.js .DS_Store diff --git a/tauri/examples/api/src-tauri/Cargo.lock b/tauri/examples/api/src-tauri/Cargo.lock index 0fefc722e..8bb6e2be2 100644 --- a/tauri/examples/api/src-tauri/Cargo.lock +++ b/tauri/examples/api/src-tauri/Cargo.lock @@ -2389,7 +2389,6 @@ dependencies = [ "thiserror", "tiny_http", "tokio", - "urlencoding", "uuid", "webbrowser", "wry", @@ -2641,12 +2640,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9232eb53352b4442e40d7900465dfc534e8cb2dc8f18656fcb2ac16112b5593" - [[package]] name = "uuid" version = "0.8.2" diff --git a/tauri/examples/api/src-tauri/Cargo.toml b/tauri/examples/api/src-tauri/Cargo.toml index 1a5883aa6..c2bc6b8fa 100644 --- a/tauri/examples/api/src-tauri/Cargo.toml +++ b/tauri/examples/api/src-tauri/Cargo.toml @@ -21,7 +21,6 @@ winres = "0.1" [features] embedded-server = [ "tauri/embedded-server" ] -no-server = [ "tauri/no-server" ] [[bin]] name = "app" diff --git a/tauri/examples/api/src-tauri/tauri.conf.json b/tauri/examples/api/src-tauri/tauri.conf.json index 73b68e151..f0e9add29 100644 --- a/tauri/examples/api/src-tauri/tauri.conf.json +++ b/tauri/examples/api/src-tauri/tauri.conf.json @@ -43,9 +43,6 @@ } } }, - "embeddedServer": { - "active": true - }, "bundle": { "active": true, "identifier": "com.tauri.communication", @@ -65,9 +62,6 @@ }, "security": { "csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'" - }, - "inliner": { - "active": true } } } diff --git a/tauri/examples/communication/dist/__tauri.js b/tauri/examples/communication/dist/__tauri.js index 991170341..5ce41abbf 100644 --- a/tauri/examples/communication/dist/__tauri.js +++ b/tauri/examples/communication/dist/__tauri.js @@ -145,31 +145,6 @@ if (!String.prototype.startsWith) { }) } - window.__TAURI__.loadAsset = function loadAsset(assetName, assetType) { - return this.promisified({ - cmd: 'loadAsset', - asset: assetName, - assetType: assetType || 'unknown' - }) - } - - document.addEventListener( - 'error', - function (e) { - var target = e.target - while (target != null) { - if (target.matches('img')) { - window.__TAURI__.loadAsset(target.src, 'image').then(function (img) { - target.src = img - }) - break - } - target = target.parentElement - } - }, - true - ) - // open links with the Tauri API function __openLinks() { document.querySelector('body').addEventListener( @@ -309,52 +284,4 @@ if (!String.prototype.startsWith) { message: message }) } -})() - -function __tauri_mutation_observer (target) { - function loadAsset(path, type) { - if (path) { - window.__TAURI__.loadAsset(path, type) - } - } - - var observer = new MutationObserver(mutation => { - mutation.forEach(function (mutationRecord) { - var addedNodes = mutationRecord.addedNodes - addedNodes.forEach(function (node) { - if (node.nodeType === 1) { - if (node.tagName === 'SCRIPT') { - node.onload = node.onerror = null - loadAsset(node.src) - } else if (node.tagName === 'LINK') { - if (node.type === 'text/css' || (node.href && node.href.endsWith('.css'))) { - loadAsset(node.href, 'stylesheet') - } - } - } - }) - }) - }) - - observer.observe(target, { - childList: true, - subtree: true - }) -} - -__tauri_mutation_observer(document.documentElement) -if ( - document.readyState === 'complete' || - document.readyState === 'interactive' -) { - __tauri_mutation_observer(document.head) -} else { - window.addEventListener( - 'DOMContentLoaded', - function () { - __tauri_mutation_observer(document.head) - }, - true - ) -} - +})() \ No newline at end of file diff --git a/tauri/examples/communication/dist/index.tauri.html b/tauri/examples/communication/dist/index.tauri.html deleted file mode 100644 index 387fb4abc..000000000 --- a/tauri/examples/communication/dist/index.tauri.html +++ /dev/null @@ -1 +0,0 @@ -


\ No newline at end of file diff --git a/tauri/examples/communication/src-tauri/Cargo.lock b/tauri/examples/communication/src-tauri/Cargo.lock index 0fefc722e..4170460e7 100644 --- a/tauri/examples/communication/src-tauri/Cargo.lock +++ b/tauri/examples/communication/src-tauri/Cargo.lock @@ -2374,7 +2374,6 @@ dependencies = [ name = "tauri" version = "0.11.1" dependencies = [ - "anyhow", "async-trait", "base64", "cfg_aliases", @@ -2389,7 +2388,6 @@ dependencies = [ "thiserror", "tiny_http", "tokio", - "urlencoding", "uuid", "webbrowser", "wry", @@ -2399,7 +2397,6 @@ dependencies = [ name = "tauri-api" version = "0.7.5" dependencies = [ - "anyhow", "attohttpc", "clap", "dirs-next", @@ -2409,7 +2406,6 @@ dependencies = [ "nfd", "notify-rust", "once_cell", - "phf", "rand 0.8.3", "semver", "serde", @@ -2452,7 +2448,7 @@ dependencies = [ "serde", "serde_json", "syn 1.0.60", - "tauri-api", + "tauri-utils", "walkdir", ] @@ -2460,7 +2456,10 @@ dependencies = [ name = "tauri-utils" version = "0.5.1" dependencies = [ - "anyhow", + "flate2", + "phf", + "serde", + "serde_json", "sysinfo", "thiserror", ] @@ -2641,12 +2640,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "urlencoding" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9232eb53352b4442e40d7900465dfc534e8cb2dc8f18656fcb2ac16112b5593" - [[package]] name = "uuid" version = "0.8.2" diff --git a/tauri/examples/communication/src-tauri/Cargo.toml b/tauri/examples/communication/src-tauri/Cargo.toml index 2280a2899..b26a827cc 100644 --- a/tauri/examples/communication/src-tauri/Cargo.toml +++ b/tauri/examples/communication/src-tauri/Cargo.toml @@ -31,7 +31,6 @@ winres = "0.1" [features] embedded-server = [ "tauri/embedded-server" ] -no-server = [ "tauri/no-server" ] [[bin]] name = "app" diff --git a/tauri/examples/communication/src-tauri/tauri.conf.json b/tauri/examples/communication/src-tauri/tauri.conf.json index b8ad38fc3..083cd7e31 100644 --- a/tauri/examples/communication/src-tauri/tauri.conf.json +++ b/tauri/examples/communication/src-tauri/tauri.conf.json @@ -42,9 +42,6 @@ } } }, - "embeddedServer": { - "active": true - }, "bundle": { "active": true, "identifier": "com.tauri.communication", @@ -64,9 +61,6 @@ }, "security": { "csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'" - }, - "inliner": { - "active": true } } } diff --git a/tauri/examples/communication/yarn.lock b/tauri/examples/communication/yarn.lock index 426be36ce..3a04e2381 100644 --- a/tauri/examples/communication/yarn.lock +++ b/tauri/examples/communication/yarn.lock @@ -52,29 +52,6 @@ dependencies: defer-to-connect "^2.0.0" -"@tauri-apps/tauri-inliner@1.14.1": - version "1.14.1" - resolved "https://registry.yarnpkg.com/@tauri-apps/tauri-inliner/-/tauri-inliner-1.14.1.tgz#7fe4d183188cbeb3edc87d6ac266ac8dbfc25a8c" - integrity sha512-IXlPbWXpKNz0dz1fplPAetBBzKA8kUaOvrrpyJ0jvxMihI9vKHaKP4GDyF89XCi0edXKv2MM+MWaaPVcmy12Bg== - dependencies: - ansi-escapes "^4.3.0" - ansi-styles "^4.2.1" - chalk "^3.0.0" - charset "^1.0.1" - cheerio "^0.22.0" - debug "^4.1.1" - es6-promise "^4.2.8" - iconv-lite "^0.5.0" - jschardet "^2.1.1" - lodash "^4.17.15" - mime "^2.4.4" - minimist "^1.2.0" - request "^2.88.0" - svgo "^1.3.2" - then-fs "^2.0.0" - uglify-js "^3.7.4" - update-notifier "^4.0.0" - "@tauri-apps/toml@2.2.4": version "2.2.4" resolved "https://registry.yarnpkg.com/@tauri-apps/toml/-/toml-2.2.4.tgz#2b4f637aded7fc3a7302724605682c8fa3ac7505" @@ -3969,7 +3946,6 @@ tar-stream@^2.1.4: "tauri@link:../../../cli/tauri.js": version "0.13.0" dependencies: - "@tauri-apps/tauri-inliner" "1.14.1" "@tauri-apps/toml" "2.2.4" chalk "4.1.0" chokidar "3.4.3" diff --git a/tauri/src/app.rs b/tauri/src/app.rs index d4b4712c8..276bc7e2c 100644 --- a/tauri/src/app.rs +++ b/tauri/src/app.rs @@ -13,11 +13,7 @@ type Setup = dyn Fn(W, String) -> BoxFuture<'static, ()> + Send + Sync; pub struct Context { pub(crate) config: Config, pub(crate) tauri_script: &'static str, - #[cfg(assets)] pub(crate) assets: &'static tauri_api::assets::Assets, - #[cfg(any(dev, no_server))] - #[allow(dead_code)] - pub(crate) index: &'static str, } impl Context { @@ -25,10 +21,7 @@ impl Context { Ok(Self { config: serde_json::from_str(Context::raw_config())?, tauri_script: Context::raw_tauri_script(), - #[cfg(assets)] assets: Context::assets(), - #[cfg(any(dev, no_server))] - index: Context::raw_index(), }) } } diff --git a/tauri/src/app/runner.rs b/tauri/src/app/runner.rs index 05abe67d9..cc15ac963 100644 --- a/tauri/src/app/runner.rs +++ b/tauri/src/app/runner.rs @@ -1,8 +1,13 @@ +#[cfg(dev)] +use std::io::Read; use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, }; +#[cfg(dev)] +use crate::api::assets::{AssetFetch, Assets}; + use crate::{ApplicationDispatcherExt, ApplicationExt, WebviewBuilderExt, WindowBuilderExt}; use super::App; @@ -69,11 +74,6 @@ pub(crate) fn run(application: App) -> crate::Re Ok(()) } -#[cfg(all(embedded_server, no_server))] -fn setup_content(_: &Context) -> crate::Result> { - panic!("only one of `embedded-server` and `no-server` is allowed") -} - // setup content for dev-server #[cfg(dev)] fn setup_content(context: &Context) -> crate::Result> { @@ -105,14 +105,26 @@ fn setup_content(context: &Context) -> crate::Result> { Ok(Content::Url(config.build.dev_path.clone())) } else { Ok(Content::Html(format!( - "data:text/html,{}", - urlencoding::encode(context.index) + "data:text/html;base64,{}", + base64::encode( + context + .assets + .get(&Assets::format_key("index.html"), AssetFetch::Decompress) + .ok_or_else(|| crate::Error::AssetNotFound("index.html".to_string())) + .and_then(|(read, _)| { + read + .bytes() + .collect::, _>>() + .map_err(Into::into) + }) + .expect("Unable to find `index.html` under your devPath folder") + ) ))) } } // setup content for embedded server -#[cfg(all(embedded_server, not(no_server)))] +#[cfg(embedded_server)] fn setup_content(context: &Context) -> crate::Result> { let (port, valid) = setup_port(&context); if valid { @@ -123,15 +135,6 @@ fn setup_content(context: &Context) -> crate::Result> { } } -// setup content for no-server -#[cfg(all(no_server, not(embedded_server)))] -fn setup_content(context: &Context) -> crate::Result> { - Ok(Content::Html(format!( - "data:text/html,{}", - urlencoding::encode(context.index) - ))) -} - // get the port for the embedded server #[cfg(embedded_server)] #[allow(dead_code)] @@ -172,7 +175,7 @@ fn spawn_server(server_url: String, context: &Context) { for request in server.incoming_requests() { let url = request.url().replace(&server_url, ""); let url = match url.as_str() { - "/" => "/index.tauri.html", + "/" => "/index.html", url => { if url.starts_with(&public_path) { &url[public_path.len() - 1..] @@ -394,6 +397,8 @@ mod test { use crate::Context; use crate::FromTauriContext; use proptest::prelude::*; + #[cfg(dev)] + use std::io::Read; #[derive(FromTauriContext)] #[config_path = "test/fixture/src-tauri/tauri.conf.json"] @@ -410,17 +415,6 @@ mod test { _ => panic!("setup content failed"), } - #[cfg(no_server)] - match res { - Ok(Content::Html(s)) => { - assert_eq!( - s, - format!("data:text/html,{}", urlencoding::encode(context.index)) - ); - } - _ => panic!("setup content failed"), - } - #[cfg(dev)] { let config = &context.config; @@ -429,7 +423,25 @@ mod test { Ok(Content::Html(s)) => { assert_eq!( s, - format!("data:text/html,{}", urlencoding::encode(context.index)) + format!( + "data:text/html;base64,{}", + base64::encode( + context + .assets + .get( + &crate::api::assets::Assets::format_key("index.html"), + crate::api::assets::AssetFetch::Decompress + ) + .ok_or_else(|| crate::Error::AssetNotFound("index.html".to_string())) + .and_then(|(read, _)| { + read + .bytes() + .collect::, _>>() + .map_err(Into::into) + }) + .expect("Unable to find `index.html` under your dist folder") + ) + ) ); } _ => panic!("setup content failed"), diff --git a/tauri/src/endpoints.rs b/tauri/src/endpoints.rs index 47264dbd2..71dbdc719 100644 --- a/tauri/src/endpoints.rs +++ b/tauri/src/endpoints.rs @@ -4,8 +4,6 @@ mod file_system; mod path; mod salt; -#[cfg(assets)] -mod asset; #[cfg(open)] mod browser; mod dialog; @@ -271,15 +269,6 @@ pub(crate) async fn handle( #[cfg(not(http_request))] allowlist_error(dispatcher, error, "httpRequest"); } - #[cfg(assets)] - LoadAsset { - asset, - asset_type, - callback, - error, - } => { - asset::load(dispatcher, asset, asset_type, callback, error, &context).await; - } CliMatches { callback, error } => { #[cfg(cli)] { diff --git a/tauri/src/endpoints/asset.rs b/tauri/src/endpoints/asset.rs deleted file mode 100644 index a8b0252ce..000000000 --- a/tauri/src/endpoints/asset.rs +++ /dev/null @@ -1,97 +0,0 @@ -use crate::{ApplicationDispatcherExt, Context}; -use tauri_api::assets::{AssetFetch, Assets}; - -use std::io::Read; - -#[allow(clippy::option_env_unwrap)] -pub async fn load( - dispatcher: &mut D, - asset: String, - asset_type: String, - callback: String, - error: String, - ctx: &Context, -) { - let mut dispatcher_ = dispatcher.clone(); - let assets = ctx.assets; - let public_path = ctx.config.tauri.embedded_server.public_path.clone(); - crate::execute_promise( - dispatcher, - async move { - // strip "about:" uri scheme if it exists - let asset = asset.strip_prefix("about:").unwrap_or(&asset); - - // handle public path setting from tauri.conf > tauri > embeddedServer > publicPath - let asset = if asset.starts_with(&public_path) { - &asset[public_path.len() - 1..] - } else { - eprintln!( - "found url not matching public path.\nasset url: {}\npublic path: {}", - asset, public_path - ); - asset - } - .to_string(); - - // how should that condition be handled now? - let asset_bytes: Vec = assets - .get(&Assets::format_key(&asset), AssetFetch::Decompress) - .ok_or_else(|| crate::Error::AssetNotFound(asset.clone())) - .and_then(|(read, _)| { - read - .bytes() - .collect::, _>>() - .map_err(Into::into) - })?; - - if asset_type == "image" { - let mime_type = if asset.ends_with("gif") { - "gif" - } else if asset.ends_with("apng") { - "apng" - } else if asset.ends_with("png") { - "png" - } else if asset.ends_with("avif") { - "avif" - } else if asset.ends_with("webp") { - "webp" - } else if asset.ends_with("svg") { - "svg+xml" - } else { - "jpeg" - }; - crate::Result::Ok(format!( - r#""data:image/{};base64,{}""#, - mime_type, - base64::encode(&asset_bytes) - )) - } else { - let asset_str = - std::str::from_utf8(&asset_bytes).expect("failed to convert asset bytes to u8 slice"); - if asset_type == "stylesheet" { - dispatcher_.eval(&format!( - r#" - (function (content) {{ - var css = document.createElement('style') - css.type = 'text/css' - if (css.styleSheet) - css.styleSheet.cssText = content - else - css.appendChild(document.createTextNode(content)) - document.getElementsByTagName("head")[0].appendChild(css); - }})(`{css}`) - "#, - // Escape octal sequences, which aren't allowed in template literals - css = asset_str.replace("\\", "\\\\").as_str() - )); - } else { - dispatcher_.eval(asset_str); - } - crate::Result::Ok("Asset loaded successfully".to_string()) - } - }, - callback, - error, - ) - .await; -} diff --git a/tauri/src/endpoints/cmd.rs b/tauri/src/endpoints/cmd.rs index 40f6547cc..3e88e72c4 100644 --- a/tauri/src/endpoints/cmd.rs +++ b/tauri/src/endpoints/cmd.rs @@ -204,15 +204,6 @@ pub enum Cmd { callback: String, error: String, }, - /// The load asset into webview API. - #[serde(rename_all = "camelCase")] - #[cfg(assets)] - LoadAsset { - asset: String, - asset_type: String, - callback: String, - error: String, - }, /// The get CLI matches API. CliMatches { callback: String, diff --git a/tauri/test/fixture/dist/index.tauri.html b/tauri/test/fixture/dist/index.html similarity index 100% rename from tauri/test/fixture/dist/index.tauri.html rename to tauri/test/fixture/dist/index.html diff --git a/tauri/test/fixture/src-tauri/tauri.conf.json b/tauri/test/fixture/src-tauri/tauri.conf.json index 3fba2cc88..66b7e9993 100644 --- a/tauri/test/fixture/src-tauri/tauri.conf.json +++ b/tauri/test/fixture/src-tauri/tauri.conf.json @@ -5,9 +5,6 @@ }, "ctx": {}, "tauri": { - "embeddedServer": { - "active": true - }, "bundle": { "identifier": "studio.tauri.example", "active": true @@ -20,9 +17,6 @@ }, "security": { "csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'" - }, - "inliner": { - "active": true } } }