pake-cli 2.0.5 → 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 +28 -13
- package/dist/cli.js +30 -7
- package/package.json +4 -3
- package/src-tauri/Cargo.lock +997 -281
- package/src-tauri/Cargo.toml +4 -4
- package/src-tauri/icons/gpt.icns +0 -0
- package/src-tauri/icons/myshell.icns +0 -0
- package/src-tauri/png/gpt_256.ico +0 -0
- package/src-tauri/png/gpt_32.ico +0 -0
- package/src-tauri/png/gpt_512.png +0 -0
- package/src-tauri/png/myshell_256.ico +0 -0
- package/src-tauri/png/myshell_32.ico +0 -0
- package/src-tauri/png/myshell_512.png +0 -0
- package/src-tauri/src/app/invoke.rs +0 -20
- package/src-tauri/src/app/window.rs +1 -0
- package/src-tauri/src/inject/component.js +6 -0
- package/src-tauri/src/inject/event.js +105 -19
- package/src-tauri/src/inject/style.js +48 -1
- package/src-tauri/src/main.rs +2 -7
- package/src-tauri/tauri.conf.json +17 -2
package/README.md
CHANGED
|
@@ -248,25 +248,25 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
248
248
|
</a>
|
|
249
249
|
</td>
|
|
250
250
|
<td align="center">
|
|
251
|
-
<a href="https://github.com/
|
|
252
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
251
|
+
<a href="https://github.com/AielloChan">
|
|
252
|
+
<img src="https://avatars.githubusercontent.com/u/7900765?v=4" width="90;" alt="AielloChan"/>
|
|
253
253
|
<br />
|
|
254
|
-
<sub><b>
|
|
254
|
+
<sub><b>Aiello</b></sub>
|
|
255
255
|
</a>
|
|
256
256
|
</td></tr>
|
|
257
257
|
<tr>
|
|
258
258
|
<td align="center">
|
|
259
|
-
<a href="https://github.com/
|
|
260
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
259
|
+
<a href="https://github.com/m1911star">
|
|
260
|
+
<img src="https://avatars.githubusercontent.com/u/4948120?v=4" width="90;" alt="m1911star"/>
|
|
261
261
|
<br />
|
|
262
|
-
<sub><b>
|
|
262
|
+
<sub><b>Horus</b></sub>
|
|
263
263
|
</a>
|
|
264
264
|
</td>
|
|
265
265
|
<td align="center">
|
|
266
|
-
<a href="https://github.com/
|
|
267
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
266
|
+
<a href="https://github.com/Pake-Actions">
|
|
267
|
+
<img src="https://avatars.githubusercontent.com/u/126550811?v=4" width="90;" alt="Pake-Actions"/>
|
|
268
268
|
<br />
|
|
269
|
-
<sub><b>
|
|
269
|
+
<sub><b>Pake Actions</b></sub>
|
|
270
270
|
</a>
|
|
271
271
|
</td>
|
|
272
272
|
<td align="center">
|
|
@@ -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
|
|
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"/>
|
|
@@ -333,13 +340,21 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
333
340
|
<sub><b>Hyzhao</b></sub>
|
|
334
341
|
</a>
|
|
335
342
|
</td>
|
|
343
|
+
<td align="center">
|
|
344
|
+
<a href="https://github.com/lakca">
|
|
345
|
+
<img src="https://avatars.githubusercontent.com/u/16255922?v=4" width="90;" alt="lakca"/>
|
|
346
|
+
<br />
|
|
347
|
+
<sub><b>Null</b></sub>
|
|
348
|
+
</a>
|
|
349
|
+
</td>
|
|
336
350
|
<td align="center">
|
|
337
351
|
<a href="https://github.com/liusishan">
|
|
338
352
|
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
|
|
339
353
|
<br />
|
|
340
354
|
<sub><b>Liusishan</b></sub>
|
|
341
355
|
</a>
|
|
342
|
-
</td>
|
|
356
|
+
</td></tr>
|
|
357
|
+
<tr>
|
|
343
358
|
<td align="center">
|
|
344
359
|
<a href="https://github.com/piaoyidage">
|
|
345
360
|
<img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
|
package/dist/cli.js
CHANGED
|
@@ -1641,6 +1641,11 @@ function promptText(message, initial) {
|
|
|
1641
1641
|
return response.content;
|
|
1642
1642
|
});
|
|
1643
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
|
+
}
|
|
1644
1649
|
function mergeTauriConfig(url, options, tauriConf) {
|
|
1645
1650
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1646
1651
|
const { width, height, fullscreen, transparent, resizable, userAgent, showMenu, showSystemTray, systemTrayIcon, iterCopyFile, identifier, name, } = options;
|
|
@@ -1697,9 +1702,9 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|
|
1697
1702
|
const cli_path = path.join(new_dir, "cli.js");
|
|
1698
1703
|
const cli_path_target = path.join(old_dir, "cli.js");
|
|
1699
1704
|
const about_pake_path = path.join(new_dir, "about_pake.html");
|
|
1700
|
-
const
|
|
1705
|
+
const about_pake_path_target = path.join(old_dir, "about_pake.html");
|
|
1701
1706
|
fs$1.copyFile(cli_path, cli_path_target);
|
|
1702
|
-
fs$1.copyFile(about_pake_path,
|
|
1707
|
+
fs$1.copyFile(about_pake_path, about_pake_path_target);
|
|
1703
1708
|
}
|
|
1704
1709
|
tauriConf.pake.windows[0].url = file_name;
|
|
1705
1710
|
tauriConf.pake.windows[0].url_type = "local";
|
|
@@ -1864,6 +1869,8 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|
|
1864
1869
|
tauriConf.tauri.systemTray.iconPath = "png/icon_512.png";
|
|
1865
1870
|
}
|
|
1866
1871
|
}
|
|
1872
|
+
// 设置安全调用 window.__TAURI__ 的安全域名为设置的应用域名
|
|
1873
|
+
setSecurityConfigWithUrl(tauriConf, url);
|
|
1867
1874
|
// 保存配置文件
|
|
1868
1875
|
let configPath = "";
|
|
1869
1876
|
switch (process.platform) {
|
|
@@ -2104,7 +2111,16 @@ function checkRustInstalled() {
|
|
|
2104
2111
|
|
|
2105
2112
|
var tauri$3 = {
|
|
2106
2113
|
security: {
|
|
2107
|
-
csp: null
|
|
2114
|
+
csp: null,
|
|
2115
|
+
dangerousRemoteDomainIpcAccess: [
|
|
2116
|
+
{
|
|
2117
|
+
domain: "weread.qq.com",
|
|
2118
|
+
windows: [
|
|
2119
|
+
"pake"
|
|
2120
|
+
],
|
|
2121
|
+
enableTauriAPI: true
|
|
2122
|
+
}
|
|
2123
|
+
]
|
|
2108
2124
|
},
|
|
2109
2125
|
updater: {
|
|
2110
2126
|
active: false
|
|
@@ -2114,7 +2130,13 @@ var tauri$3 = {
|
|
|
2114
2130
|
iconAsTemplate: true
|
|
2115
2131
|
},
|
|
2116
2132
|
allowlist: {
|
|
2117
|
-
all: true
|
|
2133
|
+
all: true,
|
|
2134
|
+
fs: {
|
|
2135
|
+
all: true,
|
|
2136
|
+
scope: [
|
|
2137
|
+
"$DOWNLOAD/*"
|
|
2138
|
+
]
|
|
2139
|
+
}
|
|
2118
2140
|
}
|
|
2119
2141
|
};
|
|
2120
2142
|
var build = {
|
|
@@ -2525,7 +2547,7 @@ class BuilderFactory {
|
|
|
2525
2547
|
}
|
|
2526
2548
|
|
|
2527
2549
|
var name = "pake-cli";
|
|
2528
|
-
var version = "2.0.
|
|
2550
|
+
var version = "2.0.7-beta";
|
|
2529
2551
|
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
|
2530
2552
|
var engines = {
|
|
2531
2553
|
node: ">=16.0.0"
|
|
@@ -2571,8 +2593,8 @@ var type = "module";
|
|
|
2571
2593
|
var exports = "./dist/pake.js";
|
|
2572
2594
|
var license = "MIT";
|
|
2573
2595
|
var dependencies = {
|
|
2574
|
-
"@tauri-apps/api": "^1.
|
|
2575
|
-
"@tauri-apps/cli": "^1.
|
|
2596
|
+
"@tauri-apps/api": "^1.4.0",
|
|
2597
|
+
"@tauri-apps/cli": "^1.4.0",
|
|
2576
2598
|
axios: "^1.1.3",
|
|
2577
2599
|
chalk: "^5.1.2",
|
|
2578
2600
|
commander: "^9.4.1",
|
|
@@ -2603,6 +2625,7 @@ var devDependencies = {
|
|
|
2603
2625
|
concurrently: "^7.5.0",
|
|
2604
2626
|
"cross-env": "^7.0.3",
|
|
2605
2627
|
rollup: "^3.3.0",
|
|
2628
|
+
tauri: "^0.15.0",
|
|
2606
2629
|
tslib: "^2.4.1",
|
|
2607
2630
|
typescript: "^4.9.3"
|
|
2608
2631
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pake-cli",
|
|
3
|
-
"version": "2.0.
|
|
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.
|
|
50
|
-
"@tauri-apps/cli": "^1.
|
|
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
|
}
|