pake-cli 0.0.1 → 0.0.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 +22 -2
- package/dist/cli.js +1 -1918
- package/package.json +10 -4
- package/src-tauri/src/main.rs +1 -3
- package/src-tauri/tauri.conf.json +1 -1
- package/.ecrc.json +0 -3
- package/.editorconfig +0 -24
- package/.github/FUNDING.yml +0 -2
- package/.github/ISSUE_TEMPLATE/bug.md +0 -13
- package/.github/workflows/editorconfig-check.yml +0 -23
- package/.github/workflows/main.yml +0 -17
- package/.github/workflows/rust-code-quality-check.yml +0 -89
- package/.prettierignore +0 -4
- package/.vscode/settings.json +0 -8
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -26
- package/README_EN.md +0 -148
- package/app.csv +0 -9
- package/bin/README.md +0 -72
- package/bin/builders/BuilderFactory.ts +0 -12
- package/bin/builders/LinuxBuilder.ts +0 -0
- package/bin/builders/MacBuilder.ts +0 -65
- package/bin/builders/WinBulider.ts +0 -0
- package/bin/builders/base.ts +0 -16
- package/bin/builders/common.ts +0 -11
- package/bin/cli.ts +0 -36
- package/bin/defaults.ts +0 -13
- package/bin/helpers/rust.ts +0 -21
- package/bin/helpers/tauriConfig.ts +0 -8
- package/bin/options/icon.ts +0 -97
- package/bin/options/index.ts +0 -22
- package/bin/types.ts +0 -29
- package/bin/utils/platform.ts +0 -5
- package/bin/utils/shell.ts +0 -13
- package/bin/utils/tlds.ts +0 -1489
- package/bin/utils/url.ts +0 -47
- package/bin/utils/validate.ts +0 -18
- package/icns2png.py +0 -38
- package/pake-default.icns +0 -0
- package/rollup.config.js +0 -24
- package/script/build.bat +0 -80
- package/script/build.sh +0 -122
- package/script/sd-apple-x64 +0 -0
- package/script/sd-linux-x64 +0 -0
- package/script/sd.exe +0 -0
- package/tsconfig.json +0 -17
package/dist/cli.js
CHANGED
|
@@ -1,1918 +1 @@
|
|
|
1
|
-
import * as Commander from 'commander';
|
|
2
|
-
import { program } from 'commander';
|
|
3
|
-
import url, { fileURLToPath } from 'url';
|
|
4
|
-
import isurl from 'is-url';
|
|
5
|
-
import prompts from 'prompts';
|
|
6
|
-
import crypto from 'crypto';
|
|
7
|
-
import axios from 'axios';
|
|
8
|
-
import { fileTypeFromBuffer } from 'file-type';
|
|
9
|
-
import { dir } from 'tmp-promise';
|
|
10
|
-
import path from 'path';
|
|
11
|
-
import fs from 'fs/promises';
|
|
12
|
-
import log from 'loglevel';
|
|
13
|
-
import ora from 'ora';
|
|
14
|
-
import shelljs from 'shelljs';
|
|
15
|
-
|
|
16
|
-
/******************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
|
|
19
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
-
purpose with or without fee is hereby granted.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */
|
|
30
|
-
|
|
31
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
32
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
33
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
34
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
35
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
36
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
37
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const DEFAULT_PAKE_OPTIONS = {
|
|
42
|
-
icon: '',
|
|
43
|
-
height: 800,
|
|
44
|
-
width: 1280,
|
|
45
|
-
fullscreen: false,
|
|
46
|
-
resizable: true,
|
|
47
|
-
transparent: false,
|
|
48
|
-
debug: false,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const tlds = [
|
|
52
|
-
'aaa',
|
|
53
|
-
'aarp',
|
|
54
|
-
'abarth',
|
|
55
|
-
'abb',
|
|
56
|
-
'abbott',
|
|
57
|
-
'abbvie',
|
|
58
|
-
'abc',
|
|
59
|
-
'able',
|
|
60
|
-
'abogado',
|
|
61
|
-
'abudhabi',
|
|
62
|
-
'ac',
|
|
63
|
-
'academy',
|
|
64
|
-
'accenture',
|
|
65
|
-
'accountant',
|
|
66
|
-
'accountants',
|
|
67
|
-
'aco',
|
|
68
|
-
'actor',
|
|
69
|
-
'ad',
|
|
70
|
-
'adac',
|
|
71
|
-
'ads',
|
|
72
|
-
'adult',
|
|
73
|
-
'ae',
|
|
74
|
-
'aeg',
|
|
75
|
-
'aero',
|
|
76
|
-
'aetna',
|
|
77
|
-
'af',
|
|
78
|
-
'afl',
|
|
79
|
-
'africa',
|
|
80
|
-
'ag',
|
|
81
|
-
'agakhan',
|
|
82
|
-
'agency',
|
|
83
|
-
'ai',
|
|
84
|
-
'aig',
|
|
85
|
-
'airbus',
|
|
86
|
-
'airforce',
|
|
87
|
-
'airtel',
|
|
88
|
-
'akdn',
|
|
89
|
-
'al',
|
|
90
|
-
'alfaromeo',
|
|
91
|
-
'alibaba',
|
|
92
|
-
'alipay',
|
|
93
|
-
'allfinanz',
|
|
94
|
-
'allstate',
|
|
95
|
-
'ally',
|
|
96
|
-
'alsace',
|
|
97
|
-
'alstom',
|
|
98
|
-
'am',
|
|
99
|
-
'amazon',
|
|
100
|
-
'americanexpress',
|
|
101
|
-
'americanfamily',
|
|
102
|
-
'amex',
|
|
103
|
-
'amfam',
|
|
104
|
-
'amica',
|
|
105
|
-
'amsterdam',
|
|
106
|
-
'analytics',
|
|
107
|
-
'android',
|
|
108
|
-
'anquan',
|
|
109
|
-
'anz',
|
|
110
|
-
'ao',
|
|
111
|
-
'aol',
|
|
112
|
-
'apartments',
|
|
113
|
-
'app',
|
|
114
|
-
'apple',
|
|
115
|
-
'aq',
|
|
116
|
-
'aquarelle',
|
|
117
|
-
'ar',
|
|
118
|
-
'arab',
|
|
119
|
-
'aramco',
|
|
120
|
-
'archi',
|
|
121
|
-
'army',
|
|
122
|
-
'arpa',
|
|
123
|
-
'art',
|
|
124
|
-
'arte',
|
|
125
|
-
'as',
|
|
126
|
-
'asda',
|
|
127
|
-
'asia',
|
|
128
|
-
'associates',
|
|
129
|
-
'at',
|
|
130
|
-
'athleta',
|
|
131
|
-
'attorney',
|
|
132
|
-
'au',
|
|
133
|
-
'auction',
|
|
134
|
-
'audi',
|
|
135
|
-
'audible',
|
|
136
|
-
'audio',
|
|
137
|
-
'auspost',
|
|
138
|
-
'author',
|
|
139
|
-
'auto',
|
|
140
|
-
'autos',
|
|
141
|
-
'avianca',
|
|
142
|
-
'aw',
|
|
143
|
-
'aws',
|
|
144
|
-
'ax',
|
|
145
|
-
'axa',
|
|
146
|
-
'az',
|
|
147
|
-
'azure',
|
|
148
|
-
'ba',
|
|
149
|
-
'baby',
|
|
150
|
-
'baidu',
|
|
151
|
-
'banamex',
|
|
152
|
-
'bananarepublic',
|
|
153
|
-
'band',
|
|
154
|
-
'bank',
|
|
155
|
-
'bar',
|
|
156
|
-
'barcelona',
|
|
157
|
-
'barclaycard',
|
|
158
|
-
'barclays',
|
|
159
|
-
'barefoot',
|
|
160
|
-
'bargains',
|
|
161
|
-
'baseball',
|
|
162
|
-
'basketball',
|
|
163
|
-
'bauhaus',
|
|
164
|
-
'bayern',
|
|
165
|
-
'bb',
|
|
166
|
-
'bbc',
|
|
167
|
-
'bbt',
|
|
168
|
-
'bbva',
|
|
169
|
-
'bcg',
|
|
170
|
-
'bcn',
|
|
171
|
-
'bd',
|
|
172
|
-
'be',
|
|
173
|
-
'beats',
|
|
174
|
-
'beauty',
|
|
175
|
-
'beer',
|
|
176
|
-
'bentley',
|
|
177
|
-
'berlin',
|
|
178
|
-
'best',
|
|
179
|
-
'bestbuy',
|
|
180
|
-
'bet',
|
|
181
|
-
'bf',
|
|
182
|
-
'bg',
|
|
183
|
-
'bh',
|
|
184
|
-
'bharti',
|
|
185
|
-
'bi',
|
|
186
|
-
'bible',
|
|
187
|
-
'bid',
|
|
188
|
-
'bike',
|
|
189
|
-
'bing',
|
|
190
|
-
'bingo',
|
|
191
|
-
'bio',
|
|
192
|
-
'biz',
|
|
193
|
-
'bj',
|
|
194
|
-
'black',
|
|
195
|
-
'blackfriday',
|
|
196
|
-
'blockbuster',
|
|
197
|
-
'blog',
|
|
198
|
-
'bloomberg',
|
|
199
|
-
'blue',
|
|
200
|
-
'bm',
|
|
201
|
-
'bms',
|
|
202
|
-
'bmw',
|
|
203
|
-
'bn',
|
|
204
|
-
'bnpparibas',
|
|
205
|
-
'bo',
|
|
206
|
-
'boats',
|
|
207
|
-
'boehringer',
|
|
208
|
-
'bofa',
|
|
209
|
-
'bom',
|
|
210
|
-
'bond',
|
|
211
|
-
'boo',
|
|
212
|
-
'book',
|
|
213
|
-
'booking',
|
|
214
|
-
'bosch',
|
|
215
|
-
'bostik',
|
|
216
|
-
'boston',
|
|
217
|
-
'bot',
|
|
218
|
-
'boutique',
|
|
219
|
-
'box',
|
|
220
|
-
'br',
|
|
221
|
-
'bradesco',
|
|
222
|
-
'bridgestone',
|
|
223
|
-
'broadway',
|
|
224
|
-
'broker',
|
|
225
|
-
'brother',
|
|
226
|
-
'brussels',
|
|
227
|
-
'bs',
|
|
228
|
-
'bt',
|
|
229
|
-
'build',
|
|
230
|
-
'builders',
|
|
231
|
-
'business',
|
|
232
|
-
'buy',
|
|
233
|
-
'buzz',
|
|
234
|
-
'bv',
|
|
235
|
-
'bw',
|
|
236
|
-
'by',
|
|
237
|
-
'bz',
|
|
238
|
-
'bzh',
|
|
239
|
-
'ca',
|
|
240
|
-
'cab',
|
|
241
|
-
'cafe',
|
|
242
|
-
'cal',
|
|
243
|
-
'call',
|
|
244
|
-
'calvinklein',
|
|
245
|
-
'cam',
|
|
246
|
-
'camera',
|
|
247
|
-
'camp',
|
|
248
|
-
'canon',
|
|
249
|
-
'capetown',
|
|
250
|
-
'capital',
|
|
251
|
-
'capitalone',
|
|
252
|
-
'car',
|
|
253
|
-
'caravan',
|
|
254
|
-
'cards',
|
|
255
|
-
'care',
|
|
256
|
-
'career',
|
|
257
|
-
'careers',
|
|
258
|
-
'cars',
|
|
259
|
-
'casa',
|
|
260
|
-
'case',
|
|
261
|
-
'cash',
|
|
262
|
-
'casino',
|
|
263
|
-
'cat',
|
|
264
|
-
'catering',
|
|
265
|
-
'catholic',
|
|
266
|
-
'cba',
|
|
267
|
-
'cbn',
|
|
268
|
-
'cbre',
|
|
269
|
-
'cbs',
|
|
270
|
-
'cc',
|
|
271
|
-
'cd',
|
|
272
|
-
'center',
|
|
273
|
-
'ceo',
|
|
274
|
-
'cern',
|
|
275
|
-
'cf',
|
|
276
|
-
'cfa',
|
|
277
|
-
'cfd',
|
|
278
|
-
'cg',
|
|
279
|
-
'ch',
|
|
280
|
-
'chanel',
|
|
281
|
-
'channel',
|
|
282
|
-
'charity',
|
|
283
|
-
'chase',
|
|
284
|
-
'chat',
|
|
285
|
-
'cheap',
|
|
286
|
-
'chintai',
|
|
287
|
-
'christmas',
|
|
288
|
-
'chrome',
|
|
289
|
-
'church',
|
|
290
|
-
'ci',
|
|
291
|
-
'cipriani',
|
|
292
|
-
'circle',
|
|
293
|
-
'cisco',
|
|
294
|
-
'citadel',
|
|
295
|
-
'citi',
|
|
296
|
-
'citic',
|
|
297
|
-
'city',
|
|
298
|
-
'cityeats',
|
|
299
|
-
'ck',
|
|
300
|
-
'cl',
|
|
301
|
-
'claims',
|
|
302
|
-
'cleaning',
|
|
303
|
-
'click',
|
|
304
|
-
'clinic',
|
|
305
|
-
'clinique',
|
|
306
|
-
'clothing',
|
|
307
|
-
'cloud',
|
|
308
|
-
'club',
|
|
309
|
-
'clubmed',
|
|
310
|
-
'cm',
|
|
311
|
-
'cn',
|
|
312
|
-
'co',
|
|
313
|
-
'coach',
|
|
314
|
-
'codes',
|
|
315
|
-
'coffee',
|
|
316
|
-
'college',
|
|
317
|
-
'cologne',
|
|
318
|
-
'com',
|
|
319
|
-
'comcast',
|
|
320
|
-
'commbank',
|
|
321
|
-
'community',
|
|
322
|
-
'company',
|
|
323
|
-
'compare',
|
|
324
|
-
'computer',
|
|
325
|
-
'comsec',
|
|
326
|
-
'condos',
|
|
327
|
-
'construction',
|
|
328
|
-
'consulting',
|
|
329
|
-
'contact',
|
|
330
|
-
'contractors',
|
|
331
|
-
'cooking',
|
|
332
|
-
'cookingchannel',
|
|
333
|
-
'cool',
|
|
334
|
-
'coop',
|
|
335
|
-
'corsica',
|
|
336
|
-
'country',
|
|
337
|
-
'coupon',
|
|
338
|
-
'coupons',
|
|
339
|
-
'courses',
|
|
340
|
-
'cpa',
|
|
341
|
-
'cr',
|
|
342
|
-
'credit',
|
|
343
|
-
'creditcard',
|
|
344
|
-
'creditunion',
|
|
345
|
-
'cricket',
|
|
346
|
-
'crown',
|
|
347
|
-
'crs',
|
|
348
|
-
'cruise',
|
|
349
|
-
'cruises',
|
|
350
|
-
'cu',
|
|
351
|
-
'cuisinella',
|
|
352
|
-
'cv',
|
|
353
|
-
'cw',
|
|
354
|
-
'cx',
|
|
355
|
-
'cy',
|
|
356
|
-
'cymru',
|
|
357
|
-
'cyou',
|
|
358
|
-
'cz',
|
|
359
|
-
'dabur',
|
|
360
|
-
'dad',
|
|
361
|
-
'dance',
|
|
362
|
-
'data',
|
|
363
|
-
'date',
|
|
364
|
-
'dating',
|
|
365
|
-
'datsun',
|
|
366
|
-
'day',
|
|
367
|
-
'dclk',
|
|
368
|
-
'dds',
|
|
369
|
-
'de',
|
|
370
|
-
'deal',
|
|
371
|
-
'dealer',
|
|
372
|
-
'deals',
|
|
373
|
-
'degree',
|
|
374
|
-
'delivery',
|
|
375
|
-
'dell',
|
|
376
|
-
'deloitte',
|
|
377
|
-
'delta',
|
|
378
|
-
'democrat',
|
|
379
|
-
'dental',
|
|
380
|
-
'dentist',
|
|
381
|
-
'desi',
|
|
382
|
-
'design',
|
|
383
|
-
'dev',
|
|
384
|
-
'dhl',
|
|
385
|
-
'diamonds',
|
|
386
|
-
'diet',
|
|
387
|
-
'digital',
|
|
388
|
-
'direct',
|
|
389
|
-
'directory',
|
|
390
|
-
'discount',
|
|
391
|
-
'discover',
|
|
392
|
-
'dish',
|
|
393
|
-
'diy',
|
|
394
|
-
'dj',
|
|
395
|
-
'dk',
|
|
396
|
-
'dm',
|
|
397
|
-
'dnp',
|
|
398
|
-
'do',
|
|
399
|
-
'docs',
|
|
400
|
-
'doctor',
|
|
401
|
-
'dog',
|
|
402
|
-
'domains',
|
|
403
|
-
'dot',
|
|
404
|
-
'download',
|
|
405
|
-
'drive',
|
|
406
|
-
'dtv',
|
|
407
|
-
'dubai',
|
|
408
|
-
'dunlop',
|
|
409
|
-
'dupont',
|
|
410
|
-
'durban',
|
|
411
|
-
'dvag',
|
|
412
|
-
'dvr',
|
|
413
|
-
'dz',
|
|
414
|
-
'earth',
|
|
415
|
-
'eat',
|
|
416
|
-
'ec',
|
|
417
|
-
'eco',
|
|
418
|
-
'edeka',
|
|
419
|
-
'edu',
|
|
420
|
-
'education',
|
|
421
|
-
'ee',
|
|
422
|
-
'eg',
|
|
423
|
-
'email',
|
|
424
|
-
'emerck',
|
|
425
|
-
'energy',
|
|
426
|
-
'engineer',
|
|
427
|
-
'engineering',
|
|
428
|
-
'enterprises',
|
|
429
|
-
'epson',
|
|
430
|
-
'equipment',
|
|
431
|
-
'er',
|
|
432
|
-
'ericsson',
|
|
433
|
-
'erni',
|
|
434
|
-
'es',
|
|
435
|
-
'esq',
|
|
436
|
-
'estate',
|
|
437
|
-
'et',
|
|
438
|
-
'etisalat',
|
|
439
|
-
'eu',
|
|
440
|
-
'eurovision',
|
|
441
|
-
'eus',
|
|
442
|
-
'events',
|
|
443
|
-
'exchange',
|
|
444
|
-
'expert',
|
|
445
|
-
'exposed',
|
|
446
|
-
'express',
|
|
447
|
-
'extraspace',
|
|
448
|
-
'fage',
|
|
449
|
-
'fail',
|
|
450
|
-
'fairwinds',
|
|
451
|
-
'faith',
|
|
452
|
-
'family',
|
|
453
|
-
'fan',
|
|
454
|
-
'fans',
|
|
455
|
-
'farm',
|
|
456
|
-
'farmers',
|
|
457
|
-
'fashion',
|
|
458
|
-
'fast',
|
|
459
|
-
'fedex',
|
|
460
|
-
'feedback',
|
|
461
|
-
'ferrari',
|
|
462
|
-
'ferrero',
|
|
463
|
-
'fi',
|
|
464
|
-
'fiat',
|
|
465
|
-
'fidelity',
|
|
466
|
-
'fido',
|
|
467
|
-
'film',
|
|
468
|
-
'final',
|
|
469
|
-
'finance',
|
|
470
|
-
'financial',
|
|
471
|
-
'fire',
|
|
472
|
-
'firestone',
|
|
473
|
-
'firmdale',
|
|
474
|
-
'fish',
|
|
475
|
-
'fishing',
|
|
476
|
-
'fit',
|
|
477
|
-
'fitness',
|
|
478
|
-
'fj',
|
|
479
|
-
'fk',
|
|
480
|
-
'flickr',
|
|
481
|
-
'flights',
|
|
482
|
-
'flir',
|
|
483
|
-
'florist',
|
|
484
|
-
'flowers',
|
|
485
|
-
'fly',
|
|
486
|
-
'fm',
|
|
487
|
-
'fo',
|
|
488
|
-
'foo',
|
|
489
|
-
'food',
|
|
490
|
-
'foodnetwork',
|
|
491
|
-
'football',
|
|
492
|
-
'ford',
|
|
493
|
-
'forex',
|
|
494
|
-
'forsale',
|
|
495
|
-
'forum',
|
|
496
|
-
'foundation',
|
|
497
|
-
'fox',
|
|
498
|
-
'fr',
|
|
499
|
-
'free',
|
|
500
|
-
'fresenius',
|
|
501
|
-
'frl',
|
|
502
|
-
'frogans',
|
|
503
|
-
'frontdoor',
|
|
504
|
-
'frontier',
|
|
505
|
-
'ftr',
|
|
506
|
-
'fujitsu',
|
|
507
|
-
'fun',
|
|
508
|
-
'fund',
|
|
509
|
-
'furniture',
|
|
510
|
-
'futbol',
|
|
511
|
-
'fyi',
|
|
512
|
-
'ga',
|
|
513
|
-
'gal',
|
|
514
|
-
'gallery',
|
|
515
|
-
'gallo',
|
|
516
|
-
'gallup',
|
|
517
|
-
'game',
|
|
518
|
-
'games',
|
|
519
|
-
'gap',
|
|
520
|
-
'garden',
|
|
521
|
-
'gay',
|
|
522
|
-
'gb',
|
|
523
|
-
'gbiz',
|
|
524
|
-
'gd',
|
|
525
|
-
'gdn',
|
|
526
|
-
'ge',
|
|
527
|
-
'gea',
|
|
528
|
-
'gent',
|
|
529
|
-
'genting',
|
|
530
|
-
'george',
|
|
531
|
-
'gf',
|
|
532
|
-
'gg',
|
|
533
|
-
'ggee',
|
|
534
|
-
'gh',
|
|
535
|
-
'gi',
|
|
536
|
-
'gift',
|
|
537
|
-
'gifts',
|
|
538
|
-
'gives',
|
|
539
|
-
'giving',
|
|
540
|
-
'gl',
|
|
541
|
-
'glass',
|
|
542
|
-
'gle',
|
|
543
|
-
'global',
|
|
544
|
-
'globo',
|
|
545
|
-
'gm',
|
|
546
|
-
'gmail',
|
|
547
|
-
'gmbh',
|
|
548
|
-
'gmo',
|
|
549
|
-
'gmx',
|
|
550
|
-
'gn',
|
|
551
|
-
'godaddy',
|
|
552
|
-
'gold',
|
|
553
|
-
'goldpoint',
|
|
554
|
-
'golf',
|
|
555
|
-
'goo',
|
|
556
|
-
'goodyear',
|
|
557
|
-
'goog',
|
|
558
|
-
'google',
|
|
559
|
-
'gop',
|
|
560
|
-
'got',
|
|
561
|
-
'gov',
|
|
562
|
-
'gp',
|
|
563
|
-
'gq',
|
|
564
|
-
'gr',
|
|
565
|
-
'grainger',
|
|
566
|
-
'graphics',
|
|
567
|
-
'gratis',
|
|
568
|
-
'green',
|
|
569
|
-
'gripe',
|
|
570
|
-
'grocery',
|
|
571
|
-
'group',
|
|
572
|
-
'gs',
|
|
573
|
-
'gt',
|
|
574
|
-
'gu',
|
|
575
|
-
'guardian',
|
|
576
|
-
'gucci',
|
|
577
|
-
'guge',
|
|
578
|
-
'guide',
|
|
579
|
-
'guitars',
|
|
580
|
-
'guru',
|
|
581
|
-
'gw',
|
|
582
|
-
'gy',
|
|
583
|
-
'hair',
|
|
584
|
-
'hamburg',
|
|
585
|
-
'hangout',
|
|
586
|
-
'haus',
|
|
587
|
-
'hbo',
|
|
588
|
-
'hdfc',
|
|
589
|
-
'hdfcbank',
|
|
590
|
-
'health',
|
|
591
|
-
'healthcare',
|
|
592
|
-
'help',
|
|
593
|
-
'helsinki',
|
|
594
|
-
'here',
|
|
595
|
-
'hermes',
|
|
596
|
-
'hgtv',
|
|
597
|
-
'hiphop',
|
|
598
|
-
'hisamitsu',
|
|
599
|
-
'hitachi',
|
|
600
|
-
'hiv',
|
|
601
|
-
'hk',
|
|
602
|
-
'hkt',
|
|
603
|
-
'hm',
|
|
604
|
-
'hn',
|
|
605
|
-
'hockey',
|
|
606
|
-
'holdings',
|
|
607
|
-
'holiday',
|
|
608
|
-
'homedepot',
|
|
609
|
-
'homegoods',
|
|
610
|
-
'homes',
|
|
611
|
-
'homesense',
|
|
612
|
-
'honda',
|
|
613
|
-
'horse',
|
|
614
|
-
'hospital',
|
|
615
|
-
'host',
|
|
616
|
-
'hosting',
|
|
617
|
-
'hot',
|
|
618
|
-
'hoteles',
|
|
619
|
-
'hotels',
|
|
620
|
-
'hotmail',
|
|
621
|
-
'house',
|
|
622
|
-
'how',
|
|
623
|
-
'hr',
|
|
624
|
-
'hsbc',
|
|
625
|
-
'ht',
|
|
626
|
-
'hu',
|
|
627
|
-
'hughes',
|
|
628
|
-
'hyatt',
|
|
629
|
-
'hyundai',
|
|
630
|
-
'ibm',
|
|
631
|
-
'icbc',
|
|
632
|
-
'ice',
|
|
633
|
-
'icu',
|
|
634
|
-
'id',
|
|
635
|
-
'ie',
|
|
636
|
-
'ieee',
|
|
637
|
-
'ifm',
|
|
638
|
-
'ikano',
|
|
639
|
-
'il',
|
|
640
|
-
'im',
|
|
641
|
-
'imamat',
|
|
642
|
-
'imdb',
|
|
643
|
-
'immo',
|
|
644
|
-
'immobilien',
|
|
645
|
-
'in',
|
|
646
|
-
'inc',
|
|
647
|
-
'industries',
|
|
648
|
-
'infiniti',
|
|
649
|
-
'info',
|
|
650
|
-
'ing',
|
|
651
|
-
'ink',
|
|
652
|
-
'institute',
|
|
653
|
-
'insurance',
|
|
654
|
-
'insure',
|
|
655
|
-
'int',
|
|
656
|
-
'international',
|
|
657
|
-
'intuit',
|
|
658
|
-
'investments',
|
|
659
|
-
'io',
|
|
660
|
-
'ipiranga',
|
|
661
|
-
'iq',
|
|
662
|
-
'ir',
|
|
663
|
-
'irish',
|
|
664
|
-
'is',
|
|
665
|
-
'ismaili',
|
|
666
|
-
'ist',
|
|
667
|
-
'istanbul',
|
|
668
|
-
'it',
|
|
669
|
-
'itau',
|
|
670
|
-
'itv',
|
|
671
|
-
'jaguar',
|
|
672
|
-
'java',
|
|
673
|
-
'jcb',
|
|
674
|
-
'je',
|
|
675
|
-
'jeep',
|
|
676
|
-
'jetzt',
|
|
677
|
-
'jewelry',
|
|
678
|
-
'jio',
|
|
679
|
-
'jll',
|
|
680
|
-
'jm',
|
|
681
|
-
'jmp',
|
|
682
|
-
'jnj',
|
|
683
|
-
'jo',
|
|
684
|
-
'jobs',
|
|
685
|
-
'joburg',
|
|
686
|
-
'jot',
|
|
687
|
-
'joy',
|
|
688
|
-
'jp',
|
|
689
|
-
'jpmorgan',
|
|
690
|
-
'jprs',
|
|
691
|
-
'juegos',
|
|
692
|
-
'juniper',
|
|
693
|
-
'kaufen',
|
|
694
|
-
'kddi',
|
|
695
|
-
'ke',
|
|
696
|
-
'kerryhotels',
|
|
697
|
-
'kerrylogistics',
|
|
698
|
-
'kerryproperties',
|
|
699
|
-
'kfh',
|
|
700
|
-
'kg',
|
|
701
|
-
'kh',
|
|
702
|
-
'ki',
|
|
703
|
-
'kia',
|
|
704
|
-
'kids',
|
|
705
|
-
'kim',
|
|
706
|
-
'kinder',
|
|
707
|
-
'kindle',
|
|
708
|
-
'kitchen',
|
|
709
|
-
'kiwi',
|
|
710
|
-
'km',
|
|
711
|
-
'kn',
|
|
712
|
-
'koeln',
|
|
713
|
-
'komatsu',
|
|
714
|
-
'kosher',
|
|
715
|
-
'kp',
|
|
716
|
-
'kpmg',
|
|
717
|
-
'kpn',
|
|
718
|
-
'kr',
|
|
719
|
-
'krd',
|
|
720
|
-
'kred',
|
|
721
|
-
'kuokgroup',
|
|
722
|
-
'kw',
|
|
723
|
-
'ky',
|
|
724
|
-
'kyoto',
|
|
725
|
-
'kz',
|
|
726
|
-
'la',
|
|
727
|
-
'lacaixa',
|
|
728
|
-
'lamborghini',
|
|
729
|
-
'lamer',
|
|
730
|
-
'lancaster',
|
|
731
|
-
'lancia',
|
|
732
|
-
'land',
|
|
733
|
-
'landrover',
|
|
734
|
-
'lanxess',
|
|
735
|
-
'lasalle',
|
|
736
|
-
'lat',
|
|
737
|
-
'latino',
|
|
738
|
-
'latrobe',
|
|
739
|
-
'law',
|
|
740
|
-
'lawyer',
|
|
741
|
-
'lb',
|
|
742
|
-
'lc',
|
|
743
|
-
'lds',
|
|
744
|
-
'lease',
|
|
745
|
-
'leclerc',
|
|
746
|
-
'lefrak',
|
|
747
|
-
'legal',
|
|
748
|
-
'lego',
|
|
749
|
-
'lexus',
|
|
750
|
-
'lgbt',
|
|
751
|
-
'li',
|
|
752
|
-
'lidl',
|
|
753
|
-
'life',
|
|
754
|
-
'lifeinsurance',
|
|
755
|
-
'lifestyle',
|
|
756
|
-
'lighting',
|
|
757
|
-
'like',
|
|
758
|
-
'lilly',
|
|
759
|
-
'limited',
|
|
760
|
-
'limo',
|
|
761
|
-
'lincoln',
|
|
762
|
-
'linde',
|
|
763
|
-
'link',
|
|
764
|
-
'lipsy',
|
|
765
|
-
'live',
|
|
766
|
-
'living',
|
|
767
|
-
'lk',
|
|
768
|
-
'llc',
|
|
769
|
-
'llp',
|
|
770
|
-
'loan',
|
|
771
|
-
'loans',
|
|
772
|
-
'locker',
|
|
773
|
-
'locus',
|
|
774
|
-
'loft',
|
|
775
|
-
'lol',
|
|
776
|
-
'london',
|
|
777
|
-
'lotte',
|
|
778
|
-
'lotto',
|
|
779
|
-
'love',
|
|
780
|
-
'lpl',
|
|
781
|
-
'lplfinancial',
|
|
782
|
-
'lr',
|
|
783
|
-
'ls',
|
|
784
|
-
'lt',
|
|
785
|
-
'ltd',
|
|
786
|
-
'ltda',
|
|
787
|
-
'lu',
|
|
788
|
-
'lundbeck',
|
|
789
|
-
'luxe',
|
|
790
|
-
'luxury',
|
|
791
|
-
'lv',
|
|
792
|
-
'ly',
|
|
793
|
-
'ma',
|
|
794
|
-
'macys',
|
|
795
|
-
'madrid',
|
|
796
|
-
'maif',
|
|
797
|
-
'maison',
|
|
798
|
-
'makeup',
|
|
799
|
-
'man',
|
|
800
|
-
'management',
|
|
801
|
-
'mango',
|
|
802
|
-
'map',
|
|
803
|
-
'market',
|
|
804
|
-
'marketing',
|
|
805
|
-
'markets',
|
|
806
|
-
'marriott',
|
|
807
|
-
'marshalls',
|
|
808
|
-
'maserati',
|
|
809
|
-
'mattel',
|
|
810
|
-
'mba',
|
|
811
|
-
'mc',
|
|
812
|
-
'mckinsey',
|
|
813
|
-
'md',
|
|
814
|
-
'me',
|
|
815
|
-
'med',
|
|
816
|
-
'media',
|
|
817
|
-
'meet',
|
|
818
|
-
'melbourne',
|
|
819
|
-
'meme',
|
|
820
|
-
'memorial',
|
|
821
|
-
'men',
|
|
822
|
-
'menu',
|
|
823
|
-
'merckmsd',
|
|
824
|
-
'mg',
|
|
825
|
-
'mh',
|
|
826
|
-
'miami',
|
|
827
|
-
'microsoft',
|
|
828
|
-
'mil',
|
|
829
|
-
'mini',
|
|
830
|
-
'mint',
|
|
831
|
-
'mit',
|
|
832
|
-
'mitsubishi',
|
|
833
|
-
'mk',
|
|
834
|
-
'ml',
|
|
835
|
-
'mlb',
|
|
836
|
-
'mls',
|
|
837
|
-
'mm',
|
|
838
|
-
'mma',
|
|
839
|
-
'mn',
|
|
840
|
-
'mo',
|
|
841
|
-
'mobi',
|
|
842
|
-
'mobile',
|
|
843
|
-
'moda',
|
|
844
|
-
'moe',
|
|
845
|
-
'moi',
|
|
846
|
-
'mom',
|
|
847
|
-
'monash',
|
|
848
|
-
'money',
|
|
849
|
-
'monster',
|
|
850
|
-
'mormon',
|
|
851
|
-
'mortgage',
|
|
852
|
-
'moscow',
|
|
853
|
-
'moto',
|
|
854
|
-
'motorcycles',
|
|
855
|
-
'mov',
|
|
856
|
-
'movie',
|
|
857
|
-
'mp',
|
|
858
|
-
'mq',
|
|
859
|
-
'mr',
|
|
860
|
-
'ms',
|
|
861
|
-
'msd',
|
|
862
|
-
'mt',
|
|
863
|
-
'mtn',
|
|
864
|
-
'mtr',
|
|
865
|
-
'mu',
|
|
866
|
-
'museum',
|
|
867
|
-
'music',
|
|
868
|
-
'mutual',
|
|
869
|
-
'mv',
|
|
870
|
-
'mw',
|
|
871
|
-
'mx',
|
|
872
|
-
'my',
|
|
873
|
-
'mz',
|
|
874
|
-
'na',
|
|
875
|
-
'nab',
|
|
876
|
-
'nagoya',
|
|
877
|
-
'name',
|
|
878
|
-
'natura',
|
|
879
|
-
'navy',
|
|
880
|
-
'nba',
|
|
881
|
-
'nc',
|
|
882
|
-
'ne',
|
|
883
|
-
'nec',
|
|
884
|
-
'net',
|
|
885
|
-
'netbank',
|
|
886
|
-
'netflix',
|
|
887
|
-
'network',
|
|
888
|
-
'neustar',
|
|
889
|
-
'new',
|
|
890
|
-
'news',
|
|
891
|
-
'next',
|
|
892
|
-
'nextdirect',
|
|
893
|
-
'nexus',
|
|
894
|
-
'nf',
|
|
895
|
-
'nfl',
|
|
896
|
-
'ng',
|
|
897
|
-
'ngo',
|
|
898
|
-
'nhk',
|
|
899
|
-
'ni',
|
|
900
|
-
'nico',
|
|
901
|
-
'nike',
|
|
902
|
-
'nikon',
|
|
903
|
-
'ninja',
|
|
904
|
-
'nissan',
|
|
905
|
-
'nissay',
|
|
906
|
-
'nl',
|
|
907
|
-
'no',
|
|
908
|
-
'nokia',
|
|
909
|
-
'northwesternmutual',
|
|
910
|
-
'norton',
|
|
911
|
-
'now',
|
|
912
|
-
'nowruz',
|
|
913
|
-
'nowtv',
|
|
914
|
-
'np',
|
|
915
|
-
'nr',
|
|
916
|
-
'nra',
|
|
917
|
-
'nrw',
|
|
918
|
-
'ntt',
|
|
919
|
-
'nu',
|
|
920
|
-
'nyc',
|
|
921
|
-
'nz',
|
|
922
|
-
'obi',
|
|
923
|
-
'observer',
|
|
924
|
-
'office',
|
|
925
|
-
'okinawa',
|
|
926
|
-
'olayan',
|
|
927
|
-
'olayangroup',
|
|
928
|
-
'oldnavy',
|
|
929
|
-
'ollo',
|
|
930
|
-
'om',
|
|
931
|
-
'omega',
|
|
932
|
-
'one',
|
|
933
|
-
'ong',
|
|
934
|
-
'onl',
|
|
935
|
-
'online',
|
|
936
|
-
'ooo',
|
|
937
|
-
'open',
|
|
938
|
-
'oracle',
|
|
939
|
-
'orange',
|
|
940
|
-
'org',
|
|
941
|
-
'organic',
|
|
942
|
-
'origins',
|
|
943
|
-
'osaka',
|
|
944
|
-
'otsuka',
|
|
945
|
-
'ott',
|
|
946
|
-
'ovh',
|
|
947
|
-
'pa',
|
|
948
|
-
'page',
|
|
949
|
-
'panasonic',
|
|
950
|
-
'paris',
|
|
951
|
-
'pars',
|
|
952
|
-
'partners',
|
|
953
|
-
'parts',
|
|
954
|
-
'party',
|
|
955
|
-
'passagens',
|
|
956
|
-
'pay',
|
|
957
|
-
'pccw',
|
|
958
|
-
'pe',
|
|
959
|
-
'pet',
|
|
960
|
-
'pf',
|
|
961
|
-
'pfizer',
|
|
962
|
-
'pg',
|
|
963
|
-
'ph',
|
|
964
|
-
'pharmacy',
|
|
965
|
-
'phd',
|
|
966
|
-
'philips',
|
|
967
|
-
'phone',
|
|
968
|
-
'photo',
|
|
969
|
-
'photography',
|
|
970
|
-
'photos',
|
|
971
|
-
'physio',
|
|
972
|
-
'pics',
|
|
973
|
-
'pictet',
|
|
974
|
-
'pictures',
|
|
975
|
-
'pid',
|
|
976
|
-
'pin',
|
|
977
|
-
'ping',
|
|
978
|
-
'pink',
|
|
979
|
-
'pioneer',
|
|
980
|
-
'pizza',
|
|
981
|
-
'pk',
|
|
982
|
-
'pl',
|
|
983
|
-
'place',
|
|
984
|
-
'play',
|
|
985
|
-
'playstation',
|
|
986
|
-
'plumbing',
|
|
987
|
-
'plus',
|
|
988
|
-
'pm',
|
|
989
|
-
'pn',
|
|
990
|
-
'pnc',
|
|
991
|
-
'pohl',
|
|
992
|
-
'poker',
|
|
993
|
-
'politie',
|
|
994
|
-
'porn',
|
|
995
|
-
'post',
|
|
996
|
-
'pr',
|
|
997
|
-
'pramerica',
|
|
998
|
-
'praxi',
|
|
999
|
-
'press',
|
|
1000
|
-
'prime',
|
|
1001
|
-
'pro',
|
|
1002
|
-
'prod',
|
|
1003
|
-
'productions',
|
|
1004
|
-
'prof',
|
|
1005
|
-
'progressive',
|
|
1006
|
-
'promo',
|
|
1007
|
-
'properties',
|
|
1008
|
-
'property',
|
|
1009
|
-
'protection',
|
|
1010
|
-
'pru',
|
|
1011
|
-
'prudential',
|
|
1012
|
-
'ps',
|
|
1013
|
-
'pt',
|
|
1014
|
-
'pub',
|
|
1015
|
-
'pw',
|
|
1016
|
-
'pwc',
|
|
1017
|
-
'py',
|
|
1018
|
-
'qa',
|
|
1019
|
-
'qpon',
|
|
1020
|
-
'quebec',
|
|
1021
|
-
'quest',
|
|
1022
|
-
'racing',
|
|
1023
|
-
'radio',
|
|
1024
|
-
're',
|
|
1025
|
-
'read',
|
|
1026
|
-
'realestate',
|
|
1027
|
-
'realtor',
|
|
1028
|
-
'realty',
|
|
1029
|
-
'recipes',
|
|
1030
|
-
'red',
|
|
1031
|
-
'redstone',
|
|
1032
|
-
'redumbrella',
|
|
1033
|
-
'rehab',
|
|
1034
|
-
'reise',
|
|
1035
|
-
'reisen',
|
|
1036
|
-
'reit',
|
|
1037
|
-
'reliance',
|
|
1038
|
-
'ren',
|
|
1039
|
-
'rent',
|
|
1040
|
-
'rentals',
|
|
1041
|
-
'repair',
|
|
1042
|
-
'report',
|
|
1043
|
-
'republican',
|
|
1044
|
-
'rest',
|
|
1045
|
-
'restaurant',
|
|
1046
|
-
'review',
|
|
1047
|
-
'reviews',
|
|
1048
|
-
'rexroth',
|
|
1049
|
-
'rich',
|
|
1050
|
-
'richardli',
|
|
1051
|
-
'ricoh',
|
|
1052
|
-
'ril',
|
|
1053
|
-
'rio',
|
|
1054
|
-
'rip',
|
|
1055
|
-
'ro',
|
|
1056
|
-
'rocher',
|
|
1057
|
-
'rocks',
|
|
1058
|
-
'rodeo',
|
|
1059
|
-
'rogers',
|
|
1060
|
-
'room',
|
|
1061
|
-
'rs',
|
|
1062
|
-
'rsvp',
|
|
1063
|
-
'ru',
|
|
1064
|
-
'rugby',
|
|
1065
|
-
'ruhr',
|
|
1066
|
-
'run',
|
|
1067
|
-
'rw',
|
|
1068
|
-
'rwe',
|
|
1069
|
-
'ryukyu',
|
|
1070
|
-
'sa',
|
|
1071
|
-
'saarland',
|
|
1072
|
-
'safe',
|
|
1073
|
-
'safety',
|
|
1074
|
-
'sakura',
|
|
1075
|
-
'sale',
|
|
1076
|
-
'salon',
|
|
1077
|
-
'samsclub',
|
|
1078
|
-
'samsung',
|
|
1079
|
-
'sandvik',
|
|
1080
|
-
'sandvikcoromant',
|
|
1081
|
-
'sanofi',
|
|
1082
|
-
'sap',
|
|
1083
|
-
'sarl',
|
|
1084
|
-
'sas',
|
|
1085
|
-
'save',
|
|
1086
|
-
'saxo',
|
|
1087
|
-
'sb',
|
|
1088
|
-
'sbi',
|
|
1089
|
-
'sbs',
|
|
1090
|
-
'sc',
|
|
1091
|
-
'sca',
|
|
1092
|
-
'scb',
|
|
1093
|
-
'schaeffler',
|
|
1094
|
-
'schmidt',
|
|
1095
|
-
'scholarships',
|
|
1096
|
-
'school',
|
|
1097
|
-
'schule',
|
|
1098
|
-
'schwarz',
|
|
1099
|
-
'science',
|
|
1100
|
-
'scot',
|
|
1101
|
-
'sd',
|
|
1102
|
-
'se',
|
|
1103
|
-
'search',
|
|
1104
|
-
'seat',
|
|
1105
|
-
'secure',
|
|
1106
|
-
'security',
|
|
1107
|
-
'seek',
|
|
1108
|
-
'select',
|
|
1109
|
-
'sener',
|
|
1110
|
-
'services',
|
|
1111
|
-
'ses',
|
|
1112
|
-
'seven',
|
|
1113
|
-
'sew',
|
|
1114
|
-
'sex',
|
|
1115
|
-
'sexy',
|
|
1116
|
-
'sfr',
|
|
1117
|
-
'sg',
|
|
1118
|
-
'sh',
|
|
1119
|
-
'shangrila',
|
|
1120
|
-
'sharp',
|
|
1121
|
-
'shaw',
|
|
1122
|
-
'shell',
|
|
1123
|
-
'shia',
|
|
1124
|
-
'shiksha',
|
|
1125
|
-
'shoes',
|
|
1126
|
-
'shop',
|
|
1127
|
-
'shopping',
|
|
1128
|
-
'shouji',
|
|
1129
|
-
'show',
|
|
1130
|
-
'showtime',
|
|
1131
|
-
'si',
|
|
1132
|
-
'silk',
|
|
1133
|
-
'sina',
|
|
1134
|
-
'singles',
|
|
1135
|
-
'site',
|
|
1136
|
-
'sj',
|
|
1137
|
-
'sk',
|
|
1138
|
-
'ski',
|
|
1139
|
-
'skin',
|
|
1140
|
-
'sky',
|
|
1141
|
-
'skype',
|
|
1142
|
-
'sl',
|
|
1143
|
-
'sling',
|
|
1144
|
-
'sm',
|
|
1145
|
-
'smart',
|
|
1146
|
-
'smile',
|
|
1147
|
-
'sn',
|
|
1148
|
-
'sncf',
|
|
1149
|
-
'so',
|
|
1150
|
-
'soccer',
|
|
1151
|
-
'social',
|
|
1152
|
-
'softbank',
|
|
1153
|
-
'software',
|
|
1154
|
-
'sohu',
|
|
1155
|
-
'solar',
|
|
1156
|
-
'solutions',
|
|
1157
|
-
'song',
|
|
1158
|
-
'sony',
|
|
1159
|
-
'soy',
|
|
1160
|
-
'spa',
|
|
1161
|
-
'space',
|
|
1162
|
-
'sport',
|
|
1163
|
-
'spot',
|
|
1164
|
-
'sr',
|
|
1165
|
-
'srl',
|
|
1166
|
-
'ss',
|
|
1167
|
-
'st',
|
|
1168
|
-
'stada',
|
|
1169
|
-
'staples',
|
|
1170
|
-
'star',
|
|
1171
|
-
'statebank',
|
|
1172
|
-
'statefarm',
|
|
1173
|
-
'stc',
|
|
1174
|
-
'stcgroup',
|
|
1175
|
-
'stockholm',
|
|
1176
|
-
'storage',
|
|
1177
|
-
'store',
|
|
1178
|
-
'stream',
|
|
1179
|
-
'studio',
|
|
1180
|
-
'study',
|
|
1181
|
-
'style',
|
|
1182
|
-
'su',
|
|
1183
|
-
'sucks',
|
|
1184
|
-
'supplies',
|
|
1185
|
-
'supply',
|
|
1186
|
-
'support',
|
|
1187
|
-
'surf',
|
|
1188
|
-
'surgery',
|
|
1189
|
-
'suzuki',
|
|
1190
|
-
'sv',
|
|
1191
|
-
'swatch',
|
|
1192
|
-
'swiss',
|
|
1193
|
-
'sx',
|
|
1194
|
-
'sy',
|
|
1195
|
-
'sydney',
|
|
1196
|
-
'systems',
|
|
1197
|
-
'sz',
|
|
1198
|
-
'tab',
|
|
1199
|
-
'taipei',
|
|
1200
|
-
'talk',
|
|
1201
|
-
'taobao',
|
|
1202
|
-
'target',
|
|
1203
|
-
'tatamotors',
|
|
1204
|
-
'tatar',
|
|
1205
|
-
'tattoo',
|
|
1206
|
-
'tax',
|
|
1207
|
-
'taxi',
|
|
1208
|
-
'tc',
|
|
1209
|
-
'tci',
|
|
1210
|
-
'td',
|
|
1211
|
-
'tdk',
|
|
1212
|
-
'team',
|
|
1213
|
-
'tech',
|
|
1214
|
-
'technology',
|
|
1215
|
-
'tel',
|
|
1216
|
-
'temasek',
|
|
1217
|
-
'tennis',
|
|
1218
|
-
'teva',
|
|
1219
|
-
'tf',
|
|
1220
|
-
'tg',
|
|
1221
|
-
'th',
|
|
1222
|
-
'thd',
|
|
1223
|
-
'theater',
|
|
1224
|
-
'theatre',
|
|
1225
|
-
'tiaa',
|
|
1226
|
-
'tickets',
|
|
1227
|
-
'tienda',
|
|
1228
|
-
'tiffany',
|
|
1229
|
-
'tips',
|
|
1230
|
-
'tires',
|
|
1231
|
-
'tirol',
|
|
1232
|
-
'tj',
|
|
1233
|
-
'tjmaxx',
|
|
1234
|
-
'tjx',
|
|
1235
|
-
'tk',
|
|
1236
|
-
'tkmaxx',
|
|
1237
|
-
'tl',
|
|
1238
|
-
'tm',
|
|
1239
|
-
'tmall',
|
|
1240
|
-
'tn',
|
|
1241
|
-
'to',
|
|
1242
|
-
'today',
|
|
1243
|
-
'tokyo',
|
|
1244
|
-
'tools',
|
|
1245
|
-
'top',
|
|
1246
|
-
'toray',
|
|
1247
|
-
'toshiba',
|
|
1248
|
-
'total',
|
|
1249
|
-
'tours',
|
|
1250
|
-
'town',
|
|
1251
|
-
'toyota',
|
|
1252
|
-
'toys',
|
|
1253
|
-
'tr',
|
|
1254
|
-
'trade',
|
|
1255
|
-
'trading',
|
|
1256
|
-
'training',
|
|
1257
|
-
'travel',
|
|
1258
|
-
'travelchannel',
|
|
1259
|
-
'travelers',
|
|
1260
|
-
'travelersinsurance',
|
|
1261
|
-
'trust',
|
|
1262
|
-
'trv',
|
|
1263
|
-
'tt',
|
|
1264
|
-
'tube',
|
|
1265
|
-
'tui',
|
|
1266
|
-
'tunes',
|
|
1267
|
-
'tushu',
|
|
1268
|
-
'tv',
|
|
1269
|
-
'tvs',
|
|
1270
|
-
'tw',
|
|
1271
|
-
'tz',
|
|
1272
|
-
'ua',
|
|
1273
|
-
'ubank',
|
|
1274
|
-
'ubs',
|
|
1275
|
-
'ug',
|
|
1276
|
-
'uk',
|
|
1277
|
-
'unicom',
|
|
1278
|
-
'university',
|
|
1279
|
-
'uno',
|
|
1280
|
-
'uol',
|
|
1281
|
-
'ups',
|
|
1282
|
-
'us',
|
|
1283
|
-
'uy',
|
|
1284
|
-
'uz',
|
|
1285
|
-
'va',
|
|
1286
|
-
'vacations',
|
|
1287
|
-
'vana',
|
|
1288
|
-
'vanguard',
|
|
1289
|
-
'vc',
|
|
1290
|
-
've',
|
|
1291
|
-
'vegas',
|
|
1292
|
-
'ventures',
|
|
1293
|
-
'verisign',
|
|
1294
|
-
'vermögensberater',
|
|
1295
|
-
'vermögensberatung',
|
|
1296
|
-
'versicherung',
|
|
1297
|
-
'vet',
|
|
1298
|
-
'vg',
|
|
1299
|
-
'vi',
|
|
1300
|
-
'viajes',
|
|
1301
|
-
'video',
|
|
1302
|
-
'vig',
|
|
1303
|
-
'viking',
|
|
1304
|
-
'villas',
|
|
1305
|
-
'vin',
|
|
1306
|
-
'vip',
|
|
1307
|
-
'virgin',
|
|
1308
|
-
'visa',
|
|
1309
|
-
'vision',
|
|
1310
|
-
'viva',
|
|
1311
|
-
'vivo',
|
|
1312
|
-
'vlaanderen',
|
|
1313
|
-
'vn',
|
|
1314
|
-
'vodka',
|
|
1315
|
-
'volkswagen',
|
|
1316
|
-
'volvo',
|
|
1317
|
-
'vote',
|
|
1318
|
-
'voting',
|
|
1319
|
-
'voto',
|
|
1320
|
-
'voyage',
|
|
1321
|
-
'vu',
|
|
1322
|
-
'vuelos',
|
|
1323
|
-
'wales',
|
|
1324
|
-
'walmart',
|
|
1325
|
-
'walter',
|
|
1326
|
-
'wang',
|
|
1327
|
-
'wanggou',
|
|
1328
|
-
'watch',
|
|
1329
|
-
'watches',
|
|
1330
|
-
'weather',
|
|
1331
|
-
'weatherchannel',
|
|
1332
|
-
'webcam',
|
|
1333
|
-
'weber',
|
|
1334
|
-
'website',
|
|
1335
|
-
'wed',
|
|
1336
|
-
'wedding',
|
|
1337
|
-
'weibo',
|
|
1338
|
-
'weir',
|
|
1339
|
-
'wf',
|
|
1340
|
-
'whoswho',
|
|
1341
|
-
'wien',
|
|
1342
|
-
'wiki',
|
|
1343
|
-
'williamhill',
|
|
1344
|
-
'win',
|
|
1345
|
-
'windows',
|
|
1346
|
-
'wine',
|
|
1347
|
-
'winners',
|
|
1348
|
-
'wme',
|
|
1349
|
-
'wolterskluwer',
|
|
1350
|
-
'woodside',
|
|
1351
|
-
'work',
|
|
1352
|
-
'works',
|
|
1353
|
-
'world',
|
|
1354
|
-
'wow',
|
|
1355
|
-
'ws',
|
|
1356
|
-
'wtc',
|
|
1357
|
-
'wtf',
|
|
1358
|
-
'xbox',
|
|
1359
|
-
'xerox',
|
|
1360
|
-
'xfinity',
|
|
1361
|
-
'xihuan',
|
|
1362
|
-
'xin',
|
|
1363
|
-
'xxx',
|
|
1364
|
-
'xyz',
|
|
1365
|
-
'yachts',
|
|
1366
|
-
'yahoo',
|
|
1367
|
-
'yamaxun',
|
|
1368
|
-
'yandex',
|
|
1369
|
-
'ye',
|
|
1370
|
-
'yodobashi',
|
|
1371
|
-
'yoga',
|
|
1372
|
-
'yokohama',
|
|
1373
|
-
'you',
|
|
1374
|
-
'youtube',
|
|
1375
|
-
'yt',
|
|
1376
|
-
'yun',
|
|
1377
|
-
'za',
|
|
1378
|
-
'zappos',
|
|
1379
|
-
'zara',
|
|
1380
|
-
'zero',
|
|
1381
|
-
'zip',
|
|
1382
|
-
'zm',
|
|
1383
|
-
'zone',
|
|
1384
|
-
'zuerich',
|
|
1385
|
-
'zw',
|
|
1386
|
-
'ελ',
|
|
1387
|
-
'ευ',
|
|
1388
|
-
'бг',
|
|
1389
|
-
'бел',
|
|
1390
|
-
'дети',
|
|
1391
|
-
'ею',
|
|
1392
|
-
'католик',
|
|
1393
|
-
'ком',
|
|
1394
|
-
'мкд',
|
|
1395
|
-
'мон',
|
|
1396
|
-
'москва',
|
|
1397
|
-
'онлайн',
|
|
1398
|
-
'орг',
|
|
1399
|
-
'рус',
|
|
1400
|
-
'рф',
|
|
1401
|
-
'сайт',
|
|
1402
|
-
'срб',
|
|
1403
|
-
'укр',
|
|
1404
|
-
'қаз',
|
|
1405
|
-
'հայ',
|
|
1406
|
-
'ישראל',
|
|
1407
|
-
'קום',
|
|
1408
|
-
'ابوظبي',
|
|
1409
|
-
'اتصالات',
|
|
1410
|
-
'ارامكو',
|
|
1411
|
-
'الاردن',
|
|
1412
|
-
'البحرين',
|
|
1413
|
-
'الجزائر',
|
|
1414
|
-
'السعودية',
|
|
1415
|
-
'العليان',
|
|
1416
|
-
'المغرب',
|
|
1417
|
-
'امارات',
|
|
1418
|
-
'ایران',
|
|
1419
|
-
'بارت',
|
|
1420
|
-
'بازار',
|
|
1421
|
-
'بيتك',
|
|
1422
|
-
'بھارت',
|
|
1423
|
-
'تونس',
|
|
1424
|
-
'سودان',
|
|
1425
|
-
'سورية',
|
|
1426
|
-
'شبكة',
|
|
1427
|
-
'عراق',
|
|
1428
|
-
'عرب',
|
|
1429
|
-
'عمان',
|
|
1430
|
-
'فلسطين',
|
|
1431
|
-
'قطر',
|
|
1432
|
-
'كاثوليك',
|
|
1433
|
-
'كوم',
|
|
1434
|
-
'مصر',
|
|
1435
|
-
'مليسيا',
|
|
1436
|
-
'موريتانيا',
|
|
1437
|
-
'موقع',
|
|
1438
|
-
'همراه',
|
|
1439
|
-
'پاکستان',
|
|
1440
|
-
'ڀارت',
|
|
1441
|
-
'कॉम',
|
|
1442
|
-
'नेट',
|
|
1443
|
-
'भारत',
|
|
1444
|
-
'भारतम्',
|
|
1445
|
-
'भारोत',
|
|
1446
|
-
'संगठन',
|
|
1447
|
-
'বাংলা',
|
|
1448
|
-
'ভারত',
|
|
1449
|
-
'ভাৰত',
|
|
1450
|
-
'ਭਾਰਤ',
|
|
1451
|
-
'ભારત',
|
|
1452
|
-
'ଭାରତ',
|
|
1453
|
-
'இந்தியா',
|
|
1454
|
-
'இலங்கை',
|
|
1455
|
-
'சிங்கப்பூர்',
|
|
1456
|
-
'భారత్',
|
|
1457
|
-
'ಭಾರತ',
|
|
1458
|
-
'ഭാരതം',
|
|
1459
|
-
'ලංකා',
|
|
1460
|
-
'คอม',
|
|
1461
|
-
'ไทย',
|
|
1462
|
-
'ລາວ',
|
|
1463
|
-
'გე',
|
|
1464
|
-
'みんな',
|
|
1465
|
-
'アマゾン',
|
|
1466
|
-
'クラウド',
|
|
1467
|
-
'グーグル',
|
|
1468
|
-
'コム',
|
|
1469
|
-
'ストア',
|
|
1470
|
-
'セール',
|
|
1471
|
-
'ファッション',
|
|
1472
|
-
'ポイント',
|
|
1473
|
-
'世界',
|
|
1474
|
-
'中信',
|
|
1475
|
-
'中国',
|
|
1476
|
-
'中國',
|
|
1477
|
-
'中文网',
|
|
1478
|
-
'亚马逊',
|
|
1479
|
-
'企业',
|
|
1480
|
-
'佛山',
|
|
1481
|
-
'信息',
|
|
1482
|
-
'健康',
|
|
1483
|
-
'八卦',
|
|
1484
|
-
'公司',
|
|
1485
|
-
'公益',
|
|
1486
|
-
'台湾',
|
|
1487
|
-
'台灣',
|
|
1488
|
-
'商城',
|
|
1489
|
-
'商店',
|
|
1490
|
-
'商标',
|
|
1491
|
-
'嘉里',
|
|
1492
|
-
'嘉里大酒店',
|
|
1493
|
-
'在线',
|
|
1494
|
-
'大拿',
|
|
1495
|
-
'天主教',
|
|
1496
|
-
'娱乐',
|
|
1497
|
-
'家電',
|
|
1498
|
-
'广东',
|
|
1499
|
-
'微博',
|
|
1500
|
-
'慈善',
|
|
1501
|
-
'我爱你',
|
|
1502
|
-
'手机',
|
|
1503
|
-
'招聘',
|
|
1504
|
-
'政务',
|
|
1505
|
-
'政府',
|
|
1506
|
-
'新加坡',
|
|
1507
|
-
'新闻',
|
|
1508
|
-
'时尚',
|
|
1509
|
-
'書籍',
|
|
1510
|
-
'机构',
|
|
1511
|
-
'淡马锡',
|
|
1512
|
-
'游戏',
|
|
1513
|
-
'澳門',
|
|
1514
|
-
'点看',
|
|
1515
|
-
'移动',
|
|
1516
|
-
'组织机构',
|
|
1517
|
-
'网址',
|
|
1518
|
-
'网店',
|
|
1519
|
-
'网站',
|
|
1520
|
-
'网络',
|
|
1521
|
-
'联通',
|
|
1522
|
-
'诺基亚',
|
|
1523
|
-
'谷歌',
|
|
1524
|
-
'购物',
|
|
1525
|
-
'通販',
|
|
1526
|
-
'集团',
|
|
1527
|
-
'電訊盈科',
|
|
1528
|
-
'飞利浦',
|
|
1529
|
-
'食品',
|
|
1530
|
-
'餐厅',
|
|
1531
|
-
'香格里拉',
|
|
1532
|
-
'香港',
|
|
1533
|
-
'닷넷',
|
|
1534
|
-
'닷컴',
|
|
1535
|
-
'삼성',
|
|
1536
|
-
'한국',
|
|
1537
|
-
];
|
|
1538
|
-
|
|
1539
|
-
function getDomain(inputUrl) {
|
|
1540
|
-
const parsed = url.parse(inputUrl).host;
|
|
1541
|
-
var parts = parsed.split('.');
|
|
1542
|
-
if (parts[0] === 'www' && parts[1] !== 'com') {
|
|
1543
|
-
parts.shift();
|
|
1544
|
-
}
|
|
1545
|
-
var ln = parts.length, i = ln, minLength = parts[parts.length - 1].length, part;
|
|
1546
|
-
// iterate backwards
|
|
1547
|
-
while ((part = parts[--i])) {
|
|
1548
|
-
// stop when we find a non-TLD part
|
|
1549
|
-
if (i === 0 || // 'asia.com' (last remaining must be the SLD)
|
|
1550
|
-
i < ln - 2 || // TLDs only span 2 levels
|
|
1551
|
-
part.length < minLength || // 'www.cn.com' (valid TLD as second-level domain)
|
|
1552
|
-
tlds.indexOf(part) < 0 // officialy not a TLD
|
|
1553
|
-
) {
|
|
1554
|
-
return part;
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
function appendProtocol(inputUrl) {
|
|
1559
|
-
const parsed = url.parse(inputUrl);
|
|
1560
|
-
if (!parsed.protocol) {
|
|
1561
|
-
const urlWithProtocol = `https://${inputUrl}`;
|
|
1562
|
-
return urlWithProtocol;
|
|
1563
|
-
}
|
|
1564
|
-
return inputUrl;
|
|
1565
|
-
}
|
|
1566
|
-
function normalizeUrl(urlToNormalize) {
|
|
1567
|
-
const urlWithProtocol = appendProtocol(urlToNormalize);
|
|
1568
|
-
if (isurl(urlWithProtocol)) {
|
|
1569
|
-
return urlWithProtocol;
|
|
1570
|
-
}
|
|
1571
|
-
else {
|
|
1572
|
-
throw new Error(`Your url "${urlWithProtocol}" is invalid`);
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
function validateNumberInput(value) {
|
|
1577
|
-
const parsedValue = Number(value);
|
|
1578
|
-
if (isNaN(parsedValue)) {
|
|
1579
|
-
throw new Commander.InvalidArgumentError('Not a number.');
|
|
1580
|
-
}
|
|
1581
|
-
return parsedValue;
|
|
1582
|
-
}
|
|
1583
|
-
function validateUrlInput(url) {
|
|
1584
|
-
try {
|
|
1585
|
-
return normalizeUrl(url);
|
|
1586
|
-
}
|
|
1587
|
-
catch (error) {
|
|
1588
|
-
throw new Commander.InvalidArgumentError(error.message);
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
function promptText(message, initial) {
|
|
1593
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1594
|
-
const response = yield prompts({
|
|
1595
|
-
type: 'text',
|
|
1596
|
-
name: 'content',
|
|
1597
|
-
message,
|
|
1598
|
-
initial,
|
|
1599
|
-
});
|
|
1600
|
-
return response.content;
|
|
1601
|
-
});
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
function getIdentifier(name, url) {
|
|
1605
|
-
const hash = crypto.createHash('md5');
|
|
1606
|
-
hash.update(url);
|
|
1607
|
-
const postFixHash = hash.digest('hex').substring(0, 6);
|
|
1608
|
-
return `pake-${postFixHash}`;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
function handleIcon(options, url) {
|
|
1612
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1613
|
-
if (options.icon) {
|
|
1614
|
-
if (options.icon.startsWith("http")) {
|
|
1615
|
-
log.info(options.icon);
|
|
1616
|
-
return downloadIcon(options.icon);
|
|
1617
|
-
}
|
|
1618
|
-
else {
|
|
1619
|
-
return path.resolve(options.icon);
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
if (!options.icon) {
|
|
1623
|
-
return inferIcon(options.name);
|
|
1624
|
-
}
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1627
|
-
function inferIcon(name, url) {
|
|
1628
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1629
|
-
log.info("You have not provided an app icon, use the default icon(can use --icon option to assign an icon)");
|
|
1630
|
-
const npmDirectory = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
1631
|
-
return path.join(npmDirectory, "pake-default.icns");
|
|
1632
|
-
});
|
|
1633
|
-
}
|
|
1634
|
-
// export async function getIconFromPageUrl(url: string) {
|
|
1635
|
-
// const icon = await pageIcon(url);
|
|
1636
|
-
// console.log(icon);
|
|
1637
|
-
// if (icon.ext === '.ico') {
|
|
1638
|
-
// const a = await ICO.parse(icon.data);
|
|
1639
|
-
// icon.data = Buffer.from(a[0].buffer);
|
|
1640
|
-
// }
|
|
1641
|
-
// const iconDir = (await dir()).path;
|
|
1642
|
-
// const iconPath = path.join(iconDir, `/icon.icns`);
|
|
1643
|
-
// const out = png2icons.createICNS(icon.data, png2icons.BILINEAR, 0);
|
|
1644
|
-
// await fs.writeFile(iconPath, out);
|
|
1645
|
-
// return iconPath;
|
|
1646
|
-
// }
|
|
1647
|
-
// export async function getIconFromMacosIcons(name: string) {
|
|
1648
|
-
// const data = {
|
|
1649
|
-
// query: name,
|
|
1650
|
-
// filters: 'approved:true',
|
|
1651
|
-
// hitsPerPage: 10,
|
|
1652
|
-
// page: 1,
|
|
1653
|
-
// };
|
|
1654
|
-
// const res = await axios.post('https://p1txh7zfb3-2.algolianet.com/1/indexes/macOSicons/query?x-algolia-agent=Algolia%20for%20JavaScript%20(4.13.1)%3B%20Browser', data, {
|
|
1655
|
-
// headers: {
|
|
1656
|
-
// 'x-algolia-api-key': '0ba04276e457028f3e11e38696eab32c',
|
|
1657
|
-
// 'x-algolia-application-id': 'P1TXH7ZFB3',
|
|
1658
|
-
// },
|
|
1659
|
-
// });
|
|
1660
|
-
// if (!res.data.hits.length) {
|
|
1661
|
-
// return '';
|
|
1662
|
-
// } else {
|
|
1663
|
-
// return downloadIcon(res.data.hits[0].icnsUrl);
|
|
1664
|
-
// }
|
|
1665
|
-
// }
|
|
1666
|
-
function downloadIcon(iconUrl) {
|
|
1667
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1668
|
-
let iconResponse;
|
|
1669
|
-
try {
|
|
1670
|
-
iconResponse = yield axios.get(iconUrl, {
|
|
1671
|
-
responseType: "arraybuffer",
|
|
1672
|
-
});
|
|
1673
|
-
}
|
|
1674
|
-
catch (error) {
|
|
1675
|
-
if (error.response && error.response.status === 404) {
|
|
1676
|
-
return null;
|
|
1677
|
-
}
|
|
1678
|
-
throw error;
|
|
1679
|
-
}
|
|
1680
|
-
const iconData = yield iconResponse.data;
|
|
1681
|
-
if (!iconData) {
|
|
1682
|
-
return null;
|
|
1683
|
-
}
|
|
1684
|
-
const fileDetails = yield fileTypeFromBuffer(iconData);
|
|
1685
|
-
if (!fileDetails) {
|
|
1686
|
-
return null;
|
|
1687
|
-
}
|
|
1688
|
-
const { path } = yield dir();
|
|
1689
|
-
const iconPath = `${path}/icon.${fileDetails.ext}`;
|
|
1690
|
-
yield fs.writeFile(iconPath, iconData);
|
|
1691
|
-
return iconPath;
|
|
1692
|
-
});
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
function handleOptions(options, url) {
|
|
1696
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1697
|
-
const appOptions = Object.assign(Object.assign({}, options), { identifier: '' });
|
|
1698
|
-
if (!appOptions.name) {
|
|
1699
|
-
appOptions.name = yield promptText('please input your application name', getDomain(url));
|
|
1700
|
-
}
|
|
1701
|
-
appOptions.identifier = getIdentifier(appOptions.name, url);
|
|
1702
|
-
appOptions.icon = yield handleIcon(appOptions);
|
|
1703
|
-
return appOptions;
|
|
1704
|
-
});
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
const IS_MAC = process.platform === 'darwin';
|
|
1708
|
-
process.platform === 'win32';
|
|
1709
|
-
process.platform === 'linux';
|
|
1710
|
-
|
|
1711
|
-
function shellExec(command) {
|
|
1712
|
-
return new Promise((resolve, reject) => {
|
|
1713
|
-
shelljs.exec(command, { async: true, silent: false }, (code) => {
|
|
1714
|
-
if (code === 0) {
|
|
1715
|
-
resolve(0);
|
|
1716
|
-
}
|
|
1717
|
-
else {
|
|
1718
|
-
reject(new Error(`${code}`));
|
|
1719
|
-
}
|
|
1720
|
-
});
|
|
1721
|
-
});
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
const InstallRustScript = "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
|
1725
|
-
function installRust() {
|
|
1726
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1727
|
-
const spinner = ora('Downloading Rust').start();
|
|
1728
|
-
try {
|
|
1729
|
-
yield shellExec(InstallRustScript);
|
|
1730
|
-
spinner.succeed();
|
|
1731
|
-
}
|
|
1732
|
-
catch (error) {
|
|
1733
|
-
console.error('install rust return code', error.message);
|
|
1734
|
-
spinner.fail();
|
|
1735
|
-
process.exit(1);
|
|
1736
|
-
}
|
|
1737
|
-
});
|
|
1738
|
-
}
|
|
1739
|
-
function checkRustInstalled() {
|
|
1740
|
-
return shelljs.exec('rustc --version', { silent: true }).code === 0;
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
var tauri = {
|
|
1744
|
-
windows: [
|
|
1745
|
-
{
|
|
1746
|
-
url: "https://weread.qq.com/",
|
|
1747
|
-
transparent: true,
|
|
1748
|
-
fullscreen: false,
|
|
1749
|
-
width: 1200,
|
|
1750
|
-
height: 728,
|
|
1751
|
-
resizable: true
|
|
1752
|
-
}
|
|
1753
|
-
],
|
|
1754
|
-
allowlist: {
|
|
1755
|
-
all: true
|
|
1756
|
-
},
|
|
1757
|
-
bundle: {
|
|
1758
|
-
icon: [
|
|
1759
|
-
"icons/weread.icns",
|
|
1760
|
-
"png/weread_256.ico",
|
|
1761
|
-
"png/weread_32.ico",
|
|
1762
|
-
"png/weread_512.png"
|
|
1763
|
-
],
|
|
1764
|
-
identifier: "com.tw93.weread",
|
|
1765
|
-
active: true,
|
|
1766
|
-
category: "DeveloperTool",
|
|
1767
|
-
copyright: "",
|
|
1768
|
-
deb: {
|
|
1769
|
-
depends: [
|
|
1770
|
-
"libwebkit2gtk-4.0-dev",
|
|
1771
|
-
"build-essential",
|
|
1772
|
-
"curl",
|
|
1773
|
-
"wget",
|
|
1774
|
-
"libssl-dev",
|
|
1775
|
-
"libgtk-3-dev",
|
|
1776
|
-
"libayatana-appindicator3-dev",
|
|
1777
|
-
"librsvg2-dev"
|
|
1778
|
-
],
|
|
1779
|
-
files: {
|
|
1780
|
-
"/usr/share/applications/com-tw93-weread.desktop": "assets/com-tw93-weread.desktop"
|
|
1781
|
-
}
|
|
1782
|
-
},
|
|
1783
|
-
externalBin: [
|
|
1784
|
-
],
|
|
1785
|
-
longDescription: "",
|
|
1786
|
-
macOS: {
|
|
1787
|
-
entitlements: null,
|
|
1788
|
-
exceptionDomain: "",
|
|
1789
|
-
frameworks: [
|
|
1790
|
-
],
|
|
1791
|
-
providerShortName: null,
|
|
1792
|
-
signingIdentity: null
|
|
1793
|
-
},
|
|
1794
|
-
resources: [
|
|
1795
|
-
],
|
|
1796
|
-
shortDescription: "",
|
|
1797
|
-
targets: [
|
|
1798
|
-
"deb",
|
|
1799
|
-
"msi",
|
|
1800
|
-
"dmg"
|
|
1801
|
-
],
|
|
1802
|
-
windows: {
|
|
1803
|
-
certificateThumbprint: null,
|
|
1804
|
-
digestAlgorithm: "sha256",
|
|
1805
|
-
timestampUrl: "",
|
|
1806
|
-
wix: {
|
|
1807
|
-
language: [
|
|
1808
|
-
"en-US",
|
|
1809
|
-
"zh-CN"
|
|
1810
|
-
]
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
},
|
|
1814
|
-
security: {
|
|
1815
|
-
csp: null
|
|
1816
|
-
},
|
|
1817
|
-
updater: {
|
|
1818
|
-
active: false
|
|
1819
|
-
}
|
|
1820
|
-
};
|
|
1821
|
-
var build = {
|
|
1822
|
-
devPath: "../dist",
|
|
1823
|
-
distDir: "../dist",
|
|
1824
|
-
beforeBuildCommand: "",
|
|
1825
|
-
beforeDevCommand: ""
|
|
1826
|
-
};
|
|
1827
|
-
var tauriConf = {
|
|
1828
|
-
"package": {
|
|
1829
|
-
productName: "weread",
|
|
1830
|
-
version: "0.2.0"
|
|
1831
|
-
},
|
|
1832
|
-
tauri: tauri,
|
|
1833
|
-
build: build
|
|
1834
|
-
};
|
|
1835
|
-
|
|
1836
|
-
class MacBuilder {
|
|
1837
|
-
prepare() {
|
|
1838
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1839
|
-
if (checkRustInstalled()) {
|
|
1840
|
-
return;
|
|
1841
|
-
}
|
|
1842
|
-
const res = yield prompts({
|
|
1843
|
-
type: 'confirm',
|
|
1844
|
-
message: 'Detect you have not installed Rust, install it now?',
|
|
1845
|
-
name: 'value',
|
|
1846
|
-
});
|
|
1847
|
-
if (res.value) {
|
|
1848
|
-
// TODO 国内有可能会超时
|
|
1849
|
-
yield installRust();
|
|
1850
|
-
}
|
|
1851
|
-
else {
|
|
1852
|
-
log.error('Error: Pake need Rust to package your webapp!!!');
|
|
1853
|
-
process.exit(2);
|
|
1854
|
-
}
|
|
1855
|
-
});
|
|
1856
|
-
}
|
|
1857
|
-
build(url, options) {
|
|
1858
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1859
|
-
log.debug('PakeAppOptions', options);
|
|
1860
|
-
const { width, height, fullscreen, transparent, resizable, identifier, name } = options;
|
|
1861
|
-
const tauriConfWindowOptions = {
|
|
1862
|
-
width,
|
|
1863
|
-
height,
|
|
1864
|
-
fullscreen,
|
|
1865
|
-
transparent,
|
|
1866
|
-
resizable,
|
|
1867
|
-
};
|
|
1868
|
-
// TODO 下面这块逻辑还可以再拆 目前比较简单
|
|
1869
|
-
Object.assign(tauriConf.tauri.windows[0], Object.assign({ url }, tauriConfWindowOptions));
|
|
1870
|
-
tauriConf.package.productName = name;
|
|
1871
|
-
tauriConf.tauri.bundle.identifier = identifier;
|
|
1872
|
-
tauriConf.tauri.bundle.icon = [options.icon];
|
|
1873
|
-
const npmDirectory = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
1874
|
-
const configJsonPath = path.join(npmDirectory, 'src-tauri/tauri.conf.json');
|
|
1875
|
-
yield fs.writeFile(configJsonPath, Buffer.from(JSON.stringify(tauriConf), 'utf-8'));
|
|
1876
|
-
yield shellExec(`cd ${npmDirectory} && npm run build`);
|
|
1877
|
-
const dmgName = `${name}_${'0.2.0'}_universal.dmg`;
|
|
1878
|
-
const appPath = this.getBuildedAppPath(npmDirectory, dmgName);
|
|
1879
|
-
yield fs.copyFile(appPath, path.resolve(`${name}_universal.dmg`));
|
|
1880
|
-
});
|
|
1881
|
-
}
|
|
1882
|
-
getBuildedAppPath(npmDirectory, dmgName) {
|
|
1883
|
-
return path.join(npmDirectory, 'src-tauri/target/universal-apple-darwin/release/bundle/dmg', dmgName);
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
class BuilderFactory {
|
|
1888
|
-
static create() {
|
|
1889
|
-
if (IS_MAC) {
|
|
1890
|
-
return new MacBuilder();
|
|
1891
|
-
}
|
|
1892
|
-
throw new Error('The current system does not support');
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
program.version('0.0.1').description('A cli application can package a web page to desktop application');
|
|
1897
|
-
program
|
|
1898
|
-
.showHelpAfterError()
|
|
1899
|
-
.argument('<url>', 'the web url you want to package', validateUrlInput)
|
|
1900
|
-
.option('--name <string>', 'application name')
|
|
1901
|
-
.option('--icon <string>', 'application icon', DEFAULT_PAKE_OPTIONS.icon)
|
|
1902
|
-
.option('--height <number>', 'window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height)
|
|
1903
|
-
.option('--width <number>', 'window width', validateNumberInput, DEFAULT_PAKE_OPTIONS.width)
|
|
1904
|
-
.option('--no-resizable', 'whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable)
|
|
1905
|
-
.option('--fullscreen', 'makes the packaged app start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen)
|
|
1906
|
-
.option('--transparent', 'transparent title bar', DEFAULT_PAKE_OPTIONS.transparent)
|
|
1907
|
-
.option('--debug', 'debug', DEFAULT_PAKE_OPTIONS.transparent)
|
|
1908
|
-
.action((url, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1909
|
-
log.setDefaultLevel('info');
|
|
1910
|
-
if (options.debug) {
|
|
1911
|
-
log.setLevel('debug');
|
|
1912
|
-
}
|
|
1913
|
-
const builder = BuilderFactory.create();
|
|
1914
|
-
yield builder.prepare();
|
|
1915
|
-
const appOptions = yield handleOptions(options, url);
|
|
1916
|
-
builder.build(url, appOptions);
|
|
1917
|
-
}));
|
|
1918
|
-
program.parse();
|
|
1
|
+
import*as e from"commander";import{program as a}from"commander";import i,{fileURLToPath as t}from"url";import o from"is-url";import r from"prompts";import n from"crypto";import s from"axios";import{fileTypeFromBuffer as l}from"file-type";import{dir as c}from"tmp-promise";import u from"path";import d from"fs/promises";import m from"loglevel";import p from"ora";import g from"shelljs";function h(e,a,i,t){return new(i||(i=Promise))((function(o,r){function n(e){try{l(t.next(e))}catch(e){r(e)}}function s(e){try{l(t.throw(e))}catch(e){r(e)}}function l(e){var a;e.done?o(e.value):(a=e.value,a instanceof i?a:new i((function(e){e(a)}))).then(n,s)}l((t=t.apply(e,a||[])).next())}))}const b="",f=800,y=1280,v=!1,w=!0,k=!1,x=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","etisalat","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","lancia","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mutual","mv","mw","mx","my","mz","na","nab","nagoya","name","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","اتصالات","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","诺基亚","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"];function j(e){var a=i.parse(e).host.split(".");"www"===a[0]&&"com"!==a[1]&&a.shift();for(var t,o=a.length,r=o,n=a[a.length-1].length;t=a[--r];)if(0===r||r<o-2||t.length<n||x.indexOf(t)<0)return t}function z(e){const a=function(e){if(!i.parse(e).protocol)return`https://${e}`;return e}(e);if(o(a))return a;throw new Error(`Your url "${a}" is invalid`)}function q(a){const i=Number(a);if(isNaN(i))throw new e.InvalidArgumentError("Not a number.");return i}function N(e,a){return h(this,void 0,void 0,(function*(){return e.icon?e.icon.startsWith("http")?function(e){return h(this,void 0,void 0,(function*(){let a;try{a=yield s.get(e,{responseType:"arraybuffer"})}catch(e){if(e.response&&404===e.response.status)return null;throw e}const i=yield a.data;if(!i)return null;const t=yield l(i);if(!t)return null;const{path:o}=yield c(),r=`${o}/icon.${t.ext}`;return yield d.writeFile(r,i),r}))}(e.icon):u.resolve(e.icon):e.icon?void 0:function(e,a){return h(this,void 0,void 0,(function*(){m.info("You have not provided an app icon, use the default icon(can use --icon option to assign an icon)");const e=u.join(u.dirname(t(import.meta.url)),"..");return u.join(e,"pake-default.icns")}))}(e.name)}))}function $(e,a){return h(this,void 0,void 0,(function*(){const i=Object.assign(Object.assign({},e),{identifier:""});return i.name||(i.name=yield function(e,a){return h(this,void 0,void 0,(function*(){return(yield r({type:"text",name:"content",message:e,initial:a})).content}))}("please input your application name",j(a))),i.identifier=function(e,a){const i=n.createHash("md5");return i.update(a),`pake-${i.digest("hex").substring(0,6)}`}(i.name,a),i.icon=yield N(i),i}))}const A="darwin"===process.platform;function D(e){return new Promise(((a,i)=>{g.exec(e,{async:!0,silent:!1},(e=>{0===e?a(0):i(new Error(`${e}`))}))}))}process.platform,process.platform;var O={package:{productName:"weread",version:"0.2.0"},tauri:{windows:[{url:"https://weread.qq.com/",transparent:!0,fullscreen:!1,width:1200,height:728,resizable:!0}],allowlist:{all:!0},bundle:{icon:["icons/weread.icns","png/weread_256.ico","png/weread_32.ico","png/weread_512.png"],identifier:"com.tw93.weread",active:!0,category:"DeveloperTool",copyright:"",deb:{depends:["libwebkit2gtk-4.0-dev","build-essential","curl","wget","libssl-dev","libgtk-3-dev","libayatana-appindicator3-dev","librsvg2-dev"],files:{"/usr/share/applications/com-tw93-weread.desktop":"assets/com-tw93-weread.desktop"}},externalBin:[],longDescription:"",macOS:{entitlements:null,exceptionDomain:"",frameworks:[],providerShortName:null,signingIdentity:null},resources:["png/weread_32.ico"],shortDescription:"",targets:["deb","msi","dmg"],windows:{certificateThumbprint:null,digestAlgorithm:"sha256",timestampUrl:"",wix:{language:["en-US","zh-CN"]}}},security:{csp:null},updater:{active:!1}},build:{devPath:"../dist",distDir:"../dist",beforeBuildCommand:"",beforeDevCommand:""}};class E{prepare(){return h(this,void 0,void 0,(function*(){if(0===g.exec("rustc --version",{silent:!0}).code)return;(yield r({type:"confirm",message:"We detected that you have not installed Rust. Install it now?",name:"value"})).value?yield function(){return h(this,void 0,void 0,(function*(){const e=p("Downloading Rust").start();try{yield D("curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"),e.succeed()}catch(a){console.error("install rust return code",a.message),e.fail(),process.exit(1)}}))}():(m.error("Error: Pake need Rust to package your webapp!!!"),process.exit(2))}))}build(e,a){return h(this,void 0,void 0,(function*(){m.debug("PakeAppOptions",a);const{width:i,height:o,fullscreen:r,transparent:n,resizable:s,identifier:l,name:c}=a,p={width:i,height:o,fullscreen:r,transparent:n,resizable:s};Object.assign(O.tauri.windows[0],Object.assign({url:e},p)),O.package.productName=c,O.tauri.bundle.identifier=l,O.tauri.bundle.icon=[a.icon];const g=u.join(u.dirname(t(import.meta.url)),".."),h=u.join(g,"src-tauri/tauri.conf.json");yield d.writeFile(h,Buffer.from(JSON.stringify(O),"utf-8")),yield D(`cd ${g} && npm run build`);const b=`${c}_0.2.0_universal.dmg`,f=this.getBuildedAppPath(g,b);yield d.copyFile(f,u.resolve(`${c}_universal.dmg`))}))}getBuildedAppPath(e,a){return u.join(e,"src-tauri/target/universal-apple-darwin/release/bundle/dmg",a)}}class P{static create(){if(A)return new E;throw new Error("The current system does not support")}}a.version("0.0.1").description("A cli application can package a web page to desktop application"),a.showHelpAfterError().argument("<url>","the web url you want to package",(function(a){try{return z(a)}catch(a){throw new e.InvalidArgumentError(a.message)}})).option("--name <string>","application name").option("--icon <string>","application icon",b).option("--height <number>","window height",q,f).option("--width <number>","window width",q,y).option("--no-resizable","whether the window can be resizable",w).option("--fullscreen","makes the packaged app start in full screen",v).option("--transparent","transparent title bar",k).option("--debug","debug",k).action(((e,a)=>h(void 0,void 0,void 0,(function*(){m.setDefaultLevel("info"),a.debug&&m.setLevel("debug");const i=P.create();yield i.prepare();const t=yield $(a,e);i.build(e,t)})))),a.parse();
|