Browse Source

refactor(cli): rewrite info in Rust (#1389)

Lucas Fernandes Nogueira 4 years ago
parent
commit
c3e06ee9e8

+ 6 - 0
.changes/refactor-info.md

@@ -0,0 +1,6 @@
+---
+"tauri-cli": minor
+"tauri.js": minor
+---
+
+The `info` command was rewritten in Rust.

+ 0 - 1
api/package.json

@@ -71,7 +71,6 @@
     "eslint-plugin-node": "11.1.0",
     "eslint-plugin-promise": "4.3.1",
     "eslint-plugin-security": "1.4.0",
-    "lint-staged": "10.5.4",
     "lockfile-lint": "4.6.2",
     "lodash": "4.17.21",
     "prettier": "2.2.1",

+ 8 - 301
api/yarn.lock

@@ -1155,14 +1155,6 @@ acorn@^7.4.0:
   resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
   integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
 
-aggregate-error@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
-  integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==
-  dependencies:
-    clean-stack "^2.0.0"
-    indent-string "^4.0.0"
-
 ajv@^6.10.0, ajv@^6.12.4:
   version "6.12.6"
   resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
@@ -1188,13 +1180,6 @@ ansi-colors@^4.1.1:
   resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
   integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
 
-ansi-escapes@^4.3.0:
-  version "4.3.1"
-  resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
-  integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
-  dependencies:
-    type-fest "^0.11.0"
-
 ansi-regex@^5.0.0:
   version "5.0.0"
   resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
@@ -1355,7 +1340,7 @@ chalk@^2.0.0:
     escape-string-regexp "^1.0.5"
     supports-color "^5.3.0"
 
-chalk@^4.0.0, chalk@^4.1.0:
+chalk@^4.0.0:
   version "4.1.0"
   resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
   integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
@@ -1363,26 +1348,6 @@ chalk@^4.0.0, chalk@^4.1.0:
     ansi-styles "^4.1.0"
     supports-color "^7.1.0"
 
-clean-stack@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
-  integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
-
-cli-cursor@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
-  integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
-  dependencies:
-    restore-cursor "^3.1.0"
-
-cli-truncate@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7"
-  integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==
-  dependencies:
-    slice-ansi "^3.0.0"
-    string-width "^4.2.0"
-
 cliui@^7.0.2:
   version "7.0.4"
   resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
@@ -1431,11 +1396,6 @@ commander@^4.0.0:
   resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
   integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
 
-commander@^6.2.0:
-  version "6.2.1"
-  resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
-  integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
-
 commondir@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
@@ -1477,18 +1437,7 @@ cosmiconfig@^6.0.0:
     path-type "^4.0.0"
     yaml "^1.7.2"
 
-cosmiconfig@^7.0.0:
-  version "7.0.0"
-  resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3"
-  integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==
-  dependencies:
-    "@types/parse-json" "^4.0.0"
-    import-fresh "^3.2.1"
-    parse-json "^5.0.0"
-    path-type "^4.0.0"
-    yaml "^1.10.0"
-
-cross-spawn@^7.0.0, cross-spawn@^7.0.2:
+cross-spawn@^7.0.2:
   version "7.0.3"
   resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
   integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@@ -1504,18 +1453,13 @@ debug@^2.6.9:
   dependencies:
     ms "2.0.0"
 
-debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0:
+debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
   version "4.3.1"
   resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
   integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
   dependencies:
     ms "2.1.2"
 
-dedent@^0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
-  integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
-
 deep-is@^0.1.3:
   version "0.1.3"
   resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
@@ -1565,14 +1509,7 @@ emoji-regex@^8.0.0:
   resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
   integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
 
-end-of-stream@^1.1.0:
-  version "1.4.4"
-  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
-  integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
-  dependencies:
-    once "^1.4.0"
-
-enquirer@^2.3.5, enquirer@^2.3.6:
+enquirer@^2.3.5:
   version "2.3.6"
   resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
   integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
@@ -1841,21 +1778,6 @@ esutils@^2.0.2:
   resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
   integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
 
-execa@^4.1.0:
-  version "4.1.0"
-  resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
-  integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
-  dependencies:
-    cross-spawn "^7.0.0"
-    get-stream "^5.0.0"
-    human-signals "^1.1.1"
-    is-stream "^2.0.0"
-    merge-stream "^2.0.0"
-    npm-run-path "^4.0.0"
-    onetime "^5.1.0"
-    signal-exit "^3.0.2"
-    strip-final-newline "^2.0.0"
-
 fast-deep-equal@^3.1.1:
   version "3.1.3"
   resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
@@ -1890,13 +1812,6 @@ fastq@^1.6.0:
   dependencies:
     reusify "^1.0.4"
 
-figures@^3.2.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
-  integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
-  dependencies:
-    escape-string-regexp "^1.0.5"
-
 file-entry-cache@^6.0.1:
   version "6.0.1"
   resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
@@ -1970,18 +1885,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1:
     has "^1.0.3"
     has-symbols "^1.0.1"
 
-get-own-enumerable-property-symbols@^3.0.0:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664"
-  integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==
-
-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==
-  dependencies:
-    pump "^3.0.0"
-
 glob-parent@^5.0.0, glob-parent@^5.1.0:
   version "5.1.2"
   resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
@@ -2069,11 +1972,6 @@ hosted-git-info@^2.1.4:
   resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
   integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
 
-human-signals@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
-  integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
-
 ignore@^4.0.6:
   version "4.0.6"
   resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
@@ -2097,11 +1995,6 @@ imurmurhash@^0.1.4:
   resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
   integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
 
-indent-string@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
-  integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
-
 inflight@^1.0.4:
   version "1.0.6"
   resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
@@ -2186,11 +2079,6 @@ is-number@^7.0.0:
   resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
   integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
 
-is-obj@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
-  integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
-
 is-reference@^1.2.1:
   version "1.2.1"
   resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
@@ -2206,16 +2094,6 @@ is-regex@^1.1.2:
     call-bind "^1.0.2"
     has-symbols "^1.0.1"
 
-is-regexp@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
-  integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
-
-is-stream@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
-  integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
-
 is-string@^1.0.5:
   version "1.0.5"
   resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
@@ -2317,42 +2195,6 @@ lines-and-columns@^1.1.6:
   resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
   integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
 
-lint-staged@10.5.4:
-  version "10.5.4"
-  resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.4.tgz#cd153b5f0987d2371fc1d2847a409a2fe705b665"
-  integrity sha512-EechC3DdFic/TdOPgj/RB3FicqE6932LTHCUm0Y2fsD9KGlLB+RwJl2q1IYBIvEsKzDOgn0D4gll+YxG5RsrKg==
-  dependencies:
-    chalk "^4.1.0"
-    cli-truncate "^2.1.0"
-    commander "^6.2.0"
-    cosmiconfig "^7.0.0"
-    debug "^4.2.0"
-    dedent "^0.7.0"
-    enquirer "^2.3.6"
-    execa "^4.1.0"
-    listr2 "^3.2.2"
-    log-symbols "^4.0.0"
-    micromatch "^4.0.2"
-    normalize-path "^3.0.0"
-    please-upgrade-node "^3.2.0"
-    string-argv "0.3.1"
-    stringify-object "^3.3.0"
-
-listr2@^3.2.2:
-  version "3.4.1"
-  resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.4.1.tgz#3c90d6add087f648c7ab7173e4520ddfd10f0e21"
-  integrity sha512-TYim70Kml0vISlYH7mWHqeiBytkfDwWtp4Z+HmxEXWkXCRz6sCxHisOM3b1w+OYfhLlwB7ADblC0cdZhZIriPA==
-  dependencies:
-    chalk "^4.1.0"
-    cli-truncate "^2.1.0"
-    figures "^3.2.0"
-    indent-string "^4.0.0"
-    log-update "^4.0.0"
-    p-map "^4.0.0"
-    rxjs "^6.6.6"
-    through "^2.3.8"
-    wrap-ansi "^7.0.0"
-
 load-json-file@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
@@ -2400,23 +2242,6 @@ lodash@4.17.21, lodash@>=4.17.19, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17
   resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
   integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
 
-log-symbols@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920"
-  integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
-  dependencies:
-    chalk "^4.0.0"
-
-log-update@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1"
-  integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==
-  dependencies:
-    ansi-escapes "^4.3.0"
-    cli-cursor "^3.1.0"
-    slice-ansi "^4.0.0"
-    wrap-ansi "^6.2.0"
-
 lru-cache@^6.0.0:
   version "6.0.0"
   resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
@@ -2449,11 +2274,6 @@ micromatch@^4.0.2:
     braces "^3.0.1"
     picomatch "^2.0.5"
 
-mimic-fn@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
-  integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
-
 minimatch@^3.0.4:
   version "3.0.4"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
@@ -2510,18 +2330,6 @@ normalize-package-data@^2.3.2:
     semver "2 || 3 || 4 || 5"
     validate-npm-package-license "^3.0.1"
 
-normalize-path@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
-  integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
-
-npm-run-path@^4.0.0:
-  version "4.0.1"
-  resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
-  integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
-  dependencies:
-    path-key "^3.0.0"
-
 object-assign@^4.0.1:
   version "4.1.1"
   resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
@@ -2562,20 +2370,13 @@ object.values@^1.1.1:
     es-abstract "^1.18.0-next.2"
     has "^1.0.3"
 
-once@^1.3.0, once@^1.3.1, once@^1.4.0:
+once@^1.3.0:
   version "1.4.0"
   resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
   integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
   dependencies:
     wrappy "1"
 
-onetime@^5.1.0:
-  version "5.1.2"
-  resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
-  integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
-  dependencies:
-    mimic-fn "^2.1.0"
-
 optionator@^0.9.1:
   version "0.9.1"
   resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
@@ -2602,13 +2403,6 @@ p-locate@^2.0.0:
   dependencies:
     p-limit "^1.1.0"
 
-p-map@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b"
-  integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
-  dependencies:
-    aggregate-error "^3.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"
@@ -2653,7 +2447,7 @@ path-is-absolute@^1.0.0:
   resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
   integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
 
-path-key@^3.0.0, path-key@^3.1.0:
+path-key@^3.1.0:
   version "3.1.1"
   resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
   integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
@@ -2699,13 +2493,6 @@ pkg-dir@^2.0.0:
   dependencies:
     find-up "^2.1.0"
 
-please-upgrade-node@^3.2.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942"
-  integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==
-  dependencies:
-    semver-compare "^1.0.0"
-
 prelude-ls@^1.2.1:
   version "1.2.1"
   resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -2721,14 +2508,6 @@ progress@^2.0.0:
   resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
   integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
 
-pump@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
-  integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
-  dependencies:
-    end-of-stream "^1.1.0"
-    once "^1.3.1"
-
 punycode@^2.1.0:
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
@@ -2839,14 +2618,6 @@ resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.1
     is-core-module "^2.2.0"
     path-parse "^1.0.6"
 
-restore-cursor@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
-  integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
-  dependencies:
-    onetime "^5.1.0"
-    signal-exit "^3.0.2"
-
 ret@~0.1.10:
   version "0.1.15"
   resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
@@ -2888,13 +2659,6 @@ run-parallel@^1.1.9:
   dependencies:
     queue-microtask "^1.2.2"
 
-rxjs@^6.6.6:
-  version "6.6.6"
-  resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.6.tgz#14d8417aa5a07c5e633995b525e1e3c0dec03b70"
-  integrity sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg==
-  dependencies:
-    tslib "^1.9.0"
-
 safe-buffer@^5.1.0:
   version "5.2.1"
   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
@@ -2912,11 +2676,6 @@ safe-regex@^1.1.0:
   dependencies:
     ret "~0.1.10"
 
-semver-compare@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
-  integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
-
 "semver@2 || 3 || 4 || 5":
   version "5.7.1"
   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
@@ -2958,25 +2717,11 @@ shebang-regex@^3.0.0:
   resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
   integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
 
-signal-exit@^3.0.2:
-  version "3.0.3"
-  resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
-  integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
-
 slash@^3.0.0:
   version "3.0.0"
   resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
   integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
 
-slice-ansi@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"
-  integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==
-  dependencies:
-    ansi-styles "^4.0.0"
-    astral-regex "^2.0.0"
-    is-fullwidth-code-point "^3.0.0"
-
 slice-ansi@^4.0.0:
   version "4.0.0"
   resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
@@ -3045,11 +2790,6 @@ sprintf-js@~1.0.2:
   resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
   integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
 
-string-argv@0.3.1:
-  version "0.3.1"
-  resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"
-  integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
-
 string-width@^4.1.0, string-width@^4.2.0:
   version "4.2.2"
   resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
@@ -3075,15 +2815,6 @@ string.prototype.trimstart@^1.0.4:
     call-bind "^1.0.2"
     define-properties "^1.1.3"
 
-stringify-object@^3.3.0:
-  version "3.3.0"
-  resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629"
-  integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==
-  dependencies:
-    get-own-enumerable-property-symbols "^3.0.0"
-    is-obj "^1.0.1"
-    is-regexp "^1.0.0"
-
 strip-ansi@^6.0.0:
   version "6.0.0"
   resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
@@ -3096,11 +2827,6 @@ strip-bom@^3.0.0:
   resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
   integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
 
-strip-final-newline@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
-  integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
-
 strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
   version "3.1.1"
   resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
@@ -3170,11 +2896,6 @@ thenify-all@^1.0.0:
   dependencies:
     any-promise "^1.0.0"
 
-through@^2.3.8:
-  version "2.3.8"
-  resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
-  integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
-
 to-fast-properties@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
@@ -3207,7 +2928,7 @@ tslib@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:
+tslib@^1.8.1:
   version "1.14.1"
   resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
   integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
@@ -3226,11 +2947,6 @@ type-check@^0.4.0, type-check@~0.4.0:
   dependencies:
     prelude-ls "^1.2.1"
 
-type-fest@^0.11.0:
-  version "0.11.0"
-  resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
-  integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
-
 type-fest@^0.20.2:
   version "0.20.2"
   resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
@@ -3322,15 +3038,6 @@ word-wrap@^1.2.3:
   resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
   integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
 
-wrap-ansi@^6.2.0:
-  version "6.2.0"
-  resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
-  integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
-  dependencies:
-    ansi-styles "^4.0.0"
-    string-width "^4.1.0"
-    strip-ansi "^6.0.0"
-
 wrap-ansi@^7.0.0:
   version "7.0.0"
   resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
@@ -3355,7 +3062,7 @@ yallist@^4.0.0:
   resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
   integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
 
-yaml@^1.10.0, yaml@^1.7.2:
+yaml@^1.7.2:
   version "1.10.0"
   resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
   integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==

+ 203 - 0
cli/core/Cargo.lock

@@ -113,6 +113,12 @@ dependencies = [
  "byte-tools",
 ]
 
+[[package]]
+name = "bumpalo"
+version = "3.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
+
 [[package]]
 name = "byte-tools"
 version = "0.3.1"
@@ -189,6 +195,12 @@ 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 = "3.0.0-beta.2"
@@ -789,6 +801,15 @@ dependencies = [
  "rayon",
 ]
 
+[[package]]
+name = "js-sys"
+version = "0.3.49"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc15e39392125075f60c95ba416f5381ff6c3a948ff02ab12464715adf56c821"
+dependencies = [
+ "wasm-bindgen",
+]
+
 [[package]]
 name = "json-patch"
 version = "0.2.6"
@@ -1124,6 +1145,17 @@ dependencies = [
  "vcpkg",
 ]
 
+[[package]]
+name = "os_info"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2127a5da3c69035537febc04cd07008bb643653303b213a49b036d944531207"
+dependencies = [
+ "log",
+ "serde",
+ "winapi 0.3.9",
+]
+
 [[package]]
 name = "os_str_bytes"
 version = "2.4.0"
@@ -1467,12 +1499,40 @@ dependencies = [
  "winapi 0.3.9",
 ]
 
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin",
+ "untrusted",
+ "web-sys",
+ "winapi 0.3.9",
+]
+
 [[package]]
 name = "rle-decode-fast"
 version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
 
+[[package]]
+name = "rustls"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b"
+dependencies = [
+ "base64",
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
 [[package]]
 name = "ryu"
 version = "1.0.5"
@@ -1534,6 +1594,16 @@ version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
 
+[[package]]
+name = "sct"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
 [[package]]
 name = "security-framework"
 version = "2.1.1"
@@ -1557,6 +1627,24 @@ dependencies = [
  "libc",
 ]
 
+[[package]]
+name = "semver"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6"
+dependencies = [
+ "semver-parser",
+]
+
+[[package]]
+name = "semver-parser"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7"
+dependencies = [
+ "pest",
+]
+
 [[package]]
 name = "serde"
 version = "1.0.123"
@@ -1674,6 +1762,12 @@ version = "0.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
 
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
 [[package]]
 name = "strsim"
 version = "0.10.0"
@@ -1747,7 +1841,10 @@ dependencies = [
  "json-patch",
  "notify",
  "once_cell",
+ "os_info",
+ "regex",
  "schemars",
+ "semver",
  "serde",
  "serde_json",
  "serde_with",
@@ -1755,6 +1852,7 @@ dependencies = [
  "tauri-bundler",
  "toml",
  "toml_edit",
+ "ureq",
  "valico",
  "which",
 ]
@@ -1952,6 +2050,28 @@ dependencies = [
  "void",
 ]
 
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "ureq"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6585dcbf3483242f77b502864478ede62431baf3442b99367d3456ec20c1707b"
+dependencies = [
+ "base64",
+ "chunked_transfer",
+ "log",
+ "once_cell",
+ "rustls",
+ "url",
+ "webpki",
+ "webpki-roots",
+]
+
 [[package]]
 name = "uritemplate-next"
 version = "0.2.0"
@@ -2052,6 +2172,89 @@ 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.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe"
+dependencies = [
+ "cfg-if 1.0.0",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "046ceba58ff062da072c7cb4ba5b22a37f00a302483f7e2a6cdc18fedbdc1fd3"
+dependencies = [
+ "bumpalo",
+ "lazy_static",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ef9aa01d36cda046f797c57959ff5f3c615c9cc63997a8d545831ec7976819b"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96eb45c1b2ee33545a813a92dbb53856418bf7eb54ab34f7f7ff1448a5b3735d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7148f4696fb4960a346eaa60bbfb42a1ac4ebba21f750f75fc1375b098d5ffa"
+
+[[package]]
+name = "web-sys"
+version = "0.3.49"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59fe19d70f5dacc03f6e46777213facae5ac3801575d56ca6cbd4c93dcd12310"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki"
+version = "0.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376"
+dependencies = [
+ "webpki",
+]
+
 [[package]]
 name = "weezl"
 version = "0.1.4"

+ 4 - 0
cli/core/Cargo.toml

@@ -29,6 +29,10 @@ valico = "3.6"
 handlebars = "3.5"
 include_dir = "0.6"
 dialoguer = "0.8"
+ureq = "2.0"
+os_info = "3.0"
+semver = "0.11"
+regex = "1.4"
 
 [build-dependencies]
 schemars = "0.8"

+ 1 - 1
cli/core/config_definition.rs

@@ -257,7 +257,7 @@ fn default_decorations() -> bool {
 #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct SecurityConfig {
-  csp: Option<String>,
+  pub csp: Option<String>,
 }
 
 trait Allowlist {

+ 462 - 1
cli/core/src/info.rs

@@ -1,12 +1,473 @@
+use crate::helpers::{
+  app_paths::{app_dir, tauri_dir},
+  config::get as get_config,
+};
+use serde::Deserialize;
+
+use std::{
+  collections::HashMap,
+  fs::{read_dir, read_to_string},
+  panic,
+  path::{Path, PathBuf},
+  process::Command,
+};
+
+#[derive(Deserialize)]
+struct PackageJsonEngines {
+  node: String,
+}
+
+#[derive(Deserialize)]
+struct PackageJson {
+  version: String,
+  engines: PackageJsonEngines,
+}
+
+#[derive(Deserialize)]
+struct YarnVersionInfo {
+  data: Vec<String>,
+}
+
+#[derive(Clone, Deserialize)]
+struct CargoLockPackage {
+  name: String,
+  version: String,
+}
+
+#[derive(Deserialize)]
+struct CargoLock {
+  package: Vec<CargoLockPackage>,
+}
+
+#[derive(Clone, Deserialize)]
+struct CargoManifestDependencyPackage {
+  version: Option<String>,
+  path: Option<PathBuf>,
+  #[serde(default)]
+  features: Vec<String>,
+}
+
+#[derive(Clone, Deserialize)]
+#[serde(untagged)]
+enum CargoManifestDependency {
+  Version(String),
+  Package(CargoManifestDependencyPackage),
+}
+
+#[derive(Deserialize)]
+struct CargoManifestPackage {
+  version: String,
+}
+
+#[derive(Deserialize)]
+struct CargoManifest {
+  package: CargoManifestPackage,
+  dependencies: HashMap<String, CargoManifestDependency>,
+}
+
 #[derive(Default)]
 pub struct Info;
 
+fn crate_latest_version(name: &str) -> Option<String> {
+  let url = format!("https://docs.rs/crate/{}/", name);
+  match ureq::get(&url).call() {
+    Ok(response) => match (response.status(), response.header("location")) {
+      (302, Some(location)) => Some(location.replace(&url, "")),
+      _ => None,
+    },
+    Err(_) => None,
+  }
+}
+
+fn npm_latest_version(use_yarn: bool, name: &str) -> crate::Result<Option<String>> {
+  if use_yarn {
+    let output = Command::new("yarn")
+      .arg("info")
+      .arg(name)
+      .args(&["version", "--json"])
+      .output()?;
+    if output.status.success() {
+      let stdout = String::from_utf8_lossy(&output.stdout);
+      let info: YarnVersionInfo = serde_json::from_str(&stdout)?;
+      Ok(Some(info.data.last().unwrap().to_string()))
+    } else {
+      Ok(None)
+    }
+  } else {
+    let output = Command::new("npm")
+      .arg("show")
+      .arg(name)
+      .arg("version")
+      .output()?;
+    if output.status.success() {
+      let stdout = String::from_utf8_lossy(&output.stdout);
+      Ok(Some(stdout.replace("\n", "")))
+    } else {
+      Ok(None)
+    }
+  }
+}
+
+fn npm_package_version<P: AsRef<Path>>(
+  use_yarn: bool,
+  name: &str,
+  app_dir: P,
+) -> crate::Result<Option<String>> {
+  let output = if use_yarn {
+    Command::new("yarn")
+      .args(&["list", "--pattern"])
+      .arg(name)
+      .args(&["--depth", "0"])
+      .current_dir(app_dir)
+      .output()?
+  } else {
+    Command::new("npm")
+      .arg("list")
+      .arg(name)
+      .args(&["version", "--depth", "0"])
+      .current_dir(app_dir)
+      .output()?
+  };
+  if output.status.success() {
+    let stdout = String::from_utf8_lossy(&output.stdout);
+    let regex = regex::Regex::new("@([\\da-zA-Z\\.]+)").unwrap();
+    Ok(
+      regex
+        .captures_iter(&stdout)
+        .last()
+        .and_then(|cap| cap.get(1).map(|v| v.as_str().to_string())),
+    )
+  } else {
+    Ok(None)
+  }
+}
+
+fn get_version(command: &str, args: &[&str]) -> crate::Result<Option<String>> {
+  let output = Command::new(command).args(args).arg("--version").output()?;
+  let version = if output.status.success() {
+    Some(String::from_utf8_lossy(&output.stdout).replace("\n", ""))
+  } else {
+    None
+  };
+  Ok(version)
+}
+
+struct InfoBlock {
+  section: bool,
+  key: &'static str,
+  value: Option<String>,
+  suffix: Option<String>,
+}
+
+impl InfoBlock {
+  fn new(key: &'static str) -> Self {
+    Self {
+      section: false,
+      key,
+      value: None,
+      suffix: None,
+    }
+  }
+
+  fn section(mut self) -> Self {
+    self.section = true;
+    self
+  }
+
+  fn value<V: Into<Option<String>>>(mut self, value: V) -> Self {
+    self.value = value.into();
+    self
+  }
+
+  fn suffix<S: Into<Option<String>>>(mut self, suffix: S) -> Self {
+    self.suffix = suffix.into();
+    self
+  }
+
+  fn display(&self) {
+    if self.section {
+      println!();
+    }
+    print!("{}", self.key);
+    if let Some(value) = &self.value {
+      print!(" - {}", value);
+    }
+    if let Some(suffix) = &self.suffix {
+      print!("{}", suffix);
+    }
+    println!();
+  }
+}
+
+struct VersionBlock {
+  section: bool,
+  key: &'static str,
+  version: Option<String>,
+  target_version: Option<String>,
+}
+
+impl VersionBlock {
+  fn new<V: Into<Option<String>>>(key: &'static str, version: V) -> Self {
+    Self {
+      section: false,
+      key,
+      version: version.into(),
+      target_version: None,
+    }
+  }
+
+  fn target_version<V: Into<Option<String>>>(mut self, version: V) -> Self {
+    self.target_version = version.into();
+    self
+  }
+
+  fn display(&self) {
+    if self.section {
+      println!();
+    }
+    print!("{}", self.key);
+    if let Some(version) = &self.version {
+      print!(" - {}", version);
+    } else {
+      print!(" Not installed");
+    }
+    if let (Some(version), Some(target_version)) = (&self.version, &self.target_version) {
+      let version = semver::Version::parse(version).unwrap();
+      let target_version = semver::Version::parse(target_version).unwrap();
+      if version < target_version {
+        print!(" (outdated, latest: {})", target_version);
+      }
+    }
+    println!();
+  }
+}
+
 impl Info {
   pub fn new() -> Self {
     Default::default()
   }
 
   pub fn run(self) -> crate::Result<()> {
-    unimplemented!()
+    let os_info = os_info::get();
+    InfoBlock {
+      section: true,
+      key: "Operating System",
+      value: Some(format!(
+        "{}, version {} {:?}",
+        os_info.os_type(),
+        os_info.version(),
+        os_info.bitness()
+      )),
+      suffix: None,
+    }
+    .display();
+
+    let hook = panic::take_hook();
+    panic::set_hook(Box::new(|_info| {
+      // do nothing
+    }));
+    let app_dir = panic::catch_unwind(app_dir).map(Some).unwrap_or_default();
+    panic::set_hook(hook);
+
+    let use_yarn = app_dir
+      .map(|dir| dir.join("yarn.lock").exists())
+      .unwrap_or_default();
+
+    if let Some(node_version) = get_version("node", &[]).unwrap_or_default() {
+      InfoBlock::new("Node.js environment").section().display();
+      let cli_package_json: PackageJson =
+        serde_json::from_str(include_str!("../../tauri.js/package.json"))?;
+      VersionBlock::new(
+        "  Node.js",
+        node_version.chars().skip(1).collect::<String>(),
+      )
+      .target_version(cli_package_json.engines.node.replace(">= ", ""))
+      .display();
+
+      VersionBlock::new("  @tauri-apps/cli", cli_package_json.version)
+        .target_version(npm_latest_version(use_yarn, "@tauri-apps/cli").unwrap_or_default())
+        .display();
+      if let Some(app_dir) = &app_dir {
+        VersionBlock::new(
+          "  @tauri-apps/api",
+          npm_package_version(use_yarn, "@tauri-apps/api", app_dir).unwrap_or_default(),
+        )
+        .target_version(npm_latest_version(use_yarn, "@tauri-apps/api").unwrap_or_default())
+        .display();
+      }
+
+      InfoBlock::new("Global packages").section().display();
+
+      VersionBlock::new("  npm", get_version("npm", &[]).unwrap_or_default()).display();
+      VersionBlock::new("  yarn", get_version("yarn", &[]).unwrap_or_default()).display();
+    }
+
+    InfoBlock::new("Rust environment").section().display();
+    VersionBlock::new(
+      "  rustc",
+      get_version("rustc", &[]).unwrap_or_default().map(|v| {
+        let mut s = v.split(' ');
+        s.next();
+        s.next().unwrap().to_string()
+      }),
+    )
+    .display();
+    VersionBlock::new(
+      "  cargo",
+      get_version("cargo", &[]).unwrap_or_default().map(|v| {
+        let mut s = v.split(' ');
+        s.next();
+        s.next().unwrap().to_string()
+      }),
+    )
+    .display();
+
+    if let Some(app_dir) = app_dir {
+      InfoBlock::new("App directory structure")
+        .section()
+        .display();
+      for entry in read_dir(app_dir)? {
+        let entry = entry?;
+        if entry.path().is_dir() {
+          println!("/{}", entry.path().file_name().unwrap().to_string_lossy());
+        }
+      }
+
+      InfoBlock::new("App").section().display();
+      let tauri_dir = tauri_dir();
+      let manifest: Option<CargoManifest> =
+        if let Ok(manifest_contents) = read_to_string(tauri_dir.join("Cargo.toml")) {
+          toml::from_str(&manifest_contents).ok()
+        } else {
+          None
+        };
+      let lock: Option<CargoLock> =
+        if let Ok(lock_contents) = read_to_string(tauri_dir.join("Cargo.lock")) {
+          toml::from_str(&lock_contents).ok()
+        } else {
+          None
+        };
+      let tauri_lock_packages: Vec<CargoLockPackage> = lock
+        .as_ref()
+        .map(|lock| {
+          lock
+            .package
+            .iter()
+            .filter(|p| p.name == "tauri")
+            .cloned()
+            .collect()
+        })
+        .unwrap_or_default();
+      let (tauri_version_string, found_tauri_versions) =
+        match (&manifest, &lock, tauri_lock_packages.len()) {
+          (Some(_manifest), Some(_lock), 1) => {
+            let tauri_lock_package = tauri_lock_packages.first().unwrap();
+            (
+              tauri_lock_package.version.clone(),
+              vec![tauri_lock_package.version.clone()],
+            )
+          }
+          (None, Some(_lock), 1) => {
+            let tauri_lock_package = tauri_lock_packages.first().unwrap();
+            (
+              format!("{} (no manifest)", tauri_lock_package.version),
+              vec![tauri_lock_package.version.clone()],
+            )
+          }
+          _ => {
+            let mut found_tauri_versions = Vec::new();
+            let manifest_version = match manifest.and_then(|m| m.dependencies.get("tauri").cloned())
+            {
+              Some(tauri) => match tauri {
+                CargoManifestDependency::Version(v) => {
+                  found_tauri_versions.push(v.clone());
+                  v
+                }
+                CargoManifestDependency::Package(p) => {
+                  if let Some(v) = p.version {
+                    found_tauri_versions.push(v.clone());
+                    v
+                  } else if let Some(p) = p.path {
+                    let manifest_path = tauri_dir.join(&p).join("Cargo.toml");
+                    let v = match read_to_string(&manifest_path)
+                      .map_err(|_| ())
+                      .and_then(|m| toml::from_str::<CargoManifest>(&m).map_err(|_| ()))
+                    {
+                      Ok(manifest) => manifest.package.version,
+                      Err(_) => "unknown version".to_string(),
+                    };
+                    format!("path:{:?} [{}]", p, v)
+                  } else {
+                    "unknown manifest".to_string()
+                  }
+                }
+              },
+              None => "no manifest".to_string(),
+            };
+
+            let lock_version = match (lock, tauri_lock_packages.is_empty()) {
+              (Some(_lock), true) => tauri_lock_packages
+                .iter()
+                .map(|p| p.version.clone())
+                .collect::<Vec<String>>()
+                .join(", "),
+              (Some(_lock), false) => "unknown lockfile".to_string(),
+              _ => "no lockfile".to_string(),
+            };
+
+            (
+              format!("{} ({})", manifest_version, lock_version),
+              found_tauri_versions,
+            )
+          }
+        };
+
+      let tauri_version = found_tauri_versions
+        .into_iter()
+        .map(|v| semver::Version::parse(&v).unwrap())
+        .max();
+      let suffix = match (tauri_version, crate_latest_version("tauri")) {
+        (Some(version), Some(target_version)) => {
+          let target_version = semver::Version::parse(&target_version).unwrap();
+          if version < target_version {
+            Some(format!(" (outdated, latest: {})", target_version))
+          } else {
+            None
+          }
+        }
+        _ => None,
+      };
+      InfoBlock::new("  tauri.rs")
+        .value(tauri_version_string)
+        .suffix(suffix)
+        .display();
+
+      if let Ok(config) = get_config(None) {
+        let config_guard = config.lock().unwrap();
+        let config = config_guard.as_ref().unwrap();
+        InfoBlock::new("build-type")
+          .value(if config.tauri.bundle.active {
+            "bundle".to_string()
+          } else {
+            "build".to_string()
+          })
+          .display();
+        InfoBlock::new("CSP")
+          .value(if let Some(security) = &config.tauri.security {
+            security.csp.clone().unwrap_or_else(|| "unset".to_string())
+          } else {
+            "unset".to_string()
+          })
+          .display();
+        InfoBlock::new("distDir")
+          .value(config.build.dist_dir.clone())
+          .display();
+        InfoBlock::new("devPath")
+          .value(config.build.dev_path.clone())
+          .display();
+      }
+    }
+
+    Ok(())
   }
 }

+ 0 - 7
cli/tauri.js/bin/tauri-info.js

@@ -1,7 +0,0 @@
-const info = require('../dist/api/info')
-
-async function run() {
-  await info()
-}
-
-run()

+ 3 - 3
cli/tauri.js/bin/tauri.js

@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 
-const cmds = ['help', 'icon', 'info', 'deps']
-const rustCliCmds = ['dev', 'build', 'init']
+const cmds = ['help', 'icon', 'deps']
+const rustCliCmds = ['dev', 'build', 'init', 'info']
 
 const cmd = process.argv[2]
 
@@ -43,7 +43,7 @@ const tauri = function (command) {
     Description
       This is the Tauri CLI.
     Usage
-      $ tauri ${cmds.join('|')}
+      $ tauri ${[...cmds, ...rustCliCmds].join('|')}
     Options
       --help, -h     Displays this message
       --version, -v  Displays the Tauri CLI version

+ 1 - 3
cli/tauri.js/package.json

@@ -63,8 +63,7 @@
     "png2icons": "2.0.1",
     "read-chunk": "3.2.0",
     "semver": "7.3.5",
-    "sharp": "0.27.2",
-    "webpack-merge": "5.7.3"
+    "sharp": "0.27.2"
   },
   "devDependencies": {
     "@babel/core": "7.13.10",
@@ -94,7 +93,6 @@
     "is-running": "2.1.0",
     "jest": "26.6.3",
     "jest-transform-toml": "1.0.0",
-    "lint-staged": "10.5.4",
     "lockfile-lint": "4.6.2",
     "prettier": "2.2.1",
     "promise": "8.1.0",

+ 1 - 1
cli/tauri.js/src/api/dependency-manager/util.ts

@@ -60,7 +60,7 @@ async function getNpmPackageVersion(
   const child = (await useYarn())
     ? crossSpawnSync(
         'yarn',
-        ['list', '--patern', packageName, '--depth', '0'],
+        ['list', '--pattern', packageName, '--depth', '0'],
         {
           cwd: appDir
         }

+ 0 - 305
cli/tauri.js/src/api/info.ts

@@ -1,305 +0,0 @@
-import toml from '@tauri-apps/toml'
-import chalk from 'chalk'
-import fs from 'fs'
-import os from 'os'
-import path from 'path'
-import { appDir, tauriDir } from '../helpers/app-paths'
-import { sync as spawn } from 'cross-spawn'
-import { CargoLock, CargoManifest } from '../types/cargo'
-import { TauriBuildConfig } from './../types/config'
-import nonWebpackRequire from '../helpers/non-webpack-require'
-import packageJson from '../../package.json'
-import getScriptVersion from '../helpers/get-script-version'
-import {
-  semverLt,
-  getNpmLatestVersion,
-  getCrateLatestVersion
-} from './dependency-manager/util'
-
-interface Config {
-  tauri: {
-    bundle?: {
-      active: boolean
-    }
-    security?: {
-      csp: string
-    }
-  }
-  build?: TauriBuildConfig
-}
-
-async function crateLatestVersion(name: string): Promise<string | undefined> {
-  try {
-    return await getCrateLatestVersion(name)
-  } catch {
-    return undefined
-  }
-}
-
-interface DirInfo {
-  path: string
-  name: string
-  type?: 'folder' | 'file'
-  children?: DirInfo[]
-}
-
-/* eslint-disable security/detect-non-literal-fs-filename */
-function dirTree(filename: string, recurse = true): DirInfo {
-  const stats = fs.lstatSync(filename)
-  const info: DirInfo = {
-    path: filename,
-    name: path.basename(filename)
-  }
-
-  if (stats.isDirectory()) {
-    info.type = 'folder'
-    if (recurse) {
-      info.children = fs.readdirSync(filename).map(function (child: string) {
-        return dirTree(filename + '/' + child, false)
-      })
-    }
-  } else {
-    info.type = 'file'
-  }
-
-  return info
-}
-
-function getVersion(
-  command: string,
-  args: string[] = [],
-  formatter?: (output: string) => string
-): string {
-  const version = getScriptVersion(command, args)
-  if (version === null) {
-    return chalk.red('Not installed')
-  } else {
-    return chalk.green(formatter === undefined ? version : formatter(version))
-  }
-}
-
-interface Info {
-  section?: boolean
-  key: string
-  value?: string
-  suffix?: string
-}
-
-function printInfo(info: Info): void {
-  const suffix = info.suffix ? ` ${info.suffix}` : ''
-  console.log(
-    `${info.section ? '\n' : ''}${info.key}${
-      info.value === undefined ? '' : ' - ' + info.value
-    }${suffix}`
-  )
-}
-
-interface Version {
-  section?: boolean
-  key: string
-  version?: string | null
-  targetVersion?: string
-}
-
-function printVersion(info: Version): void {
-  const outdated =
-    info.version &&
-    info.targetVersion &&
-    semverLt(info.version, info.targetVersion)
-  console.log(
-    `${info.section ? '\n' : ''}${info.key}${
-      info.version
-        ? ' - ' + chalk.green(info.version)
-        : chalk.red('Not installed')
-    }` +
-      (outdated && info.targetVersion
-        ? ` (${chalk.red('outdated, latest: ' + info.targetVersion)})`
-        : '')
-  )
-}
-
-function readTomlFile<T extends CargoLock | CargoManifest>(
-  filepath: string
-): T | null {
-  try {
-    const file = fs.readFileSync(filepath).toString()
-    return (toml.parse(file) as unknown) as T
-  } catch (_) {
-    return null
-  }
-}
-
-async function printAppInfo(tauriDir: string): Promise<void> {
-  printInfo({ key: 'App', section: true })
-
-  const lockPath = path.join(tauriDir, 'Cargo.lock')
-  const lock = readTomlFile<CargoLock>(lockPath)
-  const lockPackages = lock
-    ? lock.package.filter((pkg) => pkg.name === 'tauri')
-    : []
-
-  const manifestPath = path.join(tauriDir, 'Cargo.toml')
-  const manifest = readTomlFile<CargoManifest>(manifestPath)
-
-  let tauriVersion
-  const foundTauriVersions = []
-  if (manifest && lock && lockPackages.length === 1) {
-    // everything looks good
-    foundTauriVersions.push(lockPackages[0].version)
-    tauriVersion = chalk.green(lockPackages[0].version)
-  } else if (lock && lockPackages.length === 1) {
-    // good lockfile, but no manifest - will cause problems building
-    foundTauriVersions.push(lockPackages[0].version)
-    tauriVersion = `${chalk.green(lockPackages[0].version)} (${chalk.red(
-      'no manifest'
-    )})`
-  } else {
-    // we found multiple/none `tauri` packages in the lockfile, or
-    // no manifest. in both cases we want more info on the manifest
-    const manifestVersion = (): string => {
-      const tauri = manifest?.dependencies.tauri
-      if (tauri) {
-        if (typeof tauri === 'string') {
-          foundTauriVersions.push(tauri)
-          return chalk.yellow(tauri)
-        } else if (tauri.version) {
-          foundTauriVersions.push(tauri.version)
-          return chalk.yellow(tauri.version)
-        } else if (tauri.path) {
-          const manifestPath = path.resolve(tauriDir, tauri.path, 'Cargo.toml')
-          const manifestContent = readTomlFile<CargoManifest>(manifestPath)
-          let pathVersion = manifestContent?.package.version
-          pathVersion = pathVersion
-            ? chalk.yellow(pathVersion)
-            : chalk.red(pathVersion)
-          return `path:${tauri.path} [${pathVersion}]`
-        }
-      } else {
-        return chalk.red('no manifest')
-      }
-      return chalk.red('unknown manifest')
-    }
-
-    let lockVersion
-    if (lock && lockPackages.length > 0) {
-      lockVersion = chalk.yellow(lockPackages.map((p) => p.version).join(', '))
-    } else if (lock && lockPackages.length === 0) {
-      lockVersion = chalk.red('unknown lockfile')
-    } else {
-      lockVersion = chalk.red('no lockfile')
-    }
-
-    tauriVersion = `${manifestVersion()} (${chalk.yellow(lockVersion)})`
-  }
-
-  const tauriVersionString = foundTauriVersions.reduce(
-    (old, current) => (semverLt(old, current) ? current : old),
-    '0.0.0'
-  )
-  const latestTauriCore = await crateLatestVersion('tauri')
-  printInfo({
-    key: '  tauri.rs',
-    value: tauriVersion,
-    suffix:
-      tauriVersionString !== '0.0.0' &&
-      latestTauriCore &&
-      semverLt(tauriVersionString, latestTauriCore)
-        ? `(${chalk.red('outdated, latest: ' + latestTauriCore)})`
-        : undefined
-  })
-
-  try {
-    const configPath = path.join(tauriDir, 'tauri.conf.json')
-    const config = nonWebpackRequire(configPath) as Config
-    printInfo({
-      key: '  build-type',
-      value: config.tauri.bundle?.active ? 'bundle' : 'build'
-    })
-    printInfo({
-      key: '  CSP',
-      value: config.tauri.security ? config.tauri.security.csp : 'unset'
-    })
-    printInfo({
-      key: '  distDir',
-      value: config.build
-        ? chalk.green(config.build.distDir)
-        : chalk.red('unset')
-    })
-    printInfo({
-      key: '  devPath',
-      value: config.build
-        ? chalk.green(config.build.devPath)
-        : chalk.red('unset')
-    })
-  } catch (_) {}
-}
-
-module.exports = async () => {
-  printInfo({
-    key: 'Operating System',
-    value: chalk.green(
-      `${os.type()}(${os.release()}) - ${os.platform()}/${os.arch()}`
-    ),
-    section: true
-  })
-  if (os.platform() === 'win32') {
-    const { stdout } = spawn('REG', [
-      'QUERY',
-      'HKEY_CLASSES_root\\AppX3xxs313wwkfjhythsb8q46xdsq8d2cvv\\Application',
-      '/v',
-      'ApplicationName'
-    ])
-    const match = /{(\S+)}/g.exec(stdout.toString())
-    if (match) {
-      const edgeString = match[1]
-      printInfo({
-        key: 'Microsoft Edge',
-        value: edgeString.split('?')[0].replace('Microsoft.MicrosoftEdge_', '')
-      })
-    }
-  }
-
-  printInfo({ key: 'Node.js environment', section: true })
-  printVersion({
-    key: '  Node.js',
-    version: process.version.slice(1),
-    targetVersion: packageJson.engines.node.replace('>= ', '')
-  })
-  printVersion({
-    key: '  tauri.js',
-    version: packageJson.version,
-    targetVersion: await getNpmLatestVersion('tauri')
-  })
-
-  printInfo({ key: 'Rust environment', section: true })
-  printInfo({
-    key: '  rustc',
-    value: getVersion('rustc', [], (output) => output.split(' ')[1])
-  })
-  printInfo({
-    key: '  cargo',
-    value: getVersion('cargo', [], (output) => output.split(' ')[1])
-  })
-  printVersion({
-    key: '  tauri-bundler',
-    version: getScriptVersion('cargo', ['tauri-bundler']),
-    targetVersion: await crateLatestVersion('tauri-bundler')
-  })
-
-  printInfo({ key: 'Global packages', section: true })
-  printInfo({ key: '  NPM', value: getVersion('npm') })
-  printInfo({ key: '  yarn', value: getVersion('yarn') })
-
-  printInfo({ key: 'App directory structure', section: true })
-
-  const tree = dirTree(appDir)
-  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
-  for (const artifact of tree.children || []) {
-    if (artifact.type === 'folder') {
-      console.log(`/${artifact.name}`)
-    }
-  }
-  await printAppInfo(tauriDir)
-}
-
-/* eslint-enable security/detect-non-literal-fs-filename */

+ 0 - 1
cli/tauri.js/webpack.config.js

@@ -5,7 +5,6 @@ module.exports = {
   entry: {
     'api/cli': './src/api/cli.ts',
     'api/tauricon': './src/api/tauricon.ts',
-    'api/info': './src/api/info.ts',
     'api/dependency-manager': './src/api/dependency-manager/index.ts',
     'helpers/spawn': './src/helpers/spawn.ts',
     'helpers/rust-cli': './src/helpers/rust-cli.ts'

File diff suppressed because it is too large
+ 136 - 400
cli/tauri.js/yarn.lock


Some files were not shown because too many files changed in this diff