disposable-domains 1.0.0 → 1.0.1
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 +24 -14
- package/index.json +3 -48
- package/package.json +3 -4
- package/{domain-manager.js → scripts/domain-manager.js} +28 -32
- package/scripts/release.js +164 -0
- package/wildcard.json +5 -0
- package/flattened_codebase.txt +0 -335
- package/llm.json +0 -9
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Disposable Email Domains
|
|
2
2
|
|
|
3
|
-
A list of [disposable email domains](http://en.wikipedia.org/wiki/Disposable_email_address) like `mailinator.com`. You can use it to detect or block disposable accounts in your signup process. Exact domain matches are found in [index.json](https://github.com/tompec/disposable-email-domains/blob/master/index.json) and wildcard domains (ex: `*.33mail.com`) are in [wildcard.json](https://github.com/tompec/disposable-email-domains/blob/master/wildcard.json).
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
A list of [disposable email domains](http://en.wikipedia.org/wiki/Disposable_email_address) like `mailinator.com`. You can use it to detect or block disposable accounts in your signup process. Exact domain matches are found in [index.json](https://github.com/tompec/disposable-email-domains/blob/main/index.json) and wildcard domains (ex: `*.33mail.com`) are in [wildcard.json](https://github.com/tompec/disposable-email-domains/blob/main/wildcard.json).
|
|
6
5
|
|
|
7
|
-
##
|
|
6
|
+
## Examples
|
|
7
|
+
|
|
8
|
+
### Node.JS
|
|
8
9
|
```js
|
|
9
10
|
var domains = require('disposable-email-domains');
|
|
10
11
|
var wildcards = require('disposable-email-domains/wildcard.json');
|
|
@@ -12,24 +13,33 @@ var wildcards = require('disposable-email-domains/wildcard.json');
|
|
|
12
13
|
// ... your code here
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Installation
|
|
16
17
|
|
|
17
18
|
```
|
|
18
|
-
$ npm install disposable-
|
|
19
|
+
$ npm install disposable-domains
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Add new disposable domains to [index.json](https://github.com/tompec/disposable-email-domains/blob/master/index.json) and wildcard disposable domains to [wildcard.json](https://github.com/tompec/disposable-email-domains/blob/master/wildcard.json).
|
|
22
|
+
## Contributing
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
1. Install dependencies:
|
|
25
|
+
```
|
|
26
|
+
npm install
|
|
27
|
+
```
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
2. Add your disposable domains to [contributions/index.txt](https://github.com/tompec/disposable-email-domains/blob/main/contributions/index.txt) (one domain per line, without any additional formatting)
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
3. Run the [domain manager script](https://github.com/tompec/disposable-email-domains/blob/main/scripts/domain-manager.js):
|
|
32
|
+
```
|
|
33
|
+
npm run process
|
|
34
|
+
```
|
|
35
|
+
That script will:
|
|
36
|
+
- Add your domains to index.json
|
|
37
|
+
- Validate domains using the FQDN (Fully Qualified Domain Name) standard
|
|
38
|
+
- Move domains to wildcard.json if they have 2 or more subdomains
|
|
39
|
+
- Sort and deduplicate all entries
|
|
40
|
+
- Run the tests to ensure everything is working correctly
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
## License
|
|
33
43
|
|
|
34
44
|
```
|
|
35
45
|
WWWWWW||WWWWWW
|
package/index.json
CHANGED
|
@@ -7946,7 +7946,6 @@
|
|
|
7946
7946
|
"a1678991.xyz",
|
|
7947
7947
|
"a1aemail.win",
|
|
7948
7948
|
"a1b2.cf",
|
|
7949
|
-
"a1b2.cloudns.ph",
|
|
7950
7949
|
"a1b2.gq",
|
|
7951
7950
|
"a1b2.ml",
|
|
7952
7951
|
"a1b31.xyz",
|
|
@@ -8251,7 +8250,6 @@
|
|
|
8251
8250
|
"abbonamentitv.net",
|
|
8252
8251
|
"abbstore.website",
|
|
8253
8252
|
"abbuzz.com",
|
|
8254
|
-
"abc.ngopi.eu.org",
|
|
8255
8253
|
"abc1918.xyz",
|
|
8256
8254
|
"abcaga.cf",
|
|
8257
8255
|
"abcaga.ga",
|
|
@@ -9763,7 +9761,6 @@
|
|
|
9763
9761
|
"ai-pct.com",
|
|
9764
9762
|
"ai-report.ru",
|
|
9765
9763
|
"ai.hsfz.info",
|
|
9766
|
-
"ai.vcss.eu.org",
|
|
9767
9764
|
"ai2111.com",
|
|
9768
9765
|
"ai4000.com",
|
|
9769
9766
|
"ai6554.com",
|
|
@@ -9869,7 +9866,6 @@
|
|
|
9869
9866
|
"aiodown.net",
|
|
9870
9867
|
"aioneclick.com",
|
|
9871
9868
|
"aionline.xyz",
|
|
9872
|
-
"aiot.aiphone.eu.org",
|
|
9873
9869
|
"aipi8x.com",
|
|
9874
9870
|
"aipian.info",
|
|
9875
9871
|
"aipp.tech",
|
|
@@ -10206,12 +10202,10 @@
|
|
|
10206
10202
|
"akumaofficiall.live",
|
|
10207
10203
|
"akun-vip.com",
|
|
10208
10204
|
"akunamatata.site",
|
|
10209
|
-
"akunfb.thempter.eu.org",
|
|
10210
10205
|
"akunhd.com",
|
|
10211
10206
|
"akunprm.com",
|
|
10212
10207
|
"akunvipku.com",
|
|
10213
10208
|
"akunyd.com",
|
|
10214
|
-
"akusayangkamu.eu.org",
|
|
10215
10209
|
"akusayyangkamusangat.ga",
|
|
10216
10210
|
"akusayyangkamusangat.ml",
|
|
10217
10211
|
"akusayyangkamusangat.tk",
|
|
@@ -18411,7 +18405,6 @@
|
|
|
18411
18405
|
"binoma.biz",
|
|
18412
18406
|
"binomoqq.com",
|
|
18413
18407
|
"binumartep.cf",
|
|
18414
|
-
"binus.eu.org",
|
|
18415
18408
|
"binwindvil.cf",
|
|
18416
18409
|
"binwindvil.ga",
|
|
18417
18410
|
"binwindvil.ml",
|
|
@@ -18816,7 +18809,6 @@
|
|
|
18816
18809
|
"bkxdwnpvje.site",
|
|
18817
18810
|
"bkxmby.fun",
|
|
18818
18811
|
"bkxmqm.fun",
|
|
18819
|
-
"bl.ctu.edu.gr",
|
|
18820
18812
|
"bl0.info",
|
|
18821
18813
|
"bl3xo7.us",
|
|
18822
18814
|
"bl5ic2ywfn7bo.cf",
|
|
@@ -20559,7 +20551,6 @@
|
|
|
20559
20551
|
"breemillsfilms.com",
|
|
20560
20552
|
"breethase.cf",
|
|
20561
20553
|
"breetiwe.cf",
|
|
20562
|
-
"breeze.eu.org",
|
|
20563
20554
|
"brefmail.com",
|
|
20564
20555
|
"breitbandanbindung.de",
|
|
20565
20556
|
"breizhmarechalerie.com",
|
|
@@ -21114,7 +21105,6 @@
|
|
|
21114
21105
|
"bud-zdorov-03.site",
|
|
21115
21106
|
"bud-zdorov-07.site",
|
|
21116
21107
|
"budakcinta.online",
|
|
21117
|
-
"budalendeel1.eu.org",
|
|
21118
21108
|
"budapest2040.com",
|
|
21119
21109
|
"budapestdailydeal.com",
|
|
21120
21110
|
"budapestinsider.net",
|
|
@@ -25841,9 +25831,11 @@
|
|
|
25841
25831
|
"cloudns.asia",
|
|
25842
25832
|
"cloudns.cc",
|
|
25843
25833
|
"cloudns.cf",
|
|
25834
|
+
"cloudns.cl",
|
|
25844
25835
|
"cloudns.cx",
|
|
25845
25836
|
"cloudns.gq",
|
|
25846
25837
|
"cloudns.nz",
|
|
25838
|
+
"cloudns.ph",
|
|
25847
25839
|
"cloudonf.com",
|
|
25848
25840
|
"cloudoom.com",
|
|
25849
25841
|
"cloudosys.com",
|
|
@@ -27989,7 +27981,6 @@
|
|
|
27989
27981
|
"cremcalsult.cf",
|
|
27990
27982
|
"cremcalsult.gq",
|
|
27991
27983
|
"cremcalsult.tk",
|
|
27992
|
-
"creo.ctu.edu.gr",
|
|
27993
27984
|
"creo.site",
|
|
27994
27985
|
"creo.tips",
|
|
27995
27986
|
"creou.dev",
|
|
@@ -29079,7 +29070,6 @@
|
|
|
29079
29070
|
"d-sadokam.ru",
|
|
29080
29071
|
"d-skin.com",
|
|
29081
29072
|
"d-v-w.de",
|
|
29082
|
-
"d.megafon.org.ua",
|
|
29083
29073
|
"d00300.com",
|
|
29084
29074
|
"d00700.com",
|
|
29085
29075
|
"d029ksfd.buzz",
|
|
@@ -30091,7 +30081,6 @@
|
|
|
30091
30081
|
"ddataliste.site",
|
|
30092
30082
|
"ddbb99.xyz",
|
|
30093
30083
|
"ddblanding.com",
|
|
30094
|
-
"ddd.megafon.org.ua",
|
|
30095
30084
|
"ddd062.com",
|
|
30096
30085
|
"ddd9827.com",
|
|
30097
30086
|
"dddddd.com",
|
|
@@ -30151,7 +30140,6 @@
|
|
|
30151
30140
|
"de-lyrics.ru",
|
|
30152
30141
|
"de.introverted.ninja",
|
|
30153
30142
|
"de.newhorizons.gq",
|
|
30154
|
-
"de.vipqq.eu.org",
|
|
30155
30143
|
"de4ce.gq",
|
|
30156
30144
|
"de5m7y56n5.cf",
|
|
30157
30145
|
"de5m7y56n5.ga",
|
|
@@ -30359,7 +30347,6 @@
|
|
|
30359
30347
|
"dedeurassen.online",
|
|
30360
30348
|
"dedicateddivorcelawyer.com",
|
|
30361
30349
|
"dedimath.com",
|
|
30362
|
-
"dedisutardi.eu.org",
|
|
30363
30350
|
"dedmoroz-vesti.ru",
|
|
30364
30351
|
"dedmorozkoz.ru",
|
|
30365
30352
|
"dedom.info",
|
|
@@ -32674,7 +32661,6 @@
|
|
|
32674
32661
|
"dmc-12.tk",
|
|
32675
32662
|
"dmc4u.tk",
|
|
32676
32663
|
"dmcchampion.site",
|
|
32677
|
-
"dmcd.ctu.edu.gr",
|
|
32678
32664
|
"dmcforex.com",
|
|
32679
32665
|
"dmcgames.store",
|
|
32680
32666
|
"dmcqcnzq.shop",
|
|
@@ -32714,7 +32700,6 @@
|
|
|
32714
32700
|
"dmtc.press",
|
|
32715
32701
|
"dmtp.fhvxkg2t.xyz",
|
|
32716
32702
|
"dmtqrnqrb.shop",
|
|
32717
|
-
"dmtu.ctu.edu.gr",
|
|
32718
32703
|
"dmuxgi.icu",
|
|
32719
32704
|
"dmv911.com",
|
|
32720
32705
|
"dmwiki.com",
|
|
@@ -35388,7 +35373,6 @@
|
|
|
35388
35373
|
"edu-archive.com",
|
|
35389
35374
|
"edu-track.net",
|
|
35390
35375
|
"edu.auction",
|
|
35391
|
-
"edu.hstu.eu.org",
|
|
35392
35376
|
"edu.net",
|
|
35393
35377
|
"edu.pl",
|
|
35394
35378
|
"edu.treehouse.publicvm.com",
|
|
@@ -37860,6 +37844,7 @@
|
|
|
37860
37844
|
"etzdnetx.com",
|
|
37861
37845
|
"eu-med4.site",
|
|
37862
37846
|
"eu-portals.info",
|
|
37847
|
+
"eu.org",
|
|
37863
37848
|
"eu42ti.site",
|
|
37864
37849
|
"eu6genetic.com",
|
|
37865
37850
|
"eu83t4nncmxv3g2.xyz",
|
|
@@ -39320,7 +39305,6 @@
|
|
|
39320
39305
|
"fastgrowthpodcast.com",
|
|
39321
39306
|
"fastighetsmaklarenerja.com",
|
|
39322
39307
|
"fastinfra.net",
|
|
39323
|
-
"fastip.eu.org",
|
|
39324
39308
|
"fastkawasaki.com",
|
|
39325
39309
|
"fastleads.in",
|
|
39326
39310
|
"fastlottery.net",
|
|
@@ -44693,7 +44677,6 @@
|
|
|
44693
44677
|
"giedewly.ml",
|
|
44694
44678
|
"giedewly.tk",
|
|
44695
44679
|
"gies.email",
|
|
44696
|
-
"giessdorf.eu.org",
|
|
44697
44680
|
"gifanu.ga",
|
|
44698
44681
|
"gifanu.gq",
|
|
44699
44682
|
"gifanu.ml",
|
|
@@ -45280,7 +45263,6 @@
|
|
|
45280
45263
|
"gmail-anjim.tk",
|
|
45281
45264
|
"gmail-fiji.gq",
|
|
45282
45265
|
"gmail.ax",
|
|
45283
|
-
"gmail.bangjo.eu.org",
|
|
45284
45266
|
"gmail.bdca-net.com",
|
|
45285
45267
|
"gmail.com.247blog.com",
|
|
45286
45268
|
"gmail.com.bellwellcharters.com",
|
|
@@ -47329,7 +47311,6 @@
|
|
|
47329
47311
|
"gxyl666.org",
|
|
47330
47312
|
"gxzsrr.info",
|
|
47331
47313
|
"gy273.site",
|
|
47332
|
-
"gyagwgwgwgsusiej70029292228.cloudns.cl",
|
|
47333
47314
|
"gybatu.info",
|
|
47334
47315
|
"gyberstore.top",
|
|
47335
47316
|
"gyblerefy.host",
|
|
@@ -50587,7 +50568,6 @@
|
|
|
50587
50568
|
"honemedi.com",
|
|
50588
50569
|
"honestcto.com",
|
|
50589
50570
|
"honestwealthblog.com",
|
|
50590
|
-
"honey.cloudns.ph",
|
|
50591
50571
|
"honeybet90.org",
|
|
50592
50572
|
"honeyedoakforge.com",
|
|
50593
50573
|
"honeyfragilelodge.site",
|
|
@@ -51287,7 +51267,6 @@
|
|
|
51287
51267
|
"hsh.co",
|
|
51288
51268
|
"hshed.org",
|
|
51289
51269
|
"hshr.us",
|
|
51290
|
-
"hshvmail.eu.org",
|
|
51291
51270
|
"hsjjttr.cf",
|
|
51292
51271
|
"hsjjttr.ga",
|
|
51293
51272
|
"hsjjttr.tk",
|
|
@@ -53041,7 +53020,6 @@
|
|
|
53041
53020
|
"ilschool-wiesbaden.com",
|
|
53042
53021
|
"ilselyhouse.co",
|
|
53043
53022
|
"ilsongzung.com",
|
|
53044
|
-
"ilt.ctu.edu.gr",
|
|
53045
53023
|
"ilthomar.cf",
|
|
53046
53024
|
"ilthomar.ga",
|
|
53047
53025
|
"ilthomar.gq",
|
|
@@ -54492,7 +54470,6 @@
|
|
|
54492
54470
|
"iostwatch.com",
|
|
54493
54471
|
"iosvzq.site",
|
|
54494
54472
|
"iot-connected.com",
|
|
54495
|
-
"iot.aiphone.eu.org",
|
|
54496
54473
|
"iotaph.ink",
|
|
54497
54474
|
"iotdf.club",
|
|
54498
54475
|
"iothm.club",
|
|
@@ -54504,8 +54481,6 @@
|
|
|
54504
54481
|
"iotrh5667.ga",
|
|
54505
54482
|
"iotrh5667.gq",
|
|
54506
54483
|
"iotrh5667.ml",
|
|
54507
|
-
"iotu.de.vipqq.eu.org",
|
|
54508
|
-
"iotu.hstu.eu.org",
|
|
54509
54484
|
"iotuitive.org",
|
|
54510
54485
|
"ioubuy.com",
|
|
54511
54486
|
"ioucai.xyz",
|
|
@@ -56632,7 +56607,6 @@
|
|
|
56632
56607
|
"jjkgrtteee098.tk",
|
|
56633
56608
|
"jjlhm.live",
|
|
56634
56609
|
"jjlink.cn",
|
|
56635
|
-
"jjmsb.eu.org",
|
|
56636
56610
|
"jjo77.space",
|
|
56637
56611
|
"jjohbqppg.shop",
|
|
56638
56612
|
"jjosale.top",
|
|
@@ -58008,7 +57982,6 @@
|
|
|
58008
57982
|
"kakashi1223e.tk",
|
|
58009
57983
|
"kakbankrot.xyz",
|
|
58010
57984
|
"kakekbet.com",
|
|
58011
|
-
"kakraffi.eu.org",
|
|
58012
57985
|
"kaku92.com",
|
|
58013
57986
|
"kaku97.com",
|
|
58014
57987
|
"kalaf.tech",
|
|
@@ -64810,7 +64783,6 @@
|
|
|
64810
64783
|
"lttsd.com",
|
|
64811
64784
|
"lttusers.com",
|
|
64812
64785
|
"lttusers.net",
|
|
64813
|
-
"ltuc.edu.eu.org",
|
|
64814
64786
|
"ltuiwz.us",
|
|
64815
64787
|
"luadao.club",
|
|
64816
64788
|
"luagram.com",
|
|
@@ -65264,7 +65236,6 @@
|
|
|
65264
65236
|
"m.887.at",
|
|
65265
65237
|
"m.arkf.xyz",
|
|
65266
65238
|
"m.beedham.org",
|
|
65267
|
-
"m.cloudns.cl",
|
|
65268
65239
|
"m.codng.com",
|
|
65269
65240
|
"m.convulse.net",
|
|
65270
65241
|
"m.ddcrew.com",
|
|
@@ -67822,7 +67793,6 @@
|
|
|
67822
67793
|
"mba-virgin.com",
|
|
67823
67794
|
"mbacolleges.info",
|
|
67824
67795
|
"mbadicole.info",
|
|
67825
|
-
"mbahraffi.eu.org",
|
|
67826
67796
|
"mbahtekno.net",
|
|
67827
67797
|
"mbakingzl.com",
|
|
67828
67798
|
"mban.ml",
|
|
@@ -69603,7 +69573,6 @@
|
|
|
69603
69573
|
"minicooperspeed.com",
|
|
69604
69574
|
"minikokul.net",
|
|
69605
69575
|
"minimail.club",
|
|
69606
|
-
"minimail.eu.org",
|
|
69607
69576
|
"minimail.gq",
|
|
69608
69577
|
"minimal.homes",
|
|
69609
69578
|
"minime.xyz",
|
|
@@ -71470,7 +71439,6 @@
|
|
|
71470
71439
|
"ms.email",
|
|
71471
71440
|
"ms.land",
|
|
71472
71441
|
"ms.rentals",
|
|
71473
|
-
"ms.vcss.eu.org",
|
|
71474
71442
|
"ms0o.club",
|
|
71475
71443
|
"ms1.email",
|
|
71476
71444
|
"ms248.com",
|
|
@@ -76382,7 +76350,6 @@
|
|
|
76382
76350
|
"nyscengage.com",
|
|
76383
76351
|
"nysmail.com",
|
|
76384
76352
|
"nyter44.website",
|
|
76385
|
-
"nyumbang.idjaya.eu.org",
|
|
76386
76353
|
"nyusul.com",
|
|
76387
76354
|
"nyvhuzbi.site",
|
|
76388
76355
|
"nywcmiftn8hwhj.cf",
|
|
@@ -89033,7 +89000,6 @@
|
|
|
89033
89000
|
"rexuejianghusifu.com",
|
|
89034
89001
|
"reydonerkebabmalaga.com",
|
|
89035
89002
|
"reymisterio.com",
|
|
89036
|
-
"reynagg.eu.org",
|
|
89037
89003
|
"reyw3.us",
|
|
89038
89004
|
"reyzor.com",
|
|
89039
89005
|
"rezablog.com",
|
|
@@ -96491,7 +96457,6 @@
|
|
|
96491
96457
|
"smtp.fortniteskill.com",
|
|
96492
96458
|
"smtp.gdmail.top",
|
|
96493
96459
|
"smtp.getprivacy.xyz",
|
|
96494
|
-
"smtp.giessdorf.eu.org",
|
|
96495
96460
|
"smtp.go2021.xyz",
|
|
96496
96461
|
"smtp.gofsrhr.com",
|
|
96497
96462
|
"smtp.hadeh.xyz",
|
|
@@ -99405,8 +99370,6 @@
|
|
|
99405
99370
|
"student-web-design.com",
|
|
99406
99371
|
"student.cpit.ac.nz.wayaengopi.buzz",
|
|
99407
99372
|
"student.onsow.k12nc.us",
|
|
99408
|
-
"student.telkomuniversity.cloudns.cl",
|
|
99409
|
-
"student.telkomuniversity.eu.org",
|
|
99410
99373
|
"student.telkomuniversity.netlib.re",
|
|
99411
99374
|
"student.tp.edu.sg.ehmhondajazz.buzz",
|
|
99412
99375
|
"student.uum.edu.my.kecapasin.buzz",
|
|
@@ -101810,7 +101773,6 @@
|
|
|
101810
101773
|
"teamxpress.org",
|
|
101811
101774
|
"teardown.site",
|
|
101812
101775
|
"tearflakes.com",
|
|
101813
|
-
"tearflakes.eu.org",
|
|
101814
101776
|
"teasealoo.buzz",
|
|
101815
101777
|
"teasebre.icu",
|
|
101816
101778
|
"teaser-team.ru",
|
|
@@ -106402,7 +106364,6 @@
|
|
|
106402
106364
|
"trgoals3.club",
|
|
106403
106365
|
"trgovinanaveliko.info",
|
|
106404
106366
|
"tri-katushki.ru",
|
|
106405
|
-
"triadstore.eu.org",
|
|
106406
106367
|
"triadstore.ru",
|
|
106407
106368
|
"trialaloo.xyz",
|
|
106408
106369
|
"trialforyou.com",
|
|
@@ -111332,10 +111293,8 @@
|
|
|
111332
111293
|
"vip-stuff.biz",
|
|
111333
111294
|
"vip-sushi.ru",
|
|
111334
111295
|
"vip-timeclub.ru",
|
|
111335
|
-
"vip.aiot.eu.org",
|
|
111336
111296
|
"vip.boxmaill.com",
|
|
111337
111297
|
"vip.cool",
|
|
111338
|
-
"vip.hstu.eu.org",
|
|
111339
111298
|
"vip52.online",
|
|
111340
111299
|
"vip52.pro",
|
|
111341
111300
|
"vip5319.com",
|
|
@@ -111363,7 +111322,6 @@
|
|
|
111363
111322
|
"vipfirstpay.com",
|
|
111364
111323
|
"vipflix.xyz",
|
|
111365
111324
|
"vipgamemarket.ru",
|
|
111366
|
-
"viphone.eu.org",
|
|
111367
111325
|
"viphop.ru",
|
|
111368
111326
|
"viphospitality.se",
|
|
111369
111327
|
"vipilitka.buzz",
|
|
@@ -119327,9 +119285,7 @@
|
|
|
119327
119285
|
"yop.emersion.fr",
|
|
119328
119286
|
"yop.fexp.io",
|
|
119329
119287
|
"yop.itram.es",
|
|
119330
|
-
"yop.milter.int.eu.org",
|
|
119331
119288
|
"yop.profmusique.com",
|
|
119332
|
-
"yop.xn--vqq79r59m.eu.org",
|
|
119333
119289
|
"yopmail.cf",
|
|
119334
119290
|
"yopmail.com",
|
|
119335
119291
|
"yopmail.dams.city",
|
|
@@ -119638,7 +119594,6 @@
|
|
|
119638
119594
|
"ypicall.shop",
|
|
119639
119595
|
"ypkyl.fun",
|
|
119640
119596
|
"ypkzn.com",
|
|
119641
|
-
"ypmail.webarnak.fr.eu.org",
|
|
119642
119597
|
"ypolk1.site",
|
|
119643
119598
|
"ypovert.shop",
|
|
119644
119599
|
"ypplasev.cf",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disposable-domains",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A list of disposable email domains",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
"main": "./index.json",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "mocha test/index.js test/wildcard.js",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"prod": "node domain-manager.js"
|
|
13
|
+
"process": "node scripts/domain-manager.js",
|
|
14
|
+
"release": "node scripts/release.js"
|
|
16
15
|
},
|
|
17
16
|
"dependencies": {
|
|
18
17
|
"lodash": "^4.17.21",
|
|
@@ -3,6 +3,7 @@ const _ = require('lodash');
|
|
|
3
3
|
const validator = require('validator');
|
|
4
4
|
const { execSync } = require('child_process');
|
|
5
5
|
const { tlds } = require('top-level-domains');
|
|
6
|
+
const path = require('path');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Domain Manager - A comprehensive tool for managing disposable email domains
|
|
@@ -14,12 +15,15 @@ const { tlds } = require('top-level-domains');
|
|
|
14
15
|
* 4. Sort, deduplicate, and format domains
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
|
-
//
|
|
18
|
+
// Get the root directory
|
|
19
|
+
const rootDir = path.join(__dirname, '..');
|
|
20
|
+
|
|
21
|
+
// Configuration with updated paths
|
|
18
22
|
const CONFIG = {
|
|
19
|
-
indexFile: 'index.json',
|
|
20
|
-
wildcardFile: 'wildcard.json',
|
|
21
|
-
contributionsDir: '
|
|
22
|
-
contributionsIndexFile: '
|
|
23
|
+
indexFile: path.join(rootDir, 'index.json'),
|
|
24
|
+
wildcardFile: path.join(rootDir, 'wildcard.json'),
|
|
25
|
+
contributionsDir: path.join(rootDir, 'contributions'),
|
|
26
|
+
contributionsIndexFile: path.join(rootDir, 'contributions', 'index.txt')
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
/**
|
|
@@ -192,17 +196,18 @@ function processDomains(index, wildcard) {
|
|
|
192
196
|
|
|
193
197
|
// Count domains with multiple subdomains
|
|
194
198
|
let multiSubdomainCount = 0;
|
|
195
|
-
let
|
|
199
|
+
let rootDomainsWithMultipleSubdomains = 0;
|
|
196
200
|
Object.entries(domainGroups).forEach(([rootDomain, domains]) => {
|
|
197
|
-
|
|
201
|
+
// Filter out the root domain itself from the group
|
|
202
|
+
const subdomains = domains.filter(domain => domain !== rootDomain);
|
|
203
|
+
if (subdomains.length > 1) {
|
|
204
|
+
// More than one true subdomain
|
|
198
205
|
multiSubdomainCount++;
|
|
199
|
-
|
|
200
|
-
if (domains.length >= 3) {
|
|
201
|
-
threeOrMoreSubdomainsCount++;
|
|
206
|
+
rootDomainsWithMultipleSubdomains++;
|
|
202
207
|
}
|
|
203
208
|
});
|
|
204
209
|
console.log(`Found ${multiSubdomainCount} root domains with multiple subdomains`);
|
|
205
|
-
console.log(`Found ${
|
|
210
|
+
console.log(`Found ${rootDomainsWithMultipleSubdomains} root domains with two or more true subdomains`);
|
|
206
211
|
|
|
207
212
|
// Prepare new lists
|
|
208
213
|
const newIndexDomains = [];
|
|
@@ -211,19 +216,16 @@ function processDomains(index, wildcard) {
|
|
|
211
216
|
|
|
212
217
|
// Process each group
|
|
213
218
|
Object.entries(domainGroups).forEach(([rootDomain, domains]) => {
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
// Filter out the root domain itself from the group to get only true subdomains
|
|
220
|
+
const subdomains = domains.filter(domain => domain !== rootDomain);
|
|
221
|
+
|
|
222
|
+
if (subdomains.length < 2) {
|
|
223
|
+
// Less than two true subdomains with this root, keep them all in index.json
|
|
216
224
|
newIndexDomains.push(...domains);
|
|
217
225
|
} else {
|
|
218
|
-
//
|
|
219
|
-
//
|
|
220
|
-
|
|
221
|
-
newIndexDomains.push(rootDomain);
|
|
222
|
-
} else {
|
|
223
|
-
// If the root domain itself isn't in the list, add the shortest domain
|
|
224
|
-
domains.sort((a, b) => a.length - b.length);
|
|
225
|
-
newIndexDomains.push(domains[0]);
|
|
226
|
-
}
|
|
226
|
+
// Two or more true subdomains with this root
|
|
227
|
+
// Always add the root domain to index.json, regardless of whether it was in the original list
|
|
228
|
+
newIndexDomains.push(rootDomain);
|
|
227
229
|
|
|
228
230
|
// Add the root domain to wildcard.json if not already there
|
|
229
231
|
if (!newWildcardDomains.includes(rootDomain)) {
|
|
@@ -366,7 +368,8 @@ function runTests() {
|
|
|
366
368
|
|
|
367
369
|
// Run the tests
|
|
368
370
|
try {
|
|
369
|
-
const
|
|
371
|
+
const testCommand = `cd ${rootDir} && npx mocha test/index.js test/wildcard.js`;
|
|
372
|
+
const testOutput = execSync(testCommand, { encoding: 'utf8' });
|
|
370
373
|
console.log(testOutput);
|
|
371
374
|
return true;
|
|
372
375
|
} catch (error) {
|
|
@@ -386,11 +389,6 @@ function runTests() {
|
|
|
386
389
|
function main() {
|
|
387
390
|
console.log('=== Domain Manager ===');
|
|
388
391
|
|
|
389
|
-
// Process command line arguments
|
|
390
|
-
const args = process.argv.slice(2);
|
|
391
|
-
const skipTests = args.includes('--skip-tests');
|
|
392
|
-
const skipProcessing = args.includes('--skip-processing');
|
|
393
|
-
|
|
394
392
|
// Load domains
|
|
395
393
|
let { index, wildcard } = loadDomains();
|
|
396
394
|
|
|
@@ -401,9 +399,7 @@ function main() {
|
|
|
401
399
|
({ index, wildcard } = cleanDomains(index, wildcard));
|
|
402
400
|
|
|
403
401
|
// Process domains (optimize wildcards)
|
|
404
|
-
|
|
405
|
-
({ index, wildcard } = processDomains(index, wildcard));
|
|
406
|
-
}
|
|
402
|
+
({ index, wildcard } = processDomains(index, wildcard));
|
|
407
403
|
|
|
408
404
|
// Remove domains covered by wildcards
|
|
409
405
|
({ index, wildcard } = removeWildcardCoveredDomains(index, wildcard));
|
|
@@ -415,7 +411,7 @@ function main() {
|
|
|
415
411
|
const saveSuccess = saveDomains(index, wildcard);
|
|
416
412
|
|
|
417
413
|
// Run tests
|
|
418
|
-
if (
|
|
414
|
+
if (saveSuccess) {
|
|
419
415
|
const testsSuccess = runTests();
|
|
420
416
|
if (testsSuccess) {
|
|
421
417
|
console.log('All tests passed!');
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This script automates the release process for the disposable-email-domains package.
|
|
5
|
+
* It handles versioning, processing domains, testing, and publishing to both npm and GitHub.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* node scripts/release.js [patch|minor|major]
|
|
9
|
+
*
|
|
10
|
+
* Example:
|
|
11
|
+
* node scripts/release.js patch # Increments the patch version (1.0.0 -> 1.0.1)
|
|
12
|
+
* node scripts/release.js minor # Increments the minor version (1.0.0 -> 1.1.0)
|
|
13
|
+
* node scripts/release.js major # Increments the major version (1.0.0 -> 2.0.0)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const { execSync } = require('child_process');
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
// Get the version type from command line arguments
|
|
21
|
+
const versionType = process.argv[2] || 'patch';
|
|
22
|
+
|
|
23
|
+
// Validate version type
|
|
24
|
+
if (!['patch', 'minor', 'major'].includes(versionType)) {
|
|
25
|
+
console.error('Error: Version type must be one of: patch, minor, major');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Executes a shell command and returns the output
|
|
31
|
+
* @param {string} command - The command to execute
|
|
32
|
+
* @param {boolean} silent - Whether to suppress console output
|
|
33
|
+
* @returns {string} - The command output
|
|
34
|
+
*/
|
|
35
|
+
function exec(command, silent = false) {
|
|
36
|
+
try {
|
|
37
|
+
if (!silent) {
|
|
38
|
+
console.log(`Executing: ${command}`);
|
|
39
|
+
}
|
|
40
|
+
return execSync(command, { encoding: 'utf8', stdio: silent ? 'pipe' : 'inherit' });
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.error(`Error executing command: ${command}`);
|
|
43
|
+
console.error(error.message);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Gets the current version from package.json
|
|
50
|
+
* @returns {string} - The current version
|
|
51
|
+
*/
|
|
52
|
+
function getCurrentVersion() {
|
|
53
|
+
const packageJsonPath = path.join(__dirname, '..', 'package.json');
|
|
54
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
55
|
+
return packageJson.version;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Checks if the working directory is clean
|
|
60
|
+
* @returns {boolean} - Whether the working directory is clean
|
|
61
|
+
*/
|
|
62
|
+
function isWorkingDirectoryClean() {
|
|
63
|
+
try {
|
|
64
|
+
const status = exec('git status --porcelain', true);
|
|
65
|
+
return status.trim() === '';
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.error('Error checking git status:', error.message);
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Checks if the user is logged in to npm
|
|
74
|
+
* @returns {boolean} - Whether the user is logged in
|
|
75
|
+
*/
|
|
76
|
+
function isNpmLoggedIn() {
|
|
77
|
+
try {
|
|
78
|
+
const whoami = exec('npm whoami', true);
|
|
79
|
+
return whoami.trim() !== '';
|
|
80
|
+
} catch (error) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Processes domains using the domain-manager.js script
|
|
87
|
+
*/
|
|
88
|
+
function processDomains() {
|
|
89
|
+
console.log('\n🔄 Processing domains...');
|
|
90
|
+
exec('node scripts/domain-manager.js');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Main release process
|
|
95
|
+
*/
|
|
96
|
+
async function release() {
|
|
97
|
+
try {
|
|
98
|
+
// Check if git working directory is clean
|
|
99
|
+
if (!isWorkingDirectoryClean()) {
|
|
100
|
+
console.error('Error: Working directory is not clean. Please commit or stash your changes first.');
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Check if user is logged in to npm
|
|
105
|
+
if (!isNpmLoggedIn()) {
|
|
106
|
+
console.error('Error: You are not logged in to npm. Please run "npm login" first.');
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const currentVersion = getCurrentVersion();
|
|
111
|
+
console.log(`Current version: ${currentVersion}`);
|
|
112
|
+
console.log(`Preparing ${versionType} release...`);
|
|
113
|
+
|
|
114
|
+
// Install dependencies
|
|
115
|
+
console.log('\n📦 Installing dependencies...');
|
|
116
|
+
exec('npm install');
|
|
117
|
+
|
|
118
|
+
// Process domains
|
|
119
|
+
processDomains();
|
|
120
|
+
|
|
121
|
+
// Run tests
|
|
122
|
+
console.log('\n🧪 Running tests...');
|
|
123
|
+
exec('npm test');
|
|
124
|
+
|
|
125
|
+
// Update version
|
|
126
|
+
console.log(`\n🔖 Updating version (${versionType})...`);
|
|
127
|
+
exec(`npm version ${versionType} --no-git-tag-version`);
|
|
128
|
+
|
|
129
|
+
const newVersion = getCurrentVersion();
|
|
130
|
+
console.log(`Version updated: ${currentVersion} -> ${newVersion}`);
|
|
131
|
+
|
|
132
|
+
// Commit changes
|
|
133
|
+
console.log('\n📝 Committing changes...');
|
|
134
|
+
exec('git add .');
|
|
135
|
+
exec(`git commit -m "Release v${newVersion}"`);
|
|
136
|
+
|
|
137
|
+
// Create git tag
|
|
138
|
+
console.log('\n🏷️ Creating git tag...');
|
|
139
|
+
exec(`git tag -a v${newVersion} -m "Version ${newVersion}"`);
|
|
140
|
+
|
|
141
|
+
// Push to GitHub
|
|
142
|
+
console.log('\n🚀 Pushing to GitHub...');
|
|
143
|
+
exec('git push');
|
|
144
|
+
exec('git push --tags');
|
|
145
|
+
|
|
146
|
+
// Publish to npm
|
|
147
|
+
console.log('\n📦 Publishing to npm...');
|
|
148
|
+
exec('npm publish');
|
|
149
|
+
|
|
150
|
+
console.log(`\n✅ Release v${newVersion} completed successfully!`);
|
|
151
|
+
console.log('\nNext steps:');
|
|
152
|
+
console.log(' 1. Create a release on GitHub: https://github.com/tompec/disposable-email-domains/releases/new');
|
|
153
|
+
console.log(` 2. Select the v${newVersion} tag`);
|
|
154
|
+
console.log(' 3. Add release notes describing the changes');
|
|
155
|
+
console.log(' 4. Publish the release');
|
|
156
|
+
|
|
157
|
+
} catch (error) {
|
|
158
|
+
console.error('Error during release process:', error.message);
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Run the release process
|
|
164
|
+
release();
|
package/wildcard.json
CHANGED
|
@@ -56,8 +56,10 @@
|
|
|
56
56
|
"cko.kr",
|
|
57
57
|
"cloudns.asia",
|
|
58
58
|
"cloudns.cc",
|
|
59
|
+
"cloudns.cl",
|
|
59
60
|
"cloudns.cx",
|
|
60
61
|
"cloudns.nz",
|
|
62
|
+
"cloudns.ph",
|
|
61
63
|
"com.com",
|
|
62
64
|
"coms.hk",
|
|
63
65
|
"comx.cf",
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
"creo.tips",
|
|
67
69
|
"creou.dev",
|
|
68
70
|
"crowdpress.it",
|
|
71
|
+
"ctu.edu.gr",
|
|
69
72
|
"cu.cc",
|
|
70
73
|
"cua77.xyz",
|
|
71
74
|
"d3vs.net",
|
|
@@ -117,6 +120,7 @@
|
|
|
117
120
|
"escritossad.net",
|
|
118
121
|
"ese.kr",
|
|
119
122
|
"esy.es",
|
|
123
|
+
"eu.org",
|
|
120
124
|
"ewa.kr",
|
|
121
125
|
"exi.kr",
|
|
122
126
|
"expiredtoaster.org",
|
|
@@ -210,6 +214,7 @@
|
|
|
210
214
|
"mblimbingan.space",
|
|
211
215
|
"mebelnovation.ru",
|
|
212
216
|
"mefound.com",
|
|
217
|
+
"megafon.org.ua",
|
|
213
218
|
"mintemail.com",
|
|
214
219
|
"mishmash.buzz",
|
|
215
220
|
"mko.kr",
|
package/flattened_codebase.txt
DELETED
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
## Codebase
|
|
2
|
-
<.gitignore>
|
|
3
|
-
.DS_Store
|
|
4
|
-
npm-debug.log
|
|
5
|
-
node_modules/
|
|
6
|
-
tmp.*
|
|
7
|
-
*.sh
|
|
8
|
-
</.gitignore>
|
|
9
|
-
|
|
10
|
-
<.npmignore>
|
|
11
|
-
tmp.*
|
|
12
|
-
*.sh
|
|
13
|
-
contributions/*
|
|
14
|
-
</.npmignore>
|
|
15
|
-
|
|
16
|
-
<Readme.md>
|
|
17
|
-
# disposable-email-domains
|
|
18
|
-
|
|
19
|
-
A list of [disposable email domains](http://en.wikipedia.org/wiki/Disposable_email_address) like `mailinator.com`. You can use it to detect or block disposable accounts in your signup process. Exact domain matches are found in [index.json](https://github.com/ivolo/disposable-email-domains/blob/master/index.json) and wildcard domains (ex: `*.33mail.com`) are in [wildcard.json](https://github.com/ivolo/disposable-email-domains/blob/master/wildcard.json).
|
|
20
|
-
|
|
21
|
-
# Examples
|
|
22
|
-
|
|
23
|
-
## Node.JS
|
|
24
|
-
```js
|
|
25
|
-
var domains = require('disposable-email-domains');
|
|
26
|
-
var wildcards = require('disposable-email-domains/wildcard.json');
|
|
27
|
-
|
|
28
|
-
// ... your code here
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## API
|
|
32
|
-
|
|
33
|
-
An always-up-to-date version of this repo is provided as an API by [Kickbox](https://kickbox.com/). Issuing a `GET` request to https://open.kickbox.com/v1/disposable/{DomainOrEmailAddress} will return `{"disposable":true}` or `{"disposable":false}` as a JSON response.
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
https://open.kickbox.com/v1/disposable/mailinator.com
|
|
37
|
-
|
|
38
|
-
{"disposable":true}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
# Installation
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
$ npm install disposable-email-domains
|
|
45
|
-
```
|
|
46
|
-
```
|
|
47
|
-
$ component install ivolo/disposable-email-domains
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
# Contributing
|
|
51
|
-
|
|
52
|
-
Add new disposable domains to [index.json](https://github.com/ivolo/disposable-email-domains/blob/master/index.json) and wildcard disposable domains to [wildcard.json](https://github.com/ivolo/disposable-email-domains/blob/master/wildcard.json).
|
|
53
|
-
|
|
54
|
-
To easily add new domains, insert them into [index.txt](https://github.com/ivolo/disposable-email-domains/blob/master/contributions/index.txt) and/or [wildcard.txt](https://github.com/ivolo/disposable-email-domains/blob/master/contributions/wildcard.txt) and run `npm run add`.
|
|
55
|
-
The domains will be added to the respective files and some validation will be made to ensure they pass the tests.
|
|
56
|
-
|
|
57
|
-
Please run `npm run test` before creating a Pull Request to ensure all tests are passing.
|
|
58
|
-
|
|
59
|
-
You can also run `npm run prod` to add new domains and run the tests at the same time.
|
|
60
|
-
|
|
61
|
-
# License
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
WWWWWW||WWWWWW
|
|
65
|
-
W W W||W W W
|
|
66
|
-
||
|
|
67
|
-
( OO )__________
|
|
68
|
-
/ | \
|
|
69
|
-
/o o| MIT \
|
|
70
|
-
\___/||_||__||_|| *
|
|
71
|
-
|| || || ||
|
|
72
|
-
_||_|| _||_||
|
|
73
|
-
(__|__|(__|__|
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND "AS AND WHEN AVAILABLE", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
77
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
78
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
79
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
80
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
81
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
82
|
-
THE SOFTWARE.
|
|
83
|
-
</Readme.md>
|
|
84
|
-
|
|
85
|
-
<add.js>
|
|
86
|
-
const { writeFileSync, readFileSync } = require('fs')
|
|
87
|
-
const _ = require('lodash')
|
|
88
|
-
|
|
89
|
-
var index = require('./index')
|
|
90
|
-
var wildcard = require('./wildcard')
|
|
91
|
-
|
|
92
|
-
// Add new domains
|
|
93
|
-
const newDomains = readFileSync('./contributions/index.txt').toString().split("\n").filter(d => d)
|
|
94
|
-
index = _.concat(index, newDomains)
|
|
95
|
-
|
|
96
|
-
const newWildcardDomains = readFileSync('./contributions/wildcard.txt').toString().split("\n").filter(d => d)
|
|
97
|
-
wildcard = _.concat(wildcard, newWildcardDomains)
|
|
98
|
-
|
|
99
|
-
// Remove empty strings
|
|
100
|
-
index = index.filter(d => d)
|
|
101
|
-
wildcard = wildcard.filter(d => d)
|
|
102
|
-
|
|
103
|
-
// Lowercase
|
|
104
|
-
index = index.map(domain => { return _.toLower(domain) })
|
|
105
|
-
wildcard = wildcard.map(domain => { return _.toLower(domain) })
|
|
106
|
-
|
|
107
|
-
// Sort
|
|
108
|
-
index.sort()
|
|
109
|
-
wildcard.sort()
|
|
110
|
-
|
|
111
|
-
// Dedupe
|
|
112
|
-
index = _.uniq(index)
|
|
113
|
-
wildcard = _.uniq(wildcard)
|
|
114
|
-
|
|
115
|
-
// Remove wildcards
|
|
116
|
-
var regexp = new RegExp(/(.+(?:\.[\w-]+\.[\w-]+)+)$/)
|
|
117
|
-
|
|
118
|
-
index = index
|
|
119
|
-
.filter(domain => {
|
|
120
|
-
if (regexp.test(domain)) {
|
|
121
|
-
return ! wildcard.filter(wildcard => {
|
|
122
|
-
return _.endsWith(domain, wildcard)
|
|
123
|
-
}).length
|
|
124
|
-
}
|
|
125
|
-
return true
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
writeFileSync('index.json', JSON.stringify(index, null, 2))
|
|
129
|
-
writeFileSync('wildcard.json', JSON.stringify(wildcard, null, 2))
|
|
130
|
-
</add.js>
|
|
131
|
-
|
|
132
|
-
<component.json>
|
|
133
|
-
{
|
|
134
|
-
"name": "disposable-email-domains",
|
|
135
|
-
"repo": "ivolo/disposable-email-domains",
|
|
136
|
-
"description": "Get a list of disposable email domains.",
|
|
137
|
-
"version": "1.0.62",
|
|
138
|
-
"keywords": ["validate", "email", "disposable", "domains"],
|
|
139
|
-
"license": "MIT",
|
|
140
|
-
"files": ["index.json"],
|
|
141
|
-
"scripts": ["index.js"]
|
|
142
|
-
}
|
|
143
|
-
</component.json>
|
|
144
|
-
|
|
145
|
-
<composer.json>
|
|
146
|
-
{
|
|
147
|
-
"name": "ivolo/disposable-email-domains",
|
|
148
|
-
"description": "disposable domains list",
|
|
149
|
-
"keywords": ["disposable", "domains"],
|
|
150
|
-
"license": "MIT",
|
|
151
|
-
"authors": [
|
|
152
|
-
{
|
|
153
|
-
"name": "Ilya Volodarsky",
|
|
154
|
-
"email": "ivolodarsky@gmail.com",
|
|
155
|
-
"role": "Maintainer"
|
|
156
|
-
}
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
</composer.json>
|
|
160
|
-
|
|
161
|
-
<contributions/index.txt>
|
|
162
|
-
|
|
163
|
-
</contributions/index.txt>
|
|
164
|
-
|
|
165
|
-
<contributions/wildcard.txt>
|
|
166
|
-
|
|
167
|
-
</contributions/wildcard.txt>
|
|
168
|
-
|
|
169
|
-
<index.js>
|
|
170
|
-
/**
|
|
171
|
-
* Expose the disposable domains.
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
module.exports = require('./index.json');
|
|
175
|
-
</index.js>
|
|
176
|
-
|
|
177
|
-
<package.json>
|
|
178
|
-
{
|
|
179
|
-
"name": "disposable-domains",
|
|
180
|
-
"version": "0.0.1",
|
|
181
|
-
"repository": "https://github.com/tompec/disposable-email-domains.git",
|
|
182
|
-
"license": "MIT",
|
|
183
|
-
"main": "./index.json",
|
|
184
|
-
"scripts": {
|
|
185
|
-
"test": "mocha || true",
|
|
186
|
-
"add": "node add.js",
|
|
187
|
-
"prod": "node add.js && mocha || true"
|
|
188
|
-
},
|
|
189
|
-
"devDependencies": {
|
|
190
|
-
"chai": "^3.5.0",
|
|
191
|
-
"chai-sorted": "^0.1.0",
|
|
192
|
-
"lodash": "^4.17.21",
|
|
193
|
-
"mocha": "^6.2.1",
|
|
194
|
-
"validator": "^13.7.0"
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
</package.json>
|
|
198
|
-
|
|
199
|
-
<test/helpers/isFQDN.js>
|
|
200
|
-
const isFQDN = require('validator').isFQDN;
|
|
201
|
-
|
|
202
|
-
/*
|
|
203
|
-
Check if all the elements are valid domains
|
|
204
|
-
*/
|
|
205
|
-
module.exports = function (chai) {
|
|
206
|
-
chai.Assertion.addProperty('isFQDN', function () {
|
|
207
|
-
var obj = this._obj, _this = this;
|
|
208
|
-
obj.forEach(function(o){
|
|
209
|
-
_this.assert(
|
|
210
|
-
isFQDN(o)
|
|
211
|
-
, 'expected "' + o + '" to be a valid domain'
|
|
212
|
-
, 'expected "' + o + '" to not be all lowecase'
|
|
213
|
-
);
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
};
|
|
217
|
-
</test/helpers/isFQDN.js>
|
|
218
|
-
|
|
219
|
-
<test/helpers/lowercase.js>
|
|
220
|
-
/*
|
|
221
|
-
Check if all the elements are in lowercase
|
|
222
|
-
*/
|
|
223
|
-
module.exports = function (chai) {
|
|
224
|
-
chai.Assertion.addProperty('lowercase', function () {
|
|
225
|
-
var obj = this._obj, _this = this;
|
|
226
|
-
obj.forEach(function(o){
|
|
227
|
-
_this.assert(
|
|
228
|
-
o === o.toLowerCase()
|
|
229
|
-
, 'expected "' + o + '" to be all lowercase'
|
|
230
|
-
, 'expected "' + o + '" to not be all lowercase'
|
|
231
|
-
);
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
};
|
|
235
|
-
</test/helpers/lowercase.js>
|
|
236
|
-
|
|
237
|
-
<test/helpers/notInWildcard.js>
|
|
238
|
-
var wildcard = require('../../wildcard');
|
|
239
|
-
const _ = require('lodash');
|
|
240
|
-
|
|
241
|
-
/*
|
|
242
|
-
Check if all the elements are in lowercase
|
|
243
|
-
*/
|
|
244
|
-
module.exports = function (chai) {
|
|
245
|
-
chai.Assertion.addProperty('notInWildcard', function () {
|
|
246
|
-
this._obj.forEach(domain => {
|
|
247
|
-
if (new RegExp(/(.+(?:\.[\w-]+\.[\w-]+)+)$/).test(domain)) {
|
|
248
|
-
wildcard.forEach(wildcard => {
|
|
249
|
-
this.assert(
|
|
250
|
-
! _.endsWith(domain, wildcard)
|
|
251
|
-
, '"' + domain + '" is already in the wildcard list'
|
|
252
|
-
);
|
|
253
|
-
})
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
};
|
|
258
|
-
</test/helpers/notInWildcard.js>
|
|
259
|
-
|
|
260
|
-
<test/index.js>
|
|
261
|
-
const _ = require('lodash');
|
|
262
|
-
const domains = require('../index');
|
|
263
|
-
const chai = require('chai');
|
|
264
|
-
const expect = chai.expect;
|
|
265
|
-
|
|
266
|
-
chai.use(require("chai-sorted"));
|
|
267
|
-
chai.use(require('./helpers/lowercase'));
|
|
268
|
-
chai.use(require('./helpers/isFQDN'));
|
|
269
|
-
chai.use(require('./helpers/notInWildcard'));
|
|
270
|
-
|
|
271
|
-
describe('Domains', function(){
|
|
272
|
-
it('should be an array', function(){
|
|
273
|
-
expect(domains).to.be.a('array');
|
|
274
|
-
});
|
|
275
|
-
it('should have at least one domain', function(){
|
|
276
|
-
expect(domains).to.have.length.above(0);
|
|
277
|
-
});
|
|
278
|
-
it('should be in alphabetical order', function(){
|
|
279
|
-
expect(domains).to.be.sorted();
|
|
280
|
-
});
|
|
281
|
-
it('should not have duplicates', function(){
|
|
282
|
-
expect(domains).to.deep.equal(_.uniq(domains));
|
|
283
|
-
});
|
|
284
|
-
it('should be lowercase', function(){
|
|
285
|
-
expect(domains).to.be.all.lowercase;
|
|
286
|
-
});
|
|
287
|
-
it('should be a valid domain', function(){
|
|
288
|
-
expect(domains).to.be.all.isFQDN;
|
|
289
|
-
});
|
|
290
|
-
it('should not be a wildcard domain', function(){
|
|
291
|
-
expect(domains).to.be.all.notInWildcard;
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
</test/index.js>
|
|
295
|
-
|
|
296
|
-
<test/wildcard.js>
|
|
297
|
-
const _ = require('lodash');
|
|
298
|
-
const domains = require('../wildcard');
|
|
299
|
-
const chai = require('chai');
|
|
300
|
-
const expect = chai.expect;
|
|
301
|
-
|
|
302
|
-
chai.use(require("chai-sorted"));
|
|
303
|
-
chai.use(require('./helpers/lowercase'));
|
|
304
|
-
chai.use(require('./helpers/isFQDN'));
|
|
305
|
-
|
|
306
|
-
describe('Wildcard domains', function(){
|
|
307
|
-
it('should be an array', function(){
|
|
308
|
-
expect(domains).to.be.a('array');
|
|
309
|
-
});
|
|
310
|
-
it('should have at least one domain', function(){
|
|
311
|
-
expect(domains).to.have.length.above(0);
|
|
312
|
-
});
|
|
313
|
-
it('should be in alphabetical order', function(){
|
|
314
|
-
expect(domains).to.be.sorted();
|
|
315
|
-
});
|
|
316
|
-
it('should not have duplicates', function(){
|
|
317
|
-
expect(domains).to.deep.equal(_.uniq(domains));
|
|
318
|
-
});
|
|
319
|
-
it('should be lowercase', function(){
|
|
320
|
-
expect(domains).to.be.all.lowercase;
|
|
321
|
-
});
|
|
322
|
-
it('should be a valid domain', function(){
|
|
323
|
-
expect(domains).to.be.all.isFQDN;
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
</test/wildcard.js>
|
|
327
|
-
|
|
328
|
-
<wildcard.js>
|
|
329
|
-
/**
|
|
330
|
-
* Expose the wildcard disposable domains.
|
|
331
|
-
*/
|
|
332
|
-
|
|
333
|
-
module.exports = require('./wildcard.json');
|
|
334
|
-
</wildcard.js>
|
|
335
|
-
|