diff --git a/src/chrome/content/rules/Adk2.xml b/src/chrome/content/rules/Adk2.xml index 73d62b51d56e..5b965923439c 100644 --- a/src/chrome/content/rules/Adk2.xml +++ b/src/chrome/content/rules/Adk2.xml @@ -36,6 +36,6 @@ Fetch error: http://adk2.com/ => https://adk2.com/: (60, 'SSL certificate proble + to="https://cdn.adk2.com/" /> diff --git a/src/chrome/content/rules/Adspdbl.com.xml b/src/chrome/content/rules/Adspdbl.com.xml index 5b35b381bbc4..f5cde3f06f21 100644 --- a/src/chrome/content/rules/Adspdbl.com.xml +++ b/src/chrome/content/rules/Adspdbl.com.xml @@ -17,7 +17,6 @@ - + diff --git a/src/chrome/content/rules/Altex.ro.xml b/src/chrome/content/rules/Altex.ro.xml index 46b9bc00cd10..ffe531a703d8 100644 --- a/src/chrome/content/rules/Altex.ro.xml +++ b/src/chrome/content/rules/Altex.ro.xml @@ -55,10 +55,6 @@ Fetch error: http://cdn.altex.ro/ => https://d2qpxedcu5ji30.cloudfront.net/: (28 - - - + diff --git a/src/chrome/content/rules/CKSource.com.xml b/src/chrome/content/rules/CKSource.com.xml index 1e0dd092c171..7a6b777f43ce 100644 --- a/src/chrome/content/rules/CKSource.com.xml +++ b/src/chrome/content/rules/CKSource.com.xml @@ -53,10 +53,6 @@ - - - diff --git a/src/chrome/content/rules/Circle_of_Moms.xml b/src/chrome/content/rules/Circle_of_Moms.xml index 5ee1c0813676..87ace5b26574 100644 --- a/src/chrome/content/rules/Circle_of_Moms.xml +++ b/src/chrome/content/rules/Circle_of_Moms.xml @@ -30,9 +30,9 @@ Fetch error: http://circleofmoms.com/ => https://www.circleofmoms.com/: Cycle de to="https://www.circleofmoms.com/" /> + to="https://imagelib4.circleofmoms.com/" /> + to="https://images3.circleofmoms.com/" /> diff --git a/src/chrome/content/rules/CmCDN.net.xml b/src/chrome/content/rules/CmCDN.net.xml index a5e59ef2c16c..7357663eb18c 100644 --- a/src/chrome/content/rules/CmCDN.net.xml +++ b/src/chrome/content/rules/CmCDN.net.xml @@ -33,7 +33,7 @@ Fetch error: http://s.cmcdn.net/ => https://d1gyuuidj3lauh.cloudfront.net/: (6, + to="https://media.cmcdn.net/" /> diff --git a/src/chrome/content/rules/ComiXology.com.xml b/src/chrome/content/rules/ComiXology.com.xml index 4c013ff0572b..ecd09546deb0 100644 --- a/src/chrome/content/rules/ComiXology.com.xml +++ b/src/chrome/content/rules/ComiXology.com.xml @@ -86,9 +86,6 @@ - - diff --git a/src/chrome/content/rules/Conde_Nast.co.uk.xml b/src/chrome/content/rules/Conde_Nast.co.uk.xml index 2c039465d217..5dbfefdd9a59 100644 --- a/src/chrome/content/rules/Conde_Nast.co.uk.xml +++ b/src/chrome/content/rules/Conde_Nast.co.uk.xml @@ -11,14 +11,8 @@ - cnda.condenast.co.uk - - dvcpqzrjfwvhx.cloudfront.net - - - cdni.condenast.co.uk - - Problematic subdomains: - - cdni.condenast.co.uk (mismatched, 403 when rewritten to dvcpqzrjfwvhx.cloudfront.net) - cnda.condenast.co.uk (mismatched, CN: *.cloudfront.net) --> @@ -26,14 +20,8 @@ - - - - - + diff --git a/src/chrome/content/rules/Customersaas.com.xml b/src/chrome/content/rules/Customersaas.com.xml index 44b80e8d0496..b8bb88286fb4 100644 --- a/src/chrome/content/rules/Customersaas.com.xml +++ b/src/chrome/content/rules/Customersaas.com.xml @@ -14,13 +14,10 @@ --> - + + - - - + diff --git a/src/chrome/content/rules/Cxt.ms.xml b/src/chrome/content/rules/Cxt.ms.xml index 9e72e1cd24d7..03f0b92dd78e 100644 --- a/src/chrome/content/rules/Cxt.ms.xml +++ b/src/chrome/content/rules/Cxt.ms.xml @@ -8,13 +8,10 @@ --> - + + - - - + \ No newline at end of file diff --git a/src/chrome/content/rules/DealerRater.com.xml b/src/chrome/content/rules/DealerRater.com.xml index 1131ba584227..d0e5b38232bf 100644 --- a/src/chrome/content/rules/DealerRater.com.xml +++ b/src/chrome/content/rules/DealerRater.com.xml @@ -1,36 +1,15 @@ - + - - - - - - - - + + - + diff --git a/src/chrome/content/rules/Desk.com.xml b/src/chrome/content/rules/Desk.com.xml index 7d2f1609e949..4f1f31389701 100644 --- a/src/chrome/content/rules/Desk.com.xml +++ b/src/chrome/content/rules/Desk.com.xml @@ -73,7 +73,7 @@ Fetch error: http://assistly.com/ => https://assistly.com/: (51, "SSL: no altern to="https://d218iqt4mo6adh.cloudfront.net/" /> + to="https://webassets.desk.com/" /> + to="https://demo.idg.com.au/" /> diff --git a/src/chrome/content/rules/IT_Toolbox.com.xml b/src/chrome/content/rules/IT_Toolbox.com.xml index 7a1c86c218f6..4ef9f442ccfc 100644 --- a/src/chrome/content/rules/IT_Toolbox.com.xml +++ b/src/chrome/content/rules/IT_Toolbox.com.xml @@ -21,7 +21,8 @@ --> - + + - - - + diff --git a/src/chrome/content/rules/IndiaMART.xml b/src/chrome/content/rules/IndiaMART.xml index e7e4f56faba9..e9327d48def0 100644 --- a/src/chrome/content/rules/IndiaMART.xml +++ b/src/chrome/content/rules/IndiaMART.xml @@ -33,23 +33,13 @@ --> - + + + + - + - - - - - - - - - \ No newline at end of file + diff --git a/src/chrome/content/rules/InkFrog.com.xml b/src/chrome/content/rules/InkFrog.com.xml index 0bcfadc4ce8d..808e4843b960 100644 --- a/src/chrome/content/rules/InkFrog.com.xml +++ b/src/chrome/content/rules/InkFrog.com.xml @@ -16,7 +16,7 @@ - img ¹ - imgs ² - thmb ¹ - - thumbnails ² + - thumbnails (expired) ¹ Works, expired 2013-04-24 ² Cloudfront @@ -44,12 +44,7 @@ - - - + to="https://imgs.inkfrog.com/" /> diff --git a/src/chrome/content/rules/Internet_Video_Archive.com.xml b/src/chrome/content/rules/Internet_Video_Archive.com.xml index a424d17b8921..16e46bd06bb5 100644 --- a/src/chrome/content/rules/Internet_Video_Archive.com.xml +++ b/src/chrome/content/rules/Internet_Video_Archive.com.xml @@ -9,7 +9,6 @@ - + diff --git a/src/chrome/content/rules/Iono.fm.xml b/src/chrome/content/rules/Iono.fm.xml index 0f68dd55c5a7..a3df11cb2914 100644 --- a/src/chrome/content/rules/Iono.fm.xml +++ b/src/chrome/content/rules/Iono.fm.xml @@ -42,10 +42,6 @@ - - - + diff --git a/src/chrome/content/rules/Jawbone.com.xml b/src/chrome/content/rules/Jawbone.com.xml index b46be5103ec4..0ea3617a3706 100644 --- a/src/chrome/content/rules/Jawbone.com.xml +++ b/src/chrome/content/rules/Jawbone.com.xml @@ -9,6 +9,10 @@ - forums + Non-functional hosts: + Timeout: + - jawbone.com + Partially covered subdomains: @@ -47,7 +51,6 @@ --> - @@ -55,10 +58,10 @@ - + to="https://content.jawbone.com/" /> - \ No newline at end of file + diff --git a/src/chrome/content/rules/LesFurets.com.xml b/src/chrome/content/rules/LesFurets.com.xml index 529373e37953..92401787111e 100644 --- a/src/chrome/content/rules/LesFurets.com.xml +++ b/src/chrome/content/rules/LesFurets.com.xml @@ -16,7 +16,6 @@ - + diff --git a/src/chrome/content/rules/London_Review_of_Books.xml b/src/chrome/content/rules/London_Review_of_Books.xml index 1ed524173fdc..4a54d0665b34 100644 --- a/src/chrome/content/rules/London_Review_of_Books.xml +++ b/src/chrome/content/rules/London_Review_of_Books.xml @@ -25,6 +25,6 @@ to="https://www.lrb.co.uk/$1" /> + to="https://cdn.lrb.co.uk/" /> \ No newline at end of file diff --git a/src/chrome/content/rules/MESO-Rx.xml b/src/chrome/content/rules/MESO-Rx.xml index 27e830d48415..27a8ff9a4343 100644 --- a/src/chrome/content/rules/MESO-Rx.xml +++ b/src/chrome/content/rules/MESO-Rx.xml @@ -46,9 +46,6 @@ Non-2xx HTTP code: http://www.thinksteroids.com/ (200) => https://www.thinkstero - - diff --git a/src/chrome/content/rules/MailChimp.xml b/src/chrome/content/rules/MailChimp.xml index 17d2dc159ed2..1d91c415d91e 100644 --- a/src/chrome/content/rules/MailChimp.xml +++ b/src/chrome/content/rules/MailChimp.xml @@ -159,10 +159,6 @@ - - - + diff --git a/src/chrome/content/rules/Mass_Relevance.xml b/src/chrome/content/rules/Mass_Relevance.xml index 35a8681bb5ed..c70dd421690f 100644 --- a/src/chrome/content/rules/Mass_Relevance.xml +++ b/src/chrome/content/rules/Mass_Relevance.xml @@ -32,7 +32,7 @@ to="https://$1massrelevance.com/" /> + to="https://up.massrelevance.com/" /> diff --git a/src/chrome/content/rules/MediaMatters.org.xml b/src/chrome/content/rules/MediaMatters.org.xml index fd3d13156fed..543f31e17677 100644 --- a/src/chrome/content/rules/MediaMatters.org.xml +++ b/src/chrome/content/rules/MediaMatters.org.xml @@ -56,7 +56,7 @@ to="https://dnqv4na4axyak.cloudfront.net/static/" /> + to="https://cloudfront.mediamatters.org/" /> diff --git a/src/chrome/content/rules/MikroTik.com.xml b/src/chrome/content/rules/MikroTik.com.xml index 986405ec9c0f..b68be85faa59 100644 --- a/src/chrome/content/rules/MikroTik.com.xml +++ b/src/chrome/content/rules/MikroTik.com.xml @@ -71,13 +71,11 @@ - + - + diff --git a/src/chrome/content/rules/Minted.xml b/src/chrome/content/rules/Minted.xml index 3f67f5c64778..144a3e1a9a4d 100644 --- a/src/chrome/content/rules/Minted.xml +++ b/src/chrome/content/rules/Minted.xml @@ -60,12 +60,12 @@ to="https://www.minted.com/" /> + to="https://cdn3.minted.com/" /> + to="https://cdn4.minted.com/" /> + to="https://cdn5.minted.com/" /> \ No newline at end of file diff --git a/src/chrome/content/rules/Mobypicture.xml b/src/chrome/content/rules/Mobypicture.xml index 1b2053271bc2..07cf1990c7f1 100644 --- a/src/chrome/content/rules/Mobypicture.xml +++ b/src/chrome/content/rules/Mobypicture.xml @@ -96,6 +96,6 @@ Fetch error: http://mobypicture.com/ => https://mobypicture.com/: (60, 'SSL cert to="https://d3l076gtvxuom7.cloudfront.net/" /> + to="https://vid.mobypicture.com/" /> diff --git a/src/chrome/content/rules/No_Starch_Press.xml b/src/chrome/content/rules/No_Starch_Press.xml index 8f8300c1d3ad..a089369cf305 100644 --- a/src/chrome/content/rules/No_Starch_Press.xml +++ b/src/chrome/content/rules/No_Starch_Press.xml @@ -46,6 +46,6 @@ to="https://mail.google.com/a/nostarch.com" /> + to="https://media.nostarch.com/" /> diff --git a/src/chrome/content/rules/PBase.xml b/src/chrome/content/rules/PBase.xml index 06847d92144d..00a09b223f62 100644 --- a/src/chrome/content/rules/PBase.xml +++ b/src/chrome/content/rules/PBase.xml @@ -25,6 +25,6 @@ to="https://secure2.pbase.com/" /> + to="https://ap1.pbase.com/" /> diff --git a/src/chrome/content/rules/PC_Booster.xml b/src/chrome/content/rules/PC_Booster.xml index ed30e91907f1..711748a27371 100644 --- a/src/chrome/content/rules/PC_Booster.xml +++ b/src/chrome/content/rules/PC_Booster.xml @@ -19,6 +19,6 @@ to="https://$1pcbooster.com/" /> + to="https://files.pcbooster.com/" /> diff --git a/src/chrome/content/rules/PRX.xml b/src/chrome/content/rules/PRX.xml index 086fc3f07882..0aae40d31e6d 100644 --- a/src/chrome/content/rules/PRX.xml +++ b/src/chrome/content/rules/PRX.xml @@ -28,6 +28,6 @@ to="https://$1prx.org/" /> + to="https://assets1.prx.org/" /> diff --git a/src/chrome/content/rules/PSX-Extreme.xml b/src/chrome/content/rules/PSX-Extreme.xml index 6566219e071f..68c7e2923cf2 100644 --- a/src/chrome/content/rules/PSX-Extreme.xml +++ b/src/chrome/content/rules/PSX-Extreme.xml @@ -10,7 +10,6 @@ - + diff --git a/src/chrome/content/rules/Piriform.xml b/src/chrome/content/rules/Piriform.xml index 1a5737991308..cf440587fab8 100644 --- a/src/chrome/content/rules/Piriform.xml +++ b/src/chrome/content/rules/Piriform.xml @@ -73,13 +73,13 @@ + to="https://s1.pir.fm/" /> + to="https://download.piriform.com/" /> diff --git a/src/chrome/content/rules/ResellerRatings.xml b/src/chrome/content/rules/ResellerRatings.xml index 4a28940752e3..f7b132c80765 100644 --- a/src/chrome/content/rules/ResellerRatings.xml +++ b/src/chrome/content/rules/ResellerRatings.xml @@ -48,6 +48,6 @@ Fetch error: http://resellerratings.com/ => https://resellerratings.com/: (60, ' to="https://d3cb52u6zfmv02.cloudfront.net/" /> + to="https://images.resellerratings.com/" /> diff --git a/src/chrome/content/rules/RightScale.com.xml b/src/chrome/content/rules/RightScale.com.xml index 0767e6e9e10b..89c07f96703b 100644 --- a/src/chrome/content/rules/RightScale.com.xml +++ b/src/chrome/content/rules/RightScale.com.xml @@ -5,6 +5,11 @@ - assets + Non-functional hosts: + Self-signed certificate: + - forums.rightscale.com + - www.forums.rightscale.com + Fully covered subdomains: @@ -31,18 +36,18 @@ --> + - + + + + - - - + diff --git a/src/chrome/content/rules/Rovio.com.xml b/src/chrome/content/rules/Rovio.com.xml index fceceeb839b0..a737aaf3aa47 100644 --- a/src/chrome/content/rules/Rovio.com.xml +++ b/src/chrome/content/rules/Rovio.com.xml @@ -64,9 +64,6 @@ - - + to="https://cdn.smfboards.com/" /> diff --git a/src/chrome/content/rules/Sailthru.xml b/src/chrome/content/rules/Sailthru.xml index df92a978c667..954e12a8894c 100644 --- a/src/chrome/content/rules/Sailthru.xml +++ b/src/chrome/content/rules/Sailthru.xml @@ -111,9 +111,6 @@ Fetch error: http://me.sailthru.com/ => https://www.sailthru.com/: Too many redi - - diff --git a/src/chrome/content/rules/Scoop.it.xml b/src/chrome/content/rules/Scoop.it.xml index 42519c6a0c2c..a5fbb315c05f 100644 --- a/src/chrome/content/rules/Scoop.it.xml +++ b/src/chrome/content/rules/Scoop.it.xml @@ -30,6 +30,6 @@ to="https://www.scoop.it/$1" /> + to="https://img.scoop.it/" /> \ No newline at end of file diff --git a/src/chrome/content/rules/ShareASale.com.xml b/src/chrome/content/rules/ShareASale.com.xml index 26f7ce02da18..29e1c276f48c 100644 --- a/src/chrome/content/rules/ShareASale.com.xml +++ b/src/chrome/content/rules/ShareASale.com.xml @@ -48,10 +48,6 @@ - - - + diff --git a/src/chrome/content/rules/Shmoop.com.xml b/src/chrome/content/rules/Shmoop.com.xml index db934ea84b91..3ace8a775a90 100644 --- a/src/chrome/content/rules/Shmoop.com.xml +++ b/src/chrome/content/rules/Shmoop.com.xml @@ -23,6 +23,6 @@ to="https://www.shmoop.com/" /> + to="https://media1.shmoop.com/" /> diff --git a/src/chrome/content/rules/Showcase.ca.xml b/src/chrome/content/rules/Showcase.ca.xml index de456e96c907..91efaebf58d3 100644 --- a/src/chrome/content/rules/Showcase.ca.xml +++ b/src/chrome/content/rules/Showcase.ca.xml @@ -60,7 +60,6 @@ - + diff --git a/src/chrome/content/rules/Smdg.ca.xml b/src/chrome/content/rules/Smdg.ca.xml index 99b3b72c910f..c2ba73160ffa 100644 --- a/src/chrome/content/rules/Smdg.ca.xml +++ b/src/chrome/content/rules/Smdg.ca.xml @@ -14,7 +14,6 @@ - + diff --git a/src/chrome/content/rules/SodaHead.com.xml b/src/chrome/content/rules/SodaHead.com.xml index fe3abd9cc029..9f54451dee9c 100644 --- a/src/chrome/content/rules/SodaHead.com.xml +++ b/src/chrome/content/rules/SodaHead.com.xml @@ -32,7 +32,7 @@ Fetch error: http://sodahead.com/ => https://sodahead.com/: (51, "SSL: no altern to="https://$1sodahead.com/" /> + to="https://images.sodahead.com/" /> diff --git a/src/chrome/content/rules/Sussan.com.au.xml b/src/chrome/content/rules/Sussan.com.au.xml index edc5516d448c..7e4a45c96e8d 100644 --- a/src/chrome/content/rules/Sussan.com.au.xml +++ b/src/chrome/content/rules/Sussan.com.au.xml @@ -38,12 +38,10 @@ - + - + diff --git a/src/chrome/content/rules/TechWeb.xml b/src/chrome/content/rules/TechWeb.xml index 90f433b88fba..aa7c9eb35be7 100644 --- a/src/chrome/content/rules/TechWeb.xml +++ b/src/chrome/content/rules/TechWeb.xml @@ -65,7 +65,7 @@ Fetch error: http://techwebonlineevents.com/ => https://www.techwebonlineevents. + to="https://img.lightreading.com/" /> diff --git a/src/chrome/content/rules/TheResumator.com.xml b/src/chrome/content/rules/TheResumator.com.xml index 776581d39ffa..ee7a38ee52ea 100644 --- a/src/chrome/content/rules/TheResumator.com.xml +++ b/src/chrome/content/rules/TheResumator.com.xml @@ -21,7 +21,7 @@ to="https://$1theresumator.com/" /> + to="https://assets.theresumator.com/" /> diff --git a/src/chrome/content/rules/Thesn.net.xml b/src/chrome/content/rules/Thesn.net.xml index 75396253ffde..142f81e96558 100644 --- a/src/chrome/content/rules/Thesn.net.xml +++ b/src/chrome/content/rules/Thesn.net.xml @@ -14,7 +14,6 @@ - + diff --git a/src/chrome/content/rules/TrialPay.xml b/src/chrome/content/rules/TrialPay.xml index b920d4ab0ec6..50d796d3fcbc 100644 --- a/src/chrome/content/rules/TrialPay.xml +++ b/src/chrome/content/rules/TrialPay.xml @@ -23,6 +23,6 @@ to="https://www.trialpay.com/" /> + to="https://assets.trialpay.com/" /> diff --git a/src/chrome/content/rules/TurboSquid.xml b/src/chrome/content/rules/TurboSquid.xml index 489e8972c607..915658634a69 100644 --- a/src/chrome/content/rules/TurboSquid.xml +++ b/src/chrome/content/rules/TurboSquid.xml @@ -20,6 +20,6 @@ Fetch error: http://turbosquid.com/ => https://turbosquid.com/: Cycle detected - to="https://$1turbosquid.com/" /> + to="https://sitefiles.turbosquid.com/" /> diff --git a/src/chrome/content/rules/Vid.ly.xml b/src/chrome/content/rules/Vid.ly.xml index 4e1704191f32..3fcb6225729c 100644 --- a/src/chrome/content/rules/Vid.ly.xml +++ b/src/chrome/content/rules/Vid.ly.xml @@ -34,9 +34,9 @@ to="https://$1vid.ly/" /> + to="https://cf.cdn.vid.ly/" /> + to="https://s.vid.ly/" /> diff --git a/src/chrome/content/rules/Visitestonia.com.xml b/src/chrome/content/rules/Visitestonia.com.xml index 290b77d3b8e1..5da6b6a6cab7 100644 --- a/src/chrome/content/rules/Visitestonia.com.xml +++ b/src/chrome/content/rules/Visitestonia.com.xml @@ -48,7 +48,7 @@ to="https://$1visitestonia.com/" /> + to="https://cache.visitestonia.com/" /> diff --git a/src/chrome/content/rules/Whiskey-Media.xml b/src/chrome/content/rules/Whiskey-Media.xml index f69887479bdc..df02cb5ac1f8 100644 --- a/src/chrome/content/rules/Whiskey-Media.xml +++ b/src/chrome/content/rules/Whiskey-Media.xml @@ -41,6 +41,6 @@ Fetch error: http://media.corp.whiskeymedia.com/ => https://s3.amazonaws.com/med to="https://s3.amazonaws.com/media.$1.com/" /> + to="https://files.tested.com/" /> diff --git a/src/chrome/content/rules/Xignite.xml b/src/chrome/content/rules/Xignite.xml index 69eaff27283b..810fc91d20cd 100644 --- a/src/chrome/content/rules/Xignite.xml +++ b/src/chrome/content/rules/Xignite.xml @@ -64,10 +64,6 @@ - - - + diff --git a/src/chrome/content/rules/ZDbb.net.xml b/src/chrome/content/rules/ZDbb.net.xml index 019e6a2a453a..69ab3479a002 100644 --- a/src/chrome/content/rules/ZDbb.net.xml +++ b/src/chrome/content/rules/ZDbb.net.xml @@ -29,10 +29,6 @@ - - - + diff --git a/src/chrome/content/rules/lightreading.com.xml b/src/chrome/content/rules/lightreading.com.xml index 94184d3b1c99..020b9d9ad0de 100644 --- a/src/chrome/content/rules/lightreading.com.xml +++ b/src/chrome/content/rules/lightreading.com.xml @@ -68,12 +68,10 @@ - + - + diff --git a/src/chrome/content/rules/scmagazine.com.xml b/src/chrome/content/rules/scmagazine.com.xml index ed2d41a37466..da18871b72a7 100644 --- a/src/chrome/content/rules/scmagazine.com.xml +++ b/src/chrome/content/rules/scmagazine.com.xml @@ -59,9 +59,6 @@ - - { + switch(level) { + case 'WARN': + console.warn(chalk.yellow(`[${level}]: ${chalk.bold(filename)}: ${message}`)); + break; + case 'INFO': + console.info(chalk.green(`[${level}]: ${chalk.bold(filename)}: ${message}`)); + break; + case 'FAIL': + default: + console.error(chalk.red(`[${level}]: ${chalk.bold(filename)}: ${message}`)); + break; + } +} + +const supportedCDNsRegexs = [ + { // Cloudfront.net + fromRe: /^\^http(?:s\?)?:\/\/((([\\a-z0-9äö_-]+)\.)*([\\a-z0-9äö-]+))\/$/, + toRe: /^https:\/\/\w+\.cloudfront\.net\/$/, + }, + { // 2o7.net + fromRe: /^\^http(?:s\?)?:\/\/((([\\a-z0-9äö_-]+)\.)*([\\a-z0-9äö-]+))\/$/, + toRe: /^https:\/\/[\w-]+\.122\.2o7\.net\/$/, + }, + { // amazonaws.com + fromRe: /^\^http(?:s\?)?:\/\/((([\\a-z0-9äö_-]+)\.)*([\\a-z0-9äö-]+))\/$/, + toRe: /^https:\/\/s3\.amazonaws\.com\//, + } +] + +const escapeRegExp = (str) => { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); +} + +const isSecureConnectionOkay = (host) => { + // FIXME: terrible performance... + let response = request('GET', `https://${host}/`, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0' + }, + timeout: 3000, + socketTimeout: 3000, + maxRedirects: 5, + }); + if (response) { + return true; + } else { + return false; + } +} + +const trivializeGenericRewrites = async (fstat, content, rules) => { + return new Promise((resolve, reject) => { + let rewrittenAtLeastOnce = false; + let originalContent = content; + + for (const rule of rules) { + for (const supportedCDNsRegex of supportedCDNsRegexs) { + if (supportedCDNsRegex.fromRe.test(rule.from) && supportedCDNsRegex.toRe.test(rule.to)) { + let host = rule.from.replace(supportedCDNsRegex.fromRe, '$1').replace(/\\\./g, '.'); + + if (host !== null && isSecureConnectionOkay(host)) { + // TODO: replace rule here... + const ruleRe = `\n([\t ]*)[\t ]*\n`; + const ruleRegex = new RegExp(ruleRe, 'g'); + + if (ruleRegex.test(content)) { + content = content.replace(ruleRegex, `\n$1\n`) + if (originalContent != content) { + rewrittenAtLeastOnce = true; + } + } + break; + } + } + } + } + + if (rewrittenAtLeastOnce) { + try { + fs.writeFileSync(fstat.fullname, content, { encoding: 'utf8' }); + resolve(rewrittenAtLeastOnce); + } catch (error) { + reject(error); + } + } else { + resolve(rewrittenAtLeastOnce); + } + }); +} + +const trivializeCDNRewrites = async (fstat) => { + return new Promise((resolve, reject) => { + (async () => { // async wrapper for await keyword... + let content = await readFile(fstat.fullname, { encoding: 'utf8' }).catch(error => reject(error)); + let $ = await parseXML(content).catch(error => reject(error)); + let rules = $.ruleset.rule.map(rule => rule.$); + let rewrittenAtLeastOnce = false; + + await trivializeGenericRewrites(fstat, content, rules) + .then(rewritten => { + if (rewritten) { + rewrittenAtLeastOnce = true; + } + }) + .catch(error => { + reject(error); + }) + + // TODO: Add support for more CDNs + resolve(rewrittenAtLeastOnce); + })(); + }) +} + +(async () => { + await readdir(rulesDir) + .then(filenames => { + return filenames.filter(filename => filename.endsWith('.xml')); + }) + .then(filenames => { + return filenames.map(filename => ({ + fullname: path.join(rulesDir, filename), + filename + })) + }) + .then(async (fstats) => { + return Promise.all(fstats.map(fstat => { + return trivializeCDNRewrites(fstat) + .then(rewritten => { + if (rewritten) { + log('INFO', fstat.filename, 'trivialized') + } + }) + .catch(error => { + log('FAIL', fstat.filename, error); + }) + })) + }) + .catch(error => { + log('FAIL', "::Promise.all::", error); + }) +})(); diff --git a/utils/trivialize-cdn-rules/package-lock.json b/utils/trivialize-cdn-rules/package-lock.json new file mode 100644 index 000000000000..67e15744d176 --- /dev/null +++ b/utils/trivialize-cdn-rules/package-lock.json @@ -0,0 +1,586 @@ +{ + "name": "trivialize-cdn-rules", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "9.6.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.23.tgz", + "integrity": "sha512-d2SJJpwkiPudEQ3+9ysANN2Nvz4QJKUPoe/WL5zyQzI0RaEeZWH5K5xjvUIGszTItHQpFPdH+u51f6G/LkS8Cg==" + }, + "@types/qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-mNhVdZHdtKHMMxbqzNK3RzkBcN1cux3AvuCYGTvjEIQT2uheH3eCAyYsbMbh2Bq8nXkeOWs1kyDiF7geWRFQ4Q==" + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "http-basic": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-7.0.0.tgz", + "integrity": "sha1-gvClBr6UJzLsje6+6A50bvVzbbo=", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/node": "^9.4.1", + "caseless": "~0.12.0", + "concat-stream": "^1.4.6", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.1.tgz", + "integrity": "sha512-6L0Fkd6TozA8kFSfh9Widst0wfza3U1Ex2RjJ6zNDK0vR1U1auUR6jY4Nn2Xl7CCy0ikFmxW1XcspVpb9RvwTg==", + "requires": { + "@types/node": "^9.3.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "~1.33.0" + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "promise": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.1.tgz", + "integrity": "sha1-5F1osAoXZHttpxG/he1u1HII9FA=", + "requires": { + "asap": "~2.0.3" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "sync-request": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.0.0.tgz", + "integrity": "sha512-jGNIAlCi9iU4X3Dm4oQnNQshDD3h0/1A7r79LyqjbjUnj69sX6mShAXlhRXgImsfVKtTcnra1jfzabdZvp+Lmw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.4.tgz", + "integrity": "sha512-Iug+t1ICVFenUcTnDu8WXFnT+k8IVoLKGh8VA3eXUtl2Rt9SjKX3YEv33OenABqpTPL9QEaHv1+CNn2LK8vMow==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.0.tgz", + "integrity": "sha512-xA+7uEMc+jsQIoyySJ93Ad08Kuqnik7u6jLS5hR91Z3smAoCfL3M8/MqMlobAa9gzBfO9pA88A/AntfepkkMJQ==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^7.0.0", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", + "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" + } + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "requires": { + "punycode": "^1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + } + } +} diff --git a/utils/trivialize-cdn-rules/package.json b/utils/trivialize-cdn-rules/package.json new file mode 100644 index 000000000000..26d7d48be5d2 --- /dev/null +++ b/utils/trivialize-cdn-rules/package.json @@ -0,0 +1,20 @@ +{ + "name": "trivialize-cdn-rules", + "version": "1.0.0", + "main": "index.js", + "dependencies": { + "graceful-fs": "^4.1.11", + "request": "^2.87.0", + "sync-request": "^6.0.0", + "xml2js": "^0.4.19" + }, + "devDependencies": { + "chalk": "^2.4.1" + }, + "scripts": { + "start": "node index.js" + }, + "keywords": [], + "author": "Chan Chak Shing", + "description": "" +}