pake-cli 2.3.5 β 2.3.7
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/LICENSE +1 -1
- package/README.md +81 -55
- package/dist/cli.js +17 -26
- package/package.json +13 -13
- package/src-tauri/Cargo.lock +1344 -721
- package/src-tauri/Cargo.toml +2 -1
- package/src-tauri/icons/devv.icns +0 -0
- package/src-tauri/icons/juchats.icns +0 -0
- package/src-tauri/info.plist +11 -6
- package/src-tauri/pake.json +0 -5
- package/src-tauri/src/app/config.rs +0 -6
- package/src-tauri/src/app/menu.rs +10 -94
- package/src-tauri/src/inject/component.js +0 -128
- package/src-tauri/src/inject/event.js +7 -4
- package/src-tauri/src/inject/style.js +14 -4
- package/src-tauri/src/main.rs +12 -21
- package/src-tauri/tauri.conf.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
- π Nearly 20 times smaller than an Electron package (around 5M!)
|
|
27
27
|
- π With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks.
|
|
28
28
|
- π¦ Battery-included package β shortcut pass-through, immersive windows, and minimalist customization.
|
|
29
|
-
- π» Pake is just a simple tool β replace the old bundle approach with
|
|
29
|
+
- π» Pake is just a simple tool β replace the old bundle approach with Tauri (though PWA is good enough).
|
|
30
30
|
|
|
31
31
|
## Popular Packages
|
|
32
32
|
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
</td>
|
|
61
61
|
</tr>
|
|
62
62
|
<tr>
|
|
63
|
-
<td><img src=https://cdn.fliggy.com/upic/
|
|
64
|
-
<td><img src=https://
|
|
63
|
+
<td><img src=https://cdn.fliggy.com/upic/5aO6yP.png width=600/></td>
|
|
64
|
+
<td><img src=https://cdn.fliggy.com/upic/Ztsx23.png width=600/></td>
|
|
65
65
|
</tr>
|
|
66
66
|
<tr>
|
|
67
67
|
<td>YouTube Music
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</td>
|
|
77
77
|
</tr>
|
|
78
78
|
<tr>
|
|
79
|
-
<td><img src=https://
|
|
79
|
+
<td><img src=https://raw.githubusercontent.com/tw93/static/master/pic/12.png width=600/></td>
|
|
80
80
|
<td><img src=https://gw.alipayobjects.com/zos/k/pn/1.jpg width=600/></td>
|
|
81
81
|
</tr>
|
|
82
82
|
<tr>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<br/>
|
|
136
136
|
|
|
137
137
|
| Mac | Windows/Linux | Function |
|
|
138
|
-
|
|
138
|
+
| --------------------------- | ------------------------------ | ----------------------------- |
|
|
139
139
|
| <kbd>β</kbd> + <kbd>[</kbd> | <kbd>Ctrl</kbd> + <kbd>β</kbd> | Return to the previous page |
|
|
140
140
|
| <kbd>β</kbd> + <kbd>]</kbd> | <kbd>Ctrl</kbd> + <kbd>β</kbd> | Go to the next page |
|
|
141
141
|
| <kbd>β</kbd> + <kbd>β</kbd> | <kbd>Ctrl</kbd> + <kbd>β</kbd> | Auto scroll to top of page |
|
|
@@ -153,7 +153,7 @@ In addition, double-click the title bar to switch to full-screen mode. For Mac u
|
|
|
153
153
|
|
|
154
154
|
## Before starting
|
|
155
155
|
|
|
156
|
-
1. **For beginners**: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with [GitHub Actions](https://github.com/tw93/Pake/wiki/Online-Compilation-(used-by-ordinary-users)). Don't hesitate to reach for assistance at [Discussion](https://github.com/tw93/Pake/discussions)!
|
|
156
|
+
1. **For beginners**: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with [GitHub Actions](<https://github.com/tw93/Pake/wiki/Online-Compilation-(used-by-ordinary-users)>). Don't hesitate to reach for assistance at [Discussion](https://github.com/tw93/Pake/discussions)!
|
|
157
157
|
2. **For developers**: βCommand-Line Packagingβ supports macOS fully. For Windows/Linux users, it requires some tinkering. [Configure your environment](https://tauri.app/v1/guides/getting-started/prerequisites) before getting started.
|
|
158
158
|
3. **For hackers**: For people who are good at both front-end development and Rust, how about customizing your apps' function more with the following [Customized Development](#development)?
|
|
159
159
|
|
|
@@ -174,7 +174,7 @@ pake url [OPTIONS]...
|
|
|
174
174
|
pake https://weekly.tw93.fun --name Weekly --transparent
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
-
If you are new to the command line, you can compile packages online with _GitHub Actions_. See the [Tutorial](https://github.com/tw93/Pake/wiki/Online-Compilation-(used-by-ordinary-users)) for more information.
|
|
177
|
+
If you are new to the command line, you can compile packages online with _GitHub Actions_. See the [Tutorial](<https://github.com/tw93/Pake/wiki/Online-Compilation-(used-by-ordinary-users)>) for more information.
|
|
178
178
|
|
|
179
179
|
## Development
|
|
180
180
|
|
|
@@ -196,7 +196,7 @@ npm run build
|
|
|
196
196
|
## Advanced Usage
|
|
197
197
|
|
|
198
198
|
1. You can refer to the [codebase structure](https://github.com/tw93/Pake/wiki/Description-of-Pake's-code-structure) before working on Pake, which will help you much in development.
|
|
199
|
-
2. Modify the `url` and `productName` fields in the `pake.json` file under the src-tauri directory, the "domain" field in the `tauri.config.json` file needs to be modified synchronously, as well as the `icon` and `identifier` fields in the `tauri.xxx.conf.json` file. You can select
|
|
199
|
+
2. Modify the `url` and `productName` fields in the `pake.json` file under the src-tauri directory, the "domain" field in the `tauri.config.json` file needs to be modified synchronously, as well as the `icon` and `identifier` fields in the `tauri.xxx.conf.json` file. You can select an `icon` from the `icons` directory or download one from [macOSicons](https://macosicons.com/#/) to match your product needs.
|
|
200
200
|
3. For configurations on window properties, you can modify the `pake.json` file to change the value of `width`, `height`, `fullscreen` (or not), `resizable` (or not) of the `windows` property. To adapt to the immersive header on Mac, change `transparent` to `true`, look for the `Header` element, and add the `padding-top` property.
|
|
201
201
|
4. For advanced usages such as style rewriting, advertisement removal, JS injection, container message communication, and user-defined shortcut keys, see [Advanced Usage of Pake](https://github.com/tw93/Pake/wiki/Advanced-Usage-of-Pake).
|
|
202
202
|
|
|
@@ -279,67 +279,74 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
279
279
|
</a>
|
|
280
280
|
</td>
|
|
281
281
|
<td align="center">
|
|
282
|
-
<a href="https://github.com/
|
|
283
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
282
|
+
<a href="https://github.com/exposir">
|
|
283
|
+
<img src="https://avatars.githubusercontent.com/u/33340988?v=4" width="90;" alt="exposir"/>
|
|
284
284
|
<br />
|
|
285
|
-
<sub><b
|
|
285
|
+
<sub><b>εδΈε</b></sub>
|
|
286
286
|
</a>
|
|
287
287
|
</td>
|
|
288
288
|
<td align="center">
|
|
289
|
-
<a href="https://github.com/
|
|
290
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
289
|
+
<a href="https://github.com/QingZ11">
|
|
290
|
+
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
|
|
291
291
|
<br />
|
|
292
|
-
<sub><b
|
|
292
|
+
<sub><b>Steam</b></sub>
|
|
293
293
|
</a>
|
|
294
294
|
</td>
|
|
295
295
|
<td align="center">
|
|
296
|
-
<a href="https://github.com/
|
|
297
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
296
|
+
<a href="https://github.com/hetz">
|
|
297
|
+
<img src="https://avatars.githubusercontent.com/u/820141?v=4" width="90;" alt="hetz"/>
|
|
298
298
|
<br />
|
|
299
|
-
<sub><b
|
|
299
|
+
<sub><b>贺倩ε</b></sub>
|
|
300
300
|
</a>
|
|
301
301
|
</td>
|
|
302
302
|
<td align="center">
|
|
303
|
-
<a href="https://github.com/
|
|
304
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
303
|
+
<a href="https://github.com/piaoyidage">
|
|
304
|
+
<img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
|
|
305
305
|
<br />
|
|
306
|
-
<sub><b>
|
|
306
|
+
<sub><b>Ranger</b></sub>
|
|
307
307
|
</a>
|
|
308
308
|
</td></tr>
|
|
309
309
|
<tr>
|
|
310
310
|
<td align="center">
|
|
311
|
-
<a href="https://github.com/
|
|
312
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
311
|
+
<a href="https://github.com/liusishan">
|
|
312
|
+
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
|
|
313
313
|
<br />
|
|
314
|
-
<sub><b>
|
|
314
|
+
<sub><b>Liusishan</b></sub>
|
|
315
315
|
</a>
|
|
316
316
|
</td>
|
|
317
317
|
<td align="center">
|
|
318
|
-
<a href="https://github.com/
|
|
319
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
318
|
+
<a href="https://github.com/liudonghua123">
|
|
319
|
+
<img src="https://avatars.githubusercontent.com/u/2276718?v=4" width="90;" alt="liudonghua123"/>
|
|
320
320
|
<br />
|
|
321
|
-
<sub><b>
|
|
321
|
+
<sub><b>Liudonghua</b></sub>
|
|
322
322
|
</a>
|
|
323
323
|
</td>
|
|
324
324
|
<td align="center">
|
|
325
|
-
<a href="https://github.com/
|
|
326
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
325
|
+
<a href="https://github.com/lakca">
|
|
326
|
+
<img src="https://avatars.githubusercontent.com/u/16255922?v=4" width="90;" alt="lakca"/>
|
|
327
327
|
<br />
|
|
328
|
-
<sub><b>
|
|
328
|
+
<sub><b>Null</b></sub>
|
|
329
329
|
</a>
|
|
330
330
|
</td>
|
|
331
331
|
<td align="center">
|
|
332
|
-
<a href="https://github.com/
|
|
333
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
332
|
+
<a href="https://github.com/houhoz">
|
|
333
|
+
<img src="https://avatars.githubusercontent.com/u/19684376?v=4" width="90;" alt="houhoz"/>
|
|
334
334
|
<br />
|
|
335
|
-
<sub><b>
|
|
335
|
+
<sub><b>Hyzhao</b></sub>
|
|
336
336
|
</a>
|
|
337
337
|
</td>
|
|
338
338
|
<td align="center">
|
|
339
|
-
<a href="https://github.com/
|
|
340
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
339
|
+
<a href="https://github.com/geekvest">
|
|
340
|
+
<img src="https://avatars.githubusercontent.com/u/126322776?v=4" width="90;" alt="geekvest"/>
|
|
341
341
|
<br />
|
|
342
|
-
<sub><b>
|
|
342
|
+
<sub><b>Null</b></sub>
|
|
343
|
+
</a>
|
|
344
|
+
</td>
|
|
345
|
+
<td align="center">
|
|
346
|
+
<a href="https://github.com/princemaple">
|
|
347
|
+
<img src="https://avatars.githubusercontent.com/u/1329716?v=4" width="90;" alt="princemaple"/>
|
|
348
|
+
<br />
|
|
349
|
+
<sub><b>Po Chen</b></sub>
|
|
343
350
|
</a>
|
|
344
351
|
</td>
|
|
345
352
|
<td align="center">
|
|
@@ -348,53 +355,72 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
348
355
|
<br />
|
|
349
356
|
<sub><b>Milo</b></sub>
|
|
350
357
|
</a>
|
|
358
|
+
</td></tr>
|
|
359
|
+
<tr>
|
|
360
|
+
<td align="center">
|
|
361
|
+
<a href="https://github.com/eltociear">
|
|
362
|
+
<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="90;" alt="eltociear"/>
|
|
363
|
+
<br />
|
|
364
|
+
<sub><b>Ikko Eltociear Ashimine</b></sub>
|
|
365
|
+
</a>
|
|
351
366
|
</td>
|
|
352
367
|
<td align="center">
|
|
353
|
-
<a href="https://github.com/
|
|
354
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
368
|
+
<a href="https://github.com/Fechin">
|
|
369
|
+
<img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
|
|
355
370
|
<br />
|
|
356
|
-
<sub><b>
|
|
371
|
+
<sub><b>Fechin</b></sub>
|
|
357
372
|
</a>
|
|
358
|
-
</td
|
|
359
|
-
<tr>
|
|
373
|
+
</td>
|
|
360
374
|
<td align="center">
|
|
361
|
-
<a href="https://github.com/
|
|
362
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
375
|
+
<a href="https://github.com/turkyden">
|
|
376
|
+
<img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
|
|
363
377
|
<br />
|
|
364
|
-
<sub><b>
|
|
378
|
+
<sub><b>Dengju Deng</b></sub>
|
|
365
379
|
</a>
|
|
366
380
|
</td>
|
|
367
381
|
<td align="center">
|
|
368
|
-
<a href="https://github.com/
|
|
369
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
382
|
+
<a href="https://github.com/nekomeowww">
|
|
383
|
+
<img src="https://avatars.githubusercontent.com/u/11081491?v=4" width="90;" alt="nekomeowww"/>
|
|
370
384
|
<br />
|
|
371
|
-
<sub><b>
|
|
385
|
+
<sub><b>Ayaka Neko</b></sub>
|
|
372
386
|
</a>
|
|
373
387
|
</td>
|
|
374
388
|
<td align="center">
|
|
375
|
-
<a href="https://github.com/
|
|
376
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
389
|
+
<a href="https://github.com/kidylee">
|
|
390
|
+
<img src="https://avatars.githubusercontent.com/u/841310?v=4" width="90;" alt="kidylee"/>
|
|
377
391
|
<br />
|
|
378
|
-
<sub><b>
|
|
392
|
+
<sub><b>An Li</b></sub>
|
|
379
393
|
</a>
|
|
380
394
|
</td>
|
|
381
395
|
<td align="center">
|
|
382
|
-
<a href="https://github.com/
|
|
383
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
396
|
+
<a href="https://github.com/imabutahersiddik">
|
|
397
|
+
<img src="https://avatars.githubusercontent.com/u/138387257?v=4" width="90;" alt="imabutahersiddik"/>
|
|
384
398
|
<br />
|
|
385
|
-
<sub><b>
|
|
399
|
+
<sub><b>Abu Taher Siddik</b></sub>
|
|
386
400
|
</a>
|
|
387
401
|
</td>
|
|
388
402
|
<td align="center">
|
|
389
|
-
<a href="https://github.com/
|
|
390
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
403
|
+
<a href="https://github.com/ACGNnsj">
|
|
404
|
+
<img src="https://avatars.githubusercontent.com/u/22112141?v=4" width="90;" alt="ACGNnsj"/>
|
|
391
405
|
<br />
|
|
392
|
-
<sub><b
|
|
406
|
+
<sub><b>Null</b></sub>
|
|
407
|
+
</a>
|
|
408
|
+
</td></tr>
|
|
409
|
+
<tr>
|
|
410
|
+
<td align="center">
|
|
411
|
+
<a href="https://github.com/2nthony">
|
|
412
|
+
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
|
|
413
|
+
<br />
|
|
414
|
+
<sub><b>2nthony</b></sub>
|
|
393
415
|
</a>
|
|
394
416
|
</td></tr>
|
|
395
417
|
</table>
|
|
396
418
|
<!-- readme: contributors -end -->
|
|
397
419
|
|
|
420
|
+
## Frequently Asked Questions
|
|
421
|
+
|
|
422
|
+
1. Right-clicking on an image element in the page to open the menu and select download image or other events does not work (common in MacOS systems). This issue is due to the MacOS built-in webview not supporting this feature.
|
|
423
|
+
|
|
398
424
|
## Support
|
|
399
425
|
|
|
400
426
|
1. I have two cats, TangYuan and Coke. If you think Pake delights your life, you can feed them <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">some canned food π₯©</a>.
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import psl from 'psl';
|
|
|
20
20
|
import isUrl from 'is-url';
|
|
21
21
|
|
|
22
22
|
var name = "pake-cli";
|
|
23
|
-
var version = "2.3.
|
|
23
|
+
var version = "2.3.7";
|
|
24
24
|
var description = "π€±π» Turn any webpage into a desktop app with Rust. π€±π» ε©η¨ Rust θ½»ζΎζε»Ίθ½»ιηΊ§ε€η«―ζ‘ι’εΊη¨γ";
|
|
25
25
|
var engines = {
|
|
26
26
|
node: ">=16.0.0"
|
|
@@ -67,15 +67,15 @@ var type = "module";
|
|
|
67
67
|
var exports = "./dist/pake.js";
|
|
68
68
|
var license = "MIT";
|
|
69
69
|
var dependencies = {
|
|
70
|
-
"@tauri-apps/api": "^1.5.
|
|
71
|
-
"@tauri-apps/cli": "^1.5.
|
|
72
|
-
axios: "^1.6.
|
|
70
|
+
"@tauri-apps/api": "^1.5.4",
|
|
71
|
+
"@tauri-apps/cli": "^1.5.12",
|
|
72
|
+
axios: "^1.6.8",
|
|
73
73
|
chalk: "^5.3.0",
|
|
74
74
|
commander: "^11.1.0",
|
|
75
|
-
"file-type": "^18.
|
|
76
|
-
"fs-extra": "^11.
|
|
75
|
+
"file-type": "^18.7.0",
|
|
76
|
+
"fs-extra": "^11.2.0",
|
|
77
77
|
"is-url": "^1.2.4",
|
|
78
|
-
loglevel: "^1.
|
|
78
|
+
loglevel: "^1.9.1",
|
|
79
79
|
ora: "^7.0.1",
|
|
80
80
|
prompts: "^2.4.2",
|
|
81
81
|
psl: "^1.9.0",
|
|
@@ -84,25 +84,25 @@ var dependencies = {
|
|
|
84
84
|
"update-notifier": "^7.0.0"
|
|
85
85
|
};
|
|
86
86
|
var devDependencies = {
|
|
87
|
-
"@rollup/plugin-alias": "^5.0
|
|
87
|
+
"@rollup/plugin-alias": "^5.1.0",
|
|
88
88
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
89
|
-
"@rollup/plugin-json": "^6.0
|
|
89
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
90
90
|
"@rollup/plugin-replace": "^5.0.5",
|
|
91
91
|
"@rollup/plugin-terser": "^0.4.4",
|
|
92
92
|
"@types/fs-extra": "^11.0.4",
|
|
93
93
|
"@types/is-url": "^1.2.32",
|
|
94
94
|
"@types/page-icon": "^0.3.6",
|
|
95
|
-
"@types/prompts": "^2.4.
|
|
95
|
+
"@types/prompts": "^2.4.9",
|
|
96
96
|
"@types/psl": "^1.1.3",
|
|
97
97
|
"@types/shelljs": "^0.8.15",
|
|
98
98
|
"@types/tmp": "^0.2.6",
|
|
99
|
-
"@types/update-notifier": "^6.0.
|
|
99
|
+
"@types/update-notifier": "^6.0.8",
|
|
100
100
|
"app-root-path": "^3.1.0",
|
|
101
101
|
"cross-env": "^7.0.3",
|
|
102
|
-
rollup: "^4.
|
|
102
|
+
rollup: "^4.17.0",
|
|
103
103
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
104
104
|
tslib: "^2.6.2",
|
|
105
|
-
typescript: "^5.
|
|
105
|
+
typescript: "^5.4.5"
|
|
106
106
|
};
|
|
107
107
|
var packageJson = {
|
|
108
108
|
name: name,
|
|
@@ -138,11 +138,6 @@ var user_agent = {
|
|
|
138
138
|
linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
|
|
139
139
|
windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
|
|
140
140
|
};
|
|
141
|
-
var menu = {
|
|
142
|
-
macos: false,
|
|
143
|
-
linux: false,
|
|
144
|
-
windows: false
|
|
145
|
-
};
|
|
146
141
|
var system_tray = {
|
|
147
142
|
macos: false,
|
|
148
143
|
linux: true,
|
|
@@ -153,7 +148,6 @@ var inject = [
|
|
|
153
148
|
var pakeConf = {
|
|
154
149
|
windows: windows,
|
|
155
150
|
user_agent: user_agent,
|
|
156
|
-
menu: menu,
|
|
157
151
|
system_tray: system_tray,
|
|
158
152
|
inject: inject
|
|
159
153
|
};
|
|
@@ -176,7 +170,7 @@ var tauri$3 = {
|
|
|
176
170
|
},
|
|
177
171
|
systemTray: {
|
|
178
172
|
iconPath: "png/icon_512.png",
|
|
179
|
-
iconAsTemplate:
|
|
173
|
+
iconAsTemplate: false
|
|
180
174
|
},
|
|
181
175
|
allowlist: {
|
|
182
176
|
all: true,
|
|
@@ -476,7 +470,7 @@ async function combineFiles(files, output) {
|
|
|
476
470
|
}
|
|
477
471
|
|
|
478
472
|
async function mergeConfig(url, options, tauriConf) {
|
|
479
|
-
const { width, height, fullscreen, transparent, userAgent,
|
|
473
|
+
const { width, height, fullscreen, transparent, userAgent, showSystemTray, systemTrayIcon, iterCopyFile, identifier, name, resizable = true, inject, safeDomain, } = options;
|
|
480
474
|
const { platform } = process;
|
|
481
475
|
// Set Windows parameters.
|
|
482
476
|
const tauriConfWindowOptions = {
|
|
@@ -543,7 +537,6 @@ async function mergeConfig(url, options, tauriConf) {
|
|
|
543
537
|
if (userAgent.length > 0) {
|
|
544
538
|
tauriConf.pake.user_agent[currentPlatform] = userAgent;
|
|
545
539
|
}
|
|
546
|
-
tauriConf.pake.menu[currentPlatform] = showMenu;
|
|
547
540
|
tauriConf.pake.system_tray[currentPlatform] = showSystemTray;
|
|
548
541
|
// Processing targets are currently only open to Linux.
|
|
549
542
|
if (platform === 'linux') {
|
|
@@ -831,7 +824,6 @@ const DEFAULT_PAKE_OPTIONS = {
|
|
|
831
824
|
resizable: true,
|
|
832
825
|
transparent: false,
|
|
833
826
|
userAgent: '',
|
|
834
|
-
showMenu: false,
|
|
835
827
|
showSystemTray: false,
|
|
836
828
|
multiArch: false,
|
|
837
829
|
targets: 'deb',
|
|
@@ -946,7 +938,7 @@ function resolveAppName(name, platform) {
|
|
|
946
938
|
function isValidName(name, platform) {
|
|
947
939
|
const platformRegexMapping = {
|
|
948
940
|
linux: /^[a-z0-9]+(-[a-z0-9]+)*$/,
|
|
949
|
-
default: /^[a-zA-Z0-9]
|
|
941
|
+
default: /^[a-zA-Z0-9]+([-a-zA-Z0-9])*$/,
|
|
950
942
|
};
|
|
951
943
|
const reg = platformRegexMapping[platform] || platformRegexMapping.default;
|
|
952
944
|
return !!name && reg.test(name);
|
|
@@ -964,7 +956,7 @@ async function handleOptions(options, url) {
|
|
|
964
956
|
}
|
|
965
957
|
if (!isValidName(name, platform)) {
|
|
966
958
|
const LINUX_NAME_ERROR = `β name should only include lowercase letters, numbers, and dashes, and must contain at least one lowercase letter. Examples: com-123-xxx, 123pan, pan123, weread, we-read.`;
|
|
967
|
-
const DEFAULT_NAME_ERROR = `β Name should only include letters and numbers, and must contain at least one letter. Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead.`;
|
|
959
|
+
const DEFAULT_NAME_ERROR = `β Name should only include letters and numbers, and dashes (dashes must not at the beginning), and must contain at least one letter. Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead, we-read.`;
|
|
968
960
|
const errorMsg = platform === 'linux' ? LINUX_NAME_ERROR : DEFAULT_NAME_ERROR;
|
|
969
961
|
logger.error(errorMsg);
|
|
970
962
|
if (isActions) {
|
|
@@ -1024,7 +1016,6 @@ program
|
|
|
1024
1016
|
.option('--transparent', 'Only for Mac, hide title bar', DEFAULT_PAKE_OPTIONS.transparent)
|
|
1025
1017
|
.option('--fullscreen', 'Start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen)
|
|
1026
1018
|
.option('--user-agent <string>', 'Custom user agent', DEFAULT_PAKE_OPTIONS.userAgent)
|
|
1027
|
-
.option('--show-menu', 'Show menu in app', DEFAULT_PAKE_OPTIONS.showMenu)
|
|
1028
1019
|
.option('--show-system-tray', 'Show system tray in app', DEFAULT_PAKE_OPTIONS.showSystemTray)
|
|
1029
1020
|
.option('--system-tray-icon <string>', 'Custom system tray icon', DEFAULT_PAKE_OPTIONS.systemTrayIcon)
|
|
1030
1021
|
.option('--iter-copy-file', 'Copy files when URL is a local file', DEFAULT_PAKE_OPTIONS.iterCopyFile)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pake-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "π€±π» Turn any webpage into a desktop app with Rust. π€±π» ε©η¨ Rust θ½»ζΎζε»Ίθ½»ιηΊ§ε€η«―ζ‘ι’εΊη¨γ",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.0.0"
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"exports": "./dist/pake.js",
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@tauri-apps/api": "^1.5.
|
|
51
|
-
"@tauri-apps/cli": "^1.5.
|
|
52
|
-
"axios": "^1.6.
|
|
50
|
+
"@tauri-apps/api": "^1.5.4",
|
|
51
|
+
"@tauri-apps/cli": "^1.5.12",
|
|
52
|
+
"axios": "^1.6.8",
|
|
53
53
|
"chalk": "^5.3.0",
|
|
54
54
|
"commander": "^11.1.0",
|
|
55
|
-
"file-type": "^18.
|
|
56
|
-
"fs-extra": "^11.
|
|
55
|
+
"file-type": "^18.7.0",
|
|
56
|
+
"fs-extra": "^11.2.0",
|
|
57
57
|
"is-url": "^1.2.4",
|
|
58
|
-
"loglevel": "^1.
|
|
58
|
+
"loglevel": "^1.9.1",
|
|
59
59
|
"ora": "^7.0.1",
|
|
60
60
|
"prompts": "^2.4.2",
|
|
61
61
|
"psl": "^1.9.0",
|
|
@@ -64,24 +64,24 @@
|
|
|
64
64
|
"update-notifier": "^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@rollup/plugin-alias": "^5.0
|
|
67
|
+
"@rollup/plugin-alias": "^5.1.0",
|
|
68
68
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
69
|
-
"@rollup/plugin-json": "^6.0
|
|
69
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
70
70
|
"@rollup/plugin-replace": "^5.0.5",
|
|
71
71
|
"@rollup/plugin-terser": "^0.4.4",
|
|
72
72
|
"@types/fs-extra": "^11.0.4",
|
|
73
73
|
"@types/is-url": "^1.2.32",
|
|
74
74
|
"@types/page-icon": "^0.3.6",
|
|
75
|
-
"@types/prompts": "^2.4.
|
|
75
|
+
"@types/prompts": "^2.4.9",
|
|
76
76
|
"@types/psl": "^1.1.3",
|
|
77
77
|
"@types/shelljs": "^0.8.15",
|
|
78
78
|
"@types/tmp": "^0.2.6",
|
|
79
|
-
"@types/update-notifier": "^6.0.
|
|
79
|
+
"@types/update-notifier": "^6.0.8",
|
|
80
80
|
"app-root-path": "^3.1.0",
|
|
81
81
|
"cross-env": "^7.0.3",
|
|
82
|
-
"rollup": "^4.
|
|
82
|
+
"rollup": "^4.17.0",
|
|
83
83
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
84
84
|
"tslib": "^2.6.2",
|
|
85
|
-
"typescript": "^5.
|
|
85
|
+
"typescript": "^5.4.5"
|
|
86
86
|
}
|
|
87
87
|
}
|