pake-cli 1.0.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="left"><strong>中文</strong> | <a href="https://github.com/tw93/Pake/blob/master/README_EN.md">English</a></p>
1
+ <h4 align="right"><strong>中文</strong> | <a href="https://github.com/tw93/Pake/blob/master/README_EN.md">English</a></h4>
2
2
  <p align="center">
3
3
  <img src=https://gw.alipayobjects.com/zos/k/fa/logo-modified.png width=138/>
4
4
  </p>
@@ -60,10 +60,10 @@
60
60
  <td><img src=https://cdn.fliggy.com/upic/Ea5ZRw.png width=600/></td>
61
61
  </tr>
62
62
  <tr>
63
- <td>Code
64
- <a href="https://github.com/tw93/Pake/releases/latest/download/Code.dmg">Mac</a>
65
- <a href="https://github.com/tw93/Pake/releases/latest/download/Code_x64.msi">Windows</a>
66
- <a href="https://github.com/tw93/Pake/releases/latest/download/Code_amd64.deb">Linux</a>
63
+ <td>Qwerty
64
+ <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty.dmg">Mac</a>
65
+ <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x64.msi">Windows</a>
66
+ <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_amd64.deb">Linux</a>
67
67
  </td>
68
68
  <td>Reference
69
69
  <a href="https://github.com/tw93/Pake/releases/latest/download/Reference.dmg">Mac</a>
@@ -72,14 +72,14 @@
72
72
  </td>
73
73
  </tr>
74
74
  <tr>
75
- <td><img src=https://cdn.fliggy.com/upic/EB1OYP.jpg width=600/></td>
75
+ <td><img src=https://cdn.fliggy.com/upic/CJjagn.jpg width=600/></td>
76
76
  <td><img src=https://cdn.fliggy.com/upic/KFsZIY.png width=600/></td>
77
77
  </tr>
78
78
  <tr>
79
- <td>Qwerty
80
- <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty.dmg">Mac</a>
81
- <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x64.msi">Windows</a>
82
- <a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_amd64.deb">Linux</a>
79
+ <td>Library
80
+ <a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary.dmg">Mac</a>
81
+ <a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary_x64.msi">Windows</a>
82
+ <a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary_amd64.deb">Linux</a>
83
83
  </td>
84
84
  <td>ChatGPT
85
85
  <a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT.dmg">Mac</a>
@@ -88,14 +88,14 @@
88
88
  </td>
89
89
  </tr>
90
90
  <tr>
91
- <td><img src=https://cdn.fliggy.com/upic/CJjagn.jpg width=600/></td>
91
+ <td><img src=https://cdn.fliggy.com/upic/2vPptL.png width=600/></td>
92
92
  <td><img src=https://cdn.fliggy.com/upic/sfnTXf.png width=600/></td>
93
93
  </tr>
94
94
  </table>
95
95
 
96
96
  <details>
97
97
 
98
- <summary>🏂 更多应用如 Flomo / 语雀可去 <a href="https://github.com/tw93/Pake/releases">Release</a>下载,<b>此外点击可展开快捷键说明</b></summary>
98
+ <summary>🏂 更多应用如 Flomo / 语雀 / RunCode 可去 <a href="https://github.com/tw93/Pake/releases">Release</a>下载,<b>此外点击可展开快捷键说明</b></summary>
99
99
 
100
100
  <br/>
101
101
 
@@ -146,7 +146,7 @@ pake https://weekly.tw93.fun --name Weekly --transparent
146
146
 
147
147
  ## 定制开发
148
148
 
149
- 开始前请确保电脑已经安装了 Rust 和 Node 的环境,此外需参考 [Tauri 文档](https://tauri.app/v1/guides/getting-started/prerequisites) 快速配置好环境才可以开始使用,假如你太不懂,使用上面的命令行打包会更加合适。
149
+ 开始前请确保电脑已经安装了 Rust `>=1.63` 和 Node `>=16 如 16.18.1` 的环境,此外需参考 [Tauri 文档](https://tauri.app/v1/guides/getting-started/prerequisites) 快速配置好环境才可以开始使用,假如你太不懂,使用上面的命令行打包会更加合适。
150
150
 
151
151
  ```sh
152
152
  // 安装依赖
@@ -262,21 +262,28 @@ Pake 的发展离不开这些 Hacker 们,一起贡献了大量能力,也欢
262
262
  <sub><b>Dengju Deng</b></sub>
263
263
  </a>
264
264
  </td>
265
+ <td align="center">
266
+ <a href="https://github.com/Fechin">
267
+ <img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
268
+ <br />
269
+ <sub><b>Fechin</b></sub>
270
+ </a>
271
+ </td>
265
272
  <td align="center">
266
273
  <a href="https://github.com/princemaple">
267
274
  <img src="https://avatars.githubusercontent.com/u/1329716?v=4" width="90;" alt="princemaple"/>
268
275
  <br />
269
276
  <sub><b>Po Chen</b></sub>
270
277
  </a>
271
- </td>
278
+ </td></tr>
279
+ <tr>
272
280
  <td align="center">
273
281
  <a href="https://github.com/houhoz">
274
282
  <img src="https://avatars.githubusercontent.com/u/19684376?v=4" width="90;" alt="houhoz"/>
275
283
  <br />
276
284
  <sub><b>Hyzhao</b></sub>
277
285
  </a>
278
- </td></tr>
279
- <tr>
286
+ </td>
280
287
  <td align="center">
281
288
  <a href="https://github.com/liusishan">
282
289
  <img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
package/dist/cli.js CHANGED
@@ -1632,6 +1632,24 @@ function mergeTauriConfig(url, options, tauriConf) {
1632
1632
  transparent,
1633
1633
  resizable,
1634
1634
  };
1635
+ // Package name is valid ?
1636
+ // for Linux, package name must be a-z, 0-9 or "-", not allow to A-Z and other
1637
+ if (process.platform === "linux") {
1638
+ const reg = new RegExp(/[0-9]*[a-z]+[0-9]*\-?[0-9]*[a-z]*[0-9]*\-?[0-9]*[a-z]*[0-9]*/);
1639
+ if (!reg.test(name) || reg.exec(name)[0].length != name.length) {
1640
+ logger.error("package name is illegal, it must be lowercase letters, numbers, dashes, and it must contain the lowercase letters.");
1641
+ logger.error("E.g com-123-xxx, 123pan, pan123,weread, we-read");
1642
+ process.exit();
1643
+ }
1644
+ }
1645
+ if (process.platform === "win32") {
1646
+ const reg = new RegExp(/([0-9]*[a-zA-Z]+[0-9]*)+/);
1647
+ if (!reg.test(name) || reg.exec(name)[0].length != name.length) {
1648
+ logger.error("package name is illegal, it must be letters, numbers, and it must contain the letters");
1649
+ logger.error("E.g 123pan,123Pan,Pan123,weread,WeRead,WERead");
1650
+ process.exit();
1651
+ }
1652
+ }
1635
1653
  Object.assign(tauriConf.tauri.windows[0], Object.assign({ url }, tauriConfWindowOptions));
1636
1654
  tauriConf.package.productName = name;
1637
1655
  tauriConf.tauri.bundle.identifier = identifier;
@@ -1734,38 +1752,6 @@ function getDefaultIcon() {
1734
1752
  return path.join(npmDirectory, iconPath);
1735
1753
  });
1736
1754
  }
1737
- // export async function getIconFromPageUrl(url: string) {
1738
- // const icon = await pageIcon(url);
1739
- // console.log(icon);
1740
- // if (icon.ext === '.ico') {
1741
- // const a = await ICO.parse(icon.data);
1742
- // icon.data = Buffer.from(a[0].buffer);
1743
- // }
1744
- // const iconDir = (await dir()).path;
1745
- // const iconPath = path.join(iconDir, `/icon.icns`);
1746
- // const out = png2icons.createICNS(icon.data, png2icons.BILINEAR, 0);
1747
- // await fs.writeFile(iconPath, out);
1748
- // return iconPath;
1749
- // }
1750
- // export async function getIconFromMacosIcons(name: string) {
1751
- // const data = {
1752
- // query: name,
1753
- // filters: 'approved:true',
1754
- // hitsPerPage: 10,
1755
- // page: 1,
1756
- // };
1757
- // const res = await axios.post('https://p1txh7zfb3-2.algolianet.com/1/indexes/macOSicons/query?x-algolia-agent=Algolia%20for%20JavaScript%20(4.13.1)%3B%20Browser', data, {
1758
- // headers: {
1759
- // 'x-algolia-api-key': '0ba04276e457028f3e11e38696eab32c',
1760
- // 'x-algolia-application-id': 'P1TXH7ZFB3',
1761
- // },
1762
- // });
1763
- // if (!res.data.hits.length) {
1764
- // return '';
1765
- // } else {
1766
- // return downloadIcon(res.data.hits[0].icnsUrl);
1767
- // }
1768
- // }
1769
1755
  function downloadIcon(iconUrl) {
1770
1756
  return __awaiter(this, void 0, void 0, function* () {
1771
1757
  let iconResponse;
@@ -2020,7 +2006,7 @@ class MacBuilder {
2020
2006
  yield installRust();
2021
2007
  }
2022
2008
  else {
2023
- log.error('Error: Pake need Rust to package your webapp!!!');
2009
+ log.error('Error: Pake need Rust to package your webapp!');
2024
2010
  process.exit(2);
2025
2011
  }
2026
2012
  });
@@ -2030,16 +2016,10 @@ class MacBuilder {
2030
2016
  log.debug('PakeAppOptions', options);
2031
2017
  const { name } = options;
2032
2018
  yield mergeTauriConfig(url, options, tauriConf);
2033
- yield shellExec(`cd ${npmDirectory} && npm install && npm run build`);
2034
- let arch = "x64";
2035
- if (process.arch === "arm64") {
2036
- arch = "aarch64";
2037
- }
2038
- else {
2039
- arch = process.arch;
2040
- }
2041
- const dmgName = `${name}_${tauriConf.package.version}_${arch}.dmg`;
2042
- const appPath = this.getBuildedAppPath(npmDirectory, dmgName);
2019
+ //这里直接使用 universal-apple-darwin 的打包,而非当前系统的包
2020
+ yield shellExec(`cd ${npmDirectory} && npm install && npm run build:mac`);
2021
+ const dmgName = `${name}_${tauriConf.package.version}_universal.dmg`;
2022
+ const appPath = this.getBuildAppPath(npmDirectory, dmgName);
2043
2023
  const distPath = path.resolve(`${name}.dmg`);
2044
2024
  yield fs.copyFile(appPath, distPath);
2045
2025
  yield fs.unlink(appPath);
@@ -2047,8 +2027,8 @@ class MacBuilder {
2047
2027
  logger.success('You can find the app installer in', distPath);
2048
2028
  });
2049
2029
  }
2050
- getBuildedAppPath(npmDirectory, dmgName) {
2051
- return path.join(npmDirectory, 'src-tauri/target/release/bundle/dmg', dmgName);
2030
+ getBuildAppPath(npmDirectory, dmgName) {
2031
+ return path.join(npmDirectory, 'src-tauri/target/universal-apple-darwin/release/bundle/dmg', dmgName);
2052
2032
  }
2053
2033
  }
2054
2034
 
@@ -2084,7 +2064,7 @@ class WinBuilder {
2084
2064
  const language = tauriConf.tauri.bundle.windows.wix.language[0];
2085
2065
  const arch = process.arch;
2086
2066
  const msiName = `${name}_${tauriConf.package.version}_${arch}_${language}.msi`;
2087
- const appPath = this.getBuildedAppPath(npmDirectory, msiName);
2067
+ const appPath = this.getBuildAppPath(npmDirectory, msiName);
2088
2068
  const distPath = path.resolve(`${name}.msi`);
2089
2069
  yield fs.copyFile(appPath, distPath);
2090
2070
  yield fs.unlink(appPath);
@@ -2092,7 +2072,7 @@ class WinBuilder {
2092
2072
  logger.success('You can find the app installer in', distPath);
2093
2073
  });
2094
2074
  }
2095
- getBuildedAppPath(npmDirectory, dmgName) {
2075
+ getBuildAppPath(npmDirectory, dmgName) {
2096
2076
  return path.join(npmDirectory, 'src-tauri/target/release/bundle/msi', dmgName);
2097
2077
  }
2098
2078
  }
@@ -2126,7 +2106,7 @@ class LinuxBuilder {
2126
2106
  const { name } = options;
2127
2107
  yield mergeTauriConfig(url, options, tauriConf);
2128
2108
  yield shellExec(`cd ${npmDirectory} && npm install && npm run build`);
2129
- let arch = "";
2109
+ let arch;
2130
2110
  if (process.arch === "x64") {
2131
2111
  arch = "amd64";
2132
2112
  }
@@ -2134,21 +2114,21 @@ class LinuxBuilder {
2134
2114
  arch = process.arch;
2135
2115
  }
2136
2116
  const debName = `${name}_${tauriConf.package.version}_${arch}.deb`;
2137
- const appPath = this.getBuildedAppPath(npmDirectory, "deb", debName);
2117
+ const appPath = this.getBuildAppPath(npmDirectory, "deb", debName);
2138
2118
  const distPath = path.resolve(`${name}.deb`);
2139
2119
  yield fs.copyFile(appPath, distPath);
2140
2120
  yield fs.unlink(appPath);
2141
2121
  const appImageName = `${name}_${tauriConf.package.version}_${arch}.AppImage`;
2142
- const appImagePath = this.getBuildedAppPath(npmDirectory, "appimage", appImageName);
2122
+ const appImagePath = this.getBuildAppPath(npmDirectory, "appimage", appImageName);
2143
2123
  const distAppPath = path.resolve(`${name}.AppImage`);
2144
2124
  yield fs.copyFile(appImagePath, distAppPath);
2145
2125
  yield fs.unlink(appImagePath);
2146
2126
  logger.success('Build success!');
2147
2127
  logger.success('You can find the deb app installer in', distPath);
2148
- logger.success('You can find the Appimage app installer in', distAppPath);
2128
+ logger.success('You can find the AppImage app installer in', distAppPath);
2149
2129
  });
2150
2130
  }
2151
- getBuildedAppPath(npmDirectory, packageType, packageName) {
2131
+ getBuildAppPath(npmDirectory, packageType, packageName) {
2152
2132
  return path.join(npmDirectory, 'src-tauri/target/release/bundle/', packageType, packageName);
2153
2133
  }
2154
2134
  }
@@ -2169,10 +2149,10 @@ class BuilderFactory {
2169
2149
  }
2170
2150
 
2171
2151
  var name = "pake-cli";
2172
- var version = "1.0.1";
2152
+ var version = "1.2.2";
2173
2153
  var description = "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.";
2174
2154
  var engines = {
2175
- node: "^14.13 || >=16.0.0"
2155
+ node: ">=16.0.0"
2176
2156
  };
2177
2157
  var bin = {
2178
2158
  pake: "./cli.js"
@@ -2209,7 +2189,7 @@ var scripts = {
2209
2189
  tauri: "tauri",
2210
2190
  cli: "rollup -c rollup.config.js --watch",
2211
2191
  "cli:build": "cross-env NODE_ENV=production rollup -c rollup.config.js",
2212
- "cli:publish": "npm run cli:build && npm publish"
2192
+ prepublishOnly: "npm run cli:build"
2213
2193
  };
2214
2194
  var type = "module";
2215
2195
  var exports = "./dist/pake.js";
@@ -2285,7 +2265,7 @@ program
2285
2265
  .option('--transparent', 'transparent title bar', DEFAULT_PAKE_OPTIONS.transparent)
2286
2266
  .option('--debug', 'debug', DEFAULT_PAKE_OPTIONS.transparent)
2287
2267
  .action((url, options) => __awaiter(void 0, void 0, void 0, function* () {
2288
- checkUpdateTips();
2268
+ yield checkUpdateTips();
2289
2269
  if (!url) {
2290
2270
  // 直接 pake 不需要出现url提示
2291
2271
  program.help();
@@ -2297,6 +2277,6 @@ program
2297
2277
  const builder = BuilderFactory.create();
2298
2278
  yield builder.prepare();
2299
2279
  const appOptions = yield handleOptions(options, url);
2300
- builder.build(url, appOptions);
2280
+ yield builder.build(url, appOptions);
2301
2281
  }));
2302
2282
  program.parse();
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "1.0.1",
3
+ "version": "1.2.2",
4
4
  "description": "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.",
5
5
  "engines": {
6
- "node": "^14.13 || >=16.0.0"
6
+ "node": ">=16.0.0"
7
7
  },
8
8
  "bin": {
9
9
  "pake": "./cli.js"
@@ -40,7 +40,7 @@
40
40
  "tauri": "tauri",
41
41
  "cli": "rollup -c rollup.config.js --watch",
42
42
  "cli:build": "cross-env NODE_ENV=production rollup -c rollup.config.js",
43
- "cli:publish": "npm run cli:build && npm publish"
43
+ "prepublishOnly": "npm run cli:build"
44
44
  },
45
45
  "type": "module",
46
46
  "exports": "./dist/pake.js",
@@ -34,14 +34,15 @@ dependencies = [
34
34
 
35
35
  [[package]]
36
36
  name = "anyhow"
37
- version = "1.0.66"
37
+ version = "1.0.68"
38
38
  source = "registry+https://github.com/rust-lang/crates.io-index"
39
- checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
39
+ checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
40
40
 
41
41
  [[package]]
42
42
  name = "app"
43
43
  version = "0.1.0"
44
44
  dependencies = [
45
+ "dirs",
45
46
  "home",
46
47
  "image",
47
48
  "serde",
@@ -139,11 +140,12 @@ dependencies = [
139
140
 
140
141
  [[package]]
141
142
  name = "bstr"
142
- version = "0.2.17"
143
+ version = "1.1.0"
143
144
  source = "registry+https://github.com/rust-lang/crates.io-index"
144
- checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
145
+ checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b"
145
146
  dependencies = [
146
147
  "memchr",
148
+ "serde",
147
149
  ]
148
150
 
149
151
  [[package]]
@@ -196,9 +198,9 @@ dependencies = [
196
198
 
197
199
  [[package]]
198
200
  name = "cargo_toml"
199
- version = "0.13.0"
201
+ version = "0.13.3"
200
202
  source = "registry+https://github.com/rust-lang/crates.io-index"
201
- checksum = "aa0e3586af56b3bfa51fca452bd56e8dbbbd5d8d81cbf0b7e4e35b695b537eb8"
203
+ checksum = "497049e9477329f8f6a559972ee42e117487d01d1e8c2cc9f836ea6fa23a9e1a"
202
204
  dependencies = [
203
205
  "serde",
204
206
  "toml",
@@ -206,9 +208,9 @@ dependencies = [
206
208
 
207
209
  [[package]]
208
210
  name = "cc"
209
- version = "1.0.77"
211
+ version = "1.0.78"
210
212
  source = "registry+https://github.com/rust-lang/crates.io-index"
211
- checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
213
+ checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
212
214
 
213
215
  [[package]]
214
216
  name = "cesu8"
@@ -522,6 +524,15 @@ dependencies = [
522
524
  "crypto-common",
523
525
  ]
524
526
 
527
+ [[package]]
528
+ name = "dirs"
529
+ version = "4.0.0"
530
+ source = "registry+https://github.com/rust-lang/crates.io-index"
531
+ checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
532
+ dependencies = [
533
+ "dirs-sys",
534
+ ]
535
+
525
536
  [[package]]
526
537
  name = "dirs-next"
527
538
  version = "2.0.0"
@@ -532,6 +543,17 @@ dependencies = [
532
543
  "dirs-sys-next",
533
544
  ]
534
545
 
546
+ [[package]]
547
+ name = "dirs-sys"
548
+ version = "0.3.7"
549
+ source = "registry+https://github.com/rust-lang/crates.io-index"
550
+ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
551
+ dependencies = [
552
+ "libc",
553
+ "redox_users",
554
+ "winapi",
555
+ ]
556
+
535
557
  [[package]]
536
558
  name = "dirs-sys-next"
537
559
  version = "0.1.2"
@@ -860,7 +882,7 @@ dependencies = [
860
882
  "libc",
861
883
  "log",
862
884
  "rustversion",
863
- "windows",
885
+ "windows 0.39.0",
864
886
  ]
865
887
 
866
888
  [[package]]
@@ -984,15 +1006,15 @@ dependencies = [
984
1006
 
985
1007
  [[package]]
986
1008
  name = "glob"
987
- version = "0.3.0"
1009
+ version = "0.3.1"
988
1010
  source = "registry+https://github.com/rust-lang/crates.io-index"
989
- checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
1011
+ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
990
1012
 
991
1013
  [[package]]
992
1014
  name = "globset"
993
- version = "0.4.9"
1015
+ version = "0.4.10"
994
1016
  source = "registry+https://github.com/rust-lang/crates.io-index"
995
- checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a"
1017
+ checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc"
996
1018
  dependencies = [
997
1019
  "aho-corasick",
998
1020
  "bstr",
@@ -1069,9 +1091,9 @@ dependencies = [
1069
1091
 
1070
1092
  [[package]]
1071
1093
  name = "half"
1072
- version = "2.1.0"
1094
+ version = "2.2.0"
1073
1095
  source = "registry+https://github.com/rust-lang/crates.io-index"
1074
- checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554"
1096
+ checksum = "6c467d36af040b7b2681f5fddd27427f6da8d3d072f575a265e181d2f8e8d157"
1075
1097
  dependencies = [
1076
1098
  "crunchy",
1077
1099
  ]
@@ -1099,9 +1121,9 @@ checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
1099
1121
 
1100
1122
  [[package]]
1101
1123
  name = "hermit-abi"
1102
- version = "0.1.19"
1124
+ version = "0.2.6"
1103
1125
  source = "registry+https://github.com/rust-lang/crates.io-index"
1104
- checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
1126
+ checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
1105
1127
  dependencies = [
1106
1128
  "libc",
1107
1129
  ]
@@ -1137,7 +1159,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
1137
1159
  dependencies = [
1138
1160
  "bytes",
1139
1161
  "fnv",
1140
- "itoa 1.0.4",
1162
+ "itoa 1.0.5",
1141
1163
  ]
1142
1164
 
1143
1165
  [[package]]
@@ -1174,11 +1196,10 @@ dependencies = [
1174
1196
 
1175
1197
  [[package]]
1176
1198
  name = "ignore"
1177
- version = "0.4.18"
1199
+ version = "0.4.19"
1178
1200
  source = "registry+https://github.com/rust-lang/crates.io-index"
1179
- checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d"
1201
+ checksum = "a05705bc64e0b66a806c3740bd6578ea66051b157ec42dc219c785cbf185aef3"
1180
1202
  dependencies = [
1181
- "crossbeam-utils",
1182
1203
  "globset",
1183
1204
  "lazy_static",
1184
1205
  "log",
@@ -1245,9 +1266,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
1245
1266
 
1246
1267
  [[package]]
1247
1268
  name = "itoa"
1248
- version = "1.0.4"
1269
+ version = "1.0.5"
1249
1270
  source = "registry+https://github.com/rust-lang/crates.io-index"
1250
- checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
1271
+ checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
1251
1272
 
1252
1273
  [[package]]
1253
1274
  name = "javascriptcore-rs"
@@ -1347,9 +1368,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
1347
1368
 
1348
1369
  [[package]]
1349
1370
  name = "libc"
1350
- version = "0.2.138"
1371
+ version = "0.2.139"
1351
1372
  source = "registry+https://github.com/rust-lang/crates.io-index"
1352
- checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
1373
+ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
1353
1374
 
1354
1375
  [[package]]
1355
1376
  name = "line-wrap"
@@ -1562,9 +1583,9 @@ dependencies = [
1562
1583
 
1563
1584
  [[package]]
1564
1585
  name = "num_cpus"
1565
- version = "1.14.0"
1586
+ version = "1.15.0"
1566
1587
  source = "registry+https://github.com/rust-lang/crates.io-index"
1567
- checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
1588
+ checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
1568
1589
  dependencies = [
1569
1590
  "hermit-abi",
1570
1591
  "libc",
@@ -1621,9 +1642,9 @@ dependencies = [
1621
1642
 
1622
1643
  [[package]]
1623
1644
  name = "once_cell"
1624
- version = "1.16.0"
1645
+ version = "1.17.0"
1625
1646
  source = "registry+https://github.com/rust-lang/crates.io-index"
1626
- checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
1647
+ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
1627
1648
 
1628
1649
  [[package]]
1629
1650
  name = "overload"
@@ -1681,9 +1702,9 @@ dependencies = [
1681
1702
 
1682
1703
  [[package]]
1683
1704
  name = "paste"
1684
- version = "1.0.10"
1705
+ version = "1.0.11"
1685
1706
  source = "registry+https://github.com/rust-lang/crates.io-index"
1686
- checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b"
1707
+ checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"
1687
1708
 
1688
1709
  [[package]]
1689
1710
  name = "percent-encoding"
@@ -1693,9 +1714,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
1693
1714
 
1694
1715
  [[package]]
1695
1716
  name = "pest"
1696
- version = "2.5.1"
1717
+ version = "2.5.2"
1697
1718
  source = "registry+https://github.com/rust-lang/crates.io-index"
1698
- checksum = "cc8bed3549e0f9b0a2a78bf7c0018237a2cdf085eecbbc048e52612438e4e9d0"
1719
+ checksum = "0f6e86fb9e7026527a0d46bc308b841d73170ef8f443e1807f6ef88526a816d4"
1699
1720
  dependencies = [
1700
1721
  "thiserror",
1701
1722
  "ucd-trie",
@@ -1912,24 +1933,24 @@ dependencies = [
1912
1933
 
1913
1934
  [[package]]
1914
1935
  name = "proc-macro-hack"
1915
- version = "0.5.19"
1936
+ version = "0.5.20+deprecated"
1916
1937
  source = "registry+https://github.com/rust-lang/crates.io-index"
1917
- checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
1938
+ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
1918
1939
 
1919
1940
  [[package]]
1920
1941
  name = "proc-macro2"
1921
- version = "1.0.47"
1942
+ version = "1.0.49"
1922
1943
  source = "registry+https://github.com/rust-lang/crates.io-index"
1923
- checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
1944
+ checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
1924
1945
  dependencies = [
1925
1946
  "unicode-ident",
1926
1947
  ]
1927
1948
 
1928
1949
  [[package]]
1929
1950
  name = "quote"
1930
- version = "1.0.21"
1951
+ version = "1.0.23"
1931
1952
  source = "registry+https://github.com/rust-lang/crates.io-index"
1932
- checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
1953
+ checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
1933
1954
  dependencies = [
1934
1955
  "proc-macro2",
1935
1956
  ]
@@ -2116,20 +2137,20 @@ version = "0.4.0"
2116
2137
  source = "registry+https://github.com/rust-lang/crates.io-index"
2117
2138
  checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
2118
2139
  dependencies = [
2119
- "semver 1.0.14",
2140
+ "semver 1.0.16",
2120
2141
  ]
2121
2142
 
2122
2143
  [[package]]
2123
2144
  name = "rustversion"
2124
- version = "1.0.9"
2145
+ version = "1.0.11"
2125
2146
  source = "registry+https://github.com/rust-lang/crates.io-index"
2126
- checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
2147
+ checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70"
2127
2148
 
2128
2149
  [[package]]
2129
2150
  name = "ryu"
2130
- version = "1.0.11"
2151
+ version = "1.0.12"
2131
2152
  source = "registry+https://github.com/rust-lang/crates.io-index"
2132
- checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
2153
+ checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
2133
2154
 
2134
2155
  [[package]]
2135
2156
  name = "safemem"
@@ -2195,9 +2216,9 @@ dependencies = [
2195
2216
 
2196
2217
  [[package]]
2197
2218
  name = "semver"
2198
- version = "1.0.14"
2219
+ version = "1.0.16"
2199
2220
  source = "registry+https://github.com/rust-lang/crates.io-index"
2200
- checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
2221
+ checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
2201
2222
  dependencies = [
2202
2223
  "serde",
2203
2224
  ]
@@ -2213,18 +2234,18 @@ dependencies = [
2213
2234
 
2214
2235
  [[package]]
2215
2236
  name = "serde"
2216
- version = "1.0.150"
2237
+ version = "1.0.152"
2217
2238
  source = "registry+https://github.com/rust-lang/crates.io-index"
2218
- checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91"
2239
+ checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
2219
2240
  dependencies = [
2220
2241
  "serde_derive",
2221
2242
  ]
2222
2243
 
2223
2244
  [[package]]
2224
2245
  name = "serde_derive"
2225
- version = "1.0.150"
2246
+ version = "1.0.152"
2226
2247
  source = "registry+https://github.com/rust-lang/crates.io-index"
2227
- checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e"
2248
+ checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
2228
2249
  dependencies = [
2229
2250
  "proc-macro2",
2230
2251
  "quote",
@@ -2233,20 +2254,20 @@ dependencies = [
2233
2254
 
2234
2255
  [[package]]
2235
2256
  name = "serde_json"
2236
- version = "1.0.89"
2257
+ version = "1.0.91"
2237
2258
  source = "registry+https://github.com/rust-lang/crates.io-index"
2238
- checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
2259
+ checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
2239
2260
  dependencies = [
2240
- "itoa 1.0.4",
2261
+ "itoa 1.0.5",
2241
2262
  "ryu",
2242
2263
  "serde",
2243
2264
  ]
2244
2265
 
2245
2266
  [[package]]
2246
2267
  name = "serde_repr"
2247
- version = "0.1.9"
2268
+ version = "0.1.10"
2248
2269
  source = "registry+https://github.com/rust-lang/crates.io-index"
2249
- checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca"
2270
+ checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e"
2250
2271
  dependencies = [
2251
2272
  "proc-macro2",
2252
2273
  "quote",
@@ -2434,9 +2455,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
2434
2455
 
2435
2456
  [[package]]
2436
2457
  name = "syn"
2437
- version = "1.0.105"
2458
+ version = "1.0.107"
2438
2459
  source = "registry+https://github.com/rust-lang/crates.io-index"
2439
- checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
2460
+ checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
2440
2461
  dependencies = [
2441
2462
  "proc-macro2",
2442
2463
  "quote",
@@ -2471,9 +2492,9 @@ dependencies = [
2471
2492
 
2472
2493
  [[package]]
2473
2494
  name = "tao"
2474
- version = "0.15.7"
2495
+ version = "0.15.8"
2475
2496
  source = "registry+https://github.com/rust-lang/crates.io-index"
2476
- checksum = "a1fa15735311b4816d030ff54da58560b047daca0970e1031aed5502e84231a8"
2497
+ checksum = "ac8e6399427c8494f9849b58694754d7cc741293348a6836b6c8d2c5aa82d8e6"
2477
2498
  dependencies = [
2478
2499
  "bitflags",
2479
2500
  "cairo-rs",
@@ -2510,7 +2531,7 @@ dependencies = [
2510
2531
  "serde",
2511
2532
  "unicode-segmentation",
2512
2533
  "uuid 1.2.2",
2513
- "windows",
2534
+ "windows 0.39.0",
2514
2535
  "windows-implement",
2515
2536
  "x11-dl",
2516
2537
  ]
@@ -2528,9 +2549,9 @@ dependencies = [
2528
2549
 
2529
2550
  [[package]]
2530
2551
  name = "tauri"
2531
- version = "1.2.2"
2552
+ version = "1.2.3"
2532
2553
  source = "registry+https://github.com/rust-lang/crates.io-index"
2533
- checksum = "d8ea1d785ab2164373703817bff144c4610a69ad3f659becaca0e1ea004b98d8"
2554
+ checksum = "5b48820ee3bb6a5031a83b2b6e11f8630bdc5a2f68cb841ab8ebc7a15a916679"
2534
2555
  dependencies = [
2535
2556
  "anyhow",
2536
2557
  "cocoa",
@@ -2550,7 +2571,7 @@ dependencies = [
2550
2571
  "percent-encoding",
2551
2572
  "rand 0.8.5",
2552
2573
  "raw-window-handle",
2553
- "semver 1.0.14",
2574
+ "semver 1.0.16",
2554
2575
  "serde",
2555
2576
  "serde_json",
2556
2577
  "serde_repr",
@@ -2568,7 +2589,7 @@ dependencies = [
2568
2589
  "uuid 1.2.2",
2569
2590
  "webkit2gtk",
2570
2591
  "webview2-com",
2571
- "windows",
2592
+ "windows 0.39.0",
2572
2593
  ]
2573
2594
 
2574
2595
  [[package]]
@@ -2581,7 +2602,7 @@ dependencies = [
2581
2602
  "cargo_toml",
2582
2603
  "heck 0.4.0",
2583
2604
  "json-patch",
2584
- "semver 1.0.14",
2605
+ "semver 1.0.16",
2585
2606
  "serde_json",
2586
2607
  "tauri-utils",
2587
2608
  "winres",
@@ -2601,7 +2622,7 @@ dependencies = [
2601
2622
  "png",
2602
2623
  "proc-macro2",
2603
2624
  "quote",
2604
- "semver 1.0.14",
2625
+ "semver 1.0.16",
2605
2626
  "serde",
2606
2627
  "serde_json",
2607
2628
  "sha2",
@@ -2643,7 +2664,7 @@ dependencies = [
2643
2664
  "thiserror",
2644
2665
  "uuid 1.2.2",
2645
2666
  "webview2-com",
2646
- "windows",
2667
+ "windows 0.39.0",
2647
2668
  ]
2648
2669
 
2649
2670
  [[package]]
@@ -2662,7 +2683,7 @@ dependencies = [
2662
2683
  "uuid 1.2.2",
2663
2684
  "webkit2gtk",
2664
2685
  "webview2-com",
2665
- "windows",
2686
+ "windows 0.39.0",
2666
2687
  "wry",
2667
2688
  ]
2668
2689
 
@@ -2684,14 +2705,14 @@ dependencies = [
2684
2705
  "phf 0.10.1",
2685
2706
  "proc-macro2",
2686
2707
  "quote",
2687
- "semver 1.0.14",
2708
+ "semver 1.0.16",
2688
2709
  "serde",
2689
2710
  "serde_json",
2690
2711
  "serde_with",
2691
2712
  "thiserror",
2692
2713
  "url",
2693
2714
  "walkdir",
2694
- "windows",
2715
+ "windows 0.39.0",
2695
2716
  ]
2696
2717
 
2697
2718
  [[package]]
@@ -2727,18 +2748,18 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
2727
2748
 
2728
2749
  [[package]]
2729
2750
  name = "thiserror"
2730
- version = "1.0.37"
2751
+ version = "1.0.38"
2731
2752
  source = "registry+https://github.com/rust-lang/crates.io-index"
2732
- checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
2753
+ checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
2733
2754
  dependencies = [
2734
2755
  "thiserror-impl",
2735
2756
  ]
2736
2757
 
2737
2758
  [[package]]
2738
2759
  name = "thiserror-impl"
2739
- version = "1.0.37"
2760
+ version = "1.0.38"
2740
2761
  source = "registry+https://github.com/rust-lang/crates.io-index"
2741
- checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
2762
+ checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
2742
2763
  dependencies = [
2743
2764
  "proc-macro2",
2744
2765
  "quote",
@@ -2780,7 +2801,7 @@ version = "0.3.17"
2780
2801
  source = "registry+https://github.com/rust-lang/crates.io-index"
2781
2802
  checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
2782
2803
  dependencies = [
2783
- "itoa 1.0.4",
2804
+ "itoa 1.0.5",
2784
2805
  "serde",
2785
2806
  "time-core",
2786
2807
  "time-macros",
@@ -2818,9 +2839,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
2818
2839
 
2819
2840
  [[package]]
2820
2841
  name = "tokio"
2821
- version = "1.23.0"
2842
+ version = "1.24.1"
2822
2843
  source = "registry+https://github.com/rust-lang/crates.io-index"
2823
- checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46"
2844
+ checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae"
2824
2845
  dependencies = [
2825
2846
  "autocfg",
2826
2847
  "bytes",
@@ -2832,9 +2853,9 @@ dependencies = [
2832
2853
 
2833
2854
  [[package]]
2834
2855
  name = "toml"
2835
- version = "0.5.9"
2856
+ version = "0.5.10"
2836
2857
  source = "registry+https://github.com/rust-lang/crates.io-index"
2837
- checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
2858
+ checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f"
2838
2859
  dependencies = [
2839
2860
  "serde",
2840
2861
  ]
@@ -2930,9 +2951,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
2930
2951
 
2931
2952
  [[package]]
2932
2953
  name = "unicode-ident"
2933
- version = "1.0.5"
2954
+ version = "1.0.6"
2934
2955
  source = "registry+https://github.com/rust-lang/crates.io-index"
2935
- checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
2956
+ checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
2936
2957
 
2937
2958
  [[package]]
2938
2959
  name = "unicode-normalization"
@@ -3095,18 +3116,20 @@ dependencies = [
3095
3116
 
3096
3117
  [[package]]
3097
3118
  name = "webbrowser"
3098
- version = "0.8.2"
3119
+ version = "0.8.4"
3099
3120
  source = "registry+https://github.com/rust-lang/crates.io-index"
3100
- checksum = "2a0cc7962b5aaa0dfcebaeef0161eec6edf5f4606c12e6777fd7d392f52033a5"
3121
+ checksum = "e74f5ff7786c4c21f61ba8e30ea29c9745f06fca0a4a02d083b3c662583399e8"
3101
3122
  dependencies = [
3123
+ "core-foundation",
3124
+ "dirs",
3102
3125
  "jni",
3126
+ "log",
3103
3127
  "ndk-context",
3104
3128
  "objc",
3105
3129
  "raw-window-handle",
3106
3130
  "url",
3107
3131
  "web-sys",
3108
- "widestring",
3109
- "winapi",
3132
+ "windows 0.43.0",
3110
3133
  ]
3111
3134
 
3112
3135
  [[package]]
@@ -3164,7 +3187,7 @@ checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178"
3164
3187
  dependencies = [
3165
3188
  "webview2-com-macros",
3166
3189
  "webview2-com-sys",
3167
- "windows",
3190
+ "windows 0.39.0",
3168
3191
  "windows-implement",
3169
3192
  ]
3170
3193
 
@@ -3189,7 +3212,7 @@ dependencies = [
3189
3212
  "serde",
3190
3213
  "serde_json",
3191
3214
  "thiserror",
3192
- "windows",
3215
+ "windows 0.39.0",
3193
3216
  "windows-bindgen",
3194
3217
  "windows-metadata",
3195
3218
  ]
@@ -3200,12 +3223,6 @@ version = "0.1.7"
3200
3223
  source = "registry+https://github.com/rust-lang/crates.io-index"
3201
3224
  checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
3202
3225
 
3203
- [[package]]
3204
- name = "widestring"
3205
- version = "1.0.2"
3206
- source = "registry+https://github.com/rust-lang/crates.io-index"
3207
- checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
3208
-
3209
3226
  [[package]]
3210
3227
  name = "winapi"
3211
3228
  version = "0.3.9"
@@ -3251,6 +3268,21 @@ dependencies = [
3251
3268
  "windows_x86_64_msvc 0.39.0",
3252
3269
  ]
3253
3270
 
3271
+ [[package]]
3272
+ name = "windows"
3273
+ version = "0.43.0"
3274
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3275
+ checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244"
3276
+ dependencies = [
3277
+ "windows_aarch64_gnullvm",
3278
+ "windows_aarch64_msvc 0.42.0",
3279
+ "windows_i686_gnu 0.42.0",
3280
+ "windows_i686_msvc 0.42.0",
3281
+ "windows_x86_64_gnu 0.42.0",
3282
+ "windows_x86_64_gnullvm",
3283
+ "windows_x86_64_msvc 0.42.0",
3284
+ ]
3285
+
3254
3286
  [[package]]
3255
3287
  name = "windows-bindgen"
3256
3288
  version = "0.39.0"
@@ -3413,7 +3445,7 @@ dependencies = [
3413
3445
  "webkit2gtk",
3414
3446
  "webkit2gtk-sys",
3415
3447
  "webview2-com",
3416
- "windows",
3448
+ "windows 0.39.0",
3417
3449
  "windows-implement",
3418
3450
  ]
3419
3451
 
@@ -7,7 +7,7 @@ license = ""
7
7
  repository = ""
8
8
  default-run = "app"
9
9
  edition = "2021"
10
- rust-version = "1.61.0"
10
+ rust-version = "1.63.0"
11
11
 
12
12
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
13
13
 
@@ -17,12 +17,13 @@ tauri-build = { version = "1.2.1", features = [] }
17
17
  [dependencies]
18
18
  serde_json = "1.0.89"
19
19
  serde = { version = "1.0.150", features = ["derive"] }
20
- tauri = { version = "1.2.2", features = [] }
20
+ tauri = { version = "1.2.3", features = [] }
21
21
  image = "0.24.5"
22
22
  home = "0.5"
23
23
  tauri-utils = "1.2.1"
24
24
  webbrowser = "0.8.2"
25
25
  wry = "0.23.4"
26
+ dirs = "4.0"
26
27
 
27
28
  [features]
28
29
  # by default Tauri runs in production mode
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -26,6 +26,14 @@ use wry::application::window::Icon;
26
26
  #[cfg(any(target_os = "linux", target_os = "windows"))]
27
27
  use wry::webview::WebContext;
28
28
 
29
+ use dirs::download_dir;
30
+ use std::path::PathBuf;
31
+
32
+ enum UserEvent {
33
+ DownloadStarted(String, String),
34
+ DownloadComplete(Option<PathBuf>, bool),
35
+ }
36
+
29
37
  fn main() -> wry::Result<()> {
30
38
  #[cfg(target_os = "macos")]
31
39
  let (menu_bar_menu, close_item) = {
@@ -82,8 +90,9 @@ fn main() -> wry::Result<()> {
82
90
  fullscreen,
83
91
  ..
84
92
  } = get_windows_config().1.unwrap_or_default();
85
- let event_loop = EventLoop::new();
86
93
 
94
+ let event_loop: EventLoop<UserEvent> = EventLoop::with_user_event();
95
+ let proxy = event_loop.create_proxy();
87
96
  let common_window = WindowBuilder::new()
88
97
  .with_title("")
89
98
  .with_resizable(resizable)
@@ -93,9 +102,14 @@ fn main() -> wry::Result<()> {
93
102
  None
94
103
  })
95
104
  .with_inner_size(wry::application::dpi::LogicalSize::new(width, height));
105
+
96
106
  #[cfg(target_os = "windows")]
97
107
  let window = {
98
- let icon_path = format!("png/{}_32.ico", package_name);
108
+ let mut icon_path = format!("png/{}_32.ico", package_name);
109
+ // If there is no setting, use the default one.
110
+ if !std::path::Path::new(&icon_path).exists() {
111
+ icon_path = "png/icon_32.ico".to_string();
112
+ }
99
113
  let icon = load_icon(std::path::Path::new(&icon_path));
100
114
  common_window
101
115
  .with_decorations(true)
@@ -117,22 +131,40 @@ fn main() -> wry::Result<()> {
117
131
  .build(&event_loop)
118
132
  .unwrap();
119
133
 
134
+ // Handling events of JS -> Rust
120
135
  let handler = move |window: &Window, req: String| {
121
136
  if req == "drag_window" {
122
137
  let _ = window.drag_window();
123
138
  } else if req == "fullscreen" {
124
- if window.fullscreen().is_some() {
125
- window.set_fullscreen(None);
126
- } else {
127
- window.set_fullscreen(Some(Fullscreen::Borderless(None)));
128
- }
139
+ let is_maximized = window.is_maximized();
140
+ window.set_maximized(!is_maximized);
129
141
  } else if req.starts_with("open_browser") {
130
142
  let href = req.replace("open_browser:", "");
131
143
  webbrowser::open(&href).expect("no browser");
132
144
  }
133
145
  };
134
146
 
135
- // 用于欺骗部分页面对于浏览器的强检测
147
+ let download_started = {
148
+ let proxy = proxy.clone();
149
+ move |uri: String, default_path: &mut PathBuf| {
150
+ let path = download_dir()
151
+ .unwrap()
152
+ .join(default_path.display().to_string())
153
+ .as_path()
154
+ .to_path_buf();
155
+ *default_path = path.clone();
156
+ let submitted = proxy
157
+ .send_event(UserEvent::DownloadStarted(uri, path.display().to_string()))
158
+ .is_ok();
159
+ submitted
160
+ }
161
+ };
162
+
163
+ let download_completed = {
164
+ move |_uri, path, success| {
165
+ let _ = proxy.send_event(UserEvent::DownloadComplete(path, success));
166
+ }
167
+ };
136
168
 
137
169
  #[cfg(target_os = "macos")]
138
170
  let webview = {
@@ -144,6 +176,8 @@ fn main() -> wry::Result<()> {
144
176
  .with_initialization_script(include_str!("pake.js"))
145
177
  .with_ipc_handler(handler)
146
178
  .with_back_forward_navigation_gestures(true)
179
+ .with_download_started_handler(download_started)
180
+ .with_download_completed_handler(download_completed)
147
181
  .build()?
148
182
  };
149
183
 
@@ -173,6 +207,8 @@ fn main() -> wry::Result<()> {
173
207
  .with_initialization_script(include_str!("pake.js"))
174
208
  .with_ipc_handler(handler)
175
209
  .with_web_context(&mut web_content)
210
+ .with_download_started_handler(download_started)
211
+ .with_download_completed_handler(download_completed)
176
212
  .build()?
177
213
  };
178
214
  #[cfg(feature = "devtools")]
@@ -201,6 +237,18 @@ fn main() -> wry::Result<()> {
201
237
  println!("Clicked on {:?}", menu_id);
202
238
  println!("Clicked on {:?}", webview.window().is_visible());
203
239
  }
240
+ Event::UserEvent(UserEvent::DownloadStarted(uri, temp_dir)) => {
241
+ println!("Download: {}", uri);
242
+ println!("Will write to: {:?}", temp_dir);
243
+ }
244
+ Event::UserEvent(UserEvent::DownloadComplete(_, success)) => {
245
+ println!("Succeeded: {}", success);
246
+ if success {
247
+ let _ = webview.evaluate_script("window.pakeToast('Save in downloads folder')");
248
+ } else {
249
+ println!("No output path")
250
+ }
251
+ }
204
252
  _ => (),
205
253
  }
206
254
  });
@@ -51,10 +51,19 @@ window.addEventListener("DOMContentLoaded", (_event) => {
51
51
  display: none !important;
52
52
  }
53
53
 
54
- #page .main_header, .cb-layout-basic--navbar{
54
+ #page .main_header, .cb-layout-basic--navbar,
55
+ #app .splitpanes.splitpanes--horizontal.no-splitter header {
55
56
  padding-top: 20px;
56
57
  }
57
58
 
59
+ .chakra-ui-light #app .chakra-heading,
60
+ .chakra-ui-dark #app .chakra-heading,
61
+ .chakra-ui-light #app .chakra-stack,
62
+ .chakra-ui-dark #app .chakra-stack,
63
+ .app-main .sidebar-mouse-in-out {
64
+ padding-top: 10px;
65
+ }
66
+
58
67
  #__next .overflow-hidden .flex.flex-1.flex-col {
59
68
  padding-left: 0;
60
69
  }
@@ -358,3 +367,20 @@ function zoomIn() {
358
367
  function zoomOut() {
359
368
  zoomCommon((htmlZoom) => `${Math.max(parseInt(htmlZoom) - 10, 30)}%`);
360
369
  }
370
+
371
+
372
+ function pakeToast(msg) {
373
+ const m = document.createElement('div');
374
+ m.innerHTML = msg;
375
+ m.style.cssText = "max-width:60%;min-width: 180px;padding:0 8px;height: 36px;color: rgb(255, 255, 255);line-height: 36px;text-align: center;border-radius: 4px;position: fixed;bottom:16px;right: 16px;transform: translate(-50%, -50%);z-index: 999999;background: rgba(0, 0, 0,.9);font-size: 14px;";
376
+ document.body.appendChild(m);
377
+ setTimeout(function() {
378
+ const d = 0.5;
379
+ m.style.transition = 'transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
380
+ m.style.opacity = '0';
381
+ setTimeout(function() {
382
+ document.body.removeChild(m)
383
+ }, d * 1000);
384
+ }, 2500);
385
+ }
386
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file