pake-cli 2.0.6 → 2.0.7-beta1

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
@@ -283,6 +283,13 @@ Pake's development can not be without these Hackers. They contributed a lot of c
283
283
  <sub><b>孟世博</b></sub>
284
284
  </a>
285
285
  </td>
286
+ <td align="center">
287
+ <a href="https://github.com/jeasonnow">
288
+ <img src="https://avatars.githubusercontent.com/u/16950207?v=4" width="90;" alt="jeasonnow"/>
289
+ <br />
290
+ <sub><b>Santree</b></sub>
291
+ </a>
292
+ </td>
286
293
  <td align="center">
287
294
  <a href="https://github.com/2nthony">
288
295
  <img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
@@ -296,15 +303,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
296
303
  <br />
297
304
  <sub><b>Null</b></sub>
298
305
  </a>
299
- </td>
306
+ </td></tr>
307
+ <tr>
300
308
  <td align="center">
301
309
  <a href="https://github.com/nekomeowww">
302
310
  <img src="https://avatars.githubusercontent.com/u/11081491?v=4" width="90;" alt="nekomeowww"/>
303
311
  <br />
304
312
  <sub><b>Ayaka Neko</b></sub>
305
313
  </a>
306
- </td></tr>
307
- <tr>
314
+ </td>
308
315
  <td align="center">
309
316
  <a href="https://github.com/turkyden">
310
317
  <img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
@@ -346,7 +353,8 @@ Pake's development can not be without these Hackers. They contributed a lot of c
346
353
  <br />
347
354
  <sub><b>Liusishan</b></sub>
348
355
  </a>
349
- </td>
356
+ </td></tr>
357
+ <tr>
350
358
  <td align="center">
351
359
  <a href="https://github.com/piaoyidage">
352
360
  <img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
package/dist/cli.js CHANGED
@@ -34,6 +34,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
34
34
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
35
35
  PERFORMANCE OF THIS SOFTWARE.
36
36
  ***************************************************************************** */
37
+ /* global Reflect, Promise */
38
+
37
39
 
38
40
  function __awaiter(thisArg, _arguments, P, generator) {
39
41
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -1639,6 +1641,11 @@ function promptText(message, initial) {
1639
1641
  return response.content;
1640
1642
  });
1641
1643
  }
1644
+ function setSecurityConfigWithUrl(tauriConfig, url) {
1645
+ const myURL = new URL(url);
1646
+ const hostname = myURL.hostname;
1647
+ tauriConfig.tauri.security.dangerousRemoteDomainIpcAccess[0].domain = hostname;
1648
+ }
1642
1649
  function mergeTauriConfig(url, options, tauriConf) {
1643
1650
  return __awaiter(this, void 0, void 0, function* () {
1644
1651
  const { width, height, fullscreen, transparent, resizable, userAgent, showMenu, showSystemTray, systemTrayIcon, iterCopyFile, identifier, name, } = options;
@@ -1862,6 +1869,8 @@ function mergeTauriConfig(url, options, tauriConf) {
1862
1869
  tauriConf.tauri.systemTray.iconPath = "png/icon_512.png";
1863
1870
  }
1864
1871
  }
1872
+ // 设置安全调用 window.__TAURI__ 的安全域名为设置的应用域名
1873
+ setSecurityConfigWithUrl(tauriConf, url);
1865
1874
  // 保存配置文件
1866
1875
  let configPath = "";
1867
1876
  switch (process.platform) {
@@ -2049,7 +2058,7 @@ function isChinaDomain(domain) {
2049
2058
  }
2050
2059
  catch (error) {
2051
2060
  // 域名无法解析,返回false
2052
- logger.info(`${domain} can't be parse, is not in China!`);
2061
+ logger.info(`${domain} can't be parse!`);
2053
2062
  return false;
2054
2063
  }
2055
2064
  });
@@ -2064,7 +2073,7 @@ function isChinaIP(ip, domain) {
2064
2073
  }
2065
2074
  catch (error) {
2066
2075
  // 命令执行出错,返回false
2067
- logger.info(`ping ${domain} failed!, is not in China!`);
2076
+ logger.info(`ping ${domain} failed!`);
2068
2077
  return false;
2069
2078
  }
2070
2079
  });
@@ -2102,7 +2111,16 @@ function checkRustInstalled() {
2102
2111
 
2103
2112
  var tauri$3 = {
2104
2113
  security: {
2105
- csp: null
2114
+ csp: null,
2115
+ dangerousRemoteDomainIpcAccess: [
2116
+ {
2117
+ domain: "weread.qq.com",
2118
+ windows: [
2119
+ "pake"
2120
+ ],
2121
+ enableTauriAPI: true
2122
+ }
2123
+ ]
2106
2124
  },
2107
2125
  updater: {
2108
2126
  active: false
@@ -2112,7 +2130,13 @@ var tauri$3 = {
2112
2130
  iconAsTemplate: true
2113
2131
  },
2114
2132
  allowlist: {
2115
- all: true
2133
+ all: true,
2134
+ fs: {
2135
+ all: true,
2136
+ scope: [
2137
+ "$DOWNLOAD/*"
2138
+ ]
2139
+ }
2116
2140
  }
2117
2141
  };
2118
2142
  var build = {
@@ -2523,7 +2547,7 @@ class BuilderFactory {
2523
2547
  }
2524
2548
 
2525
2549
  var name = "pake-cli";
2526
- var version = "2.0.6";
2550
+ var version = "2.0.7-beta1";
2527
2551
  var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
2528
2552
  var engines = {
2529
2553
  node: ">=16.0.0"
@@ -2569,11 +2593,11 @@ var type = "module";
2569
2593
  var exports = "./dist/pake.js";
2570
2594
  var license = "MIT";
2571
2595
  var dependencies = {
2572
- "@tauri-apps/api": "^1.2.0",
2573
- "@tauri-apps/cli": "^1.2.3",
2596
+ "@tauri-apps/api": "^1.4.0",
2597
+ "@tauri-apps/cli": "1.3.1",
2574
2598
  axios: "^1.1.3",
2575
2599
  chalk: "^5.1.2",
2576
- commander: "^9.4.1",
2600
+ commander: "^11.0.0",
2577
2601
  "file-type": "^18.0.0",
2578
2602
  "fs-extra": "^11.1.0",
2579
2603
  "is-url": "^1.2.4",
@@ -2598,9 +2622,9 @@ var devDependencies = {
2598
2622
  "@types/tmp": "^0.2.3",
2599
2623
  "@types/update-notifier": "^6.0.1",
2600
2624
  "app-root-path": "^3.1.0",
2601
- concurrently: "^7.5.0",
2602
2625
  "cross-env": "^7.0.3",
2603
2626
  rollup: "^3.3.0",
2627
+ tauri: "^0.15.0",
2604
2628
  tslib: "^2.4.1",
2605
2629
  typescript: "^4.9.3"
2606
2630
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "2.0.6",
3
+ "version": "2.0.7-beta1",
4
4
  "description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -46,11 +46,11 @@
46
46
  "exports": "./dist/pake.js",
47
47
  "license": "MIT",
48
48
  "dependencies": {
49
- "@tauri-apps/api": "^1.2.0",
50
- "@tauri-apps/cli": "^1.2.3",
49
+ "@tauri-apps/api": "^1.4.0",
50
+ "@tauri-apps/cli": "1.3.1",
51
51
  "axios": "^1.1.3",
52
52
  "chalk": "^5.1.2",
53
- "commander": "^9.4.1",
53
+ "commander": "^11.0.0",
54
54
  "file-type": "^18.0.0",
55
55
  "fs-extra": "^11.1.0",
56
56
  "is-url": "^1.2.4",
@@ -75,9 +75,9 @@
75
75
  "@types/tmp": "^0.2.3",
76
76
  "@types/update-notifier": "^6.0.1",
77
77
  "app-root-path": "^3.1.0",
78
- "concurrently": "^7.5.0",
79
78
  "cross-env": "^7.0.3",
80
79
  "rollup": "^3.3.0",
80
+ "tauri": "^0.15.0",
81
81
  "tslib": "^2.4.1",
82
82
  "typescript": "^4.9.3"
83
83
  }