File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed
Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ var argParser = require('yargs')
4343 alias : 'url' ,
4444 default : '{{host}}/{{domain}}/v1/page/html/{title}/{oldid}'
4545 } )
46+ . options ( 'n' , {
47+ alias : 'noCache' ,
48+ default : false
49+ } )
4650 //.default('apiURL', 'http://en.wikipedia.org/w/api.php')
4751 //.default('prefix', 'en.wikipedia.org')
4852 //.default('ns', '0')
Original file line number Diff line number Diff line change 11"use strict" ;
2- // Upgrade to es6
3- require ( 'core-js/shim' ) ;
42
53var P = require ( 'bluebird' ) ;
64var Template = require ( 'swagger-router' ) . Template ;
@@ -218,7 +216,8 @@ function makeDump (options) {
218216 uri : options . url ,
219217 headers : {
220218 'user-agent' : options . userAgent ,
221- 'accept-encoding' : 'gzip'
219+ 'accept-encoding' : 'gzip' ,
220+ 'cache-control' : options . noCache ? 'no-cache' : undefined
222221 } ,
223222 retries : 5 ,
224223 timeout : 60000 ,
Original file line number Diff line number Diff line change 11{
22 "name" : " htmldump" ,
3- "version" : " 0.1.2 " ,
3+ "version" : " 0.1.3 " ,
44 "description" : " Parsoid HTML dump utility" ,
55 "scripts" : {
66 "test" : " echo \" Error: no test specified\" && exit 1"
1414 "url" : " github.com/wikimedia/htmldumper"
1515 },
1616 "author" : " Gabriel Wicke <gwicke@wikimedia.org>" ,
17- "license" : " Apache2 " ,
17+ "license" : " Apache-2.0 " ,
1818 "bugs" : {
1919 "url" : " https://github.com/wikimedia/htmldumper/issues"
2020 },
2121 "dependencies" : {
22- "bluebird" : " ~2.3.11" ,
23- "core-js" : " ^1.0.0" ,
24- "preq" : " ~0.3.1" ,
25- "sqlite3" : " ^3.0.5" ,
26- "swagger-router" : " ^0.5.6" ,
27- "yargs" : " ~1.2.1"
22+ "bluebird" : " ^3.5.2" ,
23+ "preq" : " ^0.5.6" ,
24+ "sqlite3" : " ^4.0.2" ,
25+ "swagger-router" : " ^0.7.1" ,
26+ "yargs" : " ^12.0.2"
2827 }
2928}
You can’t perform that action at this time.
0 commit comments