Explorar o código

Chore/updates new (#183)

* chore(deps): update and test

* fix(template): fix tauri.js init for mac
nothingismagick %!s(int64=5) %!d(string=hai) anos
pai
achega
acdb73febf

+ 3 - 3
Cargo.lock

@@ -1920,7 +1920,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "strsim"
-version = "0.9.2"
+version = "0.9.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -2048,7 +2048,7 @@ dependencies = [
  "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
  "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
  "target_build_utils 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2796,7 +2796,7 @@ dependencies = [
 "checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86"
 "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d"
 "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
-"checksum strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "032c03039aae92b350aad2e3779c352e104d919cb192ba2fabbd7b831ce4f0f6"
+"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
 "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
 "checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238"
 "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"

+ 1 - 1
cli/tauri-cli/Cargo.toml

@@ -23,7 +23,7 @@ msi = "0.2"
 
 serde = "1.0"
 serde_derive = "1.0"
-strsim = "0.9.2"
+strsim = "0.9.3"
 tar = "0.4"
 target_build_utils = "0.3"
 term = "0.6.1"

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

@@ -41,7 +41,7 @@
   "dependencies": {
     "@tauri-apps/toml": "2.2.4",
     "chalk": "3.0.0",
-    "chokidar": "3.3.0",
+    "chokidar": "3.3.1",
     "cross-spawn": "7.0.1",
     "fast-glob": "3.1.1",
     "fs-extra": "8.1.0",

+ 2 - 2
cli/tauri.js/runner.js

@@ -65,6 +65,7 @@ class Runner {
     }
 
     // Start watching for tauri app changes
+    // eslint-disable-next-line security/detect-non-literal-fs-filename
     this.tauriWatcher = chokidar
       .watch([
         path.join(tauriDir, 'src'),
@@ -102,7 +103,6 @@ class Runner {
       ...cfg.tauri
     })
     entry.generate(tauriDir, cfg)
-    
 
     const features = [
       cfg.tauri.embeddedServer.active ? 'embedded-server' : 'no-server'
@@ -132,7 +132,7 @@ class Runner {
     const jsdom = require('jsdom')
     const { JSDOM } = jsdom
     const inlinedAssets = []
-    
+
     return new Promise((resolve, reject) => {
       new Inliner(path.join(indexDir, 'index.html'), (err, html) => {
         if (err) {

+ 11 - 4
cli/tauri.js/templates/tauri.js

@@ -373,10 +373,17 @@ window.tauri = {
 };
 
 // init tauri API
-
-window.tauri.invoke({
-  cmd: 'init'
-})
+try {
+  window.tauri.invoke({
+    cmd: 'init'
+  })
+} catch (e) {
+  window.addEventListener('DOMContentLoaded', function () {
+    window.tauri.invoke({
+      cmd: 'init'
+    })
+  }, true)
+}
 
 if (window.onTauriInit !== void 0) {
   window.onTauriInit()

+ 13 - 13
cli/tauri.js/yarn.lock

@@ -1137,10 +1137,10 @@ cheerio@^0.22.0:
     lodash.reject "^4.4.0"
     lodash.some "^4.4.0"
 
-chokidar@3.3.0:
-  version "3.3.0"
-  resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6"
-  integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==
+chokidar@3.3.1:
+  version "3.3.1"
+  resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450"
+  integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==
   dependencies:
     anymatch "~3.1.1"
     braces "~3.0.2"
@@ -1148,9 +1148,9 @@ chokidar@3.3.0:
     is-binary-path "~2.1.0"
     is-glob "~4.0.1"
     normalize-path "~3.0.0"
-    readdirp "~3.2.0"
+    readdirp "~3.3.0"
   optionalDependencies:
-    fsevents "~2.1.1"
+    fsevents "~2.1.2"
 
 chownr@^1.1.1, chownr@^1.1.3:
   version "1.1.3"
@@ -2595,7 +2595,7 @@ fsevents@^1.2.7:
     nan "^2.12.1"
     node-pre-gyp "^0.12.0"
 
-fsevents@~2.1.1:
+fsevents@~2.1.2:
   version "2.1.2"
   resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
   integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==
@@ -5260,7 +5260,7 @@ performance-now@^2.1.0:
   resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
   integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
 
-picomatch@^2.0.4, picomatch@^2.0.5:
+picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7:
   version "2.1.1"
   resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5"
   integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==
@@ -5596,12 +5596,12 @@ readable-stream@^3.0.1, readable-stream@^3.1.1:
     string_decoder "^1.1.1"
     util-deprecate "^1.0.1"
 
-readdirp@~3.2.0:
-  version "3.2.0"
-  resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839"
-  integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==
+readdirp@~3.3.0:
+  version "3.3.0"
+  resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17"
+  integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==
   dependencies:
-    picomatch "^2.0.4"
+    picomatch "^2.0.7"
 
 realpath-native@^1.1.0:
   version "1.1.0"

+ 2 - 2
examples/gatsby/themed-site/src-tauri/Cargo.toml

@@ -25,11 +25,11 @@ serde_json = "1.0.44"
 serde = "1.0"
 serde_derive = "1.0"
 tiny_http = "0.6"
-phf = "0.7.24"
+phf = "0.8.0"
 includedir = "0.5.0"
 
   [dependencies.tauri]
-  version = "^0.1"
+  path = "../../../../tauri"
   features = [ "edge" ]
 
 [features]

+ 3 - 3
examples/vanillajs/monolith/src-tauri/Cargo.toml

@@ -19,15 +19,15 @@ icon = [
 ]
 
 [dependencies]
-serde_json = "1.0.41"
+serde_json = "1.0.44"
 serde = "1.0"
 serde_derive = "1.0"
 tiny_http = "0.6"
-phf = "0.7.24"
+phf = "0.8.0"
 includedir = "0.5.0"
 
   [dependencies.tauri]
-  version = "0.1.0"
+  path = "../../../../tauri"
   features = [ "all-api", "edge" ]
 
 [features]

+ 1 - 0
examples/vue/quasar-app/.gitignore

@@ -32,3 +32,4 @@ yarn-error.log*
 *.ntvs*
 *.njsproj
 *.sln
+yarn.lock

+ 11 - 7
examples/vue/quasar-app/package.json

@@ -22,17 +22,21 @@
   },
   "dependencies": {
     "@quasar/extras": "1.3.3",
-    "quasar": "1.5.8"
+    "quasar": "1.5.9"
   },
   "devDependencies": {
-    "@quasar/app": "1.3.6",
+    "@quasar/app": "1.4.1",
     "@tauri-apps/tauri-webpack": "0.1.4",
-    "@vue/eslint-config-standard": "4.0.0",
+    "@vue/eslint-config-standard": "5.0.1",
     "babel-eslint": "10.0.3",
-    "eslint": "5.16.0",
-    "eslint-loader": "2.2.1",
-    "eslint-plugin-vue": "5.2.3",
-    "tauri": "0.1.9"
+    "eslint": "6.7.2",
+    "eslint-loader": "3.0.3",
+    "eslint-plugin-import": "^2.19.1",
+    "eslint-plugin-node": "^10.0.0",
+    "eslint-plugin-promise": "^4.2.1",
+    "eslint-plugin-standard": "^4.0.1",
+    "eslint-plugin-vue": "6.0.1",
+    "tauri": "0.2.0"
   },
   "engines": {
     "node": ">= 8.9.0",

+ 1 - 1
examples/vue/quasar-app/src-tauri/Cargo.toml

@@ -25,7 +25,7 @@ serde_json = "1.0.44"
 serde = "1.0"
 serde_derive = "1.0"
 tiny_http = "0.6"
-phf = "0.7.24"
+phf = "0.8.0"
 includedir = "0.5.0"
 
   [dependencies.tauri]

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 396 - 161
examples/vue/quasar-app/yarn.lock


+ 1 - 1
tauri/Cargo.toml

@@ -40,7 +40,7 @@ pbr = {version = "1", optional = true }
 
 [build-dependencies]
 tauri_includedir_codegen = "0.5.1"
-serde_json = "1.0.42"
+serde_json = "1.0.44"
 serde = "1.0"
 serde_derive = "1.0"
 rand = "0.7"

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio