pake-cli 3.5.2 → 3.5.3
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 +6 -350
- package/dist/cli.js +31 -2
- package/package.json +1 -1
- package/src-tauri/src/app/config.rs +12 -0
- package/src-tauri/src/app/window.rs +31 -0
- package/src-tauri/src/inject/event.js +2 -0
- package/src-tauri/.pake/pake.json +0 -38
- package/src-tauri/.pake/tauri.conf.json +0 -26
- package/src-tauri/.pake/tauri.linux.conf.json +0 -13
- package/src-tauri/.pake/tauri.macos.conf.json +0 -14
- package/src-tauri/.pake/tauri.windows.conf.json +0 -15
package/README.md
CHANGED
|
@@ -173,7 +173,7 @@ First-time packaging requires environment setup and may be slower, subsequent bu
|
|
|
173
173
|
|
|
174
174
|
## Development
|
|
175
175
|
|
|
176
|
-
Requires Rust `>=1.
|
|
176
|
+
Requires Rust `>=1.85` and Node `>=22`. For detailed installation guide, see [Tauri documentation](https://tauri.app/start/prerequisites/). If unfamiliar with development environment, use the CLI tool instead.
|
|
177
177
|
|
|
178
178
|
```bash
|
|
179
179
|
# Install dependencies
|
|
@@ -192,358 +192,14 @@ For style customization, feature enhancement, container communication and other
|
|
|
192
192
|
|
|
193
193
|
Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! ❤️
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
<tr>
|
|
199
|
-
<td align="center">
|
|
200
|
-
<a href="https://github.com/tw93">
|
|
201
|
-
<img src="https://avatars.githubusercontent.com/u/8736212?v=4" width="90;" alt="tw93"/>
|
|
202
|
-
<br />
|
|
203
|
-
<sub><b>Tw93</b></sub>
|
|
204
|
-
</a>
|
|
205
|
-
</td>
|
|
206
|
-
<td align="center">
|
|
207
|
-
<a href="https://github.com/Tlntin">
|
|
208
|
-
<img src="https://avatars.githubusercontent.com/u/28218658?v=4" width="90;" alt="Tlntin"/>
|
|
209
|
-
<br />
|
|
210
|
-
<sub><b>Tlntin</b></sub>
|
|
211
|
-
</a>
|
|
212
|
-
</td>
|
|
213
|
-
<td align="center">
|
|
214
|
-
<a href="https://github.com/jeasonnow">
|
|
215
|
-
<img src="https://avatars.githubusercontent.com/u/16950207?v=4" width="90;" alt="jeasonnow"/>
|
|
216
|
-
<br />
|
|
217
|
-
<sub><b>Santree</b></sub>
|
|
218
|
-
</a>
|
|
219
|
-
</td>
|
|
220
|
-
<td align="center">
|
|
221
|
-
<a href="https://github.com/pan93412">
|
|
222
|
-
<img src="https://avatars.githubusercontent.com/u/28441561?v=4" width="90;" alt="pan93412"/>
|
|
223
|
-
<br />
|
|
224
|
-
<sub><b>Pan93412</b></sub>
|
|
225
|
-
</a>
|
|
226
|
-
</td>
|
|
227
|
-
<td align="center">
|
|
228
|
-
<a href="https://github.com/stone-w4tch3r">
|
|
229
|
-
<img src="https://avatars.githubusercontent.com/u/100294019?v=4" width="90;" alt="stone-w4tch3r"/>
|
|
230
|
-
<br />
|
|
231
|
-
<sub><b>Данил Бизимов</b></sub>
|
|
232
|
-
</a>
|
|
233
|
-
</td>
|
|
234
|
-
<td align="center">
|
|
235
|
-
<a href="https://github.com/wanghanzhen">
|
|
236
|
-
<img src="https://avatars.githubusercontent.com/u/25301012?v=4" width="90;" alt="wanghanzhen"/>
|
|
237
|
-
<br />
|
|
238
|
-
<sub><b>Volare</b></sub>
|
|
239
|
-
</a>
|
|
240
|
-
</td>
|
|
241
|
-
<td align="center">
|
|
242
|
-
<a href="https://github.com/liby">
|
|
243
|
-
<img src="https://avatars.githubusercontent.com/u/38807139?v=4" width="90;" alt="liby"/>
|
|
244
|
-
<br />
|
|
245
|
-
<sub><b>Bryan Lee</b></sub>
|
|
246
|
-
</a>
|
|
247
|
-
</td>
|
|
248
|
-
</tr>
|
|
249
|
-
<tr>
|
|
250
|
-
<td align="center">
|
|
251
|
-
<a href="https://github.com/essesoul">
|
|
252
|
-
<img src="https://avatars.githubusercontent.com/u/58624474?v=4" width="90;" alt="essesoul"/>
|
|
253
|
-
<br />
|
|
254
|
-
<sub><b>Essesoul</b></sub>
|
|
255
|
-
</a>
|
|
256
|
-
</td>
|
|
257
|
-
<td align="center">
|
|
258
|
-
<a href="https://github.com/YangguangZhou">
|
|
259
|
-
<img src="https://avatars.githubusercontent.com/u/61733195?v=4" width="90;" alt="YangguangZhou"/>
|
|
260
|
-
<br />
|
|
261
|
-
<sub><b>Jerry Zhou</b></sub>
|
|
262
|
-
</a>
|
|
263
|
-
</td>
|
|
264
|
-
<td align="center">
|
|
265
|
-
<a href="https://github.com/AielloChan">
|
|
266
|
-
<img src="https://avatars.githubusercontent.com/u/7900765?v=4" width="90;" alt="AielloChan"/>
|
|
267
|
-
<br />
|
|
268
|
-
<sub><b>Aiello</b></sub>
|
|
269
|
-
</a>
|
|
270
|
-
</td>
|
|
271
|
-
<td align="center">
|
|
272
|
-
<a href="https://github.com/m1911star">
|
|
273
|
-
<img src="https://avatars.githubusercontent.com/u/4948120?v=4" width="90;" alt="m1911star"/>
|
|
274
|
-
<br />
|
|
275
|
-
<sub><b>Horus</b></sub>
|
|
276
|
-
</a>
|
|
277
|
-
</td>
|
|
278
|
-
<td align="center">
|
|
279
|
-
<a href="https://github.com/Pake-Actions">
|
|
280
|
-
<img src="https://avatars.githubusercontent.com/u/126550811?v=4" width="90;" alt="Pake-Actions"/>
|
|
281
|
-
<br />
|
|
282
|
-
<sub><b>Pake Actions</b></sub>
|
|
283
|
-
</a>
|
|
284
|
-
</td>
|
|
285
|
-
<td align="center">
|
|
286
|
-
<a href="https://github.com/GoodbyeNJN">
|
|
287
|
-
<img src="https://avatars.githubusercontent.com/u/6856639?v=4" width="90;" alt="GoodbyeNJN"/>
|
|
288
|
-
<br />
|
|
289
|
-
<sub><b>GoodbyeNJN</b></sub>
|
|
290
|
-
</a>
|
|
291
|
-
</td>
|
|
292
|
-
<td align="center">
|
|
293
|
-
<a href="https://github.com/eltociear">
|
|
294
|
-
<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="90;" alt="eltociear"/>
|
|
295
|
-
<br />
|
|
296
|
-
<sub><b>Ikko Eltociear Ashimine</b></sub>
|
|
297
|
-
</a>
|
|
298
|
-
</td>
|
|
299
|
-
</tr>
|
|
300
|
-
<tr>
|
|
301
|
-
<td align="center">
|
|
302
|
-
<a href="https://github.com/kittizz">
|
|
303
|
-
<img src="https://avatars.githubusercontent.com/u/62899732?v=4" width="90;" alt="kittizz"/>
|
|
304
|
-
<br />
|
|
305
|
-
<sub><b>Kittizz</b></sub>
|
|
306
|
-
</a>
|
|
307
|
-
</td>
|
|
308
|
-
<td align="center">
|
|
309
|
-
<a href="https://github.com/mattbajorek">
|
|
310
|
-
<img src="https://avatars.githubusercontent.com/u/17235301?v=4" width="90;" alt="mattbajorek"/>
|
|
311
|
-
<br />
|
|
312
|
-
<sub><b>Matt Bajorek</b></sub>
|
|
313
|
-
</a>
|
|
314
|
-
</td>
|
|
315
|
-
<td align="center">
|
|
316
|
-
<a href="https://github.com/vaddisrinivas">
|
|
317
|
-
<img src="https://avatars.githubusercontent.com/u/38348871?v=4" width="90;" alt="vaddisrinivas"/>
|
|
318
|
-
<br />
|
|
319
|
-
<sub><b>Srinivas Vaddi</b></sub>
|
|
320
|
-
</a>
|
|
321
|
-
</td>
|
|
322
|
-
<td align="center">
|
|
323
|
-
<a href="https://github.com/QingZ11">
|
|
324
|
-
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
|
|
325
|
-
<br />
|
|
326
|
-
<sub><b>Steam</b></sub>
|
|
327
|
-
</a>
|
|
328
|
-
</td>
|
|
329
|
-
<td align="center">
|
|
330
|
-
<a href="https://github.com/Tianj0o">
|
|
331
|
-
<img src="https://avatars.githubusercontent.com/u/68584284?v=4" width="90;" alt="Tianj0o"/>
|
|
332
|
-
<br />
|
|
333
|
-
<sub><b>Qitianjia</b></sub>
|
|
334
|
-
</a>
|
|
335
|
-
</td>
|
|
336
|
-
<td align="center">
|
|
337
|
-
<a href="https://github.com/xinyii">
|
|
338
|
-
<img src="https://avatars.githubusercontent.com/u/17895104?v=4" width="90;" alt="xinyii"/>
|
|
339
|
-
<br />
|
|
340
|
-
<sub><b>Yi Xin</b></sub>
|
|
341
|
-
</a>
|
|
342
|
-
</td>
|
|
343
|
-
<td align="center">
|
|
344
|
-
<a href="https://github.com/g1eny0ung">
|
|
345
|
-
<img src="https://avatars.githubusercontent.com/u/15034155?v=4" width="90;" alt="g1eny0ung"/>
|
|
346
|
-
<br />
|
|
347
|
-
<sub><b>Yue Yang</b></sub>
|
|
348
|
-
</a>
|
|
349
|
-
</td>
|
|
350
|
-
</tr>
|
|
351
|
-
<tr>
|
|
352
|
-
<td align="center">
|
|
353
|
-
<a href="https://github.com/lkieryan">
|
|
354
|
-
<img src="https://avatars.githubusercontent.com/u/187804088?v=4" width="90;" alt="lkieryan"/>
|
|
355
|
-
<br />
|
|
356
|
-
<sub><b>Kieran</b></sub>
|
|
357
|
-
</a>
|
|
358
|
-
</td>
|
|
359
|
-
<td align="center">
|
|
360
|
-
<a href="https://github.com/exposir">
|
|
361
|
-
<img src="https://avatars.githubusercontent.com/u/33340988?v=4" width="90;" alt="exposir"/>
|
|
362
|
-
<br />
|
|
363
|
-
<sub><b>孟世博</b></sub>
|
|
364
|
-
</a>
|
|
365
|
-
</td>
|
|
366
|
-
<td align="center">
|
|
367
|
-
<a href="https://github.com/2nthony">
|
|
368
|
-
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
|
|
369
|
-
<br />
|
|
370
|
-
<sub><b>2nthony</b></sub>
|
|
371
|
-
</a>
|
|
372
|
-
</td>
|
|
373
|
-
<td align="center">
|
|
374
|
-
<a href="https://github.com/ACGNnsj">
|
|
375
|
-
<img src="https://avatars.githubusercontent.com/u/22112141?v=4" width="90;" alt="ACGNnsj"/>
|
|
376
|
-
<br />
|
|
377
|
-
<sub><b>Null</b></sub>
|
|
378
|
-
</a>
|
|
379
|
-
</td>
|
|
380
|
-
<td align="center">
|
|
381
|
-
<a href="https://github.com/imabutahersiddik">
|
|
382
|
-
<img src="https://avatars.githubusercontent.com/u/138387257?v=4" width="90;" alt="imabutahersiddik"/>
|
|
383
|
-
<br />
|
|
384
|
-
<sub><b>Abu Taher Siddik</b></sub>
|
|
385
|
-
</a>
|
|
386
|
-
</td>
|
|
387
|
-
<td align="center">
|
|
388
|
-
<a href="https://github.com/kidylee">
|
|
389
|
-
<img src="https://avatars.githubusercontent.com/u/841310?v=4" width="90;" alt="kidylee"/>
|
|
390
|
-
<br />
|
|
391
|
-
<sub><b>An Li</b></sub>
|
|
392
|
-
</a>
|
|
393
|
-
</td>
|
|
394
|
-
<td align="center">
|
|
395
|
-
<a href="https://github.com/nekomeowww">
|
|
396
|
-
<img src="https://avatars.githubusercontent.com/u/11081491?v=4" width="90;" alt="nekomeowww"/>
|
|
397
|
-
<br />
|
|
398
|
-
<sub><b>Ayaka Neko</b></sub>
|
|
399
|
-
</a>
|
|
400
|
-
</td>
|
|
401
|
-
</tr>
|
|
402
|
-
<tr>
|
|
403
|
-
<td align="center">
|
|
404
|
-
<a href="https://github.com/claude">
|
|
405
|
-
<img src="https://avatars.githubusercontent.com/u/81847?v=4" width="90;" alt="claude"/>
|
|
406
|
-
<br />
|
|
407
|
-
<sub><b>Claude</b></sub>
|
|
408
|
-
</a>
|
|
409
|
-
</td>
|
|
410
|
-
<td align="center">
|
|
411
|
-
<a href="https://github.com/turkyden">
|
|
412
|
-
<img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
|
|
413
|
-
<br />
|
|
414
|
-
<sub><b>Dengju Deng</b></sub>
|
|
415
|
-
</a>
|
|
416
|
-
</td>
|
|
417
|
-
<td align="center">
|
|
418
|
-
<a href="https://github.com/fvn-elmy">
|
|
419
|
-
<img src="https://avatars.githubusercontent.com/u/71275745?v=4" width="90;" alt="fvn-elmy"/>
|
|
420
|
-
<br />
|
|
421
|
-
<sub><b>Fabien</b></sub>
|
|
422
|
-
</a>
|
|
423
|
-
</td>
|
|
424
|
-
<td align="center">
|
|
425
|
-
<a href="https://github.com/Fechin">
|
|
426
|
-
<img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
|
|
427
|
-
<br />
|
|
428
|
-
<sub><b>Fechin</b></sub>
|
|
429
|
-
</a>
|
|
430
|
-
</td>
|
|
431
|
-
<td align="center">
|
|
432
|
-
<a href="https://github.com/ImgBotApp">
|
|
433
|
-
<img src="https://avatars.githubusercontent.com/u/31427850?v=4" width="90;" alt="ImgBotApp"/>
|
|
434
|
-
<br />
|
|
435
|
-
<sub><b>Imgbot</b></sub>
|
|
436
|
-
</a>
|
|
437
|
-
</td>
|
|
438
|
-
<td align="center">
|
|
439
|
-
<a href="https://github.com/droid-Q">
|
|
440
|
-
<img src="https://avatars.githubusercontent.com/u/708277?v=4" width="90;" alt="droid-Q"/>
|
|
441
|
-
<br />
|
|
442
|
-
<sub><b>Jiaqi Gu</b></sub>
|
|
443
|
-
</a>
|
|
444
|
-
</td>
|
|
445
|
-
<td align="center">
|
|
446
|
-
<a href="https://github.com/JohannLai">
|
|
447
|
-
<img src="https://avatars.githubusercontent.com/u/10769405?v=4" width="90;" alt="JohannLai"/>
|
|
448
|
-
<br />
|
|
449
|
-
<sub><b>Johannlai</b></sub>
|
|
450
|
-
</a>
|
|
451
|
-
</td>
|
|
452
|
-
</tr>
|
|
453
|
-
<tr>
|
|
454
|
-
<td align="center">
|
|
455
|
-
<a href="https://github.com/Jason6987">
|
|
456
|
-
<img src="https://avatars.githubusercontent.com/u/140222795?v=4" width="90;" alt="Jason6987"/>
|
|
457
|
-
<br />
|
|
458
|
-
<sub><b>Luminall</b></sub>
|
|
459
|
-
</a>
|
|
460
|
-
</td>
|
|
461
|
-
<td align="center">
|
|
462
|
-
<a href="https://github.com/Milo123459">
|
|
463
|
-
<img src="https://avatars.githubusercontent.com/u/50248166?v=4" width="90;" alt="Milo123459"/>
|
|
464
|
-
<br />
|
|
465
|
-
<sub><b>Milo</b></sub>
|
|
466
|
-
</a>
|
|
467
|
-
</td>
|
|
468
|
-
<td align="center">
|
|
469
|
-
<a href="https://github.com/princemaple">
|
|
470
|
-
<img src="https://avatars.githubusercontent.com/u/1329716?v=4" width="90;" alt="princemaple"/>
|
|
471
|
-
<br />
|
|
472
|
-
<sub><b>Po Chen</b></sub>
|
|
473
|
-
</a>
|
|
474
|
-
</td>
|
|
475
|
-
<td align="center">
|
|
476
|
-
<a href="https://github.com/beautifulrem">
|
|
477
|
-
<img src="https://avatars.githubusercontent.com/u/98527099?v=4" width="90;" alt="beautifulrem"/>
|
|
478
|
-
<br />
|
|
479
|
-
<sub><b>Xie Ruiqi</b></sub>
|
|
480
|
-
</a>
|
|
481
|
-
</td>
|
|
482
|
-
<td align="center">
|
|
483
|
-
<a href="https://github.com/bocanhcam">
|
|
484
|
-
<img src="https://avatars.githubusercontent.com/u/35592955?v=4" width="90;" alt="bocanhcam"/>
|
|
485
|
-
<br />
|
|
486
|
-
<sub><b>Null</b></sub>
|
|
487
|
-
</a>
|
|
488
|
-
</td>
|
|
489
|
-
<td align="center">
|
|
490
|
-
<a href="https://github.com/geekvest">
|
|
491
|
-
<img src="https://avatars.githubusercontent.com/u/126322776?v=4" width="90;" alt="geekvest"/>
|
|
492
|
-
<br />
|
|
493
|
-
<sub><b>Null</b></sub>
|
|
494
|
-
</a>
|
|
495
|
-
</td>
|
|
496
|
-
<td align="center">
|
|
497
|
-
<a href="https://github.com/houhoz">
|
|
498
|
-
<img src="https://avatars.githubusercontent.com/u/19684376?v=4" width="90;" alt="houhoz"/>
|
|
499
|
-
<br />
|
|
500
|
-
<sub><b>Hyzhao</b></sub>
|
|
501
|
-
</a>
|
|
502
|
-
</td>
|
|
503
|
-
</tr>
|
|
504
|
-
<tr>
|
|
505
|
-
<td align="center">
|
|
506
|
-
<a href="https://github.com/lakca">
|
|
507
|
-
<img src="https://avatars.githubusercontent.com/u/16255922?v=4" width="90;" alt="lakca"/>
|
|
508
|
-
<br />
|
|
509
|
-
<sub><b>Null</b></sub>
|
|
510
|
-
</a>
|
|
511
|
-
</td>
|
|
512
|
-
<td align="center">
|
|
513
|
-
<a href="https://github.com/liudonghua123">
|
|
514
|
-
<img src="https://avatars.githubusercontent.com/u/2276718?v=4" width="90;" alt="liudonghua123"/>
|
|
515
|
-
<br />
|
|
516
|
-
<sub><b>Liudonghua</b></sub>
|
|
517
|
-
</a>
|
|
518
|
-
</td>
|
|
519
|
-
<td align="center">
|
|
520
|
-
<a href="https://github.com/liusishan">
|
|
521
|
-
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
|
|
522
|
-
<br />
|
|
523
|
-
<sub><b>Liusishan</b></sub>
|
|
524
|
-
</a>
|
|
525
|
-
</td>
|
|
526
|
-
<td align="center">
|
|
527
|
-
<a href="https://github.com/piaoyidage">
|
|
528
|
-
<img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
|
|
529
|
-
<br />
|
|
530
|
-
<sub><b>Ranger</b></sub>
|
|
531
|
-
</a>
|
|
532
|
-
</td>
|
|
533
|
-
<td align="center">
|
|
534
|
-
<a href="https://github.com/hetz">
|
|
535
|
-
<img src="https://avatars.githubusercontent.com/u/820141?v=4" width="90;" alt="hetz"/>
|
|
536
|
-
<br />
|
|
537
|
-
<sub><b>贺天卓</b></sub>
|
|
538
|
-
</a>
|
|
539
|
-
</td>
|
|
540
|
-
</tr>
|
|
541
|
-
<tbody>
|
|
542
|
-
</table>
|
|
543
|
-
<!-- readme: contributors -end -->
|
|
195
|
+
<a href="https://github.com/tw93/Pake/graphs/contributors">
|
|
196
|
+
<img src="https://raw.githubusercontent.com/tw93/Pake/main/CONTRIBUTORS.svg?sanitize=true" alt="Contributors" width="1000" />
|
|
197
|
+
</a>
|
|
544
198
|
|
|
545
199
|
## Support
|
|
546
200
|
|
|
201
|
+
<a href="https://miaoyan.app/cats.html?name=Pake"><img src="https://miaoyan.app/assets/sponsors.svg" width="1000px" /></a>
|
|
202
|
+
|
|
547
203
|
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">food 🥩</a>.
|
|
548
204
|
2. If you like Pake, you can star it on GitHub. Also, welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20-%20Turn%20any%20webpage%20into%20a%20desktop%20app%20with%20one%20command.%20Nearly%2020x%20smaller%20than%20Electron%20packages,%20supports%20macOS%20Windows%20Linux) to your friends.
|
|
549
205
|
3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake or join our [Telegram](https://t.me/+GclQS9ZnxyI2ODQ1) chat group.
|
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ import sharp from 'sharp';
|
|
|
23
23
|
import * as psl from 'psl';
|
|
24
24
|
|
|
25
25
|
var name = "pake-cli";
|
|
26
|
-
var version = "3.5.
|
|
26
|
+
var version = "3.5.3";
|
|
27
27
|
var description = "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。";
|
|
28
28
|
var engines = {
|
|
29
29
|
node: ">=18.0.0"
|
|
@@ -470,7 +470,7 @@ async function mergeConfig(url, options, tauriConf) {
|
|
|
470
470
|
await fsExtra.copy(sourcePath, destPath);
|
|
471
471
|
}
|
|
472
472
|
}));
|
|
473
|
-
const { width, height, fullscreen, maximize, hideTitleBar, alwaysOnTop, appVersion, darkMode, disabledWebShortcuts, activationShortcut, userAgent, showSystemTray, systemTrayIcon, useLocalFile, identifier, name, resizable = true, inject, proxyUrl, installerLanguage, hideOnClose, incognito, title, wasm, enableDragDrop, multiInstance, startToTray, forceInternalNavigation, } = options;
|
|
473
|
+
const { width, height, fullscreen, maximize, hideTitleBar, alwaysOnTop, appVersion, darkMode, disabledWebShortcuts, activationShortcut, userAgent, showSystemTray, systemTrayIcon, useLocalFile, identifier, name, resizable = true, inject, proxyUrl, installerLanguage, hideOnClose, incognito, title, wasm, enableDragDrop, multiInstance, startToTray, forceInternalNavigation, zoom, minWidth, minHeight, ignoreCertificateErrors, } = options;
|
|
474
474
|
const { platform } = process;
|
|
475
475
|
const platformHideOnClose = hideOnClose ?? platform === 'darwin';
|
|
476
476
|
const tauriConfWindowOptions = {
|
|
@@ -491,6 +491,10 @@ async function mergeConfig(url, options, tauriConf) {
|
|
|
491
491
|
enable_drag_drop: enableDragDrop,
|
|
492
492
|
start_to_tray: startToTray && showSystemTray,
|
|
493
493
|
force_internal_navigation: forceInternalNavigation,
|
|
494
|
+
zoom,
|
|
495
|
+
min_width: minWidth,
|
|
496
|
+
min_height: minHeight,
|
|
497
|
+
ignore_certificate_errors: ignoreCertificateErrors,
|
|
494
498
|
};
|
|
495
499
|
Object.assign(tauriConf.pake.windows[0], { url, ...tauriConfWindowOptions });
|
|
496
500
|
tauriConf.productName = name;
|
|
@@ -1363,6 +1367,10 @@ const DEFAULT_PAKE_OPTIONS = {
|
|
|
1363
1367
|
multiInstance: false,
|
|
1364
1368
|
startToTray: false,
|
|
1365
1369
|
forceInternalNavigation: false,
|
|
1370
|
+
zoom: 100,
|
|
1371
|
+
minWidth: 0,
|
|
1372
|
+
minHeight: 0,
|
|
1373
|
+
ignoreCertificateErrors: false,
|
|
1366
1374
|
};
|
|
1367
1375
|
|
|
1368
1376
|
async function checkUpdateTips() {
|
|
@@ -1900,6 +1908,27 @@ program
|
|
|
1900
1908
|
.addOption(new Option('--installer-language <string>', 'Installer language')
|
|
1901
1909
|
.default(DEFAULT_PAKE_OPTIONS.installerLanguage)
|
|
1902
1910
|
.hideHelp())
|
|
1911
|
+
.addOption(new Option('--zoom <number>', 'Initial page zoom level (50-200)')
|
|
1912
|
+
.default(DEFAULT_PAKE_OPTIONS.zoom)
|
|
1913
|
+
.argParser((value) => {
|
|
1914
|
+
const zoom = parseInt(value);
|
|
1915
|
+
if (isNaN(zoom) || zoom < 50 || zoom > 200) {
|
|
1916
|
+
throw new Error('--zoom must be a number between 50 and 200');
|
|
1917
|
+
}
|
|
1918
|
+
return zoom;
|
|
1919
|
+
})
|
|
1920
|
+
.hideHelp())
|
|
1921
|
+
.addOption(new Option('--min-width <number>', 'Minimum window width')
|
|
1922
|
+
.default(DEFAULT_PAKE_OPTIONS.minWidth)
|
|
1923
|
+
.argParser(validateNumberInput)
|
|
1924
|
+
.hideHelp())
|
|
1925
|
+
.addOption(new Option('--min-height <number>', 'Minimum window height')
|
|
1926
|
+
.default(DEFAULT_PAKE_OPTIONS.minHeight)
|
|
1927
|
+
.argParser(validateNumberInput)
|
|
1928
|
+
.hideHelp())
|
|
1929
|
+
.addOption(new Option('--ignore-certificate-errors', 'Ignore certificate errors (for self-signed certificates)')
|
|
1930
|
+
.default(DEFAULT_PAKE_OPTIONS.ignoreCertificateErrors)
|
|
1931
|
+
.hideHelp())
|
|
1903
1932
|
.version(packageJson.version, '-v, --version')
|
|
1904
1933
|
.configureHelp({
|
|
1905
1934
|
sortSubcommands: true,
|
package/package.json
CHANGED
|
@@ -22,6 +22,18 @@ pub struct WindowConfig {
|
|
|
22
22
|
pub start_to_tray: bool,
|
|
23
23
|
#[serde(default)]
|
|
24
24
|
pub force_internal_navigation: bool,
|
|
25
|
+
#[serde(default = "default_zoom")]
|
|
26
|
+
pub zoom: u32,
|
|
27
|
+
#[serde(default)]
|
|
28
|
+
pub min_width: f64,
|
|
29
|
+
#[serde(default)]
|
|
30
|
+
pub min_height: f64,
|
|
31
|
+
#[serde(default)]
|
|
32
|
+
pub ignore_certificate_errors: bool,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
fn default_zoom() -> u32 {
|
|
36
|
+
100
|
|
25
37
|
}
|
|
26
38
|
|
|
27
39
|
#[derive(Debug, Serialize, Deserialize)]
|
|
@@ -64,6 +64,20 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|
|
64
64
|
.always_on_top(window_config.always_on_top)
|
|
65
65
|
.incognito(window_config.incognito);
|
|
66
66
|
|
|
67
|
+
if window_config.min_width > 0.0 || window_config.min_height > 0.0 {
|
|
68
|
+
let min_w = if window_config.min_width > 0.0 {
|
|
69
|
+
window_config.min_width
|
|
70
|
+
} else {
|
|
71
|
+
window_config.width
|
|
72
|
+
};
|
|
73
|
+
let min_h = if window_config.min_height > 0.0 {
|
|
74
|
+
window_config.min_height
|
|
75
|
+
} else {
|
|
76
|
+
window_config.height
|
|
77
|
+
};
|
|
78
|
+
window_builder = window_builder.min_inner_size(min_w, min_h);
|
|
79
|
+
}
|
|
80
|
+
|
|
67
81
|
if !window_config.enable_drag_drop {
|
|
68
82
|
window_builder = window_builder.disable_drag_drop_handler();
|
|
69
83
|
}
|
|
@@ -82,6 +96,23 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|
|
82
96
|
#[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
|
|
83
97
|
let mut linux_browser_args = String::from("--disable-blink-features=AutomationControlled");
|
|
84
98
|
|
|
99
|
+
if window_config.ignore_certificate_errors {
|
|
100
|
+
#[cfg(target_os = "windows")]
|
|
101
|
+
{
|
|
102
|
+
windows_browser_args.push_str(" --ignore-certificate-errors");
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
#[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
|
|
106
|
+
{
|
|
107
|
+
linux_browser_args.push_str(" --ignore-certificate-errors");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#[cfg(target_os = "macos")]
|
|
111
|
+
{
|
|
112
|
+
window_builder = window_builder.additional_browser_args("--ignore-certificate-errors");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
85
116
|
if window_config.enable_wasm {
|
|
86
117
|
#[cfg(target_os = "windows")]
|
|
87
118
|
{
|
|
@@ -896,6 +896,8 @@ function setDefaultZoom() {
|
|
|
896
896
|
const htmlZoom = window.localStorage.getItem("htmlZoom");
|
|
897
897
|
if (htmlZoom) {
|
|
898
898
|
setZoom(htmlZoom);
|
|
899
|
+
} else if (window.pakeConfig?.zoom && window.pakeConfig.zoom !== 100) {
|
|
900
|
+
setZoom(`${window.pakeConfig.zoom}%`);
|
|
899
901
|
}
|
|
900
902
|
}
|
|
901
903
|
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"windows": [
|
|
3
|
-
{
|
|
4
|
-
"url": "https://github.com",
|
|
5
|
-
"url_type": "web",
|
|
6
|
-
"hide_title_bar": true,
|
|
7
|
-
"fullscreen": false,
|
|
8
|
-
"width": 1200,
|
|
9
|
-
"height": 800,
|
|
10
|
-
"resizable": true,
|
|
11
|
-
"always_on_top": false,
|
|
12
|
-
"dark_mode": false,
|
|
13
|
-
"activation_shortcut": "",
|
|
14
|
-
"disabled_web_shortcuts": false,
|
|
15
|
-
"hide_on_close": true,
|
|
16
|
-
"incognito": false,
|
|
17
|
-
"enable_wasm": false,
|
|
18
|
-
"enable_drag_drop": false,
|
|
19
|
-
"maximize": false,
|
|
20
|
-
"start_to_tray": false,
|
|
21
|
-
"title": null
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"user_agent": {
|
|
25
|
-
"macos": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15",
|
|
26
|
-
"linux": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
|
|
27
|
-
"windows": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
|
|
28
|
-
},
|
|
29
|
-
"system_tray": {
|
|
30
|
-
"macos": false,
|
|
31
|
-
"linux": true,
|
|
32
|
-
"windows": true
|
|
33
|
-
},
|
|
34
|
-
"system_tray_path": "png/icon_512.png",
|
|
35
|
-
"inject": [],
|
|
36
|
-
"proxy_url": "",
|
|
37
|
-
"multi_instance": false
|
|
38
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"productName": "GitHubMultiArch",
|
|
3
|
-
"identifier": "com.pake.3097fc",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"app": {
|
|
6
|
-
"withGlobalTauri": true,
|
|
7
|
-
"security": {
|
|
8
|
-
"headers": {}
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"build": {
|
|
12
|
-
"frontendDist": "../dist"
|
|
13
|
-
},
|
|
14
|
-
"bundle": {
|
|
15
|
-
"icon": [
|
|
16
|
-
"icons/githubmultiarch.icns"
|
|
17
|
-
],
|
|
18
|
-
"active": true,
|
|
19
|
-
"targets": [
|
|
20
|
-
"app"
|
|
21
|
-
],
|
|
22
|
-
"resources": [
|
|
23
|
-
"icons/githubmultiarch.icns"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"bundle": {
|
|
3
|
-
"icon": ["png/weekly_256.ico", "png/weekly_32.ico"],
|
|
4
|
-
"active": true,
|
|
5
|
-
"resources": ["png/weekly_32.ico"],
|
|
6
|
-
"targets": ["msi"],
|
|
7
|
-
"windows": {
|
|
8
|
-
"digestAlgorithm": "sha256",
|
|
9
|
-
"wix": {
|
|
10
|
-
"language": ["en-US"],
|
|
11
|
-
"template": "assets/main.wxs"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|