Commit e743717c authored by Nick Stenning's avatar Nick Stenning Committed by GitHub

Merge pull request #229 from hypothesis/package-content-server

Add an express server which serves the package's contents.
parents 5b836627 3782856c
...@@ -22,6 +22,7 @@ var through = require('through2'); ...@@ -22,6 +22,7 @@ var through = require('through2');
var createBundle = require('./scripts/gulp/create-bundle'); var createBundle = require('./scripts/gulp/create-bundle');
var manifest = require('./scripts/gulp/manifest'); var manifest = require('./scripts/gulp/manifest');
var servePackage = require('./scripts/gulp/serve-package');
var vendorBundles = require('./scripts/gulp/vendor-bundles'); var vendorBundles = require('./scripts/gulp/vendor-bundles');
var IS_PRODUCTION_BUILD = process.env.NODE_ENV === 'production'; var IS_PRODUCTION_BUILD = process.env.NODE_ENV === 'production';
...@@ -240,6 +241,19 @@ function triggerLiveReload(changedFiles) { ...@@ -240,6 +241,19 @@ function triggerLiveReload(changedFiles) {
debouncedLiveReload(); debouncedLiveReload();
} }
/**
* Return the hostname that should be used when generating URLs to the package
* content server.
*
* Customizing this can be useful when testing the client on different devices
* than the one the package content server is running on.
*/
function packageServerHostname() {
return process.env.PACKAGE_SERVER_HOSTNAME || 'localhost';
}
var isFirstBuild = true;
/** /**
* Generates the `build/boot.js` script which serves as the entry point for * Generates the `build/boot.js` script which serves as the entry point for
* the Hypothesis client. * the Hypothesis client.
...@@ -247,8 +261,29 @@ function triggerLiveReload(changedFiles) { ...@@ -247,8 +261,29 @@ function triggerLiveReload(changedFiles) {
* @param {Object} manifest - Manifest mapping asset paths to cache-busted URLs * @param {Object} manifest - Manifest mapping asset paths to cache-busted URLs
*/ */
function generateBootScript(manifest) { function generateBootScript(manifest) {
var { version } = require('./package.json');
var defaultSidebarAppUrl = process.env.H_SERVICE_URL ?
`${process.env.H_SERVICE_URL}/app.html` : 'https://hypothes.is/app.html';
var defaultAssetRoot;
if (process.env.NODE_ENV === 'production') {
defaultAssetRoot = `https://cdn.hypothes.is/hypothesis/${version}/`;
} else {
defaultAssetRoot = `http://${packageServerHostname()}:3001/hypothesis/${version}/`;
}
if (isFirstBuild) {
gulpUtil.log(`Sidebar app URL: ${defaultSidebarAppUrl}`);
gulpUtil.log(`Client asset root URL: ${defaultAssetRoot}`);
isFirstBuild = false;
}
gulp.src('build/scripts/boot.bundle.js') gulp.src('build/scripts/boot.bundle.js')
.pipe(replace('__MANIFEST__', JSON.stringify(manifest))) .pipe(replace('__MANIFEST__', JSON.stringify(manifest)))
.pipe(replace('__ASSET_ROOT__', defaultAssetRoot))
.pipe(replace('__SIDEBAR_APP_URL__', defaultSidebarAppUrl))
.pipe(rename('boot.js')) .pipe(rename('boot.js'))
.pipe(gulp.dest('build/')); .pipe(gulp.dest('build/'));
} }
...@@ -261,8 +296,6 @@ function generateManifest() { ...@@ -261,8 +296,6 @@ function generateManifest() {
gulp.src(MANIFEST_SOURCE_FILES) gulp.src(MANIFEST_SOURCE_FILES)
.pipe(manifest({name: 'manifest.json'})) .pipe(manifest({name: 'manifest.json'}))
.pipe(through.obj(function (file, enc, callback) { .pipe(through.obj(function (file, enc, callback) {
gulpUtil.log('Updated asset manifest');
// Trigger a reload of the client in the dev server at localhost:3000 // Trigger a reload of the client in the dev server at localhost:3000
var newManifest = JSON.parse(file.contents.toString()); var newManifest = JSON.parse(file.contents.toString());
var changed = changedAssets(prevManifest, newManifest); var changed = changedAssets(prevManifest, newManifest);
...@@ -286,9 +319,15 @@ gulp.task('watch-manifest', function () { ...@@ -286,9 +319,15 @@ gulp.task('watch-manifest', function () {
})); }));
}); });
gulp.task('start-live-reload-server', function () { gulp.task('serve-live-reload', ['serve-package'], function () {
var LiveReloadServer = require('./scripts/gulp/live-reload-server'); var LiveReloadServer = require('./scripts/gulp/live-reload-server');
liveReloadServer = new LiveReloadServer(3000, 'http://localhost:5000'); liveReloadServer = new LiveReloadServer(3000, {
clientUrl: `http://${packageServerHostname()}:3001/hypothesis`,
});
});
gulp.task('serve-package', function () {
servePackage(3001, packageServerHostname());
}); });
gulp.task('build', gulp.task('build',
...@@ -299,7 +338,8 @@ gulp.task('build', ...@@ -299,7 +338,8 @@ gulp.task('build',
generateManifest); generateManifest);
gulp.task('watch', gulp.task('watch',
['start-live-reload-server', ['serve-package',
'serve-live-reload',
'watch-js', 'watch-js',
'watch-css', 'watch-css',
'watch-fonts', 'watch-fonts',
......
...@@ -216,6 +216,12 @@ ...@@ -216,6 +216,12 @@
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz",
"dev": true "dev": true
}, },
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"dev": true
},
"array-index": { "array-index": {
"version": "1.0.0", "version": "1.0.0",
"from": "array-index@>=1.0.0 <2.0.0", "from": "array-index@>=1.0.0 <2.0.0",
...@@ -1306,6 +1312,12 @@ ...@@ -1306,6 +1312,12 @@
"resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
"dev": true "dev": true
}, },
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
"dev": true
},
"content-type": { "content-type": {
"version": "1.0.2", "version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0", "from": "content-type@>=1.0.2 <1.1.0",
...@@ -1318,6 +1330,18 @@ ...@@ -1318,6 +1330,18 @@
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.2.0.tgz", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.2.0.tgz",
"dev": true "dev": true
}, },
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
"dev": true
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"dev": true
},
"core-js": { "core-js": {
"version": "1.2.6", "version": "1.2.6",
"from": "core-js@>=1.2.5 <2.0.0", "from": "core-js@>=1.2.5 <2.0.0",
...@@ -1496,6 +1520,12 @@ ...@@ -1496,6 +1520,12 @@
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
"dev": true "dev": true
}, },
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"dev": true
},
"detect-indent": { "detect-indent": {
"version": "3.0.1", "version": "3.0.1",
"from": "detect-indent@>=3.0.0 <4.0.0", "from": "detect-indent@>=3.0.0 <4.0.0",
...@@ -1681,6 +1711,12 @@ ...@@ -1681,6 +1711,12 @@
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz",
"dev": true "dev": true
}, },
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
"dev": true
},
"end-of-stream": { "end-of-stream": {
"version": "1.1.0", "version": "1.1.0",
"from": "end-of-stream@>=1.1.0 <2.0.0", "from": "end-of-stream@>=1.1.0 <2.0.0",
...@@ -1936,6 +1972,12 @@ ...@@ -1936,6 +1972,12 @@
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"dev": true "dev": true
}, },
"etag": {
"version": "1.7.0",
"from": "etag@>=1.7.0 <1.8.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz",
"dev": true
},
"event-emitter": { "event-emitter": {
"version": "0.3.4", "version": "0.3.4",
"from": "event-emitter@>=0.3.4 <0.4.0", "from": "event-emitter@>=0.3.4 <0.4.0",
...@@ -2068,6 +2110,56 @@ ...@@ -2068,6 +2110,56 @@
} }
} }
}, },
"express": {
"version": "4.14.1",
"from": "express@latest",
"resolved": "https://registry.npmjs.org/express/-/express-4.14.1.tgz",
"dev": true,
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz",
"dev": true
},
"finalhandler": {
"version": "0.5.1",
"from": "finalhandler@0.5.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.1.tgz",
"dev": true
},
"mime-db": {
"version": "1.26.0",
"from": "mime-db@>=1.26.0 <1.27.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz",
"dev": true
},
"mime-types": {
"version": "2.1.14",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz",
"dev": true
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"dev": true
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
"dev": true
},
"type-is": {
"version": "1.6.14",
"from": "type-is@>=1.6.14 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz",
"dev": true
}
}
},
"extend": { "extend": {
"version": "2.0.1", "version": "2.0.1",
"from": "extend@>=2.0.0 <3.0.0", "from": "extend@>=2.0.0 <3.0.0",
...@@ -2110,210 +2202,1045 @@ ...@@ -2110,210 +2202,1045 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"dev": true "dev": true
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.0", "version": "0.5.0",
"from": "mkdirp@0.5.0", "from": "mkdirp@0.5.0",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
"dev": true
},
"readable-stream": {
"version": "2.0.6",
"from": "readable-stream@>=2.0.0 <2.1.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
"dev": true
}
}
},
"extsprintf": {
"version": "1.0.2",
"from": "extsprintf@1.0.2",
"resolved": "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
"dev": true
},
"falafel": {
"version": "1.2.0",
"from": "falafel@>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz",
"dev": true
},
"fancy-log": {
"version": "1.2.0",
"from": "fancy-log@>=1.1.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz",
"dev": true
},
"fast-levenshtein": {
"version": "1.1.3",
"from": "fast-levenshtein@>=1.1.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz",
"dev": true
},
"fd-slicer": {
"version": "1.0.1",
"from": "fd-slicer@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
"dev": true
},
"figures": {
"version": "1.7.0",
"from": "figures@>=1.3.5 <2.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
"dev": true,
"dependencies": {
"object-assign": {
"version": "4.1.0",
"from": "object-assign@>=4.1.0 <5.0.0",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz",
"dev": true
}
}
},
"file-entry-cache": {
"version": "1.3.1",
"from": "file-entry-cache@>=1.1.1 <2.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz",
"dev": true
},
"filename-regex": {
"version": "2.0.0",
"from": "filename-regex@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz",
"dev": true
},
"fill-keys": {
"version": "1.0.2",
"from": "fill-keys@>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
"dev": true
},
"fill-range": {
"version": "2.2.3",
"from": "fill-range@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
"dev": true
},
"finalhandler": {
"version": "0.4.1",
"from": "finalhandler@0.4.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.1.tgz",
"dev": true
},
"find-index": {
"version": "0.1.1",
"from": "find-index@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
"dev": true
},
"find-parent-dir": {
"version": "0.3.0",
"from": "find-parent-dir@>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz",
"dev": true
},
"find-root": {
"version": "0.1.2",
"from": "find-root@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz",
"dev": true
},
"find-up": {
"version": "1.1.2",
"from": "find-up@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"dev": true,
"dependencies": {
"path-exists": {
"version": "2.1.0",
"from": "path-exists@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"dev": true
}
}
},
"findup-sync": {
"version": "0.3.0",
"from": "findup-sync@>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
"dev": true
},
"first-chunk-stream": {
"version": "1.0.0",
"from": "first-chunk-stream@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"dev": true
},
"flagged-respawn": {
"version": "0.3.2",
"from": "flagged-respawn@>=0.3.2 <0.4.0",
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz",
"dev": true
},
"flat-cache": {
"version": "1.2.1",
"from": "flat-cache@>=1.2.1 <2.0.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz",
"dev": true
},
"for-in": {
"version": "0.1.5",
"from": "for-in@>=0.1.5 <0.2.0",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.5.tgz",
"dev": true
},
"for-own": {
"version": "0.1.4",
"from": "for-own@>=0.1.3 <0.2.0",
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz",
"dev": true
},
"foreach": {
"version": "2.0.5",
"from": "foreach@>=2.0.5 <3.0.0",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
"dev": true
},
"forever-agent": {
"version": "0.6.1",
"from": "forever-agent@>=0.6.1 <0.7.0",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"dev": true
},
"fork-stream": {
"version": "0.0.4",
"from": "fork-stream@>=0.0.4 <0.0.5",
"resolved": "https://registry.npmjs.org/fork-stream/-/fork-stream-0.0.4.tgz",
"dev": true
},
"form-data": {
"version": "1.0.0-rc4",
"from": "form-data@>=1.0.0-rc3 <1.1.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz",
"dev": true
},
"formatio": {
"version": "1.1.1",
"from": "formatio@1.1.1",
"resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz",
"dev": true
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz",
"dev": true
},
"fresh": {
"version": "0.3.0",
"from": "fresh@0.3.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz",
"dev": true
},
"fs-extra": {
"version": "0.26.7",
"from": "fs-extra@>=0.26.4 <0.27.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
"dev": true
},
"fs-readdir-recursive": {
"version": "0.1.2",
"from": "fs-readdir-recursive@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz",
"dev": true
},
"fs.realpath": {
"version": "1.0.0",
"from": "fs.realpath@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"dev": true
},
"fsevents": {
"version": "1.0.17",
"from": "fsevents@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.17.tgz",
"dev": true,
"optional": true,
"dependencies": {
"abbrev": {
"version": "1.0.9",
"from": "abbrev@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"dev": true,
"optional": true
},
"ansi-regex": {
"version": "2.0.0",
"from": "ansi-regex@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz",
"dev": true
},
"ansi-styles": {
"version": "2.2.1",
"from": "ansi-styles@>=2.2.1 <3.0.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"dev": true,
"optional": true
},
"aproba": {
"version": "1.0.4",
"from": "aproba@>=1.0.3 <2.0.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz",
"dev": true,
"optional": true
},
"are-we-there-yet": {
"version": "1.1.2",
"from": "are-we-there-yet@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz",
"dev": true,
"optional": true
},
"asn1": {
"version": "0.2.3",
"from": "asn1@>=0.2.3 <0.3.0",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
"dev": true,
"optional": true
},
"assert-plus": {
"version": "0.2.0",
"from": "assert-plus@>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
"dev": true,
"optional": true
},
"asynckit": {
"version": "0.4.0",
"from": "asynckit@>=0.4.0 <0.5.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"dev": true,
"optional": true
},
"aws-sign2": {
"version": "0.6.0",
"from": "aws-sign2@>=0.6.0 <0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
"dev": true,
"optional": true
},
"aws4": {
"version": "1.5.0",
"from": "aws4@>=1.2.1 <2.0.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz",
"dev": true,
"optional": true
},
"balanced-match": {
"version": "0.4.2",
"from": "balanced-match@>=0.4.1 <0.5.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
"dev": true
},
"bcrypt-pbkdf": {
"version": "1.0.0",
"from": "bcrypt-pbkdf@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz",
"dev": true,
"optional": true
},
"block-stream": {
"version": "0.0.9",
"from": "block-stream@*",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
"dev": true
},
"boom": {
"version": "2.10.1",
"from": "boom@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"dev": true
},
"brace-expansion": {
"version": "1.1.6",
"from": "brace-expansion@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
"dev": true
},
"buffer-shims": {
"version": "1.0.0",
"from": "buffer-shims@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
"dev": true
},
"caseless": {
"version": "0.11.0",
"from": "caseless@>=0.11.0 <0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
"dev": true,
"optional": true
},
"chalk": {
"version": "1.1.3",
"from": "chalk@>=1.1.1 <2.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"dev": true,
"optional": true,
"dependencies": {
"supports-color": {
"version": "2.0.0",
"from": "supports-color@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"dev": true,
"optional": true
}
}
},
"code-point-at": {
"version": "1.1.0",
"from": "code-point-at@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"dev": true
},
"combined-stream": {
"version": "1.0.5",
"from": "combined-stream@>=1.0.5 <1.1.0",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
"dev": true
},
"commander": {
"version": "2.9.0",
"from": "commander@>=2.9.0 <3.0.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"from": "concat-map@0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"from": "console-control-strings@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"dev": true
},
"core-util-is": {
"version": "1.0.2",
"from": "core-util-is@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"dev": true
},
"cryptiles": {
"version": "2.0.5",
"from": "cryptiles@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
"dev": true,
"optional": true
},
"dashdash": {
"version": "1.14.1",
"from": "dashdash@>=1.12.0 <2.0.0",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"dev": true,
"optional": true,
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"from": "assert-plus@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"dev": true,
"optional": true
}
}
},
"debug": {
"version": "2.2.0",
"from": "debug@>=2.2.0 <2.3.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"dev": true,
"optional": true
},
"deep-extend": {
"version": "0.4.1",
"from": "deep-extend@>=0.4.0 <0.5.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz",
"dev": true,
"optional": true
},
"delayed-stream": {
"version": "1.0.0",
"from": "delayed-stream@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"dev": true
},
"delegates": {
"version": "1.0.0",
"from": "delegates@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"dev": true,
"optional": true
},
"ecc-jsbn": {
"version": "0.1.1",
"from": "ecc-jsbn@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"dev": true,
"optional": true
},
"escape-string-regexp": {
"version": "1.0.5",
"from": "escape-string-regexp@>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"dev": true,
"optional": true
},
"extend": {
"version": "3.0.0",
"from": "extend@>=3.0.0 <3.1.0",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
"dev": true,
"optional": true
},
"extsprintf": {
"version": "1.0.2",
"from": "extsprintf@1.0.2",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
"dev": true
},
"forever-agent": {
"version": "0.6.1",
"from": "forever-agent@>=0.6.1 <0.7.0",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"dev": true,
"optional": true
},
"form-data": {
"version": "2.1.2",
"from": "form-data@>=2.1.1 <2.2.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz",
"dev": true,
"optional": true
},
"fs.realpath": {
"version": "1.0.0",
"from": "fs.realpath@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"dev": true
},
"fstream": {
"version": "1.0.10",
"from": "fstream@>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz",
"dev": true
},
"fstream-ignore": {
"version": "1.0.5",
"from": "fstream-ignore@>=1.0.5 <1.1.0",
"resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
"dev": true,
"optional": true
},
"gauge": {
"version": "2.7.2",
"from": "gauge@>=2.7.1 <2.8.0",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz",
"dev": true,
"optional": true
},
"generate-function": {
"version": "2.0.0",
"from": "generate-function@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
"dev": true,
"optional": true
},
"generate-object-property": {
"version": "1.2.0",
"from": "generate-object-property@>=1.1.0 <2.0.0",
"resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
"dev": true,
"optional": true
},
"getpass": {
"version": "0.1.6",
"from": "getpass@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz",
"dev": true,
"optional": true,
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"from": "assert-plus@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"dev": true,
"optional": true
}
}
},
"glob": {
"version": "7.1.1",
"from": "glob@>=7.0.5 <8.0.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
"dev": true
},
"graceful-fs": {
"version": "4.1.11",
"from": "graceful-fs@>=4.1.2 <5.0.0",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"dev": true
},
"graceful-readlink": {
"version": "1.0.1",
"from": "graceful-readlink@>=1.0.0",
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"dev": true,
"optional": true
},
"har-validator": {
"version": "2.0.6",
"from": "har-validator@>=2.0.6 <2.1.0",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
"dev": true,
"optional": true
},
"has-ansi": {
"version": "2.0.0",
"from": "has-ansi@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"dev": true,
"optional": true
},
"has-unicode": {
"version": "2.0.1",
"from": "has-unicode@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"dev": true,
"optional": true
},
"hawk": {
"version": "3.1.3",
"from": "hawk@>=3.1.3 <3.2.0",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
"dev": true,
"optional": true
},
"hoek": {
"version": "2.16.3",
"from": "hoek@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"dev": true
},
"http-signature": {
"version": "1.1.1",
"from": "http-signature@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
"dev": true,
"optional": true
},
"inflight": {
"version": "1.0.6",
"from": "inflight@>=1.0.4 <2.0.0",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"dev": true
},
"inherits": {
"version": "2.0.3",
"from": "inherits@>=2.0.1 <2.1.0",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"dev": true
},
"ini": {
"version": "1.3.4",
"from": "ini@>=1.3.0 <1.4.0",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"from": "is-fullwidth-code-point@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"dev": true
},
"is-my-json-valid": {
"version": "2.15.0",
"from": "is-my-json-valid@>=2.12.4 <3.0.0",
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz",
"dev": true,
"optional": true
},
"is-property": {
"version": "1.0.2",
"from": "is-property@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"dev": true,
"optional": true
},
"is-typedarray": {
"version": "1.0.0",
"from": "is-typedarray@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"dev": true,
"optional": true
},
"isarray": {
"version": "1.0.0",
"from": "isarray@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"dev": true
},
"isstream": {
"version": "0.1.2",
"from": "isstream@>=0.1.2 <0.2.0",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"dev": true,
"optional": true
},
"jodid25519": {
"version": "1.0.2",
"from": "jodid25519@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
"dev": true,
"optional": true
},
"jsbn": {
"version": "0.1.0",
"from": "jsbn@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz",
"dev": true,
"optional": true
},
"json-schema": {
"version": "0.2.3",
"from": "json-schema@0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"dev": true,
"optional": true
},
"json-stringify-safe": {
"version": "5.0.1",
"from": "json-stringify-safe@>=5.0.1 <5.1.0",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"dev": true,
"optional": true
},
"jsonpointer": {
"version": "4.0.1",
"from": "jsonpointer@>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
"dev": true,
"optional": true
},
"jsprim": {
"version": "1.3.1",
"from": "jsprim@>=1.2.2 <2.0.0",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz",
"dev": true,
"optional": true
},
"mime-db": {
"version": "1.25.0",
"from": "mime-db@>=1.25.0 <1.26.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz",
"dev": true
},
"mime-types": {
"version": "2.1.13",
"from": "mime-types@>=2.1.7 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz",
"dev": true
},
"minimatch": {
"version": "3.0.3",
"from": "minimatch@>=3.0.2 <4.0.0",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
"dev": true
},
"minimist": {
"version": "0.0.8",
"from": "minimist@0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"from": "mkdirp@>=0.5.1 <0.6.0",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"dev": true
},
"ms": {
"version": "0.7.1",
"from": "ms@0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"dev": true,
"optional": true
},
"node-pre-gyp": {
"version": "0.6.32",
"from": "node-pre-gyp@>=0.6.29 <0.7.0",
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz",
"dev": true,
"optional": true
},
"nopt": {
"version": "3.0.6",
"from": "nopt@>=3.0.6 <3.1.0",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"dev": true,
"optional": true
},
"npmlog": {
"version": "4.0.2",
"from": "npmlog@>=4.0.1 <5.0.0",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz",
"dev": true,
"optional": true
},
"number-is-nan": {
"version": "1.0.1",
"from": "number-is-nan@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"dev": true
},
"oauth-sign": {
"version": "0.8.2",
"from": "oauth-sign@>=0.8.1 <0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.0",
"from": "object-assign@>=4.1.0 <5.0.0",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz",
"dev": true,
"optional": true
},
"once": {
"version": "1.4.0",
"from": "once@>=1.3.0 <2.0.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"dev": true
},
"path-is-absolute": {
"version": "1.0.1",
"from": "path-is-absolute@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"dev": true
},
"pinkie": {
"version": "2.0.4",
"from": "pinkie@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"dev": true,
"optional": true
},
"pinkie-promise": {
"version": "2.0.1",
"from": "pinkie-promise@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"dev": true,
"optional": true
},
"process-nextick-args": {
"version": "1.0.7",
"from": "process-nextick-args@>=1.0.6 <1.1.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"dev": true
},
"punycode": {
"version": "1.4.1",
"from": "punycode@>=1.4.1 <2.0.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"dev": true,
"optional": true
},
"qs": {
"version": "6.3.0",
"from": "qs@>=6.3.0 <6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz",
"dev": true,
"optional": true
},
"rc": {
"version": "1.1.6",
"from": "rc@>=1.1.6 <1.2.0",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz",
"dev": true,
"optional": true,
"dependencies": {
"minimist": {
"version": "1.2.0",
"from": "minimist@>=1.2.0 <2.0.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"dev": true,
"optional": true
}
}
},
"readable-stream": {
"version": "2.2.2",
"from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz",
"dev": true,
"optional": true
},
"request": {
"version": "2.79.0",
"from": "request@>=2.79.0 <3.0.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
"dev": true,
"optional": true
},
"rimraf": {
"version": "2.5.4",
"from": "rimraf@>=2.5.4 <2.6.0",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz",
"dev": true
},
"semver": {
"version": "5.3.0",
"from": "semver@>=5.3.0 <5.4.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"dev": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
"from": "set-blocking@>=2.0.0 <2.1.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"dev": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
"from": "signal-exit@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"dev": true,
"optional": true
},
"sntp": {
"version": "1.0.9",
"from": "sntp@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
"dev": true,
"optional": true
},
"sshpk": {
"version": "1.10.1",
"from": "sshpk@>=1.7.0 <2.0.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz",
"dev": true,
"optional": true,
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"from": "assert-plus@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"dev": true,
"optional": true
}
}
},
"string_decoder": {
"version": "0.10.31",
"from": "string_decoder@>=0.10.0 <0.11.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"dev": true
},
"string-width": {
"version": "1.0.2",
"from": "string-width@>=1.0.1 <2.0.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"dev": true
},
"stringstream": {
"version": "0.0.5",
"from": "stringstream@>=0.0.4 <0.1.0",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
"dev": true,
"optional": true
},
"strip-ansi": {
"version": "3.0.1",
"from": "strip-ansi@>=3.0.1 <4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"dev": true
},
"strip-json-comments": {
"version": "1.0.4",
"from": "strip-json-comments@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
"dev": true,
"optional": true
},
"supports-color": {
"version": "0.2.0",
"from": "supports-color@>=0.2.0 <0.3.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz",
"dev": true,
"optional": true
},
"tar": {
"version": "2.2.1",
"from": "tar@>=2.2.1 <2.3.0",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"dev": true
},
"tar-pack": {
"version": "3.3.0",
"from": "tar-pack@>=3.3.0 <3.4.0",
"resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz",
"dev": true,
"optional": true,
"dependencies": {
"once": {
"version": "1.3.3",
"from": "once@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
"dev": true,
"optional": true
},
"readable-stream": {
"version": "2.1.5",
"from": "readable-stream@>=2.1.4 <2.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz",
"dev": true,
"optional": true
}
}
},
"tough-cookie": {
"version": "2.3.2",
"from": "tough-cookie@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
"dev": true,
"optional": true
},
"tunnel-agent": {
"version": "0.4.3",
"from": "tunnel-agent@>=0.4.1 <0.5.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
"dev": true,
"optional": true
},
"tweetnacl": {
"version": "0.14.5",
"from": "tweetnacl@>=0.14.0 <0.15.0",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"dev": true,
"optional": true
},
"uid-number": {
"version": "0.0.6",
"from": "uid-number@>=0.0.6 <0.1.0",
"resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz",
"dev": true,
"optional": true
},
"util-deprecate": {
"version": "1.0.2",
"from": "util-deprecate@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"dev": true "dev": true
}, },
"readable-stream": { "uuid": {
"version": "2.0.6", "version": "3.0.1",
"from": "readable-stream@>=2.0.0 <2.1.0", "from": "uuid@>=3.0.0 <4.0.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
"dev": true "dev": true,
} "optional": true
} },
}, "verror": {
"extsprintf": { "version": "1.3.6",
"version": "1.0.2", "from": "verror@1.3.6",
"from": "extsprintf@1.0.2", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
"resolved": "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", "dev": true,
"dev": true "optional": true
}, },
"falafel": { "wide-align": {
"version": "1.2.0", "version": "1.1.0",
"from": "falafel@>=1.0.1 <2.0.0", "from": "wide-align@>=1.1.0 <2.0.0",
"resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz",
"dev": true "dev": true,
}, "optional": true
"fancy-log": { },
"version": "1.2.0", "wrappy": {
"from": "fancy-log@>=1.1.0 <2.0.0", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz", "from": "wrappy@>=1.0.0 <2.0.0",
"dev": true "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
},
"fast-levenshtein": {
"version": "1.1.3",
"from": "fast-levenshtein@>=1.1.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.3.tgz",
"dev": true
},
"fd-slicer": {
"version": "1.0.1",
"from": "fd-slicer@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
"dev": true
},
"figures": {
"version": "1.7.0",
"from": "figures@>=1.3.5 <2.0.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
"dev": true,
"dependencies": {
"object-assign": {
"version": "4.1.0",
"from": "object-assign@>=4.1.0 <5.0.0",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz",
"dev": true
}
}
},
"file-entry-cache": {
"version": "1.3.1",
"from": "file-entry-cache@>=1.1.1 <2.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz",
"dev": true
},
"filename-regex": {
"version": "2.0.0",
"from": "filename-regex@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz",
"dev": true
},
"fill-keys": {
"version": "1.0.2",
"from": "fill-keys@>=1.0.2 <2.0.0",
"resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
"dev": true
},
"fill-range": {
"version": "2.2.3",
"from": "fill-range@>=2.1.0 <3.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
"dev": true
},
"finalhandler": {
"version": "0.4.1",
"from": "finalhandler@0.4.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.1.tgz",
"dev": true
},
"find-index": {
"version": "0.1.1",
"from": "find-index@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
"dev": true
},
"find-parent-dir": {
"version": "0.3.0",
"from": "find-parent-dir@>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz",
"dev": true
},
"find-root": {
"version": "0.1.2",
"from": "find-root@>=0.1.1 <0.2.0",
"resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz",
"dev": true
},
"find-up": {
"version": "1.1.2",
"from": "find-up@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"dev": true,
"dependencies": {
"path-exists": {
"version": "2.1.0",
"from": "path-exists@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"dev": true "dev": true
},
"xtend": {
"version": "4.0.1",
"from": "xtend@>=4.0.0 <5.0.0",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"dev": true,
"optional": true
} }
} }
}, },
"findup-sync": {
"version": "0.3.0",
"from": "findup-sync@>=0.3.0 <0.4.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
"dev": true
},
"first-chunk-stream": {
"version": "1.0.0",
"from": "first-chunk-stream@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
"dev": true
},
"flagged-respawn": {
"version": "0.3.2",
"from": "flagged-respawn@>=0.3.2 <0.4.0",
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz",
"dev": true
},
"flat-cache": {
"version": "1.2.1",
"from": "flat-cache@>=1.2.1 <2.0.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz",
"dev": true
},
"for-in": {
"version": "0.1.5",
"from": "for-in@>=0.1.5 <0.2.0",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.5.tgz",
"dev": true
},
"for-own": {
"version": "0.1.4",
"from": "for-own@>=0.1.3 <0.2.0",
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz",
"dev": true
},
"foreach": {
"version": "2.0.5",
"from": "foreach@>=2.0.5 <3.0.0",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
"dev": true
},
"forever-agent": {
"version": "0.6.1",
"from": "forever-agent@>=0.6.1 <0.7.0",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"dev": true
},
"fork-stream": {
"version": "0.0.4",
"from": "fork-stream@>=0.0.4 <0.0.5",
"resolved": "https://registry.npmjs.org/fork-stream/-/fork-stream-0.0.4.tgz",
"dev": true
},
"form-data": {
"version": "1.0.0-rc4",
"from": "form-data@>=1.0.0-rc3 <1.1.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz",
"dev": true
},
"formatio": {
"version": "1.1.1",
"from": "formatio@1.1.1",
"resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz",
"dev": true
},
"fs-extra": {
"version": "0.26.7",
"from": "fs-extra@>=0.26.4 <0.27.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
"dev": true
},
"fs-readdir-recursive": {
"version": "0.1.2",
"from": "fs-readdir-recursive@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz",
"dev": true
},
"fs.realpath": {
"version": "1.0.0",
"from": "fs.realpath@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"dev": true
},
"fstream": { "fstream": {
"version": "1.0.8", "version": "1.0.8",
"from": "fstream@>=1.0.0 <2.0.0", "from": "fstream@>=1.0.0 <2.0.0",
...@@ -2937,6 +3864,12 @@ ...@@ -2937,6 +3864,12 @@
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"dev": true "dev": true
}, },
"ipaddr.js": {
"version": "1.2.0",
"from": "ipaddr.js@1.2.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.2.0.tgz",
"dev": true
},
"is-absolute": { "is-absolute": {
"version": "0.1.7", "version": "0.1.7",
"from": "is-absolute@>=0.1.7 <0.2.0", "from": "is-absolute@>=0.1.7 <0.2.0",
...@@ -3829,6 +4762,12 @@ ...@@ -3829,6 +4762,12 @@
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.0.tgz",
"dev": true "dev": true
}, },
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"dev": true
},
"micromatch": { "micromatch": {
"version": "2.3.7", "version": "2.3.7",
"from": "micromatch@>=2.1.5 <3.0.0", "from": "micromatch@>=2.1.5 <3.0.0",
...@@ -4513,6 +5452,12 @@ ...@@ -4513,6 +5452,12 @@
"resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
"dev": true "dev": true
}, },
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"dev": true
},
"path-type": { "path-type": {
"version": "1.1.0", "version": "1.1.0",
"from": "path-type@>=1.0.0 <2.0.0", "from": "path-type@>=1.0.0 <2.0.0",
...@@ -4635,6 +5580,12 @@ ...@@ -4635,6 +5580,12 @@
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
"dev": true "dev": true
}, },
"proxy-addr": {
"version": "1.1.3",
"from": "proxy-addr@>=1.1.3 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.3.tgz",
"dev": true
},
"proxyquire": { "proxyquire": {
"version": "1.7.10", "version": "1.7.10",
"from": "proxyquire@latest", "from": "proxyquire@latest",
...@@ -4717,6 +5668,12 @@ ...@@ -4717,6 +5668,12 @@
"resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.4.tgz", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.1.4.tgz",
"dev": true "dev": true
}, },
"qs": {
"version": "6.2.0",
"from": "qs@6.2.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.2.0.tgz",
"dev": true
},
"query-string": { "query-string": {
"version": "3.0.3", "version": "3.0.3",
"from": "query-string@>=3.0.1 <4.0.0", "from": "query-string@>=3.0.1 <4.0.0",
...@@ -4753,6 +5710,12 @@ ...@@ -4753,6 +5710,12 @@
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz",
"dev": true "dev": true
}, },
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
"dev": true
},
"raven-js": { "raven-js": {
"version": "3.7.0", "version": "3.7.0",
"from": "raven-js@>=3.7.0 <4.0.0", "from": "raven-js@>=3.7.0 <4.0.0",
...@@ -5202,6 +6165,44 @@ ...@@ -5202,6 +6165,44 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
"dev": true "dev": true
}, },
"send": {
"version": "0.14.2",
"from": "send@0.14.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.14.2.tgz",
"dev": true,
"dependencies": {
"http-errors": {
"version": "1.5.1",
"from": "http-errors@>=1.5.1 <1.6.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz",
"dev": true
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"dev": true
},
"ms": {
"version": "0.7.2",
"from": "ms@0.7.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
"dev": true
},
"setprototypeof": {
"version": "1.0.2",
"from": "setprototypeof@1.0.2",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
"dev": true
},
"statuses": {
"version": "1.3.1",
"from": "statuses@~1.3.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
"dev": true
}
}
},
"sentence-case": { "sentence-case": {
"version": "1.1.3", "version": "1.1.3",
"from": "sentence-case@>=1.1.1 <2.0.0", "from": "sentence-case@>=1.1.1 <2.0.0",
...@@ -5214,6 +6215,12 @@ ...@@ -5214,6 +6215,12 @@
"resolved": "http://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", "resolved": "http://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz",
"dev": true "dev": true
}, },
"serve-static": {
"version": "1.11.2",
"from": "serve-static@>=1.11.2 <1.12.0",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.11.2.tgz",
"dev": true
},
"set-blocking": { "set-blocking": {
"version": "2.0.0", "version": "2.0.0",
"from": "set-blocking@>=2.0.0 <3.0.0", "from": "set-blocking@>=2.0.0 <3.0.0",
...@@ -6130,6 +7137,12 @@ ...@@ -6130,6 +7137,12 @@
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
"dev": true "dev": true
}, },
"vary": {
"version": "1.1.0",
"from": "vary@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.0.tgz",
"dev": true
},
"verror": { "verror": {
"version": "1.3.6", "version": "1.3.6",
"from": "verror@1.3.6", "from": "verror@1.3.6",
...@@ -6161,7 +7174,7 @@ ...@@ -6161,7 +7174,7 @@
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"natives": { "natives": {
"version": "1.10", "version": "1.10.0",
"from": "natives@>=1.1.0 <2.0.0", "from": "natives@>=1.1.0 <2.0.0",
"resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz",
"dev": true "dev": true
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
"eslint": "^3.0.1", "eslint": "^3.0.1",
"eslint-config-hypothesis": "^1.0.0", "eslint-config-hypothesis": "^1.0.0",
"exorcist": "^0.4.0", "exorcist": "^0.4.0",
"express": "^4.14.1",
"extend": "^2.0.0", "extend": "^2.0.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-batch": "^1.0.5", "gulp-batch": "^1.0.5",
......
...@@ -9,6 +9,11 @@ function changelogText() { ...@@ -9,6 +9,11 @@ function changelogText() {
return fs.readFileSync('./README.md', 'utf-8'); return fs.readFileSync('./README.md', 'utf-8');
} }
/**
* @typedef Config
* @property {string} clientUrl - The URL of the client's boot script
*/
/** /**
* An HTTP and WebSocket server which enables live reloading of the client. * An HTTP and WebSocket server which enables live reloading of the client.
* *
...@@ -18,12 +23,11 @@ function changelogText() { ...@@ -18,12 +23,11 @@ function changelogText() {
* the client to live-reload. * the client to live-reload.
* *
* @param {number} port - The port that the test server should listen on. * @param {number} port - The port that the test server should listen on.
* @param {string} appServer - The URL of the Hypothesis service to load * @param {Config} config - Config for the server
* the client from.
* *
* @constructor * @constructor
*/ */
function LiveReloadServer(port, appServer) { function LiveReloadServer(port, config) {
var connections = []; var connections = [];
function listen() { function listen() {
...@@ -60,7 +64,7 @@ function LiveReloadServer(port, appServer) { ...@@ -60,7 +64,7 @@ function LiveReloadServer(port, appServer) {
}); });
var embedScript = document.createElement('script'); var embedScript = document.createElement('script');
embedScript.src = '${appServer}/embed.js'.replace('localhost', appHost); embedScript.src = '${config.clientUrl}';
document.body.appendChild(embedScript); document.body.appendChild(embedScript);
</script> </script>
</body> </body>
......
'use strict';
var { readFileSync } = require('fs');
var express = require('express');
var { log } = require('gulp-util');
var { version } = require('../../package.json');
/**
* An express server which serves the contents of the package.
*
* The server mirrors the URL structure of cdn.hypothes.is, an S3-backed domain
* which serves the client's assets in production.
*
* When developing the client, the Hypothesis service should be configured to
* use the URL of this service as the client URL, so that the boot script is
* returned by the service's '/embed.js' route and included in the '/app.html'
* app.
*/
function servePackage(port, hostname) {
var app = express();
var serveBootScript = function (req, res) {
var entryPath = require.resolve('../..');
var entryScript = readFileSync(entryPath).toString('utf-8');
res.send(entryScript);
};
// Set up URLs which serve the boot script and package content, mirroring
// cdn.hypothes.is' structure.
app.get('/hypothesis', serveBootScript);
app.get(`/hypothesis/${version}`, serveBootScript);
app.use(`/hypothesis/${version}/`, express.static('.'));
app.listen(port, function () {
log(`Package served at http://${hostname}:${port}/hypothesis`);
});
}
module.exports = servePackage;
...@@ -7,19 +7,15 @@ ...@@ -7,19 +7,15 @@
// already has it cached when it encounters the reference in the sidebar // already has it cached when it encounters the reference in the sidebar
// application. // application.
// Variables replaced by the build script
/* global __MANIFEST__ */ /* global __MANIFEST__ */
var boot = require('./boot'); var boot = require('./boot');
var settings = require('../shared/settings')(document); var settings = require('../shared/settings')(document);
// The `sidebarAppUrl` and `assetRoot` settings are set by the service which is
// serving the Hypothesis client to tell it where to load the sidebar and assets
// from.
var defaultAssetRoot = 'https://cdn.hypothes.is/hypothesis/__VERSION__/';
boot(document, { boot(document, {
assetRoot: settings.assetRoot || defaultAssetRoot, assetRoot: settings.assetRoot || '__ASSET_ROOT__',
manifest: __MANIFEST__, // Replaced by build script manifest: __MANIFEST__,
sidebarAppUrl: settings.sidebarAppUrl || 'https://hypothes.is/app.html', sidebarAppUrl: settings.sidebarAppUrl || '__SIDEBAR_APP_URL__',
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment