pake-cli 2.0.6 → 2.0.7-beta

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) {
@@ -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-beta";
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,8 +2593,8 @@ 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.4.0",
2574
2598
  axios: "^1.1.3",
2575
2599
  chalk: "^5.1.2",
2576
2600
  commander: "^9.4.1",
@@ -2601,6 +2625,7 @@ var devDependencies = {
2601
2625
  concurrently: "^7.5.0",
2602
2626
  "cross-env": "^7.0.3",
2603
2627
  rollup: "^3.3.0",
2628
+ tauri: "^0.15.0",
2604
2629
  tslib: "^2.4.1",
2605
2630
  typescript: "^4.9.3"
2606
2631
  };
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-beta",
4
4
  "description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -46,8 +46,8 @@
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.4.0",
51
51
  "axios": "^1.1.3",
52
52
  "chalk": "^5.1.2",
53
53
  "commander": "^9.4.1",
@@ -78,6 +78,7 @@
78
78
  "concurrently": "^7.5.0",
79
79
  "cross-env": "^7.0.3",
80
80
  "rollup": "^3.3.0",
81
+ "tauri": "^0.15.0",
81
82
  "tslib": "^2.4.1",
82
83
  "typescript": "^4.9.3"
83
84
  }