From 3ad137a5992d4f1ec8be5cc3204aa8f58af1f440 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Thu, 7 Jun 2018 13:32:11 -0500 Subject: [PATCH] bump kbn-pm (#19623) --- packages/kbn-pm/dist/index.js | 21699 ++++++++++++++++---------------- 1 file changed, 11065 insertions(+), 10634 deletions(-) diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 5fd05f6daecc3..82df4eb5256a7 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -61,7 +61,7 @@ module.exports = /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 324); +/******/ return __webpack_require__(__webpack_require__.s = 325); /******/ }) /************************************************************************/ /******/ ([ @@ -71,9 +71,9 @@ module.exports = "use strict"; var root_1 = __webpack_require__(12); -var toSubscriber_1 = __webpack_require__(440); -var observable_1 = __webpack_require__(40); -var pipe_1 = __webpack_require__(60); +var toSubscriber_1 = __webpack_require__(441); +var observable_1 = __webpack_require__(41); +var pipe_1 = __webpack_require__(61); /** * A representation of any set of values over any amount of time. This is the most basic building block * of RxJS. @@ -2223,7 +2223,7 @@ function loadLocale(name) { try { oldLocale = globalLocale._abbr; var aliasedRequire = require; - __webpack_require__(380)("./" + name); + __webpack_require__(415)("./" + name); getSetGlobalLocale(oldLocale); } catch (e) {} } @@ -4915,7 +4915,7 @@ return hooks; }))); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53)(module))) /***/ }), /* 2 */ @@ -4928,10 +4928,10 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var isFunction_1 = __webpack_require__(38); +var isFunction_1 = __webpack_require__(39); var Subscription_1 = __webpack_require__(8); -var Observer_1 = __webpack_require__(221); -var rxSubscriber_1 = __webpack_require__(39); +var Observer_1 = __webpack_require__(222); +var rxSubscriber_1 = __webpack_require__(40); /** * Implements the {@link Observer} interface and extends the * {@link Subscription} class. While the {@link Observer} is the public API for @@ -5237,13 +5237,13 @@ exports.OuterSubscriber = OuterSubscriber; "use strict"; var root_1 = __webpack_require__(12); -var isArrayLike_1 = __webpack_require__(223); -var isPromise_1 = __webpack_require__(224); -var isObject_1 = __webpack_require__(219); +var isArrayLike_1 = __webpack_require__(224); +var isPromise_1 = __webpack_require__(225); +var isObject_1 = __webpack_require__(220); var Observable_1 = __webpack_require__(0); -var iterator_1 = __webpack_require__(26); -var InnerSubscriber_1 = __webpack_require__(449); -var observable_1 = __webpack_require__(40); +var iterator_1 = __webpack_require__(27); +var InnerSubscriber_1 = __webpack_require__(450); +var observable_1 = __webpack_require__(41); function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) { var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); if (destination.closed) { @@ -5321,8 +5321,8 @@ exports.subscribeToResult = subscribeToResult; "use strict"; -var AsyncAction_1 = __webpack_require__(31); -var AsyncScheduler_1 = __webpack_require__(32); +var AsyncAction_1 = __webpack_require__(32); +var AsyncScheduler_1 = __webpack_require__(33); /** * * Async Scheduler @@ -5381,11 +5381,11 @@ module.exports = require("fs"); "use strict"; var isArray_1 = __webpack_require__(16); -var isObject_1 = __webpack_require__(219); -var isFunction_1 = __webpack_require__(38); +var isObject_1 = __webpack_require__(220); +var isFunction_1 = __webpack_require__(39); var tryCatch_1 = __webpack_require__(11); var errorObject_1 = __webpack_require__(10); -var UnsubscriptionError_1 = __webpack_require__(220); +var UnsubscriptionError_1 = __webpack_require__(221); /** * Represents a disposable resource, such as the execution of an Observable. A * Subscription has one important method, `unsubscribe`, that takes no argument @@ -5587,9 +5587,9 @@ var __extends = (this && this.__extends) || function (d, b) { var Observable_1 = __webpack_require__(0); var Subscriber_1 = __webpack_require__(2); var Subscription_1 = __webpack_require__(8); -var ObjectUnsubscribedError_1 = __webpack_require__(41); -var SubjectSubscription_1 = __webpack_require__(222); -var rxSubscriber_1 = __webpack_require__(39); +var ObjectUnsubscribedError_1 = __webpack_require__(42); +var SubjectSubscription_1 = __webpack_require__(223); +var rxSubscriber_1 = __webpack_require__(40); /** * @class SubjectSubscriber */ @@ -5819,11 +5819,11 @@ module.exports = require("util"); "use strict"; -const escapeStringRegexp = __webpack_require__(328); -const ansiStyles = __webpack_require__(329); -const stdoutColor = __webpack_require__(333).stdout; +const escapeStringRegexp = __webpack_require__(327); +const ansiStyles = __webpack_require__(328); +const stdoutColor = __webpack_require__(332).stdout; -const template = __webpack_require__(336); +const template = __webpack_require__(335); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -6075,14 +6075,54 @@ exports.isArray = Array.isArray || (function (x) { return x && typeof x.length = "use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +const log = exports.log = { + /** + * Log something to the console. Ideally we would use a real logger in + * kbn-pm, but that's a pretty big change for now. + * @param ...args + */ + write(...args) { + // tslint:disable no-console + console.log(...args); + } +}; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var ScalarObservable_1 = __webpack_require__(62); -var EmptyObservable_1 = __webpack_require__(18); +var ScalarObservable_1 = __webpack_require__(63); +var EmptyObservable_1 = __webpack_require__(19); var isScheduler_1 = __webpack_require__(15); /** * We need this JSDoc comment for affecting ESDoc. @@ -6198,7 +6238,7 @@ exports.ArrayObservable = ArrayObservable; //# sourceMappingURL=ArrayObservable.js.map /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6285,12 +6325,12 @@ exports.EmptyObservable = EmptyObservable; //# sourceMappingURL=EmptyObservable.js.map /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ConnectableObservable_1 = __webpack_require__(271); +var ConnectableObservable_1 = __webpack_require__(272); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits the results of invoking a specified selector on items @@ -6350,13 +6390,13 @@ exports.MulticastOperator = MulticastOperator; //# sourceMappingURL=multicast.js.map /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports) { module.exports = require("stream"); /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6447,7 +6487,281 @@ module.exports = (obj, opts) => { /***/ }), -/* 22 */ +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +var fs = __webpack_require__(7) +var polyfills = __webpack_require__(342) +var legacy = __webpack_require__(344) +var queue = [] + +var util = __webpack_require__(13) + +function noop () {} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(queue) + __webpack_require__(24).equal(queue.length, 0) + }) +} + +module.exports = patch(__webpack_require__(79)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { + module.exports = patch(fs) +} + +// Always patch fs.close/closeSync, because we want to +// retry() whenever a close happens *anywhere* in the program. +// This is essential when multiple graceful-fs instances are +// in play at the same time. +module.exports.close = +fs.close = (function (fs$close) { return function (fd, cb) { + return fs$close.call(fs, fd, function (err) { + if (!err) + retry() + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) +}})(fs.close) + +module.exports.closeSync = +fs.closeSync = (function (fs$closeSync) { return function (fd) { + // Note that graceful-fs also retries when fs.closeSync() fails. + // Looks like a bug to me, although it's probably a harmless one. + var rval = fs$closeSync.apply(fs, arguments) + retry() + return rval +}})(fs.closeSync) + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + fs.FileReadStream = ReadStream; // Legacy name. + fs.FileWriteStream = WriteStream; // Legacy name. + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) + + return go$readdir(args) + + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() + + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + } + } + + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + + var fs$WriteStream = fs.WriteStream + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + + fs.ReadStream = ReadStream + fs.WriteStream = WriteStream + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + queue.push(elem) +} + +function retry () { + var elem = queue.shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = require("assert"); + +/***/ }), +/* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6492,7 +6806,7 @@ exports.buildProjectGraph = buildProjectGraph; exports.topologicallyBatchProjects = topologicallyBatchProjects; exports.includeTransitiveProjects = includeTransitiveProjects; -var _glob = __webpack_require__(23); +var _glob = __webpack_require__(26); var _glob2 = _interopRequireDefault(_glob); @@ -6502,13 +6816,31 @@ var _path2 = _interopRequireDefault(_path); var _util = __webpack_require__(13); -var _errors = __webpack_require__(55); +var _errors = __webpack_require__(58); -var _project = __webpack_require__(83); +var _project = __webpack_require__(86); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + const glob = (0, _util.promisify)(_glob2.default); @@ -6593,7 +6925,7 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { onlyProducti } /***/ }), -/* 23 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -6639,26 +6971,26 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { onlyProducti module.exports = glob var fs = __webpack_require__(7) -var rp = __webpack_require__(78) -var minimatch = __webpack_require__(53) +var rp = __webpack_require__(81) +var minimatch = __webpack_require__(56) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(79) -var EE = __webpack_require__(36).EventEmitter +var inherits = __webpack_require__(82) +var EE = __webpack_require__(37).EventEmitter var path = __webpack_require__(3) var assert = __webpack_require__(24) -var isAbsolute = __webpack_require__(54) -var globSync = __webpack_require__(344) -var common = __webpack_require__(80) +var isAbsolute = __webpack_require__(57) +var globSync = __webpack_require__(350) +var common = __webpack_require__(83) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(345) +var inflight = __webpack_require__(351) var util = __webpack_require__(13) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored -var once = __webpack_require__(82) +var once = __webpack_require__(85) function glob (pattern, options, cb) { if (typeof options === 'function') cb = options, options = {} @@ -7389,281 +7721,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 24 */ -/***/ (function(module, exports) { - -module.exports = require("assert"); - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -var fs = __webpack_require__(7) -var polyfills = __webpack_require__(386) -var legacy = __webpack_require__(388) -var queue = [] - -var util = __webpack_require__(13) - -function noop () {} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(queue) - __webpack_require__(24).equal(queue.length, 0) - }) -} - -module.exports = patch(__webpack_require__(208)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { - module.exports = patch(fs) -} - -// Always patch fs.close/closeSync, because we want to -// retry() whenever a close happens *anywhere* in the program. -// This is essential when multiple graceful-fs instances are -// in play at the same time. -module.exports.close = -fs.close = (function (fs$close) { return function (fd, cb) { - return fs$close.call(fs, fd, function (err) { - if (!err) - retry() - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) -}})(fs.close) - -module.exports.closeSync = -fs.closeSync = (function (fs$closeSync) { return function (fd) { - // Note that graceful-fs also retries when fs.closeSync() fails. - // Looks like a bug to me, although it's probably a harmless one. - var rval = fs$closeSync.apply(fs, arguments) - retry() - return rval -}})(fs.closeSync) - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - fs.FileReadStream = ReadStream; // Legacy name. - fs.FileWriteStream = WriteStream; // Legacy name. - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, options, cb) { - var args = [path] - if (typeof options !== 'function') { - args.push(options) - } else { - cb = options - } - args.push(go$readdir$cb) - - return go$readdir(args) - - function go$readdir$cb (err, files) { - if (files && files.sort) - files.sort() - - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [args]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - } - } - - function go$readdir (args) { - return fs$readdir.apply(fs, args) - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - - var fs$WriteStream = fs.WriteStream - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - - fs.ReadStream = ReadStream - fs.WriteStream = WriteStream - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - queue.push(elem) -} - -function retry () { - var elem = queue.shift() - if (elem) { - debug('RETRY', elem[0].name, elem[1]) - elem[0].apply(null, elem[1]) - } -} - - -/***/ }), -/* 26 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7707,15 +7765,15 @@ exports.$$iterator = exports.iterator; //# sourceMappingURL=iterator.js.map /***/ }), -/* 27 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isScheduler_1 = __webpack_require__(15); -var of_1 = __webpack_require__(225); -var from_1 = __webpack_require__(226); -var concatAll_1 = __webpack_require__(63); +var of_1 = __webpack_require__(226); +var from_1 = __webpack_require__(227); +var concatAll_1 = __webpack_require__(64); /* tslint:enable:max-line-length */ /** * Creates an output Observable which sequentially emits all values from given @@ -7824,7 +7882,7 @@ exports.concat = concat; //# sourceMappingURL=concat.js.map /***/ }), -/* 28 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7957,7 +8015,7 @@ exports.Notification = Notification; //# sourceMappingURL=Notification.js.map /***/ }), -/* 29 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8136,7 +8194,7 @@ exports.MergeMapSubscriber = MergeMapSubscriber; //# sourceMappingURL=mergeMap.js.map /***/ }), -/* 30 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8154,7 +8212,7 @@ exports.isNumeric = isNumeric; //# sourceMappingURL=isNumeric.js.map /***/ }), -/* 31 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8165,7 +8223,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var root_1 = __webpack_require__(12); -var Action_1 = __webpack_require__(479); +var Action_1 = __webpack_require__(480); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -8302,7 +8360,7 @@ exports.AsyncAction = AsyncAction; //# sourceMappingURL=AsyncAction.js.map /***/ }), -/* 32 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8312,7 +8370,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var Scheduler_1 = __webpack_require__(480); +var Scheduler_1 = __webpack_require__(481); var AsyncScheduler = (function (_super) { __extends(AsyncScheduler, _super); function AsyncScheduler() { @@ -8359,7 +8417,7 @@ exports.AsyncScheduler = AsyncScheduler; //# sourceMappingURL=AsyncScheduler.js.map /***/ }), -/* 33 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8454,7 +8512,7 @@ var MapSubscriber = (function (_super) { //# sourceMappingURL=map.js.map /***/ }), -/* 34 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8488,15 +8546,15 @@ exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError; //# sourceMappingURL=ArgumentOutOfRangeError.js.map /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var scan_1 = __webpack_require__(72); -var takeLast_1 = __webpack_require__(73); -var defaultIfEmpty_1 = __webpack_require__(67); -var pipe_1 = __webpack_require__(60); +var scan_1 = __webpack_require__(73); +var takeLast_1 = __webpack_require__(74); +var defaultIfEmpty_1 = __webpack_require__(68); +var pipe_1 = __webpack_require__(61); /* tslint:enable:max-line-length */ /** * Applies an accumulator function over the source Observable, and returns the @@ -8563,13 +8621,13 @@ exports.reduce = reduce; //# sourceMappingURL=reduce.js.map /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports) { module.exports = require("events"); /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8580,17 +8638,35 @@ Object.defineProperty(exports, "__esModule", { }); exports.isLinkDependency = exports.createProductionPackageJson = undefined; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + exports.readPackageJson = readPackageJson; exports.writePackageJson = writePackageJson; exports.transformDependencies = transformDependencies; -var _readPkg = __webpack_require__(384); +var _readPkg = __webpack_require__(352); var _readPkg2 = _interopRequireDefault(_readPkg); -var _writePkg = __webpack_require__(410); +var _writePkg = __webpack_require__(375); var _writePkg2 = _interopRequireDefault(_writePkg); @@ -8629,7 +8705,7 @@ function transformDependencies(dependencies = {}) { } /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8641,7 +8717,7 @@ exports.isFunction = isFunction; //# sourceMappingURL=isFunction.js.map /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8657,7 +8733,7 @@ exports.$$rxSubscriber = exports.rxSubscriber; //# sourceMappingURL=rxSubscriber.js.map /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8689,7 +8765,7 @@ exports.$$observable = exports.observable; //# sourceMappingURL=observable.js.map /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8722,7 +8798,7 @@ exports.ObjectUnsubscribedError = ObjectUnsubscribedError; //# sourceMappingURL=ObjectUnsubscribedError.js.map /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8781,7 +8857,7 @@ exports.AsyncSubject = AsyncSubject; //# sourceMappingURL=AsyncSubject.js.map /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8791,7 +8867,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var ArrayObservable_1 = __webpack_require__(17); +var ArrayObservable_1 = __webpack_require__(18); var isArray_1 = __webpack_require__(16); var OuterSubscriber_1 = __webpack_require__(4); var subscribeToResult_1 = __webpack_require__(5); @@ -8938,7 +9014,7 @@ exports.CombineLatestSubscriber = CombineLatestSubscriber; //# sourceMappingURL=combineLatest.js.map /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8949,7 +9025,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var Notification_1 = __webpack_require__(28); +var Notification_1 = __webpack_require__(29); /** * * Re-emits all notifications from source Observable with specified scheduler. @@ -9059,13 +9135,13 @@ exports.ObserveOnMessage = ObserveOnMessage; //# sourceMappingURL=observeOn.js.map /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeMap_1 = __webpack_require__(29); -var identity_1 = __webpack_require__(229); +var mergeMap_1 = __webpack_require__(30); +var identity_1 = __webpack_require__(230); /** * Converts a higher-order Observable into a first-order Observable which * concurrently delivers all values that are emitted on the inner Observables. @@ -9118,15 +9194,15 @@ exports.mergeAll = mergeAll; //# sourceMappingURL=mergeAll.js.map /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var ArrayObservable_1 = __webpack_require__(17); +var ArrayObservable_1 = __webpack_require__(18); var isScheduler_1 = __webpack_require__(15); -var mergeAll_1 = __webpack_require__(45); +var mergeAll_1 = __webpack_require__(46); /* tslint:enable:max-line-length */ /** * Creates an output Observable which concurrently emits all values from every @@ -9214,7 +9290,7 @@ exports.merge = merge; //# sourceMappingURL=merge.js.map /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9226,7 +9302,7 @@ exports.isDate = isDate; //# sourceMappingURL=isDate.js.map /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9236,12 +9312,12 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var ArrayObservable_1 = __webpack_require__(17); +var ArrayObservable_1 = __webpack_require__(18); var isArray_1 = __webpack_require__(16); var Subscriber_1 = __webpack_require__(2); var OuterSubscriber_1 = __webpack_require__(4); var subscribeToResult_1 = __webpack_require__(5); -var iterator_1 = __webpack_require__(26); +var iterator_1 = __webpack_require__(27); /* tslint:enable:max-line-length */ /** * @param observables @@ -9513,7 +9589,7 @@ var ZipBufferIterator = (function (_super) { //# sourceMappingURL=zip.js.map /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9524,11 +9600,11 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subject_1 = __webpack_require__(9); -var queue_1 = __webpack_require__(232); +var queue_1 = __webpack_require__(233); var Subscription_1 = __webpack_require__(8); -var observeOn_1 = __webpack_require__(44); -var ObjectUnsubscribedError_1 = __webpack_require__(41); -var SubjectSubscription_1 = __webpack_require__(222); +var observeOn_1 = __webpack_require__(45); +var ObjectUnsubscribedError_1 = __webpack_require__(42); +var SubjectSubscription_1 = __webpack_require__(223); /** * @class ReplaySubject */ @@ -9621,7 +9697,7 @@ var ReplayEvent = (function () { //# sourceMappingURL=ReplaySubject.js.map /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9655,7 +9731,7 @@ exports.EmptyError = EmptyError; //# sourceMappingURL=EmptyError.js.map /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9803,7 +9879,7 @@ var ThrottleSubscriber = (function (_super) { //# sourceMappingURL=throttle.js.map /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -9831,7 +9907,255 @@ module.exports = function(module) { /***/ }), -/* 53 */ +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createSymlink = exports.isFile = exports.isDirectory = exports.mkdirp = exports.readFile = exports.chmod = undefined; + +let statTest = (() => { + var _ref = _asyncToGenerator(function* (path, block) { + try { + return block((yield stat(path))); + } catch (e) { + if (e.code === 'ENOENT') { + return false; + } + throw e; + } + }); + + return function statTest(_x, _x2) { + return _ref.apply(this, arguments); + }; +})(); +/** + * Test if a path points to a directory. + * @param path + */ + + +let isDirectory = exports.isDirectory = (() => { + var _ref2 = _asyncToGenerator(function* (path) { + return yield statTest(path, function (stats) { + return stats.isDirectory(); + }); + }); + + return function isDirectory(_x3) { + return _ref2.apply(this, arguments); + }; +})(); +/** + * Test if a path points to a regular file. + * @param path + */ + + +let isFile = exports.isFile = (() => { + var _ref3 = _asyncToGenerator(function* (path) { + return yield statTest(path, function (stats) { + return stats.isFile(); + }); + }); + + return function isFile(_x4) { + return _ref3.apply(this, arguments); + }; +})(); +/** + * Create a symlink at dest that points to src. Adapted from + * https://github.com/lerna/lerna/blob/2f1b87d9e2295f587e4ac74269f714271d8ed428/src/FileSystemUtilities.js#L103. + * + * @param src + * @param dest + * @param type 'dir', 'file', 'junction', or 'exec'. 'exec' on + * windows will use the `cmd-shim` module since symlinks can't be used + * for executable files on windows. + */ + + +let createSymlink = exports.createSymlink = (() => { + var _ref4 = _asyncToGenerator(function* (src, dest, type) { + if (process.platform === 'win32') { + if (type === 'exec') { + yield cmdShim(src, dest); + } else { + yield forceCreate(src, dest, type); + } + } else { + const posixType = type === 'exec' ? 'file' : type; + const relativeSource = (0, _path.relative)((0, _path.dirname)(dest), src); + yield forceCreate(relativeSource, dest, posixType); + } + }); + + return function createSymlink(_x5, _x6, _x7) { + return _ref4.apply(this, arguments); + }; +})(); + +let forceCreate = (() => { + var _ref5 = _asyncToGenerator(function* (src, dest, type) { + try { + // If something exists at `dest` we need to remove it first. + yield unlink(dest); + } catch (error) { + if (error.code !== 'ENOENT') { + throw error; + } + } + yield symlink(src, dest, type); + }); + + return function forceCreate(_x8, _x9, _x10) { + return _ref5.apply(this, arguments); + }; +})(); + +var _cmdShim = __webpack_require__(341); + +var _cmdShim2 = _interopRequireDefault(_cmdShim); + +var _fs = __webpack_require__(7); + +var _fs2 = _interopRequireDefault(_fs); + +var _mkdirp = __webpack_require__(80); + +var _mkdirp2 = _interopRequireDefault(_mkdirp); + +var _path = __webpack_require__(3); + +var _util = __webpack_require__(13); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +const stat = (0, _util.promisify)(_fs2.default.stat); +const readFile = (0, _util.promisify)(_fs2.default.readFile); +const unlink = (0, _util.promisify)(_fs2.default.unlink); +const symlink = (0, _util.promisify)(_fs2.default.symlink); +const chmod = (0, _util.promisify)(_fs2.default.chmod); +const cmdShim = (0, _util.promisify)(_cmdShim2.default); +const mkdirp = (0, _util.promisify)(_mkdirp2.default); +exports.chmod = chmod; +exports.readFile = readFile; +exports.mkdirp = mkdirp; + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +let parallelizeBatches = exports.parallelizeBatches = (() => { + var _ref = _asyncToGenerator(function* (batches, fn) { + for (const batch of batches) { + // We need to make sure the entire batch has completed before we can move on + // to the next batch + yield parallelize(batch, fn); + } + }); + + return function parallelizeBatches(_x, _x2) { + return _ref.apply(this, arguments); + }; +})(); + +let parallelize = exports.parallelize = (() => { + var _ref2 = _asyncToGenerator(function* (items, fn, concurrency = 4) { + if (items.length === 0) { + return; + } + return new Promise(function (resolve, reject) { + let scheduleItem = (() => { + var _ref3 = _asyncToGenerator(function* (item) { + activePromises++; + try { + yield fn(item); + activePromises--; + if (values.length > 0) { + // We have more work to do, so we schedule the next promise + scheduleItem(values.shift()); + } else if (activePromises === 0) { + // We have no more values left, and all items have completed, so we've + // completed all the work. + resolve(); + } + } catch (error) { + reject(error); + } + }); + + return function scheduleItem(_x5) { + return _ref3.apply(this, arguments); + }; + })(); + + let activePromises = 0; + const values = items.slice(0); + + values.splice(0, concurrency).map(scheduleItem); + }); + }); + + return function parallelize(_x3, _x4) { + return _ref2.apply(this, arguments); + }; +})(); + +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } + +/***/ }), +/* 56 */ /***/ (function(module, exports, __webpack_require__) { module.exports = minimatch @@ -9843,7 +10167,7 @@ try { } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(340) +var expand = __webpack_require__(346) var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, @@ -10760,7 +11084,7 @@ function regExpEscape (s) { /***/ }), -/* 54 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10787,7 +11111,7 @@ module.exports.win32 = win32; /***/ }), -/* 55 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10796,6 +11120,24 @@ module.exports.win32 = win32; Object.defineProperty(exports, "__esModule", { value: true }); +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ class CliError extends Error { constructor(message, meta = {}) { super(message); @@ -10805,22 +11147,16 @@ class CliError extends Error { exports.CliError = CliError; /***/ }), -/* 56 */ -/***/ (function(module, exports) { - -module.exports = require("child_process"); - -/***/ }), -/* 57 */ +/* 59 */ /***/ (function(module, exports, __webpack_require__) { // Note: since nyc uses this module to output coverage, any lines // that are in the direct sync flow of nyc's outputCoverage are // ignored, since we can never get coverage for them. var assert = __webpack_require__(24) -var signals = __webpack_require__(372) +var signals = __webpack_require__(379) -var EE = __webpack_require__(36) +var EE = __webpack_require__(37) /* istanbul ignore if */ if (typeof EE !== 'function') { EE = EE.EventEmitter @@ -10974,224 +11310,18 @@ function processEmit (ev, arg) { /***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createSymlink = exports.isFile = exports.isDirectory = exports.mkdirp = exports.readFile = exports.chmod = undefined; - -let statTest = (() => { - var _ref = _asyncToGenerator(function* (path, block) { - try { - return block((yield stat(path))); - } catch (e) { - if (e.code === 'ENOENT') { - return false; - } - throw e; - } - }); - - return function statTest(_x, _x2) { - return _ref.apply(this, arguments); - }; -})(); -/** - * Test if a path points to a directory. - * @param path - */ - - -let isDirectory = exports.isDirectory = (() => { - var _ref2 = _asyncToGenerator(function* (path) { - return yield statTest(path, function (stats) { - return stats.isDirectory(); - }); - }); - - return function isDirectory(_x3) { - return _ref2.apply(this, arguments); - }; -})(); -/** - * Test if a path points to a regular file. - * @param path - */ - - -let isFile = exports.isFile = (() => { - var _ref3 = _asyncToGenerator(function* (path) { - return yield statTest(path, function (stats) { - return stats.isFile(); - }); - }); - - return function isFile(_x4) { - return _ref3.apply(this, arguments); - }; -})(); -/** - * Create a symlink at dest that points to src. Adapted from - * https://github.com/lerna/lerna/blob/2f1b87d9e2295f587e4ac74269f714271d8ed428/src/FileSystemUtilities.js#L103. - * - * @param src - * @param dest - * @param type 'dir', 'file', 'junction', or 'exec'. 'exec' on - * windows will use the `cmd-shim` module since symlinks can't be used - * for executable files on windows. - */ - - -let createSymlink = exports.createSymlink = (() => { - var _ref4 = _asyncToGenerator(function* (src, dest, type) { - if (process.platform === 'win32') { - if (type === 'exec') { - yield cmdShim(src, dest); - } else { - yield forceCreate(src, dest, type); - } - } else { - const posixType = type === 'exec' ? 'file' : type; - const relativeSource = (0, _path.relative)((0, _path.dirname)(dest), src); - yield forceCreate(relativeSource, dest, posixType); - } - }); - - return function createSymlink(_x5, _x6, _x7) { - return _ref4.apply(this, arguments); - }; -})(); - -let forceCreate = (() => { - var _ref5 = _asyncToGenerator(function* (src, dest, type) { - try { - // If something exists at `dest` we need to remove it first. - yield unlink(dest); - } catch (error) { - if (error.code !== 'ENOENT') { - throw error; - } - } - yield symlink(src, dest, type); - }); - - return function forceCreate(_x8, _x9, _x10) { - return _ref5.apply(this, arguments); - }; -})(); - -var _fs = __webpack_require__(7); - -var _fs2 = _interopRequireDefault(_fs); - -var _path = __webpack_require__(3); - -var _util = __webpack_require__(13); - -var _cmdShim = __webpack_require__(417); - -var _cmdShim2 = _interopRequireDefault(_cmdShim); - -var _mkdirp = __webpack_require__(214); - -var _mkdirp2 = _interopRequireDefault(_mkdirp); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -const stat = (0, _util.promisify)(_fs2.default.stat); -const readFile = (0, _util.promisify)(_fs2.default.readFile); -const unlink = (0, _util.promisify)(_fs2.default.unlink); -const symlink = (0, _util.promisify)(_fs2.default.symlink); -const chmod = (0, _util.promisify)(_fs2.default.chmod); -const cmdShim = (0, _util.promisify)(_cmdShim2.default); -const mkdirp = (0, _util.promisify)(_mkdirp2.default); -exports.chmod = chmod; -exports.readFile = readFile; -exports.mkdirp = mkdirp; - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -let parallelizeBatches = exports.parallelizeBatches = (() => { - var _ref = _asyncToGenerator(function* (batches, fn) { - for (const batch of batches) { - // We need to make sure the entire batch has completed before we can move on - // to the next batch - yield parallelize(batch, fn); - } - }); - - return function parallelizeBatches(_x, _x2) { - return _ref.apply(this, arguments); - }; -})(); - -let parallelize = exports.parallelize = (() => { - var _ref2 = _asyncToGenerator(function* (items, fn, concurrency = 4) { - if (items.length === 0) { - return; - } - return new Promise(function (resolve, reject) { - let scheduleItem = (() => { - var _ref3 = _asyncToGenerator(function* (item) { - activePromises++; - try { - yield fn(item); - activePromises--; - if (values.length > 0) { - // We have more work to do, so we schedule the next promise - scheduleItem(values.shift()); - } else if (activePromises === 0) { - // We have no more values left, and all items have completed, so we've - // completed all the work. - resolve(); - } - } catch (error) { - reject(error); - } - }); - - return function scheduleItem(_x5) { - return _ref3.apply(this, arguments); - }; - })(); - - let activePromises = 0; - const values = items.slice(0); - - values.splice(0, concurrency).map(scheduleItem); - }); - }); - - return function parallelize(_x3, _x4) { - return _ref2.apply(this, arguments); - }; -})(); +/* 60 */ +/***/ (function(module, exports) { -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +module.exports = require("child_process"); /***/ }), -/* 60 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var noop_1 = __webpack_require__(61); +var noop_1 = __webpack_require__(62); /* tslint:enable:max-line-length */ function pipe() { var fns = []; @@ -11217,7 +11347,7 @@ exports.pipeFromArray = pipeFromArray; //# sourceMappingURL=pipe.js.map /***/ }), -/* 61 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11228,7 +11358,7 @@ exports.noop = noop; //# sourceMappingURL=noop.js.map /***/ }), -/* 62 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11292,12 +11422,12 @@ exports.ScalarObservable = ScalarObservable; //# sourceMappingURL=ScalarObservable.js.map /***/ }), -/* 63 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeAll_1 = __webpack_require__(45); +var mergeAll_1 = __webpack_require__(46); /** * Converts a higher-order Observable into a first-order Observable by * concatenating the inner Observables in order. @@ -11353,7 +11483,7 @@ exports.concatAll = concatAll; //# sourceMappingURL=concatAll.js.map /***/ }), -/* 64 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11364,7 +11494,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var isArray_1 = __webpack_require__(16); -var ArrayObservable_1 = __webpack_require__(17); +var ArrayObservable_1 = __webpack_require__(18); var OuterSubscriber_1 = __webpack_require__(4); var subscribeToResult_1 = __webpack_require__(5); function race() { @@ -11448,7 +11578,7 @@ exports.RaceSubscriber = RaceSubscriber; //# sourceMappingURL=race.js.map /***/ }), -/* 65 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11458,7 +11588,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var FromObservable_1 = __webpack_require__(227); +var FromObservable_1 = __webpack_require__(228); var isArray_1 = __webpack_require__(16); var OuterSubscriber_1 = __webpack_require__(4); var subscribeToResult_1 = __webpack_require__(5); @@ -11591,12 +11721,12 @@ var OnErrorResumeNextSubscriber = (function (_super) { //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), -/* 66 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeMap_1 = __webpack_require__(29); +var mergeMap_1 = __webpack_require__(30); /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output @@ -11664,7 +11794,7 @@ exports.concatMap = concatMap; //# sourceMappingURL=concatMap.js.map /***/ }), -/* 67 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11747,7 +11877,7 @@ var DefaultIfEmptySubscriber = (function (_super) { //# sourceMappingURL=defaultIfEmpty.js.map /***/ }), -/* 68 */ +/* 69 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11861,7 +11991,7 @@ var DistinctUntilChangedSubscriber = (function (_super) { //# sourceMappingURL=distinctUntilChanged.js.map /***/ }), -/* 69 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11961,7 +12091,7 @@ var FilterSubscriber = (function (_super) { //# sourceMappingURL=filter.js.map /***/ }), -/* 70 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12067,7 +12197,7 @@ exports.FindValueSubscriber = FindValueSubscriber; //# sourceMappingURL=find.js.map /***/ }), -/* 71 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12191,7 +12321,7 @@ var AuditSubscriber = (function (_super) { //# sourceMappingURL=audit.js.map /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12318,7 +12448,7 @@ var ScanSubscriber = (function (_super) { //# sourceMappingURL=scan.js.map /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12329,8 +12459,8 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var ArgumentOutOfRangeError_1 = __webpack_require__(34); -var EmptyObservable_1 = __webpack_require__(18); +var ArgumentOutOfRangeError_1 = __webpack_require__(35); +var EmptyObservable_1 = __webpack_require__(19); /** * Emits only the last `count` values emitted by the source Observable. * @@ -12433,7 +12563,7 @@ var TakeLastSubscriber = (function (_super) { //# sourceMappingURL=takeLast.js.map /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12524,7 +12654,7 @@ var RefCountSubscriber = (function (_super) { //# sourceMappingURL=refCount.js.map /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12672,13 +12802,13 @@ var SwitchMapSubscriber = (function (_super) { //# sourceMappingURL=switchMap.js.map /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var map_1 = __webpack_require__(33); +var map_1 = __webpack_require__(34); /** * @param scheduler * @return {Observable>|WebSocketSubject|Observable} @@ -12703,11 +12833,11 @@ exports.Timestamp = Timestamp; //# sourceMappingURL=timestamp.js.map /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ -var cssKeywords = __webpack_require__(331); +var cssKeywords = __webpack_require__(330); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -13570,7 +13700,139 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 78 */ +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var fs = __webpack_require__(7) + +module.exports = clone(fs) + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: obj.__proto__ } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +var path = __webpack_require__(3); +var fs = __webpack_require__(7); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; + + +/***/ }), +/* 81 */ /***/ (function(module, exports, __webpack_require__) { module.exports = realpath @@ -13586,7 +13848,7 @@ var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(339) +var old = __webpack_require__(345) function newError (er) { return er && er.syscall === 'realpath' && ( @@ -13642,7 +13904,7 @@ function unmonkeypatch () { /***/ }), -/* 79 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -13650,12 +13912,12 @@ try { if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { - module.exports = __webpack_require__(343); + module.exports = __webpack_require__(349); } /***/ }), -/* 80 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -13673,8 +13935,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(3) -var minimatch = __webpack_require__(53) -var isAbsolute = __webpack_require__(54) +var minimatch = __webpack_require__(56) +var isAbsolute = __webpack_require__(57) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -13901,7 +14163,7 @@ function childrenIgnored (self, path) { /***/ }), -/* 81 */ +/* 84 */ /***/ (function(module, exports) { // Returns a wrapper function that returns a wrapped callback @@ -13940,10 +14202,10 @@ function wrappy (fn, cb) { /***/ }), -/* 82 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { -var wrappy = __webpack_require__(81) +var wrappy = __webpack_require__(84) module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) @@ -13988,7 +14250,7 @@ function onceStrict (fn) { /***/ }), -/* 83 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14001,25 +14263,43 @@ exports.Project = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; -var _path = __webpack_require__(3); +var _chalk = __webpack_require__(14); -var _path2 = _interopRequireDefault(_path); +var _chalk2 = _interopRequireDefault(_chalk); + +var _path = __webpack_require__(3); var _util = __webpack_require__(13); -var _chalk = __webpack_require__(14); +var _errors = __webpack_require__(58); -var _chalk2 = _interopRequireDefault(_chalk); +var _log = __webpack_require__(17); -var _scripts = __webpack_require__(346); +var _package_json = __webpack_require__(38); -var _package_json = __webpack_require__(37); - -var _errors = __webpack_require__(55); +var _scripts = __webpack_require__(382); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + class Project { static fromPath(path) { @@ -14031,9 +14311,9 @@ class Project { constructor(packageJson, projectPath) { this.json = Object.freeze(packageJson); this.path = projectPath; - this.packageJsonLocation = _path2.default.resolve(this.path, 'package.json'); - this.nodeModulesLocation = _path2.default.resolve(this.path, 'node_modules'); - this.targetLocation = _path2.default.resolve(this.path, 'target'); + this.packageJsonLocation = (0, _path.resolve)(this.path, 'package.json'); + this.nodeModulesLocation = (0, _path.resolve)(this.path, 'node_modules'); + this.targetLocation = (0, _path.resolve)(this.path, 'target'); this.productionDependencies = this.json.dependencies || {}; this.devDependencies = this.json.devDependencies || {}; this.allDependencies = _extends({}, this.devDependencies, this.productionDependencies); @@ -14043,7 +14323,7 @@ class Project { return this.json.name; } ensureValidProjectDependency(project) { - const relativePathToProject = normalizePath(_path2.default.relative(this.path, project.path)); + const relativePathToProject = normalizePath((0, _path.relative)(this.path, project.path)); const versionInPackageJson = this.allDependencies[project.name]; const expectedVersionInPackageJson = `link:${relativePathToProject}`; if (versionInPackageJson === expectedVersionInPackageJson) { @@ -14051,9 +14331,9 @@ class Project { } const updateMsg = 'Update its package.json to the expected value below.'; const meta = { - package: `${this.name} (${this.packageJsonLocation})`, + actual: `"${project.name}": "${versionInPackageJson}"`, expected: `"${project.name}": "${expectedVersionInPackageJson}"`, - actual: `"${project.name}": "${versionInPackageJson}"` + package: `${this.name} (${this.packageJsonLocation})` }; if ((0, _package_json.isLinkDependency)(versionInPackageJson)) { throw new _errors.CliError(`[${this.name}] depends on [${project.name}] using 'link:', but the path is wrong. ${updateMsg}`, meta); @@ -14069,7 +14349,7 @@ class Project { * instead of everything located in the project directory. */ getIntermediateBuildDirectory() { - return _path2.default.resolve(this.path, this.getBuildConfig().intermediateBuildDirectory || '.'); + return (0, _path.resolve)(this.path, this.getBuildConfig().intermediateBuildDirectory || '.'); } hasScript(name) { return name in this.scripts; @@ -14081,26 +14361,26 @@ class Project { } if (typeof raw === 'string') { return { - [this.name]: _path2.default.resolve(this.path, raw) + [this.name]: (0, _path.resolve)(this.path, raw) }; } if (typeof raw === 'object') { const binsConfig = {}; for (const binName of Object.keys(raw)) { - binsConfig[binName] = _path2.default.resolve(this.path, raw[binName]); + binsConfig[binName] = (0, _path.resolve)(this.path, raw[binName]); } return binsConfig; } throw new _errors.CliError(`[${this.name}] has an invalid "bin" field in its package.json, ` + `expected an object or a string`, { - package: `${this.name} (${this.packageJsonLocation})`, - binConfig: (0, _util.inspect)(raw) + binConfig: (0, _util.inspect)(raw), + package: `${this.name} (${this.packageJsonLocation})` }); } runScript(scriptName, args = []) { var _this = this; return _asyncToGenerator(function* () { - console.log(_chalk2.default.bold(`\n\nRunning script [${_chalk2.default.green(scriptName)}] in [${_chalk2.default.green(_this.name)}]:\n`)); + _log.log.write(_chalk2.default.bold(`\n\nRunning script [${_chalk2.default.green(scriptName)}] in [${_chalk2.default.green(_this.name)}]:\n`)); return (0, _scripts.runScriptInPackage)(scriptName, args, _this); })(); } @@ -14114,7 +14394,7 @@ class Project { var _this2 = this; return _asyncToGenerator(function* () { - console.log(_chalk2.default.bold(`\n\nInstalling dependencies in [${_chalk2.default.green(_this2.name)}]:\n`)); + _log.log.write(_chalk2.default.bold(`\n\nInstalling dependencies in [${_chalk2.default.green(_this2.name)}]:\n`)); return (0, _scripts.installInDir)(_this2.path, extraArgs); })(); } @@ -14126,15 +14406,293 @@ function normalizePath(path) { } /***/ }), -/* 84 */ +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = normalize + +var fixer = __webpack_require__(360) +normalize.fixer = fixer + +var makeWarning = __webpack_require__(373) + +var fieldsToFix = ['name','version','description','repository','modules','scripts' + ,'files','bin','man','bugs','keywords','readme','homepage','license'] +var otherThingsToFix = ['dependencies','people', 'typos'] + +var thingsToFix = fieldsToFix.map(function(fieldName) { + return ucFirst(fieldName) + "Field" +}) +// two ways to do this in CoffeeScript on only one line, sub-70 chars: +// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" +// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) +thingsToFix = thingsToFix.concat(otherThingsToFix) + +function normalize (data, warn, strict) { + if(warn === true) warn = null, strict = true + if(!strict) strict = false + if(!warn || data.private) warn = function(msg) { /* noop */ } + + if (data.scripts && + data.scripts.install === "node-gyp rebuild" && + !data.scripts.preinstall) { + data.gypfile = true + } + fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } + thingsToFix.forEach(function(thingName) { + fixer["fix" + ucFirst(thingName)](data, strict) + }) + data._id = data.name + "@" + data.version +} + +function ucFirst (string) { + return string.charAt(0).toUpperCase() + string.slice(1); +} + + +/***/ }), +/* 88 */ +/***/ (function(module, exports) { + +module.exports = require("url"); + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var gitHosts = module.exports = { + github: { + // First two are insecure and generally shouldn't be used any more, but + // they are still supported. + 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'github.com', + 'treepath': 'tree', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + }, + bitbucket: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'bitbucket.org', + 'treepath': 'src', + 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' + }, + gitlab: { + 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gitlab.com', + 'treepath': 'tree', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}' + }, + gist: { + 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], + 'domain': 'gist.github.com', + 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', + 'bugstemplate': 'https://{domain}/{project}', + 'gittemplate': 'git://{domain}/{project}.git{#committish}', + 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{project}{/committish}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + } +} + +var gitHostDefaults = { + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', + 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', + 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', + 'shortcuttemplate': '{type}:{user}/{project}{#committish}', + 'pathtemplate': '{user}/{project}{#committish}', + 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/ +} + +Object.keys(gitHosts).forEach(function (name) { + Object.keys(gitHostDefaults).forEach(function (key) { + if (gitHosts[name][key]) return + gitHosts[name][key] = gitHostDefaults[key] + }) + gitHosts[name].protocols_re = RegExp('^(' + + gitHosts[name].protocols.map(function (protocol) { + return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') + }).join('|') + '):$') +}) + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const isPlainObj = __webpack_require__(380); + +module.exports = (obj, opts) => { + if (!isPlainObj(obj)) { + throw new TypeError('Expected a plain object'); + } + + opts = opts || {}; + + // DEPRECATED + if (typeof opts === 'function') { + throw new TypeError('Specify the compare function as an option instead'); + } + + const deep = opts.deep; + const seenInput = []; + const seenOutput = []; + + const sortKeys = x => { + const seenIndex = seenInput.indexOf(x); + + if (seenIndex !== -1) { + return seenOutput[seenIndex]; + } + + const ret = {}; + const keys = Object.keys(x).sort(opts.compare); + + seenInput.push(x); + seenOutput.push(ret); + + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = x[key]; + + if (deep && Array.isArray(val)) { + const retArr = []; + + for (let j = 0; j < val.length; j++) { + retArr[j] = isPlainObj(val[j]) ? sortKeys(val[j]) : val[j]; + } + + ret[key] = retArr; + continue; + } + + ret[key] = deep && isPlainObj(val) ? sortKeys(val) : val; + } + + return ret; + }; + + return sortKeys(obj); +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const fs = __webpack_require__(7); +const path = __webpack_require__(3); +const pify = __webpack_require__(22); + +const defaults = { + mode: 0o777 & (~process.umask()), + fs +}; + +// https://github.com/nodejs/node/issues/8987 +// https://github.com/libuv/libuv/pull/1088 +const checkPath = pth => { + if (process.platform === 'win32') { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, '')); + + if (pathHasInvalidWinCharacters) { + const err = new Error(`Path contains invalid characters: ${pth}`); + err.code = 'EINVAL'; + throw err; + } + } +}; + +module.exports = (input, opts) => Promise.resolve().then(() => { + checkPath(input); + opts = Object.assign({}, defaults, opts); + const fsP = pify(opts.fs); + + const make = pth => { + return fsP.mkdir(pth, opts.mode) + .then(() => pth) + .catch(err => { + if (err.code === 'ENOENT') { + if (err.message.includes('null bytes') || path.dirname(pth) === pth) { + throw err; + } + + return make(path.dirname(pth)).then(() => make(pth)); + } + + return fsP.stat(pth) + .then(stats => stats.isDirectory() ? pth : Promise.reject()) + .catch(() => { + throw err; + }); + }); + }; + + return make(path.resolve(input)); +}); + +module.exports.sync = (input, opts) => { + checkPath(input); + opts = Object.assign({}, defaults, opts); + + const make = pth => { + try { + opts.fs.mkdirSync(pth, opts.mode); + } catch (err) { + if (err.code === 'ENOENT') { + if (err.message.includes('null bytes') || path.dirname(pth) === pth) { + throw err; + } + + make(path.dirname(pth)); + return make(pth); + } + + try { + if (!opts.fs.statSync(pth).isDirectory()) { + throw new Error('The path is not a directory'); + } + } catch (_) { + throw err; + } + } + + return pth; + }; + + return make(path.resolve(input)); +}; + + +/***/ }), +/* 92 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(3); -var which = __webpack_require__(351); -var LRU = __webpack_require__(85); +var which = __webpack_require__(387); +var LRU = __webpack_require__(93); var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec @@ -14164,7 +14722,7 @@ module.exports = resolveCommand; /***/ }), -/* 85 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14174,11 +14732,11 @@ module.exports = LRUCache // This will be a proper iterable 'Map' in engines that support it, // or a fakey-fake PseudoMap in older versions. -var Map = __webpack_require__(355) +var Map = __webpack_require__(391) var util = __webpack_require__(13) // A linked list to keep track of recently-used-ness -var Yallist = __webpack_require__(357) +var Yallist = __webpack_require__(393) // use symbols if possible, otherwise just _props var hasSymbol = typeof Symbol === 'function' @@ -14638,7 +15196,7 @@ function Entry (key, value, length, now, maxAge) { /***/ }), -/* 86 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14675,7 +15233,34 @@ module.exports = escapeArgument; /***/ }), -/* 87 */ +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const chalk = __webpack_require__(14); + +const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; + +const main = { + info: chalk.blue('ℹ'), + success: chalk.green('✔'), + warning: chalk.yellow('⚠'), + error: chalk.red('✖') +}; + +const fallbacks = { + info: chalk.blue('i'), + success: chalk.green('√'), + warning: chalk.yellow('‼'), + error: chalk.red('×') +}; + +module.exports = isSupported ? main : fallbacks; + + +/***/ }), +/* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14686,13 +15271,13 @@ module.exports = escapeArgument; -var stream = __webpack_require__(20); +var stream = __webpack_require__(21); var util = __webpack_require__(13); var fs = __webpack_require__(7); -var byline = __webpack_require__(376); -var through = __webpack_require__(378); -var duplexer = __webpack_require__(379); +var byline = __webpack_require__(411); +var through = __webpack_require__(413); +var duplexer = __webpack_require__(414); var moment = __webpack_require__(1); module.exports = Logger; @@ -14854,7 +15439,7 @@ function lineMerger(host) { /***/ }), -/* 88 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -14933,7 +15518,7 @@ return af; /***/ }), -/* 89 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15081,7 +15666,7 @@ return ar; /***/ }), -/* 90 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15146,7 +15731,7 @@ return arDz; /***/ }), -/* 91 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15211,7 +15796,7 @@ return arKw; /***/ }), -/* 92 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15343,7 +15928,7 @@ return arLy; /***/ }), -/* 93 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15409,7 +15994,7 @@ return arMa; /***/ }), -/* 94 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15520,7 +16105,7 @@ return arSa; /***/ }), -/* 95 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15585,7 +16170,7 @@ return arTn; /***/ }), -/* 96 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15696,7 +16281,7 @@ return az; /***/ }), -/* 97 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15836,7 +16421,7 @@ return be; /***/ }), -/* 98 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15932,7 +16517,7 @@ return bg; /***/ }), -/* 99 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -15997,7 +16582,7 @@ return bm; /***/ }), -/* 100 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16122,7 +16707,7 @@ return bn; /***/ }), -/* 101 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16247,7 +16832,7 @@ return bo; /***/ }), -/* 102 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16361,7 +16946,7 @@ return br; /***/ }), -/* 103 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16519,7 +17104,7 @@ return bs; /***/ }), -/* 104 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16613,7 +17198,7 @@ return ca; /***/ }), -/* 105 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16798,7 +17383,7 @@ return cs; /***/ }), -/* 106 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16867,7 +17452,7 @@ return cv; /***/ }), -/* 107 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -16954,7 +17539,7 @@ return cy; /***/ }), -/* 108 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17020,7 +17605,7 @@ return da; /***/ }), -/* 109 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17104,7 +17689,7 @@ return de; /***/ }), -/* 110 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17189,7 +17774,7 @@ return deAt; /***/ }), -/* 111 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17273,7 +17858,7 @@ return deCh; /***/ }), -/* 112 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17379,7 +17964,7 @@ return dv; /***/ }), -/* 113 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17485,7 +18070,7 @@ return el; /***/ }), -/* 114 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17558,7 +18143,7 @@ return enAu; /***/ }), -/* 115 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17627,7 +18212,7 @@ return enCa; /***/ }), -/* 116 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17700,7 +18285,7 @@ return enGb; /***/ }), -/* 117 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17773,7 +18358,7 @@ return enIe; /***/ }), -/* 118 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17846,7 +18431,7 @@ return enNz; /***/ }), -/* 119 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -17925,7 +18510,7 @@ return eo; /***/ }), -/* 120 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18023,7 +18608,7 @@ return es; /***/ }), -/* 121 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18120,7 +18705,7 @@ return esDo; /***/ }), -/* 122 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18209,7 +18794,7 @@ return esUs; /***/ }), -/* 123 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18296,7 +18881,7 @@ return et; /***/ }), -/* 124 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18368,7 +18953,7 @@ return eu; /***/ }), -/* 125 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18481,7 +19066,7 @@ return fa; /***/ }), -/* 126 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18596,7 +19181,7 @@ return fi; /***/ }), -/* 127 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18662,7 +19247,7 @@ return fo; /***/ }), -/* 128 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18751,7 +19336,7 @@ return fr; /***/ }), -/* 129 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18831,7 +19416,7 @@ return frCa; /***/ }), -/* 130 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18915,7 +19500,7 @@ return frCh; /***/ }), -/* 131 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -18996,7 +19581,7 @@ return fy; /***/ }), -/* 132 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19078,7 +19663,7 @@ return gd; /***/ }), -/* 133 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19161,7 +19746,7 @@ return gl; /***/ }), -/* 134 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19290,7 +19875,7 @@ return gomLatn; /***/ }), -/* 135 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19420,7 +20005,7 @@ return gu; /***/ }), -/* 136 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19525,7 +20110,7 @@ return he; /***/ }), -/* 137 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19655,7 +20240,7 @@ return hi; /***/ }), -/* 138 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19815,7 +20400,7 @@ return hr; /***/ }), -/* 139 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -19931,7 +20516,7 @@ return hu; /***/ }), -/* 140 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20032,7 +20617,7 @@ return hyAm; /***/ }), -/* 141 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20121,7 +20706,7 @@ return id; /***/ }), -/* 142 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20259,7 +20844,7 @@ return is; /***/ }), -/* 143 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20335,7 +20920,7 @@ return it; /***/ }), -/* 144 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20421,7 +21006,7 @@ return ja; /***/ }), -/* 145 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20510,7 +21095,7 @@ return jv; /***/ }), -/* 146 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20605,7 +21190,7 @@ return ka; /***/ }), -/* 147 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20698,7 +21283,7 @@ return kk; /***/ }), -/* 148 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20762,7 +21347,7 @@ return km; /***/ }), -/* 149 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20894,7 +21479,7 @@ return kn; /***/ }), -/* 150 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -20982,7 +21567,7 @@ return ko; /***/ }), -/* 151 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21076,7 +21661,7 @@ return ky; /***/ }), -/* 152 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21219,7 +21804,7 @@ return lb; /***/ }), -/* 153 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21295,7 +21880,7 @@ return lo; /***/ }), -/* 154 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21419,7 +22004,7 @@ return lt; /***/ }), -/* 155 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21523,7 +22108,7 @@ return lv; /***/ }), -/* 156 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21641,7 +22226,7 @@ return me; /***/ }), -/* 157 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21711,7 +22296,7 @@ return mi; /***/ }), -/* 158 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21807,7 +22392,7 @@ return mk; /***/ }), -/* 159 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -21894,7 +22479,7 @@ return ml; /***/ }), -/* 160 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22061,7 +22646,7 @@ return mr; /***/ }), -/* 161 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22149,7 +22734,7 @@ return ms; /***/ }), -/* 162 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22238,7 +22823,7 @@ return msMy; /***/ }), -/* 163 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22304,7 +22889,7 @@ return mt; /***/ }), -/* 164 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22406,7 +22991,7 @@ return my; /***/ }), -/* 165 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22475,7 +23060,7 @@ return nb; /***/ }), -/* 166 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22604,7 +23189,7 @@ return ne; /***/ }), -/* 167 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22698,7 +23283,7 @@ return nl; /***/ }), -/* 168 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22792,7 +23377,7 @@ return nlBe; /***/ }), -/* 169 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22858,7 +23443,7 @@ return nn; /***/ }), -/* 170 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -22988,7 +23573,7 @@ return paIn; /***/ }), -/* 171 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23120,7 +23705,7 @@ return pl; /***/ }), -/* 172 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23191,7 +23776,7 @@ return pt; /***/ }), -/* 173 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23258,7 +23843,7 @@ return ptBr; /***/ }), -/* 174 */ +/* 183 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23340,7 +23925,7 @@ return ro; /***/ }), -/* 175 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23530,7 +24115,7 @@ return ru; /***/ }), -/* 176 */ +/* 185 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23634,7 +24219,7 @@ return sd; /***/ }), -/* 177 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23701,7 +24286,7 @@ return se; /***/ }), -/* 178 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23778,7 +24363,7 @@ return si; /***/ }), -/* 179 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -23941,7 +24526,7 @@ return sk; /***/ }), -/* 180 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24120,7 +24705,7 @@ return sl; /***/ }), -/* 181 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24196,7 +24781,7 @@ return sq; /***/ }), -/* 182 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24313,7 +24898,7 @@ return sr; /***/ }), -/* 183 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24430,7 +25015,7 @@ return srCyrl; /***/ }), -/* 184 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24525,7 +25110,7 @@ return ss; /***/ }), -/* 185 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24600,7 +25185,7 @@ return sv; /***/ }), -/* 186 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24665,7 +25250,7 @@ return sw; /***/ }), -/* 187 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24801,7 +25386,7 @@ return ta; /***/ }), -/* 188 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24896,7 +25481,7 @@ return te; /***/ }), -/* 189 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -24970,7 +25555,7 @@ return tet; /***/ }), -/* 190 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25043,7 +25628,7 @@ return th; /***/ }), -/* 191 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25111,7 +25696,7 @@ return tlPh; /***/ }), -/* 192 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25239,7 +25824,7 @@ return tlh; /***/ }), -/* 193 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25335,7 +25920,7 @@ return tr; /***/ }), -/* 194 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25433,7 +26018,7 @@ return tzl; /***/ }), -/* 195 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25497,7 +26082,7 @@ return tzm; /***/ }), -/* 196 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25561,7 +26146,7 @@ return tzmLatn; /***/ }), -/* 197 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25719,7 +26304,7 @@ return uk; /***/ }), -/* 198 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25824,7 +26409,7 @@ return ur; /***/ }), -/* 199 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25888,7 +26473,7 @@ return uz; /***/ }), -/* 200 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -25952,7 +26537,7 @@ return uzLatn; /***/ }), -/* 201 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -26037,7 +26622,7 @@ return vi; /***/ }), -/* 202 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -26111,7 +26696,7 @@ return xPseudo; /***/ }), -/* 203 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -26177,7 +26762,7 @@ return yo; /***/ }), -/* 204 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -26294,7 +26879,7 @@ return zhCn; /***/ }), -/* 205 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -26405,7 +26990,7 @@ return zhHk; /***/ }), -/* 206 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -26515,455 +27100,18 @@ return zhTw; /***/ }), -/* 207 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const chalk = __webpack_require__(14); - -const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; - -const main = { - info: chalk.blue('ℹ'), - success: chalk.green('✔'), - warning: chalk.yellow('⚠'), - error: chalk.red('✖') -}; - -const fallbacks = { - info: chalk.blue('i'), - success: chalk.green('√'), - warning: chalk.yellow('‼'), - error: chalk.red('×') -}; - -module.exports = isSupported ? main : fallbacks; - - -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var fs = __webpack_require__(7) - -module.exports = clone(fs) - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: obj.__proto__ } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} - - -/***/ }), -/* 209 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = normalize - -var fixer = __webpack_require__(395) -normalize.fixer = fixer - -var makeWarning = __webpack_require__(408) - -var fieldsToFix = ['name','version','description','repository','modules','scripts' - ,'files','bin','man','bugs','keywords','readme','homepage','license'] -var otherThingsToFix = ['dependencies','people', 'typos'] - -var thingsToFix = fieldsToFix.map(function(fieldName) { - return ucFirst(fieldName) + "Field" -}) -// two ways to do this in CoffeeScript on only one line, sub-70 chars: -// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" -// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) -thingsToFix = thingsToFix.concat(otherThingsToFix) - -function normalize (data, warn, strict) { - if(warn === true) warn = null, strict = true - if(!strict) strict = false - if(!warn || data.private) warn = function(msg) { /* noop */ } - - if (data.scripts && - data.scripts.install === "node-gyp rebuild" && - !data.scripts.preinstall) { - data.gypfile = true - } - fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } - thingsToFix.forEach(function(thingName) { - fixer["fix" + ucFirst(thingName)](data, strict) - }) - data._id = data.name + "@" + data.version -} - -function ucFirst (string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} - - -/***/ }), -/* 210 */ -/***/ (function(module, exports) { - -module.exports = require("url"); - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var gitHosts = module.exports = { - github: { - // First two are insecure and generally shouldn't be used any more, but - // they are still supported. - 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'github.com', - 'treepath': 'tree', - 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' - }, - bitbucket: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'bitbucket.org', - 'treepath': 'src', - 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' - }, - gitlab: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gitlab.com', - 'treepath': 'tree', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}' - }, - gist: { - 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gist.github.com', - 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/, - 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', - 'bugstemplate': 'https://{domain}/{project}', - 'gittemplate': 'git://{domain}/{project}.git{#committish}', - 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{project}{/committish}', - 'docstemplate': 'https://{domain}/{project}{/committish}', - 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', - 'shortcuttemplate': '{type}:{project}{#committish}', - 'pathtemplate': '{project}{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' - } -} - -var gitHostDefaults = { - 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', - 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', - 'shortcuttemplate': '{type}:{user}/{project}{#committish}', - 'pathtemplate': '{user}/{project}{#committish}', - 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/ -} - -Object.keys(gitHosts).forEach(function (name) { - Object.keys(gitHostDefaults).forEach(function (key) { - if (gitHosts[name][key]) return - gitHosts[name][key] = gitHostDefaults[key] - }) - gitHosts[name].protocols_re = RegExp('^(' + - gitHosts[name].protocols.map(function (protocol) { - return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') - }).join('|') + '):$') -}) - - -/***/ }), -/* 212 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const isPlainObj = __webpack_require__(414); - -module.exports = (obj, opts) => { - if (!isPlainObj(obj)) { - throw new TypeError('Expected a plain object'); - } - - opts = opts || {}; - - // DEPRECATED - if (typeof opts === 'function') { - throw new TypeError('Specify the compare function as an option instead'); - } - - const deep = opts.deep; - const seenInput = []; - const seenOutput = []; - - const sortKeys = x => { - const seenIndex = seenInput.indexOf(x); - - if (seenIndex !== -1) { - return seenOutput[seenIndex]; - } - - const ret = {}; - const keys = Object.keys(x).sort(opts.compare); - - seenInput.push(x); - seenOutput.push(ret); - - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const val = x[key]; - - if (deep && Array.isArray(val)) { - const retArr = []; - - for (let j = 0; j < val.length; j++) { - retArr[j] = isPlainObj(val[j]) ? sortKeys(val[j]) : val[j]; - } - - ret[key] = retArr; - continue; - } - - ret[key] = deep && isPlainObj(val) ? sortKeys(val) : val; - } - - return ret; - }; - - return sortKeys(obj); -}; - - -/***/ }), -/* 213 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const fs = __webpack_require__(7); -const path = __webpack_require__(3); -const pify = __webpack_require__(21); - -const defaults = { - mode: 0o777 & (~process.umask()), - fs -}; - -// https://github.com/nodejs/node/issues/8987 -// https://github.com/libuv/libuv/pull/1088 -const checkPath = pth => { - if (process.platform === 'win32') { - const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, '')); - - if (pathHasInvalidWinCharacters) { - const err = new Error(`Path contains invalid characters: ${pth}`); - err.code = 'EINVAL'; - throw err; - } - } -}; - -module.exports = (input, opts) => Promise.resolve().then(() => { - checkPath(input); - opts = Object.assign({}, defaults, opts); - const fsP = pify(opts.fs); - - const make = pth => { - return fsP.mkdir(pth, opts.mode) - .then(() => pth) - .catch(err => { - if (err.code === 'ENOENT') { - if (err.message.includes('null bytes') || path.dirname(pth) === pth) { - throw err; - } - - return make(path.dirname(pth)).then(() => make(pth)); - } - - return fsP.stat(pth) - .then(stats => stats.isDirectory() ? pth : Promise.reject()) - .catch(() => { - throw err; - }); - }); - }; - - return make(path.resolve(input)); -}); - -module.exports.sync = (input, opts) => { - checkPath(input); - opts = Object.assign({}, defaults, opts); - - const make = pth => { - try { - opts.fs.mkdirSync(pth, opts.mode); - } catch (err) { - if (err.code === 'ENOENT') { - if (err.message.includes('null bytes') || path.dirname(pth) === pth) { - throw err; - } - - make(path.dirname(pth)); - return make(pth); - } - - try { - if (!opts.fs.statSync(pth).isDirectory()) { - throw new Error('The path is not a directory'); - } - } catch (_) { - throw err; - } - } - - return pth; - }; - - return make(path.resolve(input)); -}; - - -/***/ }), -/* 214 */ -/***/ (function(module, exports, __webpack_require__) { - -var path = __webpack_require__(3); -var fs = __webpack_require__(7); -var _0777 = parseInt('0777', 8); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, opts, f, made) { - if (typeof opts === 'function') { - f = opts; - opts = {}; - } - else if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - p = path.resolve(p); - - xfs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), opts, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, opts, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts }; - } - - var mode = opts.mode; - var xfs = opts.fs || fs; - - if (mode === undefined) { - mode = _0777 & (~process.umask()); - } - if (!made) made = null; - - p = path.resolve(p); - - try { - xfs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), opts, made); - sync(p, opts, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = xfs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; - - -/***/ }), -/* 215 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(3); -const globby = __webpack_require__(419); -const isPathCwd = __webpack_require__(423); -const isPathInCwd = __webpack_require__(424); -const pify = __webpack_require__(21); -const rimraf = __webpack_require__(427); -const pMap = __webpack_require__(428); +const globby = __webpack_require__(420); +const isPathCwd = __webpack_require__(424); +const isPathInCwd = __webpack_require__(425); +const pify = __webpack_require__(22); +const rimraf = __webpack_require__(428); +const pMap = __webpack_require__(429); const rimrafP = pify(rimraf); @@ -27029,22 +27177,22 @@ module.exports.sync = (patterns, opts) => { /***/ }), -/* 216 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = typeof Promise === 'function' ? Promise : __webpack_require__(420); +module.exports = typeof Promise === 'function' ? Promise : __webpack_require__(421); /***/ }), -/* 217 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(421); +var arrayUniq = __webpack_require__(422); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -27052,7 +27200,7 @@ module.exports = function () { /***/ }), -/* 218 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27149,7 +27297,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { /***/ }), -/* 219 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27161,7 +27309,7 @@ exports.isObject = isObject; //# sourceMappingURL=isObject.js.map /***/ }), -/* 220 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27192,7 +27340,7 @@ exports.UnsubscriptionError = UnsubscriptionError; //# sourceMappingURL=UnsubscriptionError.js.map /***/ }), -/* 221 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27206,7 +27354,7 @@ exports.empty = { //# sourceMappingURL=Observer.js.map /***/ }), -/* 222 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27252,7 +27400,7 @@ exports.SubjectSubscription = SubjectSubscription; //# sourceMappingURL=SubjectSubscription.js.map /***/ }), -/* 223 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27261,7 +27409,7 @@ exports.isArrayLike = (function (x) { return x && typeof x.length === 'number'; //# sourceMappingURL=isArrayLike.js.map /***/ }), -/* 224 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27273,27 +27421,27 @@ exports.isPromise = isPromise; //# sourceMappingURL=isPromise.js.map /***/ }), -/* 225 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ArrayObservable_1 = __webpack_require__(17); +var ArrayObservable_1 = __webpack_require__(18); exports.of = ArrayObservable_1.ArrayObservable.of; //# sourceMappingURL=of.js.map /***/ }), -/* 226 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var FromObservable_1 = __webpack_require__(227); +var FromObservable_1 = __webpack_require__(228); exports.from = FromObservable_1.FromObservable.create; //# sourceMappingURL=from.js.map /***/ }), -/* 227 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27304,16 +27452,16 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var isArray_1 = __webpack_require__(16); -var isArrayLike_1 = __webpack_require__(223); -var isPromise_1 = __webpack_require__(224); -var PromiseObservable_1 = __webpack_require__(228); -var IteratorObservable_1 = __webpack_require__(451); -var ArrayObservable_1 = __webpack_require__(17); -var ArrayLikeObservable_1 = __webpack_require__(452); -var iterator_1 = __webpack_require__(26); +var isArrayLike_1 = __webpack_require__(224); +var isPromise_1 = __webpack_require__(225); +var PromiseObservable_1 = __webpack_require__(229); +var IteratorObservable_1 = __webpack_require__(452); +var ArrayObservable_1 = __webpack_require__(18); +var ArrayLikeObservable_1 = __webpack_require__(453); +var iterator_1 = __webpack_require__(27); var Observable_1 = __webpack_require__(0); -var observeOn_1 = __webpack_require__(44); -var observable_1 = __webpack_require__(40); +var observeOn_1 = __webpack_require__(45); +var observable_1 = __webpack_require__(41); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -27421,7 +27569,7 @@ exports.FromObservable = FromObservable; //# sourceMappingURL=FromObservable.js.map /***/ }), -/* 228 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27548,7 +27696,7 @@ function dispatchError(arg) { //# sourceMappingURL=PromiseObservable.js.map /***/ }), -/* 229 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27560,17 +27708,17 @@ exports.identity = identity; //# sourceMappingURL=identity.js.map /***/ }), -/* 230 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var TimerObservable_1 = __webpack_require__(502); +var TimerObservable_1 = __webpack_require__(503); exports.timer = TimerObservable_1.TimerObservable.create; //# sourceMappingURL=timer.js.map /***/ }), -/* 231 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -27585,7 +27733,7 @@ var tryCatch_1 = __webpack_require__(11); var errorObject_1 = __webpack_require__(10); var Observable_1 = __webpack_require__(0); var Subscriber_1 = __webpack_require__(2); -var map_1 = __webpack_require__(33); +var map_1 = __webpack_require__(34); function getCORSRequest() { if (root_1.root.XMLHttpRequest) { return new root_1.root.XMLHttpRequest(); @@ -28002,13 +28150,13 @@ exports.AjaxTimeoutError = AjaxTimeoutError; //# sourceMappingURL=AjaxObservable.js.map /***/ }), -/* 232 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var QueueAction_1 = __webpack_require__(510); -var QueueScheduler_1 = __webpack_require__(511); +var QueueAction_1 = __webpack_require__(511); +var QueueScheduler_1 = __webpack_require__(512); /** * * Queue Scheduler @@ -28074,7 +28222,7 @@ exports.queue = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); //# sourceMappingURL=queue.js.map /***/ }), -/* 233 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28158,7 +28306,7 @@ var BufferSubscriber = (function (_super) { //# sourceMappingURL=buffer.js.map /***/ }), -/* 234 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28306,7 +28454,7 @@ var BufferSkipCountSubscriber = (function (_super) { //# sourceMappingURL=bufferCount.js.map /***/ }), -/* 235 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28513,7 +28661,7 @@ function dispatchBufferClose(arg) { //# sourceMappingURL=bufferTime.js.map /***/ }), -/* 236 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28673,7 +28821,7 @@ var BufferToggleSubscriber = (function (_super) { //# sourceMappingURL=bufferToggle.js.map /***/ }), -/* 237 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28803,7 +28951,7 @@ var BufferWhenSubscriber = (function (_super) { //# sourceMappingURL=bufferWhen.js.map /***/ }), -/* 238 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28925,12 +29073,12 @@ var CatchSubscriber = (function (_super) { //# sourceMappingURL=catchError.js.map /***/ }), -/* 239 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var combineLatest_1 = __webpack_require__(43); +var combineLatest_1 = __webpack_require__(44); function combineAll(project) { return function (source) { return source.lift(new combineLatest_1.CombineLatestOperator(project)); }; } @@ -28938,13 +29086,13 @@ exports.combineAll = combineAll; //# sourceMappingURL=combineAll.js.map /***/ }), -/* 240 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var concat_1 = __webpack_require__(27); -var concat_2 = __webpack_require__(27); +var concat_1 = __webpack_require__(28); +var concat_2 = __webpack_require__(28); exports.concatStatic = concat_2.concat; /* tslint:enable:max-line-length */ /** @@ -29007,12 +29155,12 @@ exports.concat = concat; //# sourceMappingURL=concat.js.map /***/ }), -/* 241 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var concatMap_1 = __webpack_require__(66); +var concatMap_1 = __webpack_require__(67); /* tslint:enable:max-line-length */ /** * Projects each source value to the same Observable which is merged multiple @@ -29077,7 +29225,7 @@ exports.concatMapTo = concatMapTo; //# sourceMappingURL=concatMapTo.js.map /***/ }), -/* 242 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29194,7 +29342,7 @@ var CountSubscriber = (function (_super) { //# sourceMappingURL=count.js.map /***/ }), -/* 243 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29277,7 +29425,7 @@ var DeMaterializeSubscriber = (function (_super) { //# sourceMappingURL=dematerialize.js.map /***/ }), -/* 244 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29410,7 +29558,7 @@ var DebounceSubscriber = (function (_super) { //# sourceMappingURL=debounce.js.map /***/ }), -/* 245 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29532,7 +29680,7 @@ function dispatchNext(subscriber) { //# sourceMappingURL=debounceTime.js.map /***/ }), -/* 246 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29543,9 +29691,9 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var async_1 = __webpack_require__(6); -var isDate_1 = __webpack_require__(47); +var isDate_1 = __webpack_require__(48); var Subscriber_1 = __webpack_require__(2); -var Notification_1 = __webpack_require__(28); +var Notification_1 = __webpack_require__(29); /** * Delays the emission of items from the source Observable by a given timeout or * until a given Date. @@ -29673,7 +29821,7 @@ var DelayMessage = (function () { //# sourceMappingURL=delay.js.map /***/ }), -/* 247 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29873,7 +30021,7 @@ var SubscriptionDelaySubscriber = (function (_super) { //# sourceMappingURL=delayWhen.js.map /***/ }), -/* 248 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29885,7 +30033,7 @@ var __extends = (this && this.__extends) || function (d, b) { }; var OuterSubscriber_1 = __webpack_require__(4); var subscribeToResult_1 = __webpack_require__(5); -var Set_1 = __webpack_require__(553); +var Set_1 = __webpack_require__(554); /** * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. * @@ -29999,12 +30147,12 @@ exports.DistinctSubscriber = DistinctSubscriber; //# sourceMappingURL=distinct.js.map /***/ }), -/* 249 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var distinctUntilChanged_1 = __webpack_require__(68); +var distinctUntilChanged_1 = __webpack_require__(69); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item, @@ -30070,7 +30218,7 @@ exports.distinctUntilKeyChanged = distinctUntilKeyChanged; //# sourceMappingURL=distinctUntilKeyChanged.js.map /***/ }), -/* 250 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30189,7 +30337,7 @@ var DoSubscriber = (function (_super) { //# sourceMappingURL=tap.js.map /***/ }), -/* 251 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30284,7 +30432,7 @@ var SwitchFirstSubscriber = (function (_super) { //# sourceMappingURL=exhaust.js.map /***/ }), -/* 252 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30428,7 +30576,7 @@ var SwitchFirstMapSubscriber = (function (_super) { //# sourceMappingURL=exhaustMap.js.map /***/ }), -/* 253 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30585,7 +30733,7 @@ exports.ExpandSubscriber = ExpandSubscriber; //# sourceMappingURL=expand.js.map /***/ }), -/* 254 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30596,7 +30744,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var ArgumentOutOfRangeError_1 = __webpack_require__(34); +var ArgumentOutOfRangeError_1 = __webpack_require__(35); /** * Emits the single value at the specified `index` in a sequence of emissions * from the source Observable. @@ -30691,7 +30839,7 @@ var ElementAtSubscriber = (function (_super) { //# sourceMappingURL=elementAt.js.map /***/ }), -/* 255 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30740,12 +30888,12 @@ var FinallySubscriber = (function (_super) { //# sourceMappingURL=finalize.js.map /***/ }), -/* 256 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var find_1 = __webpack_require__(70); +var find_1 = __webpack_require__(71); /** * Emits only the index of the first value emitted by the source Observable that * meets some condition. @@ -30787,7 +30935,7 @@ exports.findIndex = findIndex; //# sourceMappingURL=findIndex.js.map /***/ }), -/* 257 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30798,7 +30946,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var EmptyError_1 = __webpack_require__(50); +var EmptyError_1 = __webpack_require__(51); /** * Emits only the first value (or the first value that meets some condition) * emitted by the source Observable. @@ -30945,7 +31093,7 @@ var FirstSubscriber = (function (_super) { //# sourceMappingURL=first.js.map /***/ }), -/* 258 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30959,8 +31107,8 @@ var Subscriber_1 = __webpack_require__(2); var Subscription_1 = __webpack_require__(8); var Observable_1 = __webpack_require__(0); var Subject_1 = __webpack_require__(9); -var Map_1 = __webpack_require__(580); -var FastMap_1 = __webpack_require__(582); +var Map_1 = __webpack_require__(581); +var FastMap_1 = __webpack_require__(583); /* tslint:enable:max-line-length */ /** * Groups the items emitted by an Observable according to a specified criterion, @@ -31227,7 +31375,7 @@ var InnerRefCountSubscription = (function (_super) { //# sourceMappingURL=groupBy.js.map /***/ }), -/* 259 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31238,7 +31386,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var noop_1 = __webpack_require__(61); +var noop_1 = __webpack_require__(62); /** * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. * @@ -31281,7 +31429,7 @@ var IgnoreElementsSubscriber = (function (_super) { //# sourceMappingURL=ignoreElements.js.map /***/ }), -/* 260 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31330,14 +31478,14 @@ var IsEmptySubscriber = (function (_super) { //# sourceMappingURL=isEmpty.js.map /***/ }), -/* 261 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var audit_1 = __webpack_require__(71); -var timer_1 = __webpack_require__(230); +var audit_1 = __webpack_require__(72); +var timer_1 = __webpack_require__(231); /** * Ignores source values for `duration` milliseconds, then emits the most recent * value from the source Observable, then repeats this process. @@ -31388,7 +31536,7 @@ exports.auditTime = auditTime; //# sourceMappingURL=auditTime.js.map /***/ }), -/* 262 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31399,7 +31547,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var EmptyError_1 = __webpack_require__(50); +var EmptyError_1 = __webpack_require__(51); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits only the last item emitted by the source Observable. @@ -31513,7 +31661,7 @@ var LastSubscriber = (function (_super) { //# sourceMappingURL=last.js.map /***/ }), -/* 263 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31593,7 +31741,7 @@ var EverySubscriber = (function (_super) { //# sourceMappingURL=every.js.map /***/ }), -/* 264 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31662,7 +31810,7 @@ var MapToSubscriber = (function (_super) { //# sourceMappingURL=mapTo.js.map /***/ }), -/* 265 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31673,7 +31821,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var Notification_1 = __webpack_require__(28); +var Notification_1 = __webpack_require__(29); /** * Represents all of the notifications from the source Observable as `next` * emissions marked with their original types within {@link Notification} @@ -31760,12 +31908,12 @@ var MaterializeSubscriber = (function (_super) { //# sourceMappingURL=materialize.js.map /***/ }), -/* 266 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reduce_1 = __webpack_require__(35); +var reduce_1 = __webpack_require__(36); /** * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), * and when source Observable completes it emits a single item: the item with the largest value. @@ -31807,13 +31955,13 @@ exports.max = max; //# sourceMappingURL=max.js.map /***/ }), -/* 267 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var merge_1 = __webpack_require__(46); -var merge_2 = __webpack_require__(46); +var merge_1 = __webpack_require__(47); +var merge_2 = __webpack_require__(47); exports.mergeStatic = merge_2.merge; /* tslint:enable:max-line-length */ /** @@ -31873,7 +32021,7 @@ exports.merge = merge; //# sourceMappingURL=merge.js.map /***/ }), -/* 268 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32034,7 +32182,7 @@ exports.MergeMapToSubscriber = MergeMapToSubscriber; //# sourceMappingURL=mergeMapTo.js.map /***/ }), -/* 269 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32169,12 +32317,12 @@ exports.MergeScanSubscriber = MergeScanSubscriber; //# sourceMappingURL=mergeScan.js.map /***/ }), -/* 270 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reduce_1 = __webpack_require__(35); +var reduce_1 = __webpack_require__(36); /** * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), * and when source Observable completes it emits a single item: the item with the smallest value. @@ -32216,7 +32364,7 @@ exports.min = min; //# sourceMappingURL=min.js.map /***/ }), -/* 271 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32230,7 +32378,7 @@ var Subject_1 = __webpack_require__(9); var Observable_1 = __webpack_require__(0); var Subscriber_1 = __webpack_require__(2); var Subscription_1 = __webpack_require__(8); -var refCount_1 = __webpack_require__(74); +var refCount_1 = __webpack_require__(75); /** * @class ConnectableObservable */ @@ -32392,7 +32540,7 @@ var RefCountSubscriber = (function (_super) { //# sourceMappingURL=ConnectableObservable.js.map /***/ }), -/* 272 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32475,13 +32623,13 @@ var PairwiseSubscriber = (function (_super) { //# sourceMappingURL=pairwise.js.map /***/ }), -/* 273 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var not_1 = __webpack_require__(627); -var filter_1 = __webpack_require__(69); +var not_1 = __webpack_require__(628); +var filter_1 = __webpack_require__(70); /** * Splits the source Observable into two, one with values that satisfy a * predicate, and another with values that don't satisfy the predicate. @@ -32533,12 +32681,12 @@ exports.partition = partition; //# sourceMappingURL=partition.js.map /***/ }), -/* 274 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var map_1 = __webpack_require__(33); +var map_1 = __webpack_require__(34); /** * Maps each source value (an object) to its specified nested property. * @@ -32596,13 +32744,13 @@ function plucker(props, length) { //# sourceMappingURL=pluck.js.map /***/ }), -/* 275 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Subject_1 = __webpack_require__(9); -var multicast_1 = __webpack_require__(19); +var multicast_1 = __webpack_require__(20); /* tslint:enable:max-line-length */ /** * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called @@ -32626,13 +32774,13 @@ exports.publish = publish; //# sourceMappingURL=publish.js.map /***/ }), -/* 276 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var BehaviorSubject_1 = __webpack_require__(277); -var multicast_1 = __webpack_require__(19); +var BehaviorSubject_1 = __webpack_require__(278); +var multicast_1 = __webpack_require__(20); /** * @param value * @return {ConnectableObservable} @@ -32646,7 +32794,7 @@ exports.publishBehavior = publishBehavior; //# sourceMappingURL=publishBehavior.js.map /***/ }), -/* 277 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32657,7 +32805,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subject_1 = __webpack_require__(9); -var ObjectUnsubscribedError_1 = __webpack_require__(41); +var ObjectUnsubscribedError_1 = __webpack_require__(42); /** * @class BehaviorSubject */ @@ -32701,13 +32849,13 @@ exports.BehaviorSubject = BehaviorSubject; //# sourceMappingURL=BehaviorSubject.js.map /***/ }), -/* 278 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ReplaySubject_1 = __webpack_require__(49); -var multicast_1 = __webpack_require__(19); +var ReplaySubject_1 = __webpack_require__(50); +var multicast_1 = __webpack_require__(20); /* tslint:enable:max-line-length */ function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') { @@ -32721,13 +32869,13 @@ exports.publishReplay = publishReplay; //# sourceMappingURL=publishReplay.js.map /***/ }), -/* 279 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var AsyncSubject_1 = __webpack_require__(42); -var multicast_1 = __webpack_require__(19); +var AsyncSubject_1 = __webpack_require__(43); +var multicast_1 = __webpack_require__(20); function publishLast() { return function (source) { return multicast_1.multicast(new AsyncSubject_1.AsyncSubject())(source); }; } @@ -32735,13 +32883,13 @@ exports.publishLast = publishLast; //# sourceMappingURL=publishLast.js.map /***/ }), -/* 280 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isArray_1 = __webpack_require__(16); -var race_1 = __webpack_require__(64); +var race_1 = __webpack_require__(65); /* tslint:enable:max-line-length */ /** * Returns an Observable that mirrors the first source Observable to emit an item @@ -32769,7 +32917,7 @@ exports.race = race; //# sourceMappingURL=race.js.map /***/ }), -/* 281 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32780,7 +32928,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var EmptyObservable_1 = __webpack_require__(18); +var EmptyObservable_1 = __webpack_require__(19); /** * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times. * @@ -32847,7 +32995,7 @@ var RepeatSubscriber = (function (_super) { //# sourceMappingURL=repeat.js.map /***/ }), -/* 282 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32961,7 +33109,7 @@ var RepeatWhenSubscriber = (function (_super) { //# sourceMappingURL=repeatWhen.js.map /***/ }), -/* 283 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33032,7 +33180,7 @@ var RetrySubscriber = (function (_super) { //# sourceMappingURL=retry.js.map /***/ }), -/* 284 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33139,7 +33287,7 @@ var RetryWhenSubscriber = (function (_super) { //# sourceMappingURL=retryWhen.js.map /***/ }), -/* 285 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33233,7 +33381,7 @@ var SampleSubscriber = (function (_super) { //# sourceMappingURL=sample.js.map /***/ }), -/* 286 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33330,7 +33478,7 @@ function dispatchNotification(state) { //# sourceMappingURL=sampleTime.js.map /***/ }), -/* 287 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33500,13 +33648,13 @@ var SequenceEqualCompareToSubscriber = (function (_super) { //# sourceMappingURL=sequenceEqual.js.map /***/ }), -/* 288 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var multicast_1 = __webpack_require__(19); -var refCount_1 = __webpack_require__(74); +var multicast_1 = __webpack_require__(20); +var refCount_1 = __webpack_require__(75); var Subject_1 = __webpack_require__(9); function shareSubjectFactory() { return new Subject_1.Subject(); @@ -33531,12 +33679,12 @@ exports.share = share; //# sourceMappingURL=share.js.map /***/ }), -/* 289 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ReplaySubject_1 = __webpack_require__(49); +var ReplaySubject_1 = __webpack_require__(50); /** * @method shareReplay * @owner Observable @@ -33582,7 +33730,7 @@ function shareReplayOperator(bufferSize, windowTime, scheduler) { //# sourceMappingURL=shareReplay.js.map /***/ }), -/* 290 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33593,7 +33741,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var EmptyError_1 = __webpack_require__(50); +var EmptyError_1 = __webpack_require__(51); /** * Returns an Observable that emits the single item emitted by the source Observable that matches a specified * predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no @@ -33681,7 +33829,7 @@ var SingleSubscriber = (function (_super) { //# sourceMappingURL=single.js.map /***/ }), -/* 291 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33738,7 +33886,7 @@ var SkipSubscriber = (function (_super) { //# sourceMappingURL=skip.js.map /***/ }), -/* 292 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33749,7 +33897,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var ArgumentOutOfRangeError_1 = __webpack_require__(34); +var ArgumentOutOfRangeError_1 = __webpack_require__(35); /** * Skip the last `count` values emitted by the source Observable. * @@ -33837,7 +33985,7 @@ var SkipLastSubscriber = (function (_super) { //# sourceMappingURL=skipLast.js.map /***/ }), -/* 293 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33914,7 +34062,7 @@ var SkipUntilSubscriber = (function (_super) { //# sourceMappingURL=skipUntil.js.map /***/ }), -/* 294 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33986,15 +34134,15 @@ var SkipWhileSubscriber = (function (_super) { //# sourceMappingURL=skipWhile.js.map /***/ }), -/* 295 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ArrayObservable_1 = __webpack_require__(17); -var ScalarObservable_1 = __webpack_require__(62); -var EmptyObservable_1 = __webpack_require__(18); -var concat_1 = __webpack_require__(27); +var ArrayObservable_1 = __webpack_require__(18); +var ScalarObservable_1 = __webpack_require__(63); +var EmptyObservable_1 = __webpack_require__(19); +var concat_1 = __webpack_require__(28); var isScheduler_1 = __webpack_require__(15); /* tslint:enable:max-line-length */ /** @@ -34040,13 +34188,13 @@ exports.startWith = startWith; //# sourceMappingURL=startWith.js.map /***/ }), -/* 296 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var AsapAction_1 = __webpack_require__(678); -var AsapScheduler_1 = __webpack_require__(680); +var AsapAction_1 = __webpack_require__(679); +var AsapScheduler_1 = __webpack_require__(681); /** * * Asap Scheduler @@ -34085,13 +34233,13 @@ exports.asap = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); //# sourceMappingURL=asap.js.map /***/ }), -/* 297 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var switchMap_1 = __webpack_require__(75); -var identity_1 = __webpack_require__(229); +var switchMap_1 = __webpack_require__(76); +var identity_1 = __webpack_require__(230); function switchAll() { return switchMap_1.switchMap(identity_1.identity); } @@ -34099,7 +34247,7 @@ exports.switchAll = switchAll; //# sourceMappingURL=switchAll.js.map /***/ }), -/* 298 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34230,7 +34378,7 @@ var SwitchMapToSubscriber = (function (_super) { //# sourceMappingURL=switchMapTo.js.map /***/ }), -/* 299 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34241,8 +34389,8 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = __webpack_require__(2); -var ArgumentOutOfRangeError_1 = __webpack_require__(34); -var EmptyObservable_1 = __webpack_require__(18); +var ArgumentOutOfRangeError_1 = __webpack_require__(35); +var EmptyObservable_1 = __webpack_require__(19); /** * Emits only the first `count` values emitted by the source Observable. * @@ -34327,7 +34475,7 @@ var TakeSubscriber = (function (_super) { //# sourceMappingURL=take.js.map /***/ }), -/* 300 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34408,7 +34556,7 @@ var TakeUntilSubscriber = (function (_super) { //# sourceMappingURL=takeUntil.js.map /***/ }), -/* 301 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34506,7 +34654,7 @@ var TakeWhileSubscriber = (function (_super) { //# sourceMappingURL=takeWhile.js.map /***/ }), -/* 302 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34518,7 +34666,7 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Subscriber_1 = __webpack_require__(2); var async_1 = __webpack_require__(6); -var throttle_1 = __webpack_require__(51); +var throttle_1 = __webpack_require__(52); /** * Emits a value from the source Observable, then ignores subsequent source * values for `duration` milliseconds, then repeats this process. @@ -34628,13 +34776,13 @@ function dispatchNext(arg) { //# sourceMappingURL=throttleTime.js.map /***/ }), -/* 303 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var timeInterval_1 = __webpack_require__(304); +var timeInterval_1 = __webpack_require__(305); exports.TimeInterval = timeInterval_1.TimeInterval; /** * @param scheduler @@ -34650,7 +34798,7 @@ exports.timeInterval = timeInterval; //# sourceMappingURL=timeInterval.js.map /***/ }), -/* 304 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34709,7 +34857,7 @@ var TimeIntervalSubscriber = (function (_super) { //# sourceMappingURL=timeInterval.js.map /***/ }), -/* 305 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34720,9 +34868,9 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var async_1 = __webpack_require__(6); -var isDate_1 = __webpack_require__(47); +var isDate_1 = __webpack_require__(48); var Subscriber_1 = __webpack_require__(2); -var TimeoutError_1 = __webpack_require__(306); +var TimeoutError_1 = __webpack_require__(307); /** * * Errors if Observable does not emit a value in given time span. @@ -34856,7 +35004,7 @@ var TimeoutSubscriber = (function (_super) { //# sourceMappingURL=timeout.js.map /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34887,7 +35035,7 @@ exports.TimeoutError = TimeoutError; //# sourceMappingURL=TimeoutError.js.map /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34898,7 +35046,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var async_1 = __webpack_require__(6); -var isDate_1 = __webpack_require__(47); +var isDate_1 = __webpack_require__(48); var OuterSubscriber_1 = __webpack_require__(4); var subscribeToResult_1 = __webpack_require__(5); /* tslint:enable:max-line-length */ @@ -35021,12 +35169,12 @@ var TimeoutWithSubscriber = (function (_super) { //# sourceMappingURL=timeoutWith.js.map /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reduce_1 = __webpack_require__(35); +var reduce_1 = __webpack_require__(36); function toArrayReducer(arr, item, index) { if (index === 0) { return [item]; @@ -35041,7 +35189,7 @@ exports.toArray = toArray; //# sourceMappingURL=toArray.js.map /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35159,7 +35307,7 @@ var WindowSubscriber = (function (_super) { //# sourceMappingURL=window.js.map /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35298,7 +35446,7 @@ var WindowCountSubscriber = (function (_super) { //# sourceMappingURL=windowCount.js.map /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35311,7 +35459,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Subject_1 = __webpack_require__(9); var async_1 = __webpack_require__(6); var Subscriber_1 = __webpack_require__(2); -var isNumeric_1 = __webpack_require__(30); +var isNumeric_1 = __webpack_require__(31); var isScheduler_1 = __webpack_require__(15); function windowTime(windowTimeSpan) { var scheduler = async_1.async; @@ -35467,7 +35615,7 @@ function dispatchWindowClose(state) { //# sourceMappingURL=windowTime.js.map /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35653,7 +35801,7 @@ var WindowToggleSubscriber = (function (_super) { //# sourceMappingURL=windowToggle.js.map /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35788,7 +35936,7 @@ var WindowSubscriber = (function (_super) { //# sourceMappingURL=windowWhen.js.map /***/ }), -/* 314 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35926,12 +36074,12 @@ var WithLatestFromSubscriber = (function (_super) { //# sourceMappingURL=withLatestFrom.js.map /***/ }), -/* 315 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var zip_1 = __webpack_require__(48); +var zip_1 = __webpack_require__(49); function zipAll(project) { return function (source) { return source.lift(new zip_1.ZipOperator(project)); }; } @@ -35939,12 +36087,12 @@ exports.zipAll = zipAll; //# sourceMappingURL=zipAll.js.map /***/ }), -/* 316 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var SubscriptionLog_1 = __webpack_require__(317); +var SubscriptionLog_1 = __webpack_require__(318); var SubscriptionLoggable = (function () { function SubscriptionLoggable() { this.subscriptions = []; @@ -35964,7 +36112,7 @@ exports.SubscriptionLoggable = SubscriptionLoggable; //# sourceMappingURL=SubscriptionLoggable.js.map /***/ }), -/* 317 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35981,7 +36129,7 @@ exports.SubscriptionLog = SubscriptionLog; //# sourceMappingURL=SubscriptionLog.js.map /***/ }), -/* 318 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36000,7 +36148,7 @@ exports.applyMixins = applyMixins; //# sourceMappingURL=applyMixins.js.map /***/ }), -/* 319 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36010,8 +36158,8 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var AsyncAction_1 = __webpack_require__(31); -var AsyncScheduler_1 = __webpack_require__(32); +var AsyncAction_1 = __webpack_require__(32); +var AsyncScheduler_1 = __webpack_require__(33); var VirtualTimeScheduler = (function (_super) { __extends(VirtualTimeScheduler, _super); function VirtualTimeScheduler(SchedulerAction, maxFrames) { @@ -36119,18 +36267,18 @@ exports.VirtualAction = VirtualAction; //# sourceMappingURL=VirtualTimeScheduler.js.map /***/ }), -/* 320 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(736); +const ansiRegex = __webpack_require__(738); module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; /***/ }), -/* 321 */ +/* 322 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36160,15 +36308,32 @@ function getProjectPaths(rootPath, options) { projectPaths.push((0, _path.resolve)(rootPath, '../kibana-extra/*/plugins/*')); } return projectPaths; -} +} /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /***/ }), -/* 322 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(323); +const NestedError = __webpack_require__(324); class CpFileError extends NestedError { constructor(message, nested) { @@ -36182,10 +36347,10 @@ module.exports = CpFileError; /***/ }), -/* 323 */ +/* 324 */ /***/ (function(module, exports, __webpack_require__) { -var inherits = __webpack_require__(79); +var inherits = __webpack_require__(82); var NestedError = function (message, nested) { this.nested = nested; @@ -36236,7 +36401,7 @@ module.exports = NestedError; /***/ }), -/* 324 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36246,7 +36411,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _cli = __webpack_require__(325); +var _cli = __webpack_require__(326); Object.defineProperty(exports, 'run', { enumerable: true, @@ -36255,7 +36420,7 @@ Object.defineProperty(exports, 'run', { } }); -var _production = __webpack_require__(740); +var _production = __webpack_require__(741); Object.defineProperty(exports, 'buildProductionProjects', { enumerable: true, @@ -36270,7 +36435,7 @@ Object.defineProperty(exports, 'prepareExternalProjectDependencies', { } }); -var _package_json = __webpack_require__(37); +var _package_json = __webpack_require__(38); Object.defineProperty(exports, 'transformDependencies', { enumerable: true, @@ -36280,7 +36445,7 @@ Object.defineProperty(exports, 'transformDependencies', { }); /***/ }), -/* 325 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36297,14 +36462,14 @@ let run = exports.run = (() => { // starts forwarding the `--` directly to this script, see // https://github.com/yarnpkg/yarn/blob/b2d3e1a8fe45ef376b716d597cc79b38702a9320/src/cli/index.js#L174-L182 if (argv.includes('--')) { - console.log(_chalk2.default.red(`Using "--" is not allowed, as it doesn't work with 'yarn kbn'.`)); + _log.log.write(_chalk2.default.red(`Using "--" is not allowed, as it doesn't work with 'yarn kbn'.`)); process.exit(1); } const options = (0, _getopts2.default)(argv, { alias: { + e: 'exclude', h: 'help', - i: 'include', - e: 'exclude' + i: 'include' } }); const args = options._; @@ -36320,7 +36485,7 @@ let run = exports.run = (() => { const commandOptions = { options, extraArgs, rootPath }; const command = _commands.commands[commandName]; if (command === undefined) { - console.log(_chalk2.default.red(`[${commandName}] is not a valid command, see 'kbn --help'`)); + _log.log.write(_chalk2.default.red(`[${commandName}] is not a valid command, see 'kbn --help'`)); process.exit(1); } yield (0, _run.runCommand)(command, commandOptions); @@ -36331,31 +36496,51 @@ let run = exports.run = (() => { }; })(); -var _getopts = __webpack_require__(326); +var _chalk = __webpack_require__(14); -var _getopts2 = _interopRequireDefault(_getopts); +var _chalk2 = _interopRequireDefault(_chalk); -var _dedent = __webpack_require__(327); +var _dedent = __webpack_require__(336); var _dedent2 = _interopRequireDefault(_dedent); -var _chalk = __webpack_require__(14); +var _getopts = __webpack_require__(337); -var _chalk2 = _interopRequireDefault(_chalk); +var _getopts2 = _interopRequireDefault(_getopts); var _path = __webpack_require__(3); -var _commands = __webpack_require__(337); +var _commands = __webpack_require__(338); -var _run = __webpack_require__(733); +var _run = __webpack_require__(734); + +var _log = __webpack_require__(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + function help() { const availableCommands = Object.keys(_commands.commands).map(commandName => _commands.commands[commandName]).map(command => `${command.name} - ${command.description}`); - console.log(_dedent2.default` + _log.log.write(_dedent2.default` usage: kbn [] By default commands are run for Kibana itself, all packages in the 'packages/' @@ -36374,174 +36559,6 @@ function help() { `); } -/***/ }), -/* 326 */ -/***/ (function(module, exports) { - -const SHORTSPLIT = /$|[!-@\[-`{-~].*/g -const EMPTY = [] - -function array(any) { - return Array.isArray(any) ? any : [any] -} - -function aliases(aliases) { - var out = {} - - for (var key in aliases) { - var alias = (out[key] = array(aliases[key])) - - for (var i = 0, len = alias.length; i < len; i++) { - var curr = (out[alias[i]] = [key]) - - for (var j = 0; j < len; j++) { - if (i !== j) { - curr.push(alias[j]) - } - } - } - } - - return out -} - -function booleans(aliases, booleans) { - var out = {} - - if (booleans !== undefined) { - for (var i = 0, len = booleans.length; i < len; i++) { - var key = booleans[i] - var alias = aliases[key] - - out[key] = true - - if (alias === undefined) { - aliases[key] = EMPTY - } else { - for (var j = 0, end = alias.length; j < end; j++) { - out[alias[j]] = true - } - } - } - } - - return out -} - -function defaults(aliases, defaults) { - var out = {} - - for (var key in defaults) { - var value = defaults[key] - var alias = aliases[key] - - if (out[key] === undefined) { - out[key] = value - - if (alias === undefined) { - aliases[key] = EMPTY - } else { - for (var i = 0, len = alias.length; i < len; i++) { - out[alias[i]] = value - } - } - } - } - - return out -} - -function set(out, key, value, aliases, unknown) { - var curr = out[key] - var alias = aliases[key] - var known = alias !== undefined - - if (known || unknown === undefined || false !== unknown(key)) { - if (curr === undefined) { - out[key] = value - } else { - if (Array.isArray(curr)) { - curr.push(value) - } else { - out[key] = [curr, value] - } - } - - if (known) { - for (var i = 0, len = alias.length; i < len; ) { - out[alias[i++]] = out[key] - } - } - } -} - -module.exports = function(argv, opts) { - var unknown = (opts = opts || {}).unknown - var alias = aliases(opts.alias) - var values = defaults(alias, opts.default) - var bools = booleans(alias, opts.boolean) - var out = { _: [] } - - for (var i = 0, j = 0, len = argv.length, _ = out._; i < len; i++) { - var arg = argv[i] - - if (arg === "--") { - while (++i < len) { - _.push(argv[i]) - } - } else if (arg === "-" || arg[0] !== "-") { - _.push(arg) - } else { - if (arg[1] === "-") { - var end = arg.indexOf("=", 2) - - if (0 <= end) { - set(out, arg.slice(2, end), arg.slice(end + 1), alias, unknown) - } else { - if ("n" === arg[2] && "o" === arg[3] && "-" === arg[4]) { - set(out, arg.slice(5), false, alias, unknown) - } else { - var key = arg.slice(2) - set( - out, - key, - len === (j = i + 1) || - argv[j][0] === "-" || - bools[key] !== undefined || - argv[(i = j)], - alias, - unknown - ) - } - } - } else { - SHORTSPLIT.lastIndex = 2 - var match = SHORTSPLIT.exec(arg) - var end = match.index - var value = - match[0] || - len === (j = i + 1) || - argv[j][0] === "-" || - bools[arg[end - 1]] !== undefined || - argv[(i = j)] - - for (j = 1; j < end; ) { - set(out, arg[j], ++j !== end || value, alias, unknown) - } - } - } - } - - for (var key in values) { - if (out[key] === undefined) { - out[key] = values[key] - } - } - - return out -} - - /***/ }), /* 327 */ /***/ (function(module, exports, __webpack_require__) { @@ -36549,72 +36566,6 @@ module.exports = function(argv, opts) { "use strict"; -function dedent(strings) { - - var raw = void 0; - if (typeof strings === "string") { - // dedent can be used as a plain function - raw = [strings]; - } else { - raw = strings.raw; - } - - // first, perform interpolation - var result = ""; - for (var i = 0; i < raw.length; i++) { - result += raw[i]. - // join lines when there is a suppressed newline - replace(/\\\n[ \t]*/g, ""). - - // handle escaped backticks - replace(/\\`/g, "`"); - - if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { - result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; - } - } - - // now strip indentation - var lines = result.split("\n"); - var mindent = null; - lines.forEach(function (l) { - var m = l.match(/^(\s+)\S+/); - if (m) { - var indent = m[1].length; - if (!mindent) { - // this is the first indented line - mindent = indent; - } else { - mindent = Math.min(mindent, indent); - } - } - }); - - if (mindent !== null) { - result = lines.map(function (l) { - return l[0] === " " ? l.slice(mindent) : l; - }).join("\n"); - } - - // dedent eats leading and trailing whitespace too - result = result.trim(); - - // handle escaped newlines at the end to ensure they don't get stripped too - return result.replace(/\\n/g, "\n"); -} - -if (true) { - module.exports = dedent; -} - - -/***/ }), -/* 328 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; module.exports = function (str) { @@ -36627,12 +36578,12 @@ module.exports = function (str) { /***/ }), -/* 329 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(330); +const colorConvert = __webpack_require__(329); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -36784,14 +36735,14 @@ Object.defineProperty(module, 'exports', { get: assembleStyles }); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53)(module))) /***/ }), -/* 330 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(77); -var route = __webpack_require__(332); +var conversions = __webpack_require__(78); +var route = __webpack_require__(331); var convert = {}; @@ -36871,7 +36822,7 @@ module.exports = convert; /***/ }), -/* 331 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37030,10 +36981,10 @@ module.exports = { /***/ }), -/* 332 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(77); +var conversions = __webpack_require__(78); /* this function routes a model to all other models. @@ -37133,13 +37084,13 @@ module.exports = function (fromModel) { /***/ }), -/* 333 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const os = __webpack_require__(334); -const hasFlag = __webpack_require__(335); +const os = __webpack_require__(333); +const hasFlag = __webpack_require__(334); const env = process.env; @@ -37269,13 +37220,13 @@ module.exports = { /***/ }), -/* 334 */ +/* 333 */ /***/ (function(module, exports) { module.exports = require("os"); /***/ }), -/* 335 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37290,7 +37241,7 @@ module.exports = (flag, argv) => { /***/ }), -/* 336 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37424,35 +37375,287 @@ module.exports = (chalk, tmp) => { }; +/***/ }), +/* 336 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function dedent(strings) { + + var raw = void 0; + if (typeof strings === "string") { + // dedent can be used as a plain function + raw = [strings]; + } else { + raw = strings.raw; + } + + // first, perform interpolation + var result = ""; + for (var i = 0; i < raw.length; i++) { + result += raw[i]. + // join lines when there is a suppressed newline + replace(/\\\n[ \t]*/g, ""). + + // handle escaped backticks + replace(/\\`/g, "`"); + + if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { + result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; + } + } + + // now strip indentation + var lines = result.split("\n"); + var mindent = null; + lines.forEach(function (l) { + var m = l.match(/^(\s+)\S+/); + if (m) { + var indent = m[1].length; + if (!mindent) { + // this is the first indented line + mindent = indent; + } else { + mindent = Math.min(mindent, indent); + } + } + }); + + if (mindent !== null) { + result = lines.map(function (l) { + return l[0] === " " ? l.slice(mindent) : l; + }).join("\n"); + } + + // dedent eats leading and trailing whitespace too + result = result.trim(); + + // handle escaped newlines at the end to ensure they don't get stripped too + return result.replace(/\\n/g, "\n"); +} + +if (true) { + module.exports = dedent; +} + + /***/ }), /* 337 */ +/***/ (function(module, exports) { + +const SHORTSPLIT = /$|[!-@\[-`{-~].*/g +const EMPTY = [] + +function array(any) { + return Array.isArray(any) ? any : [any] +} + +function aliases(aliases) { + var out = {} + + for (var key in aliases) { + var alias = (out[key] = array(aliases[key])) + + for (var i = 0, len = alias.length; i < len; i++) { + var curr = (out[alias[i]] = [key]) + + for (var j = 0; j < len; j++) { + if (i !== j) { + curr.push(alias[j]) + } + } + } + } + + return out +} + +function booleans(aliases, booleans) { + var out = {} + + if (booleans !== undefined) { + for (var i = 0, len = booleans.length; i < len; i++) { + var key = booleans[i] + var alias = aliases[key] + + out[key] = true + + if (alias === undefined) { + aliases[key] = EMPTY + } else { + for (var j = 0, end = alias.length; j < end; j++) { + out[alias[j]] = true + } + } + } + } + + return out +} + +function defaults(aliases, defaults) { + var out = {} + + for (var key in defaults) { + var value = defaults[key] + var alias = aliases[key] + + if (out[key] === undefined) { + out[key] = value + + if (alias === undefined) { + aliases[key] = EMPTY + } else { + for (var i = 0, len = alias.length; i < len; i++) { + out[alias[i]] = value + } + } + } + } + + return out +} + +function set(out, key, value, aliases, unknown) { + var curr = out[key] + var alias = aliases[key] + var known = alias !== undefined + + if (known || unknown === undefined || false !== unknown(key)) { + if (curr === undefined) { + out[key] = value + } else { + if (Array.isArray(curr)) { + curr.push(value) + } else { + out[key] = [curr, value] + } + } + + if (known) { + for (var i = 0, len = alias.length; i < len; ) { + out[alias[i++]] = out[key] + } + } + } +} + +module.exports = function(argv, opts) { + var unknown = (opts = opts || {}).unknown + var alias = aliases(opts.alias) + var values = defaults(alias, opts.default) + var bools = booleans(alias, opts.boolean) + var out = { _: [] } + + for (var i = 0, j = 0, len = argv.length, _ = out._; i < len; i++) { + var arg = argv[i] + + if (arg === "--") { + while (++i < len) { + _.push(argv[i]) + } + } else if (arg === "-" || arg[0] !== "-") { + _.push(arg) + } else { + if (arg[1] === "-") { + var end = arg.indexOf("=", 2) + + if (0 <= end) { + set(out, arg.slice(2, end), arg.slice(end + 1), alias, unknown) + } else { + if ("n" === arg[2] && "o" === arg[3] && "-" === arg[4]) { + set(out, arg.slice(5), false, alias, unknown) + } else { + var key = arg.slice(2) + set( + out, + key, + len === (j = i + 1) || + argv[j][0] === "-" || + bools[key] !== undefined || + argv[(i = j)], + alias, + unknown + ) + } + } + } else { + SHORTSPLIT.lastIndex = 2 + var match = SHORTSPLIT.exec(arg) + var end = match.index + var value = + match[0] || + len === (j = i + 1) || + argv[j][0] === "-" || + bools[arg[end - 1]] !== undefined || + argv[(i = j)] + + for (j = 1; j < end; ) { + set(out, arg[j], ++j !== end || value, alias, unknown) + } + } + } + } + + for (var key in values) { + if (out[key] === undefined) { + out[key] = values[key] + } + } + + return out +} + + +/***/ }), +/* 338 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); exports.commands = undefined; -var _bootstrap = __webpack_require__(338); +var _bootstrap = __webpack_require__(339); -var _clean = __webpack_require__(418); +var _clean = __webpack_require__(419); -var _run = __webpack_require__(436); +var _run = __webpack_require__(437); -var _watch = __webpack_require__(437); +var _watch = __webpack_require__(438); +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ const commands = exports.commands = { - bootstrap: _bootstrap.BootstrapCommand, - clean: _clean.CleanCommand, - run: _run.RunCommand, - watch: _watch.WatchCommand + bootstrap: _bootstrap.BootstrapCommand, + clean: _clean.CleanCommand, + run: _run.RunCommand, + watch: _watch.WatchCommand }; /***/ }), -/* 338 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37467,25 +37670,45 @@ var _chalk = __webpack_require__(14); var _chalk2 = _interopRequireDefault(_chalk); -var _projects = __webpack_require__(22); +var _link_project_executables = __webpack_require__(340); + +var _log = __webpack_require__(17); -var _link_project_executables = __webpack_require__(416); +var _parallelize = __webpack_require__(55); -var _parallelize = __webpack_require__(59); +var _projects = __webpack_require__(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + const BootstrapCommand = exports.BootstrapCommand = { - name: 'bootstrap', description: 'Install dependencies and crosslink projects', + name: 'bootstrap', run(projects, projectGraph, { options }) { return _asyncToGenerator(function* () { const batchedProjects = (0, _projects.topologicallyBatchProjects)(projects, projectGraph); const frozenLockfile = options['frozen-lockfile'] === true; const extraArgs = frozenLockfile ? ['--frozen-lockfile'] : []; - console.log(_chalk2.default.bold('\nRunning installs in topological order:')); + _log.log.write(_chalk2.default.bold('\nRunning installs in topological order:')); for (const batch of batchedProjects) { for (const project of batch) { if (project.hasDependencies()) { @@ -37493,7 +37716,7 @@ const BootstrapCommand = exports.BootstrapCommand = { } } } - console.log(_chalk2.default.bold('\nInstalls completed, linking package executables:\n')); + _log.log.write(_chalk2.default.bold('\nInstalls completed, linking package executables:\n')); yield (0, _link_project_executables.linkProjectExecutables)(projects, projectGraph); /** * At the end of the bootstrapping process we call all `kbn:bootstrap` scripts @@ -37501,7 +37724,7 @@ const BootstrapCommand = exports.BootstrapCommand = { * transpiled before they can be used. Ideally we shouldn't do this unless we * have to, as it will slow down the bootstrapping process. */ - console.log(_chalk2.default.bold('\nLinking executables completed, running `kbn:bootstrap` scripts\n')); + _log.log.write(_chalk2.default.bold('\nLinking executables completed, running `kbn:bootstrap` scripts\n')); yield (0, _parallelize.parallelizeBatches)(batchedProjects, (() => { var _ref = _asyncToGenerator(function* (pkg) { if (pkg.hasScript('kbn:bootstrap')) { @@ -37513,7513 +37736,4749 @@ const BootstrapCommand = exports.BootstrapCommand = { return _ref.apply(this, arguments); }; })()); - console.log(_chalk2.default.green.bold('\nBootstrapping completed!\n')); + _log.log.write(_chalk2.default.green.bold('\nBootstrapping completed!\n')); })(); } }; /***/ }), -/* 339 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = __webpack_require__(3); -var isWindows = process.platform === 'win32'; -var fs = __webpack_require__(7); +"use strict"; -// JavaScript implementation of realpath, ported from node pre-v6 -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.linkProjectExecutables = undefined; -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; +/** + * Yarn does not link the executables from dependencies that are installed + * using `link:` https://github.com/yarnpkg/yarn/pull/5046 + * + * We simulate this functionality by walking through each project's project + * dependencies, and manually linking their executables if defined. The logic + * for linking was mostly adapted from lerna: https://github.com/lerna/lerna/blob/1d7eb9eeff65d5a7de64dea73613b1bf6bfa8d57/src/PackageUtilities.js#L348 + */ +let linkProjectExecutables = exports.linkProjectExecutables = (() => { + var _ref = _asyncToGenerator(function* (projectsByName, projectGraph) { + for (const [projectName, projectDeps] of projectGraph) { + const project = projectsByName.get(projectName); + const binsDir = (0, _path.resolve)(project.nodeModulesLocation, '.bin'); + for (const projectDep of projectDeps) { + const executables = projectDep.getExecutables(); + for (const name of Object.keys(executables)) { + const srcPath = executables[name]; + // existing logic from lerna -- ensure that the bin we are going to + // point to exists or ignore it + if (!(yield (0, _fs.isFile)(srcPath))) { + continue; + } + const dest = (0, _path.resolve)(binsDir, name); + // Get relative project path with normalized path separators. + const projectRelativePath = (0, _path.relative)(project.path, srcPath).split(_path.sep).join('/'); + _log.log.write(_chalk2.default`{dim [${project.name}]} ${name} -> {dim ${projectRelativePath}}`); + yield (0, _fs.mkdirp)((0, _path.dirname)(dest)); + yield (0, _fs.createSymlink)(srcPath, dest, 'exec'); + yield (0, _fs.chmod)(dest, '755'); + } + } + } + }); - return callback; + return function linkProjectExecutables(_x, _x2) { + return _ref.apply(this, arguments); + }; +})(); - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } +var _path = __webpack_require__(3); - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} +var _chalk = __webpack_require__(14); -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} +var _chalk2 = _interopRequireDefault(_chalk); -var normalize = pathModule.normalize; +var _fs = __webpack_require__(54); -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} +var _log = __webpack_require__(17); -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { - var original = p, - seenLinks = {}, - knownHard = {}; +// On windows, create a .cmd file. +// Read the #! in the file to see what it uses. The vast majority +// of the time, this will be either: +// "#!/usr/bin/env " +// or: +// "#! " +// +// Write a binroot/pkg.bin + ".cmd" file that has this line in it: +// @ %~dp0 %* - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; +module.exports = cmdShim +cmdShim.ifExists = cmdShimIfExists - start(); +var fs = __webpack_require__(23) - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; +var mkdir = __webpack_require__(80) + , path = __webpack_require__(3) + , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; +// Try to unlink, but ignore errors. +// Any problems will surface later. +function rm (path, cb) { + fs.unlink(path, function(er) { + cb() + }) +} - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } +function cmdShim (from, to, cb) { + fs.stat(from, function (er, stat) { + if (er) + return cb(er) - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } + cmdShim_(from, to, cb) + }) +} - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } +function cmdShim_ (from, to, cb) { + var then = times(2, next, cb) + rm(to, then) + rm(to + ".cmd", then) - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); + function next(er) { + writeShim(from, to, cb) } +} - if (cache) cache[original] = p; - - return p; -}; - +function writeShim (from, to, cb) { + // make a cmd file and a sh script + // First, check if the bin is a #! of some sort. + // If not, then assume it's something that'll be compiled, or some other + // sort of script, and just call it directly. + mkdir(path.dirname(to), function (er) { + if (er) + return cb(er) + fs.readFile(from, "utf8", function (er, data) { + if (er) return writeShim_(from, to, null, null, cb) + var firstLine = data.trim().split(/\r*\n/)[0] + , shebang = firstLine.match(shebangExpr) + if (!shebang) return writeShim_(from, to, null, null, cb) + var prog = shebang[1] + , args = shebang[2] || "" + return writeShim_(from, to, prog, args, cb) + }) + }) +} -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; +function writeShim_ (from, to, prog, args, cb) { + var shTarget = path.relative(path.dirname(to), from) + , target = shTarget.split("/").join("\\") + , longProg + , shProg = prog && prog.split("\\").join("/") + , shLongProg + shTarget = shTarget.split("\\").join("/") + args = args || "" + if (!prog) { + prog = "\"%~dp0\\" + target + "\"" + shProg = "\"$basedir/" + shTarget + "\"" + args = "" + target = "" + shTarget = "" + } else { + longProg = "\"%~dp0\\" + prog + ".exe\"" + shLongProg = "\"$basedir/" + prog + "\"" + target = "\"%~dp0\\" + target + "\"" + shTarget = "\"$basedir/" + shTarget + "\"" } - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); + // @IF EXIST "%~dp0\node.exe" ( + // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) ELSE ( + // SETLOCAL + // SET PATHEXT=%PATHEXT:;.JS;=;% + // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) + var cmd + if (longProg) { + cmd = "@IF EXIST " + longProg + " (\r\n" + + " " + longProg + " " + args + " " + target + " %*\r\n" + + ") ELSE (\r\n" + + " @SETLOCAL\r\n" + + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" + + " " + prog + " " + args + " " + target + " %*\r\n" + + ")" + } else { + cmd = "@" + prog + " " + args + " " + target + " %*\r\n" } - var original = p, - seenLinks = {}, - knownHard = {}; + // #!/bin/sh + // basedir=`dirname "$0"` + // + // case `uname` in + // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + // esac + // + // if [ -x "$basedir/node.exe" ]; then + // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // else + // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // fi + // exit $ret - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; + var sh = "#!/bin/sh\n" - start(); + if (shLongProg) { + sh = sh + + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" + + "\n" + + "case `uname` in\n" + + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" + + "esac\n" + + "\n" - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; + sh = sh + + "if [ -x "+shLongProg+" ]; then\n" + + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "else \n" + + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "fi\n" + + "exit $ret\n" + } else { + sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" + + "exit $?\n" + } - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } + var then = times(2, next, cb) + fs.writeFile(to + ".cmd", cmd, "utf8", then) + fs.writeFile(to, sh, "utf8", then) + function next () { + chmodShim(to, cb) } +} - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); +function chmodShim (to, cb) { + var then = times(2, cb, cb) + fs.chmod(to, 0755, then) + fs.chmod(to + ".cmd", 0755, then) +} + +function times(n, ok, cb) { + var errState = null + return function(er) { + if (!errState) { + if (er) + cb(errState = er) + else if (--n === 0) + ok() } + } +} - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } +var fs = __webpack_require__(79) +var constants = __webpack_require__(343) - return fs.lstat(base, gotStat); - } +var origCwd = process.cwd +var cwd = null - function gotStat(err, stat) { - if (err) return cb(err); +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); +var chdir = process.chdir +process.chdir = function(d) { + cwd = null + chdir.call(process, d) +} - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } +module.exports = patch - function gotTarget(err, target, base) { - if (err) return cb(err); +function patch (fs) { + // (re-)implement some things that are known busted or missing. - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) } - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) } -}; - -/***/ }), -/* 340 */ -/***/ (function(module, exports, __webpack_require__) { + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. -var concatMap = __webpack_require__(341); -var balanced = __webpack_require__(342); + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) -module.exports = expandTop; + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. - var parts = []; - var m = balanced('{', '}', str); + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + }})(fs.rename) + } - if (!m) - return str.split(','); + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + }})(fs.read) - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) +} - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); +function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) } - parts.push.apply(parts, p); + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - return parts; + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } } -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } +function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } - return expand(escapeBraces(str), true).map(unescapeBraces); -} + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } -function identity(e) { - return e; + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } } -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); +function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } } -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; +function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } } -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; +function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) } +} - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } +function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er } } +} - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - var N; +function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, cb) { + return orig.call(fs, target, function (er, stats) { + if (!stats) return cb.apply(this, arguments) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + if (cb) cb.apply(this, arguments) + }) + } +} - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); +function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target) { + var stats = orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } +} - N = []; +// ENOSYS means that the fs doesn't support the op. Just ignore +// that, because it doesn't matter. +// +// if there's no getuid, or if getuid() is something other +// than 0, and the error is EINVAL or EPERM, then just ignore +// it. +// +// This specific case is a silent failure in cp, install, tar, +// and most other unix tools that manage permissions. +// +// When running as root, or if other types of errors are +// encountered, then it's strict. +function chownErOk (er) { + if (!er) + return true - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } + if (er.code === "ENOSYS") + return true - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true } - return expansions; + return false } - /***/ }), -/* 341 */ +/* 343 */ /***/ (function(module, exports) { -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - +module.exports = require("constants"); /***/ }), -/* 342 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Stream = __webpack_require__(21).Stream -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); +module.exports = legacy - var r = range(a, b, str); +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} + Stream.call(this); -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; + var self = this; - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; - bi = str.indexOf(b, i + 1); - } + options = options || {}; - i = ai < bi && ai >= 0 ? ai : bi; + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; } - if (begs.length) { - result = [ left, right ]; - } - } + if (this.encoding) this.setEncoding(this.encoding); - return result; -} + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + if (this.start > this.end) { + throw new Error('start must be <= end'); + } -/***/ }), -/* 343 */ -/***/ (function(module, exports) { + this.pos = this.start; + } -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } -/***/ }), -/* 344 */ -/***/ (function(module, exports, __webpack_require__) { + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } -module.exports = globSync -globSync.GlobSync = GlobSync + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); -var fs = __webpack_require__(7) -var rp = __webpack_require__(78) -var minimatch = __webpack_require__(53) -var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(23).Glob -var util = __webpack_require__(13) -var path = __webpack_require__(3) -var assert = __webpack_require__(24) -var isAbsolute = __webpack_require__(54) -var common = __webpack_require__(80) -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored + Stream.call(this); -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') + this.path = path; + this.fd = null; + this.writable = true; - return new GlobSync(pattern, options).found -} + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') + options = options || {}; - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } - setopts(this, pattern, options) + this.pos = this.start; + } - if (this.noprocess) - return this + this.busy = false; + this._queue = []; - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } } - this._finish() } -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} +/***/ }), +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. +var pathModule = __webpack_require__(3); +var isWindows = process.platform === 'win32'; +var fs = __webpack_require__(7); - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return +// JavaScript implementation of realpath, ported from node pre-v6 - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } } - var remain = pattern.slice(n) + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} - var abs = this._makeAbs(read) +var normalize = pathModule.normalize; - //if ignored, skip processing - if (childrenIgnored(this, read)) - return +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; } +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } - // if the abs isn't a dir, then nothing can match! - if (!entries) - return + var original = p, + seenLinks = {}, + knownHard = {}; - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; } } - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; } - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } } - this._emitMatch(index, e) + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; } - // This was the last one, and no stats were needed - return - } - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); } -} - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return + if (cache) cache[original] = p; - var abs = this._makeAbs(e) + return p; +}; - if (this.mark) - e = this._mark(e) - if (this.absolute) { - e = abs +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; } - if (this.matches[index][e]) - return + // make p is absolute + p = pathModule.resolve(p); - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); } - this.matches[index][e] = true + var original = p, + seenLinks = {}, + knownHard = {}; - if (this.stat) - this._stat(e) -} + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + start(); -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); } } - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } - if (Array.isArray(c)) - return c + return fs.lstat(base, gotStat); } - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} + function gotStat(err, stat) { + if (err) return cb(err); -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); } - } - this.cache[abs] = entries + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); - // mark and cache dir-ness - return entries -} + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break + function gotTarget(err, target, base) { + if (err) return cb(err); - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); } -} +}; -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return +var concatMap = __webpack_require__(347); +var balanced = __webpack_require__(348); - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) +module.exports = expandTop; - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; - var len = entries.length - var isSym = this.symlinks[abs] +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) + var parts = []; + var m = balanced('{', '}', str); - if (!this.matches[index]) - this.matches[index] = Object.create(null) + if (!m) + return str.split(','); - // If it doesn't exist, then just mark the lack of results - if (!exists) - return + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); } - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') + parts.push.apply(parts, p); - // Mark this as a match - this._emitMatch(index, prefix) + return parts; } -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' +function expandTop(str) { + if (!str) + return []; - if (f.length > this.maxLength) - return false + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] + return expand(escapeBraces(str), true).map(unescapeBraces); +} - if (Array.isArray(c)) - c = 'DIR' +function identity(e) { + return e; +} - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} - if (needDir && c === 'FILE') - return false +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } +function expand(str, isTop) { + var expansions = []; - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); } + return [str]; + } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); } - } else { - stat = lstat } } - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. - if (needDir && c === 'FILE') - return false + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; - return c -} + var N; -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } -/***/ }), -/* 345 */ -/***/ (function(module, exports, __webpack_require__) { + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } -var wrappy = __webpack_require__(81) -var reqs = Object.create(null) -var once = __webpack_require__(82) + return expansions; +} -module.exports = wrappy(inflight) -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) +/***/ }), +/* 347 */ +/***/ (function(module, exports) { - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); } - }) -} - -function slice (args) { - var length = args.length - var array = [] + return res; +}; - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; /***/ }), -/* 346 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.runScriptInPackage = exports.installInDir = undefined; - -/** - * Install all dependencies in the given directory - */ -let installInDir = exports.installInDir = (() => { - var _ref = _asyncToGenerator(function* (directory, extraArgs = []) { - const options = ['install', '--non-interactive', '--mutex file', ...extraArgs]; - // We pass the mutex flag to ensure only one instance of yarn runs at any - // given time (e.g. to avoid conflicts). - yield (0, _child_process.spawn)('yarn', options, { - cwd: directory - }); - }); + var r = range(a, b, str); - return function installInDir(_x) { - return _ref.apply(this, arguments); - }; -})(); -/** - * Run script in the given directory - */ + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} -let runScriptInPackage = exports.runScriptInPackage = (() => { - var _ref2 = _asyncToGenerator(function* (script, args, pkg) { - const execOpts = { - cwd: pkg.path - }; - yield (0, _child_process.spawn)('yarn', ['run', script, ...args], execOpts); - }); +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; - return function runScriptInPackage(_x2, _x3, _x4) { - return _ref2.apply(this, arguments); - }; -})(); -/** - * Run script in the given directory - */ + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } -exports.runScriptInPackageStreaming = runScriptInPackageStreaming; + bi = str.indexOf(b, i + 1); + } -var _child_process = __webpack_require__(347); + i = ai < bi && ai >= 0 ? ai : bi; + } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } + if (begs.length) { + result = [ left, right ]; + } + } -function runScriptInPackageStreaming(script, args, pkg) { - const execOpts = { - cwd: pkg.path - }; - return (0, _child_process.spawnStreaming)('yarn', ['run', script, ...args], execOpts, { - prefix: pkg.name - }); + return result; } -/***/ }), -/* 347 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), +/* 349 */ +/***/ (function(module, exports) { -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} -exports.spawn = spawn; -exports.spawnStreaming = spawnStreaming; -var _execa = __webpack_require__(348); +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { -var _execa2 = _interopRequireDefault(_execa); +module.exports = globSync +globSync.GlobSync = GlobSync -var _chalk = __webpack_require__(14); +var fs = __webpack_require__(7) +var rp = __webpack_require__(81) +var minimatch = __webpack_require__(56) +var Minimatch = minimatch.Minimatch +var Glob = __webpack_require__(26).Glob +var util = __webpack_require__(13) +var path = __webpack_require__(3) +var assert = __webpack_require__(24) +var isAbsolute = __webpack_require__(57) +var common = __webpack_require__(83) +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored -var _chalk2 = _interopRequireDefault(_chalk); +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') -var _strongLogTransformer = __webpack_require__(375); + return new GlobSync(pattern, options).found +} -var _strongLogTransformer2 = _interopRequireDefault(_strongLogTransformer); +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') -var _logSymbols = __webpack_require__(207); + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') -var _logSymbols2 = _interopRequireDefault(_logSymbols); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + setopts(this, pattern, options) -function generateColors() { - const colorWheel = [_chalk2.default.cyan, _chalk2.default.magenta, _chalk2.default.blue, _chalk2.default.yellow, _chalk2.default.green, _chalk2.default.red]; - const count = colorWheel.length; - let children = 0; - return () => colorWheel[children++ % count]; -} -function spawn(command, args, opts) { - return (0, _execa2.default)(command, args, _extends({}, opts, { - stdio: 'inherit' - })); + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() } -const nextColor = generateColors(); -function spawnStreaming(command, args, opts, { prefix }) { - const spawned = (0, _execa2.default)(command, args, _extends({}, opts, { - stdio: ['ignore', 'pipe', 'pipe'] - })); - const color = nextColor(); - const prefixedStdout = (0, _strongLogTransformer2.default)({ tag: `${color.bold(prefix)}:` }); - const prefixedStderr = (0, _strongLogTransformer2.default)({ - tag: `${_logSymbols2.default.error} ${color.bold(prefix)}:`, - mergeMultiline: true - }); - spawned.stdout.pipe(prefixedStdout).pipe(process.stdout); - spawned.stderr.pipe(prefixedStderr).pipe(process.stderr); - return spawned; + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) } -/***/ }), -/* 348 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) -const path = __webpack_require__(3); -const childProcess = __webpack_require__(56); -const util = __webpack_require__(13); -const crossSpawn = __webpack_require__(349); -const stripEof = __webpack_require__(365); -const npmRunPath = __webpack_require__(366); -const isStream = __webpack_require__(368); -const _getStream = __webpack_require__(369); -const pFinally = __webpack_require__(371); -const onExit = __webpack_require__(57); -const errname = __webpack_require__(373); -const stdio = __webpack_require__(374); + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. -const TEN_MEGABYTES = 1000 * 1000 * 10; + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return -function handleArgs(cmd, args, opts) { - let parsed; + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break - opts = Object.assign({ - extendEnv: true, - env: {} - }, opts); + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } - if (opts.extendEnv) { - opts.env = Object.assign({}, process.env, opts.env); - } + var remain = pattern.slice(n) - if (opts.__winShell === true) { - delete opts.__winShell; - parsed = { - command: cmd, - args, - options: opts, - file: cmd, - original: cmd - }; - } else { - parsed = crossSpawn._parse(cmd, args, opts); - } + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix - opts = Object.assign({ - maxBuffer: TEN_MEGABYTES, - stripEof: true, - preferLocal: true, - localDir: parsed.options.cwd || process.cwd(), - encoding: 'utf8', - reject: true, - cleanup: true - }, parsed.options); + var abs = this._makeAbs(read) - opts.stdio = stdio(opts); + //if ignored, skip processing + if (childrenIgnored(this, read)) + return - if (opts.preferLocal) { - opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); - } + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} - if (opts.detached) { - // #115 - opts.cleanup = false; - } - if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { - // #116 - parsed.args.unshift('/q'); - } +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) - return { - cmd: parsed.command, - args: parsed.args, - opts, - parsed - }; -} + // if the abs isn't a dir, then nothing can match! + if (!entries) + return -function handleInput(spawned, opts) { - const input = opts.input; + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' - if (input === null || input === undefined) { - return; - } + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -} + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return -function handleOutput(opts, val) { - if (val && opts.stripEof) { - val = stripEof(val); - } + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. - return val; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } } -function handleShell(fn, cmd, opts) { - let file = '/bin/sh'; - let args = ['-c', cmd]; - opts = Object.assign({}, opts); +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return - if (process.platform === 'win32') { - opts.__winShell = true; - file = process.env.comspec || 'cmd.exe'; - args = ['/s', '/c', `"${cmd}"`]; - opts.windowsVerbatimArguments = true; - } + var abs = this._makeAbs(e) - if (opts.shell) { - file = opts.shell; - delete opts.shell; - } + if (this.mark) + e = this._mark(e) - return fn(file, args, opts); -} + if (this.absolute) { + e = abs + } -function getStream(process, stream, encoding, maxBuffer) { - if (!process[stream]) { - return null; - } + if (this.matches[index][e]) + return - let ret; + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } - if (encoding) { - ret = _getStream(process[stream], { - encoding, - maxBuffer - }); - } else { - ret = _getStream.buffer(process[stream], {maxBuffer}); - } + this.matches[index][e] = true - return ret.catch(err => { - err.stream = stream; - err.message = `${stream} ${err.message}`; - throw err; - }); + if (this.stat) + this._stat(e) } -function makeError(result, options) { - const stdout = result.stdout; - const stderr = result.stderr; - let err = result.error; - const code = result.code; - const signal = result.signal; +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) - const parsed = options.parsed; - const joinedCmd = options.joinedCmd; - const timedOut = options.timedOut || false; + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } - if (!err) { - let output = ''; + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym - if (Array.isArray(parsed.opts.stdio)) { - if (parsed.opts.stdio[2] !== 'inherit') { - output += output.length > 0 ? stderr : `\n${stderr}`; - } + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) - if (parsed.opts.stdio[1] !== 'inherit') { - output += `\n${stdout}`; - } - } else if (parsed.opts.stdio !== 'inherit') { - output = `\n${stderr}${stdout}`; - } + return entries +} - err = new Error(`Command failed: ${joinedCmd}${output}`); - err.code = code < 0 ? errname(code) : code; - } +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries - err.stdout = stdout; - err.stderr = stderr; - err.failed = true; - err.signal = signal || null; - err.cmd = joinedCmd; - err.timedOut = timedOut; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) - return err; + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } } -function joinCmd(cmd, args) { - let joinedCmd = cmd; +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } - if (Array.isArray(args) && args.length > 0) { - joinedCmd += ' ' + args.join(' '); - } + this.cache[abs] = entries - return joinedCmd; + // mark and cache dir-ness + return entries } -module.exports = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const encoding = parsed.opts.encoding; - const maxBuffer = parsed.opts.maxBuffer; - const joinedCmd = joinCmd(cmd, args); +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break - let spawned; - try { - spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); - } catch (err) { - return Promise.reject(err); - } + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break - let removeExitHandler; - if (parsed.opts.cleanup) { - removeExitHandler = onExit(() => { - spawned.kill(); - }); - } + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} - let timeoutId = null; - let timedOut = false; +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - const cleanupTimeout = () => { - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = null; - } - }; + var entries = this._readdir(abs, inGlobStar) - if (parsed.opts.timeout > 0) { - timeoutId = setTimeout(() => { - timeoutId = null; - timedOut = true; - spawned.kill(parsed.opts.killSignal); - }, parsed.opts.timeout); - } + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return - const processDone = new Promise(resolve => { - spawned.on('exit', (code, signal) => { - cleanupTimeout(); - resolve({code, signal}); - }); + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) - spawned.on('error', err => { - cleanupTimeout(); - resolve({error: err}); - }); + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) - if (spawned.stdin) { - spawned.stdin.on('error', err => { - cleanupTimeout(); - resolve({error: err}); - }); - } - }); + var len = entries.length + var isSym = this.symlinks[abs] - function destroy() { - if (spawned.stdout) { - spawned.stdout.destroy(); - } + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return - if (spawned.stderr) { - spawned.stderr.destroy(); - } - } + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue - const handlePromise = () => pFinally(Promise.all([ - processDone, - getStream(spawned, 'stdout', encoding, maxBuffer), - getStream(spawned, 'stderr', encoding, maxBuffer) - ]).then(arr => { - const result = arr[0]; - result.stdout = arr[1]; - result.stderr = arr[2]; + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) - if (removeExitHandler) { - removeExitHandler(); - } + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} - if (result.error || result.code !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed, - timedOut - }); +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) - // TODO: missing some timeout logic for killed - // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 - // err.killed = spawned.killed || killed; - err.killed = err.killed || spawned.killed; + if (!this.matches[index]) + this.matches[index] = Object.create(null) - if (!parsed.opts.reject) { - return err; - } + // If it doesn't exist, then just mark the lack of results + if (!exists) + return - throw err; - } + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - killed: false, - signal: null, - cmd: joinedCmd, - timedOut: false - }; - }), destroy); + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') - crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + // Mark this as a match + this._emitMatch(index, prefix) +} - handleInput(spawned, parsed.opts); +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' - spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); - spawned.catch = onrejected => handlePromise().catch(onrejected); + if (f.length > this.maxLength) + return false - return spawned; -}; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] -module.exports.stdout = function () { - // TODO: set `stderr: 'ignore'` when that option is implemented - return module.exports.apply(null, arguments).then(x => x.stdout); -}; + if (Array.isArray(c)) + c = 'DIR' -module.exports.stderr = function () { - // TODO: set `stdout: 'ignore'` when that option is implemented - return module.exports.apply(null, arguments).then(x => x.stderr); -}; + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c -module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + if (needDir && c === 'FILE') + return false -module.exports.sync = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const joinedCmd = joinCmd(cmd, args); + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } - if (isStream(parsed.opts.input)) { - throw new TypeError('The `input` option cannot be a stream in sync mode'); - } + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } - const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); - result.code = result.status; + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } - if (result.error || result.status !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed - }); + this.statCache[abs] = stat - if (!parsed.opts.reject) { - return err; - } + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' - throw err; - } + this.cache[abs] = this.cache[abs] || c - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - signal: null, - cmd: joinedCmd, - timedOut: false - }; -}; + if (needDir && c === 'FILE') + return false -module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); + return c +} -module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.'); +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} /***/ }), -/* 349 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var cp = __webpack_require__(56); -var parse = __webpack_require__(350); -var enoent = __webpack_require__(363); - -var cpSpawnSync = cp.spawnSync; - -function spawn(command, args, options) { - var parsed; - var spawned; - - // Parse the arguments - parsed = parse(command, args, options); - - // Spawn the child process - spawned = cp.spawn(parsed.command, parsed.args, parsed.options); +var wrappy = __webpack_require__(84) +var reqs = Object.create(null) +var once = __webpack_require__(85) - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); +module.exports = wrappy(inflight) - return spawned; +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } } -function spawnSync(command, args, options) { - var parsed; - var result; +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) - if (!cpSpawnSync) { - try { - cpSpawnSync = __webpack_require__(364); // eslint-disable-line global-require - } catch (ex) { - throw new Error( - 'In order to use spawnSync on node 0.10 or older, you must ' + - 'install spawn-sync:\n\n' + - ' npm install spawn-sync --save' - ); - } + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } } - - // Parse the arguments - parsed = parse(command, args, options); - - // Spawn the child process - result = cpSpawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; + }) } -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; +function slice (args) { + var length = args.length + var array = [] -module.exports._parse = parse; -module.exports._enoent = enoent; + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} /***/ }), -/* 350 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +const path = __webpack_require__(3); +const loadJsonFile = __webpack_require__(353); +const pathType = __webpack_require__(359); -var resolveCommand = __webpack_require__(84); -var hasEmptyArgumentBug = __webpack_require__(358); -var escapeArgument = __webpack_require__(86); -var escapeCommand = __webpack_require__(359); -var readShebang = __webpack_require__(360); - -var isWin = process.platform === 'win32'; -var skipShellRegExp = /\.(?:com|exe)$/i; +module.exports = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } -// Supported in Node >= 6 and >= 4.8 -var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 || - parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8; + opts = opts || {}; -function parseNonShell(parsed) { - var shebang; - var needsShell; - var applyQuotes; + return pathType.dir(fp) + .then(isDir => { + if (isDir) { + fp = path.join(fp, 'package.json'); + } - if (!isWin) { - return parsed; - } + return loadJsonFile(fp); + }) + .then(x => { + if (opts.normalize !== false) { + __webpack_require__(87)(x); + } - // Detect & add support for shebangs - parsed.file = resolveCommand(parsed.command); - parsed.file = parsed.file || resolveCommand(parsed.command, true); - shebang = parsed.file && readShebang(parsed.file); + return x; + }); +}; - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true)); - } else { - needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file); - } +module.exports.sync = (fp, opts) => { + if (typeof fp !== 'string') { + opts = fp; + fp = '.'; + } - // If a shell is required, use cmd.exe and take care of escaping everything correctly - if (needsShell) { - // Escape command & arguments - applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command - parsed.command = escapeCommand(parsed.command); - parsed.args = parsed.args.map(function (arg) { - return escapeArgument(arg, applyQuotes); - }); + opts = opts || {}; + fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; - // Make use of cmd.exe - parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"']; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } + const x = loadJsonFile.sync(fp); - return parsed; -} + if (opts.normalize !== false) { + __webpack_require__(87)(x); + } -function parseShell(parsed) { - var shellCommand; + return x; +}; - // If node supports the shell option, there's no need to mimic its behavior - if (supportsShellOption) { - return parsed; - } - // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 - shellCommand = [parsed.command].concat(parsed.args).join(' '); +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { - if (isWin) { - parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; - parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"']; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } else { - if (typeof parsed.options.shell === 'string') { - parsed.command = parsed.options.shell; - } else if (process.platform === 'android') { - parsed.command = '/system/bin/sh'; - } else { - parsed.command = '/bin/sh'; - } +"use strict"; - parsed.args = ['-c', shellCommand]; - } +const path = __webpack_require__(3); +const fs = __webpack_require__(23); +const stripBom = __webpack_require__(354); +const parseJson = __webpack_require__(355); +const pify = __webpack_require__(22); - return parsed; -} +const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); -// ------------------------------------------------ +module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp)); +module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp); -function parse(command, args, options) { - var parsed; - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = options || {}; +"use strict"; - // Build our parsed object - parsed = { - command: command, - args: args, - options: options, - file: undefined, - original: command, - }; +module.exports = x => { + if (typeof x !== 'string') { + throw new TypeError('Expected a string, got ' + typeof x); + } - // Delegate further parsing to shell or non-shell - return options.shell ? parseShell(parsed) : parseNonShell(parsed); -} + // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string + // conversion translates it to FEFF (UTF-16 BOM) + if (x.charCodeAt(0) === 0xFEFF) { + return x.slice(1); + } -module.exports = parse; + return x; +}; /***/ }), -/* 351 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = which -which.sync = whichSync +"use strict"; -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' +const errorEx = __webpack_require__(356); +const fallback = __webpack_require__(358); -var path = __webpack_require__(3) -var COLON = isWindows ? ';' : ':' -var isexe = __webpack_require__(352) +const JSONError = errorEx('JSONError', { + fileName: errorEx.append('in %s') +}); -function getNotFoundError (cmd) { - var er = new Error('not found: ' + cmd) - er.code = 'ENOENT' +module.exports = (input, reviver, filename) => { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } - return er -} + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + fallback(input, reviver); -function getPathInfo (cmd, opt) { - var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' - var pathExt = [''] + throw err; + } + } catch (err) { + err.message = err.message.replace(/\n/g, ''); - pathEnv = pathEnv.split(colon) + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } - var pathExtExe = '' - if (isWindows) { - pathEnv.unshift(process.cwd()) - pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') - pathExt = pathExtExe.split(colon) + throw jsonErr; + } +}; - // Always test the cmd itself first. isexe will check to make sure - // it's found in the pathExt set. - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) - pathEnv = [''] - - return { - env: pathEnv, - ext: pathExt, - extExe: pathExtExe - } -} - -function which (cmd, opt, cb) { - if (typeof opt === 'function') { - cb = opt - opt = {} - } +"use strict"; - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - ;(function F (i, l) { - if (i === l) { - if (opt.all && found.length) - return cb(null, found) - else - return cb(getNotFoundError(cmd)) - } +var util = __webpack_require__(13); +var isArrayish = __webpack_require__(357); - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } - var p = path.join(pathPart, cmd) - if (!pathPart && (/^\.[\\\/]/).test(cmd)) { - p = cmd.slice(0, 2) + p - } - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } -function whichSync (cmd, opt) { - opt = opt || {} + message = message instanceof Error + ? message.message + : (message || this.message); - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] + Error.call(this, message); + Error.captureStackTrace(this, errorExError); - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) + this.name = name; - var p = path.join(pathPart, cmd) - if (!pathPart && /^\.[\\\/]/.test(cmd)) { - p = cmd.slice(0, 2) + p - } - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var is - try { - is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); - if (opt.all && found.length) - return found + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } - if (opt.nothrow) - return null + var modifier = properties[key]; - throw getNotFoundError(cmd) -} + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); -/***/ }), -/* 352 */ -/***/ (function(module, exports, __webpack_require__) { + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; -var fs = __webpack_require__(7) -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = __webpack_require__(353) -} else { - core = __webpack_require__(354) -} + stackDescriptor.get = function () { + var stack = (stackGetter) + ? stackGetter.call(this).split(/\r?\n+/g) + : stackValue.split(/\r?\n+/g); -module.exports = isexe -isexe.sync = sync + // starting in Node 7, the stack builder caches the message. + // just replace it. + stack[0] = this.name + ': ' + this.message; -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } + var modifier = properties[key]; - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} + return stack.join('\n'); + }; + Object.defineProperty(this, 'stack', stackDescriptor); + }; -/***/ }), -/* 353 */ -/***/ (function(module, exports, __webpack_require__) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } -module.exports = isexe -isexe.sync = sync + return errorExError; +}; -var fs = __webpack_require__(7) +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } - if (!pathext) { - return true - } + return message; + } + }; +}; - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} + if (v) { + return str.replace('%s', v.toString()); + } -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} + return null; + } + }; +}; -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} +module.exports = errorEx; /***/ }), -/* 354 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = isexe -isexe.sync = sync - -var fs = __webpack_require__(7) - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() +"use strict"; - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 +module.exports = function isArrayish(obj) { + if (!obj) { + return false; + } - return ret -} + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; /***/ }), -/* 355 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { -if (process.env.npm_package_name === 'pseudomap' && - process.env.npm_lifecycle_script === 'test') - process.env.TEST_PSEUDOMAP = 'true' +"use strict"; -if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { - module.exports = Map -} else { - module.exports = __webpack_require__(356) + +module.exports = parseJson +function parseJson (txt, reviver, context) { + context = context || 20 + try { + return JSON.parse(txt, reviver) + } catch (e) { + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'` + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'` + } + throw e + } } /***/ }), -/* 356 */ -/***/ (function(module, exports) { +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { -var hasOwnProperty = Object.prototype.hasOwnProperty +"use strict"; -module.exports = PseudoMap +const fs = __webpack_require__(7); +const pify = __webpack_require__(22); -function PseudoMap (set) { - if (!(this instanceof PseudoMap)) // whyyyyyyy - throw new TypeError("Constructor PseudoMap requires 'new'") +function type(fn, fn2, fp) { + if (typeof fp !== 'string') { + return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`)); + } - this.clear() + return pify(fs[fn])(fp) + .then(stats => stats[fn2]()) + .catch(err => { + if (err.code === 'ENOENT') { + return false; + } - if (set) { - if ((set instanceof PseudoMap) || - (typeof Map === 'function' && set instanceof Map)) - set.forEach(function (value, key) { - this.set(key, value) - }, this) - else if (Array.isArray(set)) - set.forEach(function (kv) { - this.set(kv[0], kv[1]) - }, this) - else - throw new TypeError('invalid argument') - } + throw err; + }); } -PseudoMap.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - Object.keys(this._data).forEach(function (k) { - if (k !== 'size') - fn.call(thisp, this._data[k].value, this._data[k].key) - }, this) -} +function typeSync(fn, fn2, fp) { + if (typeof fp !== 'string') { + throw new TypeError(`Expected a string, got ${typeof fp}`); + } -PseudoMap.prototype.has = function (k) { - return !!find(this._data, k) -} + try { + return fs[fn](fp)[fn2](); + } catch (err) { + if (err.code === 'ENOENT') { + return false; + } -PseudoMap.prototype.get = function (k) { - var res = find(this._data, k) - return res && res.value + throw err; + } } -PseudoMap.prototype.set = function (k, v) { - set(this._data, k, v) -} +exports.file = type.bind(null, 'stat', 'isFile'); +exports.dir = type.bind(null, 'stat', 'isDirectory'); +exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink'); +exports.fileSync = typeSync.bind(null, 'statSync', 'isFile'); +exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); +exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); -PseudoMap.prototype.delete = function (k) { - var res = find(this._data, k) - if (res) { - delete this._data[res._index] - this._data.size-- - } -} -PseudoMap.prototype.clear = function () { - var data = Object.create(null) - data.size = 0 +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { - Object.defineProperty(this, '_data', { - value: data, - enumerable: false, - configurable: true, - writable: false - }) -} +var semver = __webpack_require__(361) +var validateLicense = __webpack_require__(362); +var hostedGitInfo = __webpack_require__(367) +var isBuiltinModule = __webpack_require__(369) +var depTypes = ["dependencies","devDependencies","optionalDependencies"] +var extractDescription = __webpack_require__(371) +var url = __webpack_require__(88) +var typos = __webpack_require__(372) -Object.defineProperty(PseudoMap.prototype, 'size', { - get: function () { - return this._data.size - }, - set: function (n) {}, - enumerable: true, - configurable: true -}) +var fixer = module.exports = { + // default warning function + warn: function() {}, -PseudoMap.prototype.values = -PseudoMap.prototype.keys = -PseudoMap.prototype.entries = function () { - throw new Error('iterators are not implemented in this version') -} + fixRepositoryField: function(data) { + if (data.repositories) { + this.warn("repositories"); + data.repository = data.repositories[0] + } + if (!data.repository) return this.warn("missingRepository") + if (typeof data.repository === "string") { + data.repository = { + type: "git", + url: data.repository + } + } + var r = data.repository.url || "" + if (r) { + var hosted = hostedGitInfo.fromUrl(r) + if (hosted) { + r = data.repository.url + = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() + } + } -// Either identical, or both NaN -function same (a, b) { - return a === b || a !== a && b !== b -} + if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { + this.warn("brokenGitUrl", r) + } + } -function Entry (k, v, i) { - this.key = k - this.value = v - this._index = i -} +, fixTypos: function(data) { + Object.keys(typos.topLevel).forEach(function (d) { + if (data.hasOwnProperty(d)) { + this.warn("typo", d, typos.topLevel[d]) + } + }, this) + } -function find (data, k) { - for (var i = 0, s = '_' + k, key = s; - hasOwnProperty.call(data, key); - key = s + i++) { - if (same(data[key].key, k)) - return data[key] - } -} - -function set (data, k, v) { - for (var i = 0, s = '_' + k, key = s; - hasOwnProperty.call(data, key); - key = s + i++) { - if (same(data[key].key, k)) { - data[key].value = v +, fixScriptsField: function(data) { + if (!data.scripts) return + if (typeof data.scripts !== "object") { + this.warn("nonObjectScripts") + delete data.scripts return } + Object.keys(data.scripts).forEach(function (k) { + if (typeof data.scripts[k] !== "string") { + this.warn("nonStringScript") + delete data.scripts[k] + } else if (typos.script[k] && !data.scripts[typos.script[k]]) { + this.warn("typo", k, typos.script[k], "scripts") + } + }, this) } - data.size++ - data[key] = new Entry(k, v, key) -} - -/***/ }), -/* 357 */ -/***/ (function(module, exports) { - -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() +, fixFilesField: function(data) { + var files = data.files + if (files && !Array.isArray(files)) { + this.warn("nonArrayFiles") + delete data.files + } else if (data.files) { + data.files = data.files.filter(function(file) { + if (!file || typeof file !== "string") { + this.warn("invalidFilename", file) + return false + } else { + return true + } + }, this) + } } - self.tail = null - self.head = null - self.length = 0 - - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) +, fixBinField: function(data) { + if (!data.bin) return; + if (typeof data.bin === "string") { + var b = {} + var match + if (match = data.name.match(/^@[^/]+[/](.*)$/)) { + b[match[1]] = data.bin + } else { + b[data.name] = data.bin + } + data.bin = b } } - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') +, fixManField: function(data) { + if (!data.man) return; + if (typeof data.man === "string") { + data.man = [ data.man ] + } + } +, fixBundleDependenciesField: function(data) { + var bdd = "bundledDependencies" + var bd = "bundleDependencies" + if (data[bdd] && !data[bd]) { + data[bd] = data[bdd] + delete data[bdd] + } + if (data[bd] && !Array.isArray(data[bd])) { + this.warn("nonArrayBundleDependencies") + delete data[bd] + } else if (data[bd]) { + data[bd] = data[bd].filter(function(bd) { + if (!bd || typeof bd !== 'string') { + this.warn("nonStringBundleDependency", bd) + return false + } else { + if (!data.dependencies) { + data.dependencies = {} + } + if (!data.dependencies.hasOwnProperty(bd)) { + this.warn("nonDependencyBundleDependency", bd) + data.dependencies[bd] = "*" + } + return true + } + }, this) + } } - var next = node.next - var prev = node.prev +, fixDependencies: function(data, strict) { + var loose = !strict + objectifyDeps(data, this.warn) + addOptionalDepsToDeps(data, this.warn) + this.fixBundleDependenciesField(data) - if (next) { - next.prev = prev + ;['dependencies','devDependencies'].forEach(function(deps) { + if (!(deps in data)) return + if (!data[deps] || typeof data[deps] !== "object") { + this.warn("nonObjectDependencies", deps) + delete data[deps] + return + } + Object.keys(data[deps]).forEach(function (d) { + var r = data[deps][d] + if (typeof r !== 'string') { + this.warn("nonStringDependency", d, JSON.stringify(r)) + delete data[deps][d] + } + var hosted = hostedGitInfo.fromUrl(data[deps][d]) + if (hosted) data[deps][d] = hosted.toString() + }, this) + }, this) } - if (prev) { - prev.next = next +, fixModulesField: function (data) { + if (data.modules) { + this.warn("deprecatedModules") + delete data.modules + } } - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev +, fixKeywordsField: function (data) { + if (typeof data.keywords === "string") { + data.keywords = data.keywords.split(/,\s+/) + } + if (data.keywords && !Array.isArray(data.keywords)) { + delete data.keywords + this.warn("nonArrayKeywords") + } else if (data.keywords) { + data.keywords = data.keywords.filter(function(kw) { + if (typeof kw !== "string" || !kw) { + this.warn("nonStringKeyword"); + return false + } else { + return true + } + }, this) + } } - node.list.length-- - node.next = null - node.prev = null - node.list = null -} - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return +, fixVersionField: function(data, strict) { + // allow "loose" semver 1.0 versions in non-strict mode + // enforce strict semver 2.0 compliance in strict mode + var loose = !strict + if (!data.version) { + data.version = "" + return true + } + if (!semver.valid(data.version, loose)) { + throw new Error('Invalid version: "'+ data.version + '"') + } + data.version = semver.clean(data.version, loose) + return true } - if (node.list) { - node.list.removeNode(node) +, fixPeople: function(data) { + modifyPeople(data, unParsePerson) + modifyPeople(data, parsePerson) } - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node +, fixNameField: function(data, options) { + if (typeof options === "boolean") options = {strict: options} + else if (typeof options === "undefined") options = {} + var strict = options.strict + if (!data.name && !strict) { + data.name = "" + return + } + if (typeof data.name !== "string") { + throw new Error("name field must be a string.") + } + if (!strict) + data.name = data.name.trim() + ensureValidName(data.name, strict, options.allowLegacyCase) + if (isBuiltinModule(data.name)) + this.warn("conflictingName", data.name) } - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return +, fixDescriptionField: function (data) { + if (data.description && typeof data.description !== 'string') { + this.warn("nonStringDescription") + delete data.description + } + if (data.readme && !data.description) + data.description = extractDescription(data.readme) + if(data.description === undefined) delete data.description; + if (!data.description) this.warn("missingDescription") } - if (node.list) { - node.list.removeNode(node) +, fixReadmeField: function (data) { + if (!data.readme) { + this.warn("missingReadme") + data.readme = "ERROR: No README data found!" + } } - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node +, fixBugsField: function(data) { + if (!data.bugs && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if(hosted && hosted.bugs()) { + data.bugs = {url: hosted.bugs()} + } + } + else if(data.bugs) { + var emailRe = /^.+@.*\..+$/ + if(typeof data.bugs == "string") { + if(emailRe.test(data.bugs)) + data.bugs = {email:data.bugs} + else if(url.parse(data.bugs).protocol) + data.bugs = {url: data.bugs} + else + this.warn("nonEmailUrlBugsString") + } + else { + bugsTypos(data.bugs, this.warn) + var oldBugs = data.bugs + data.bugs = {} + if(oldBugs.url) { + if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) + data.bugs.url = oldBugs.url + else + this.warn("nonUrlBugsUrlField") + } + if(oldBugs.email) { + if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) + data.bugs.email = oldBugs.email + else + this.warn("nonEmailBugsEmailField") + } + } + if(!data.bugs.email && !data.bugs.url) { + delete data.bugs + this.warn("emptyNormalizedBugs") + } + } } - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} +, fixHomepageField: function(data) { + if (!data.homepage && data.repository && data.repository.url) { + var hosted = hostedGitInfo.fromUrl(data.repository.url) + if (hosted && hosted.docs()) data.homepage = hosted.docs() + } + if (!data.homepage) return -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) + if(typeof data.homepage !== "string") { + this.warn("nonUrlHomepage") + return delete data.homepage + } + if(!url.parse(data.homepage).protocol) { + data.homepage = "http://" + data.homepage + } } - return this.length -} -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) +, fixLicenseField: function(data) { + if (!data.license) { + return this.warn("missingLicense") + } else{ + if ( + typeof(data.license) !== 'string' || + data.license.length < 1 + ) { + this.warn("invalidLicense") + } else { + if (!validateLicense(data.license).validForNewPackages) + this.warn("invalidLicense") + } + } } - return this.length } -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } +function isValidScopedPackageName(spec) { + if (spec.charAt(0) !== '@') return false - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res + var rest = spec.slice(1).split('/') + if (rest.length !== 2) return false + + return rest[0] && rest[1] && + rest[0] === encodeURIComponent(rest[0]) && + rest[1] === encodeURIComponent(rest[1]) } -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } +function isCorrectlyEncodedName(spec) { + return !spec.match(/[\/@\s\+%:]/) && + spec === encodeURIComponent(spec) +} - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null +function ensureValidName (name, strict, allowLegacyCase) { + if (name.charAt(0) === "." || + !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || + (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || + name.toLowerCase() === "node_modules" || + name.toLowerCase() === "favicon.ico") { + throw new Error("Invalid name: " + JSON.stringify(name)) } - this.length-- - return res } -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } +function modifyPeople (data, fn) { + if (data.author) data.author = fn(data.author) + ;["maintainers", "contributors"].forEach(function (set) { + if (!Array.isArray(data[set])) return; + data[set] = data[set].map(fn) + }) + return data } -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } +function unParsePerson (person) { + if (typeof person === "string") return person + var name = person.name || "" + var u = person.url || person.web + var url = u ? (" ("+u+")") : "" + var e = person.email || person.mail + var email = e ? (" <"+e+">") : "" + return name+email+url } -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } +function parsePerson (person) { + if (typeof person !== "string") return person + var name = person.match(/^([^\(<]+)/) + var url = person.match(/\(([^\)]+)\)/) + var email = person.match(/<([^>]+)>/) + var obj = {} + if (name && name[0].trim()) obj.name = name[0].trim() + if (email) obj.email = email[1]; + if (url) obj.url = url[1]; + return obj } -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } +function addOptionalDepsToDeps (data, warn) { + var o = data.optionalDependencies + if (!o) return; + var d = data.dependencies || {} + Object.keys(o).forEach(function (k) { + d[k] = o[k] + }) + data.dependencies = d } -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next +function depObjectify (deps, type, warn) { + if (!deps) return {} + if (typeof deps === "string") { + deps = deps.trim().split(/[\n\r\s\t ,]+/) } - return res + if (!Array.isArray(deps)) return deps + warn("deprecatedArrayDependencies", type) + var o = {} + deps.filter(function (d) { + return typeof d === "string" + }).forEach(function(d) { + d = d.trim().split(/(:?[@\s><=])/) + var dn = d.shift() + var dv = d.join("") + dv = dv.trim() + dv = dv.replace(/^@/, "") + o[dn] = dv + }) + return o } -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res +function objectifyDeps (data, warn) { + depTypes.forEach(function (type) { + if (!data[type]) return; + data[type] = depObjectify(data[type], type, warn) + }) } -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } +function bugsTypos(bugs, warn) { + if (!bugs) return + Object.keys(bugs).forEach(function (k) { + if (typos.bugs[k]) { + warn("typo", k, typos.bugs[k], "bugs") + bugs[typos.bugs[k]] = bugs[k] + delete bugs[k] + } + }) +} - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } - return acc -} +/***/ }), +/* 361 */ +/***/ (function(module, exports) { -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } - - return acc -} - -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} - -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} +exports = module.exports = SemVer; -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p - } - this.head = tail - this.tail = head - return this -} +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ -} +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16; -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. - this.list = list - this.value = value +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - if (next) { - next.prev = this - this.next = next - } else { - this.next = null - } -} +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. -/***/ }), -/* 358 */ -/***/ (function(module, exports, __webpack_require__) { +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; -"use strict"; +// ## Main Version +// Three dot-separated numeric identifiers. -// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455 -function hasEmptyArgumentBug() { - var nodeVer; +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; - if (process.platform !== 'win32') { - return false; - } +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - nodeVer = process.version.substr(1).split('.').map(function (num) { - return parseInt(num, 10); - }); +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. - return (nodeVer[0] === 0 && nodeVer[1] < 12); -} +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; -module.exports = hasEmptyArgumentBug(); +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; -/***/ }), -/* 359 */ -/***/ (function(module, exports, __webpack_require__) { +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. -"use strict"; +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; -var escapeArgument = __webpack_require__(86); +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. -function escapeCommand(command) { - // Do not escape if this command is not dangerous.. - // We do this so that commands like "echo" or "ifconfig" work - // Quoting them, will make them unaccessible - return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true); -} +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; -module.exports = escapeCommand; +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; -/***/ }), -/* 360 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. -var fs = __webpack_require__(7); -var LRU = __webpack_require__(85); -var shebangCommand = __webpack_require__(361); +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; -var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec +src[FULL] = '^' + FULLPLAIN + '$'; -function readShebang(command) { - var buffer; - var fd; - var shebang; +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; - // Check if it is in the cache first - if (shebangCache.has(command)) { - return shebangCache.get(command); - } +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; - // Read the first 150 bytes from the file - buffer = new Buffer(150); +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, 150, 0); - fs.closeSync(fd); - } catch (e) { /* empty */ } +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - // Attempt to extract shebang (null is returned if not a shebang) - shebang = shebangCommand(buffer.toString()); +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; - // Store the shebang in the cache - shebangCache.set(command, shebang); +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; - return shebang; -} +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; -module.exports = readShebang; +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++; +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])'; +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; -/***/ }), -/* 361 */ -/***/ (function(module, exports, __webpack_require__) { +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; -"use strict"; +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; -var shebangRegex = __webpack_require__(362); +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; -module.exports = function (str) { - var match = str.match(shebangRegex); +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; - if (!match) { - return null; - } +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - var arr = match[0].replace(/#! ?/, '').split(' '); - var bin = arr[0].split('/').pop(); - var arg = arr[1]; +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - return (bin === 'env' ? - arg : - bin + (arg ? ' ' + arg : '') - ); -}; +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; -/***/ }), -/* 362 */ -/***/ (function(module, exports, __webpack_require__) { +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; -"use strict"; -module.exports = /^#!.*/; +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; -/***/ }), -/* 363 */ -/***/ (function(module, exports, __webpack_require__) { +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; -"use strict"; +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; -var isWin = process.platform === 'win32'; -var resolveCommand = __webpack_require__(84); + if (typeof version !== 'string') + return null; -var isNode10 = process.version.indexOf('v0.10.') === 0; + if (version.length > MAX_LENGTH) + return null; -function notFoundError(command, syscall) { - var err; + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; - err = new Error(syscall + ' ' + command + ' ENOENT'); - err.code = err.errno = 'ENOENT'; - err.syscall = syscall + ' ' + command; + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} - return err; +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; } -function hookChildProcess(cp, parsed) { - var originalEmit; - if (!isWin) { - return; - } +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} - originalEmit = cp.emit; - cp.emit = function (name, arg1) { - var err; +exports.SemVer = SemVer; - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - err = verifyENOENT(arg1, parsed, 'spawn'); +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } - if (err) { - return originalEmit.call(cp, 'error', err); - } - } + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - return originalEmit.apply(cp, arguments); - }; -} + if (!(this instanceof SemVer)) + return new SemVer(version, loose); -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - return null; -} + if (!m) + throw new TypeError('Invalid Version: ' + version); -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } + this.raw = version; - // If we are in node 10, then we are using spawn-sync; if it exited - // with -1 it probably means that the command does not exist - if (isNode10 && status === -1) { - parsed.file = isWin ? parsed.file : resolveCommand(parsed.original); + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; - if (!parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - } + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') - return null; -} + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') -module.exports.hookChildProcess = hookChildProcess; -module.exports.verifyENOENT = verifyENOENT; -module.exports.verifyENOENTSync = verifyENOENTSync; -module.exports.notFoundError = notFoundError; + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num; + } + return id; + }); -/***/ }), -/* 364 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = __webpack_require__(56).spawnSync; - + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} -/***/ }), -/* 365 */ -/***/ (function(module, exports, __webpack_require__) { +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; -"use strict"; +SemVer.prototype.toString = function() { + return this.version; +}; -module.exports = function (x) { - var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); - var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); - if (x[x.length - 1] === lf) { - x = x.slice(0, x.length - 1); - } + return this.compareMain(other) || this.comparePre(other); +}; - if (x[x.length - 1] === cr) { - x = x.slice(0, x.length - 1); - } +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); - return x; + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); }; +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); -/***/ }), -/* 366 */ -/***/ (function(module, exports, __webpack_require__) { + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; -"use strict"; + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; -const path = __webpack_require__(3); -const pathKey = __webpack_require__(367); +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; -module.exports = opts => { - opts = Object.assign({ - cwd: process.cwd(), - path: process.env[pathKey()] - }, opts); + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; - let prev; - let pth = path.resolve(opts.cwd); - const ret = []; + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; - while (prev !== pth) { - ret.push(path.join(pth, 'node_modules/.bin')); - prev = pth; - pth = path.resolve(pth, '..'); - } +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } - // ensure the running `node` binary is used - ret.push(path.dirname(process.execPath)); + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} - return ret.concat(opts.path).join(path.delimiter); -}; +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} -module.exports.env = opts => { - opts = Object.assign({ - env: process.env - }, opts); +exports.compareIdentifiers = compareIdentifiers; - const env = Object.assign({}, opts.env); - const path = pathKey({env}); +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); - opts.path = env[path]; - env[path] = module.exports(opts); + if (anum && bnum) { + a = +a; + b = +b; + } - return env; -}; + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} -/***/ }), -/* 367 */ -/***/ (function(module, exports, __webpack_require__) { +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} -"use strict"; +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} -module.exports = opts => { - opts = opts || {}; +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} - const env = opts.env || process.env; - const platform = opts.platform || process.platform; +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)); +} - if (platform !== 'win32') { - return 'PATH'; - } +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} - return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; -}; +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} -/***/ }), -/* 368 */ -/***/ (function(module, exports, __webpack_require__) { +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} -"use strict"; +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} -var isStream = module.exports = function (stream) { - return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; -}; +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} -isStream.writable = function (stream) { - return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; -}; +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} -isStream.readable = function (stream) { - return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; -}; +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} -isStream.duplex = function (stream) { - return isStream.writable(stream) && isStream.readable(stream); -}; +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} -isStream.transform = function (stream) { - return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; -}; +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } -/***/ }), -/* 369 */ -/***/ (function(module, exports, __webpack_require__) { + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); -"use strict"; + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); -const bufferStream = __webpack_require__(370); + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; -function getStream(inputStream, opts) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } + debug('comp', this); +} - opts = Object.assign({maxBuffer: Infinity}, opts); +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); - const maxBuffer = opts.maxBuffer; - let stream; - let clean; + if (!m) + throw new TypeError('Invalid comparator: ' + comp); - const p = new Promise((resolve, reject) => { - const error = err => { - if (err) { // null check - err.bufferedData = stream.getBufferedValue(); - } + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; - reject(err); - }; + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; - stream = bufferStream(opts); - inputStream.once('error', error); - inputStream.pipe(stream); +Comparator.prototype.toString = function() { + return this.value; +}; - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - reject(new Error('maxBuffer exceeded')); - } - }); - stream.once('error', error); - stream.on('end', resolve); +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); - clean = () => { - // some streams doesn't implement the `stream.Readable` interface correctly - if (inputStream.unpipe) { - inputStream.unpipe(stream); - } - }; - }); + if (this.semver === ANY) + return true; - p.then(clean, clean); + if (typeof version === 'string') + version = new SemVer(version, this.loose); - return p.then(() => stream.getBufferedValue()); -} + return cmp(version, this.operator, this.semver, this.loose); +}; -module.exports = getStream; -module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'})); -module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true})); +Comparator.prototype.intersects = function(comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + var rangeTmp; -/***/ }), -/* 370 */ -/***/ (function(module, exports, __webpack_require__) { + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } -"use strict"; + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, loose) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')); + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, loose) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')); -const PassThrough = __webpack_require__(20).PassThrough; + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; +}; -module.exports = opts => { - opts = Object.assign({}, opts); - const array = opts.array; - let encoding = opts.encoding; - const buffer = encoding === 'buffer'; - let objectMode = false; +exports.Range = Range; +function Range(range, loose) { + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || 'utf8'; - } + if (range instanceof Comparator) { + return new Range(range.value, loose); + } - if (buffer) { - encoding = null; - } + if (!(this instanceof Range)) + return new Range(range, loose); - let len = 0; - const ret = []; - const stream = new PassThrough({objectMode}); + this.loose = loose; - if (encoding) { - stream.setEncoding(encoding); - } + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); - stream.on('data', chunk => { - ret.push(chunk); + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; - } - }); + this.format(); +} - stream.getBufferedValue = () => { - if (array) { - return ret; - } +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; - return buffer ? Buffer.concat(ret, len) : ret.join(''); - }; +Range.prototype.toString = function() { + return this.range; +}; - stream.getBufferedLength = () => len; +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); - return stream; -}; + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); -/***/ }), -/* 371 */ -/***/ (function(module, exports, __webpack_require__) { + // normalize spaces + range = range.split(/\s+/).join(' '); -"use strict"; + // At this point, the range is completely trimmed and + // ready to be split into comparators. -module.exports = (promise, onFinally) => { - onFinally = onFinally || (() => {}); + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); - return promise.then( - val => new Promise(resolve => { - resolve(onFinally()); - }).then(() => val), - err => new Promise(resolve => { - resolve(onFinally()); - }).then(() => { - throw err; - }) - ); + return set; }; +Range.prototype.intersects = function(range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } -/***/ }), -/* 372 */ -/***/ (function(module, exports) { - -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM' -] + return this.set.some(function(thisComparators) { + return thisComparators.every(function(thisComparator) { + return range.set.some(function(rangeComparators) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); +}; -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); } -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; } +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} -/***/ }), -/* 373 */ -/***/ (function(module, exports, __webpack_require__) { +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} -"use strict"; +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; -// The Node team wants to deprecate `process.bind(...)`. -// https://github.com/nodejs/node/pull/2768 -// -// However, we need the 'uv' binding for errname support. -// This is a defensive wrapper around it so `execa` will not fail entirely if it stops working someday. -// -// If this ever stops working. See: https://github.com/sindresorhus/execa/issues/31#issuecomment-215939939 for another possible solution. -let uv; + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; -try { - uv = process.binding('uv'); + debug('tilde return', ret); + return ret; + }); +} - if (typeof uv.errname !== 'function') { - throw new TypeError('uv.errname is not a function'); - } -} catch (err) { - console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); - uv = null; +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); } -function errname(uv, code) { - if (uv) { - return uv.errname(code); - } +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; - if (!(code < 0)) { - throw new Error('err >= 0'); - } + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } - return `Unknown system error ${code}`; + debug('caret return', ret); + return ret; + }); } -module.exports = code => errname(uv, code); +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} -// Used for testing the fallback behavior -module.exports.__test__ = errname; +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + if (gtlt === '=' && anyX) + gtlt = ''; -/***/ }), -/* 374 */ -/***/ (function(module, exports, __webpack_require__) { + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; -"use strict"; + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } -const alias = ['stdin', 'stdout', 'stderr']; + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } -const hasAlias = opts => alias.some(x => Boolean(opts[x])); + debug('xRange return', ret); -module.exports = opts => { - if (!opts) { - return null; - } + return ret; + }); +} - if (opts.stdio && hasAlias(opts)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); - } +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} - if (typeof opts.stdio === 'string') { - return opts.stdio; - } +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { - const stdio = opts.stdio || []; + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; - const result = []; - const len = Math.max(stdio.length, alias.length); + return (from + ' ' + to).trim(); +} - for (let i = 0; i < len; i++) { - let value = null; - if (stdio[i] !== undefined) { - value = stdio[i]; - } else if (opts[alias[i]] !== undefined) { - value = opts[alias[i]]; - } +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; - result[i] = value; - } + if (typeof version === 'string') + version = new SemVer(version, this.loose); - return result; + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; }; +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } -/***/ }), -/* 375 */ -/***/ (function(module, exports, __webpack_require__) { + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; -// Copyright IBM Corp. 2014. All Rights Reserved. -// Node module: strong-log-transformer -// This file is licensed under the Artistic License 2.0. -// License text available at https://opensource.org/licenses/Artistic-2.0 + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } -module.exports = __webpack_require__(87); -module.exports.cli = __webpack_require__(381); + // Version has a -pre, but it's not one of the ones we like. + return false; + } + return true; +} -/***/ }), -/* 376 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright (C) 2011-2015 John Hewson -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. - -var stream = __webpack_require__(20), - util = __webpack_require__(13), - timers = __webpack_require__(377); - -// convinience API -module.exports = function(readStream, options) { - return module.exports.createStream(readStream, options); -}; - -// basic API -module.exports.createStream = function(readStream, options) { - if (readStream) { - return createLineStream(readStream, options); - } else { - return new LineStream(options); - } -}; - -// deprecated API -module.exports.createLineStream = function(readStream) { - console.log('WARNING: byline#createLineStream is deprecated and will be removed soon'); - return createLineStream(readStream); -}; - -function createLineStream(readStream, options) { - if (!readStream) { - throw new Error('expected readStream'); - } - if (!readStream.readable) { - throw new Error('readStream must be readable'); +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; } - var ls = new LineStream(options); - readStream.pipe(ls); - return ls; + return range.test(version); } -// -// using the new node v0.10 "streams2" API -// - -module.exports.LineStream = LineStream; - -function LineStream(options) { - stream.Transform.call(this, options); - options = options || {}; - - // use objectMode to stop the output from being buffered - // which re-concatanates the lines, just without newlines. - this._readableState.objectMode = true; - this._lineBuffer = []; - this._keepEmptyLines = options.keepEmptyLines || false; - this._lastChunkEndedWithCR = false; - - // take the source's encoding if we don't have one - var self = this; - this.on('pipe', function(src) { - if (!self.encoding) { - // but we can't do this for old-style streams - if (src instanceof stream.Readable) { - self.encoding = src._readableState.encoding; +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); } } - }); + }) + return max; } -util.inherits(LineStream, stream.Transform); -LineStream.prototype._transform = function(chunk, encoding, done) { - // decode binary chunks as UTF-8 - encoding = encoding || 'utf8'; - - if (Buffer.isBuffer(chunk)) { - if (encoding == 'buffer') { - chunk = chunk.toString(); // utf8 - encoding = 'utf8'; - } - else { - chunk = chunk.toString(encoding); - } - } - this._chunkEncoding = encoding; - - // see: http://www.unicode.org/reports/tr18/#Line_Boundaries - var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); - - // don't split CRLF which spans chunks - if (this._lastChunkEndedWithCR && chunk[0] == '\n') { - lines.shift(); - } - - if (this._lineBuffer.length > 0) { - this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; - lines.shift(); +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, loose) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; } - - this._lastChunkEndedWithCR = chunk[chunk.length - 1] == '\r'; - this._lineBuffer = this._lineBuffer.concat(lines); - this._pushBuffer(encoding, 1, done); -}; - -LineStream.prototype._pushBuffer = function(encoding, keep, done) { - // always buffer the last (possibly partial) line - while (this._lineBuffer.length > keep) { - var line = this._lineBuffer.shift(); - // skip empty lines - if (this._keepEmptyLines || line.length > 0 ) { - if (!this.push(this._reencode(line, encoding))) { - // when the high-water mark is reached, defer pushes until the next tick - var self = this; - timers.setImmediate(function() { - self._pushBuffer(encoding, keep, done); - }); - return; + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); } } - } - done(); -}; - -LineStream.prototype._flush = function(done) { - this._pushBuffer(this._chunkEncoding, 0, done); -}; + }) + return min; +} -// see Readable::push -LineStream.prototype._reencode = function(line, chunkEncoding) { - if (this.encoding && this.encoding != chunkEncoding) { - return new Buffer(line, chunkEncoding).toString(this.encoding); - } - else if (this.encoding) { - // this should be the most common case, i.e. we're using an encoded source stream - return line; - } - else { - return new Buffer(line, chunkEncoding); +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; } -}; - - -/***/ }), -/* 377 */ -/***/ (function(module, exports) { - -module.exports = require("timers"); +} -/***/ }), -/* 378 */ -/***/ (function(module, exports, __webpack_require__) { +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} -var Stream = __webpack_require__(20) +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); -exports = module.exports = through -through.through = through + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } -//create a readable writable stream. + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) + var high = null; + var low = null; - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; } - } - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data === null) _ended = true - buffer.push(data) - drain() - return stream + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } } + return true; +} - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) +exports.intersects = intersects; +function intersects(r1, r2, loose) { + r1 = new Range(r1, loose) + r2 = new Range(r2, loose) + return r1.intersects(r2) +} - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } +exports.coerce = coerce; +function coerce(version) { + if (version instanceof SemVer) + return version; - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } + if (typeof version !== 'string') + return null; - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } + var match = version.match(re[COERCE]); - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } + if (match == null) + return null; - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); } - /***/ }), -/* 379 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { -var Stream = __webpack_require__(20) -var writeMethods = ["write", "end", "destroy"] -var readMethods = ["resume", "pause"] -var readEvents = ["data", "close"] -var slice = Array.prototype.slice +var parse = __webpack_require__(363); +var correct = __webpack_require__(365); -module.exports = duplex +var genericWarning = ( + 'license should be ' + + 'a valid SPDX license expression (without "LicenseRef"), ' + + '"UNLICENSED", or ' + + '"SEE LICENSE IN "' +); -function forEach (arr, fn) { - if (arr.forEach) { - return arr.forEach(fn) - } +var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - for (var i = 0; i < arr.length; i++) { - fn(arr[i], i) - } +function startsWith(prefix, string) { + return string.slice(0, prefix.length) === prefix; } -function duplex(writer, reader) { - var stream = new Stream() - var ended = false +function usesLicenseRef(ast) { + if (ast.hasOwnProperty('license')) { + var license = ast.license; + return ( + startsWith('LicenseRef', license) || + startsWith('DocumentRef', license) + ); + } else { + return ( + usesLicenseRef(ast.left) || + usesLicenseRef(ast.right) + ); + } +} - forEach(writeMethods, proxyWriter) +module.exports = function(argument) { + var ast; - forEach(readMethods, proxyReader) + try { + ast = parse(argument); + } catch (e) { + var match + if ( + argument === 'UNLICENSED' || + argument === 'UNLICENCED' + ) { + return { + validForOldPackages: true, + validForNewPackages: true, + unlicensed: true + }; + } else if (match = fileReferenceRE.exec(argument)) { + return { + validForOldPackages: true, + validForNewPackages: true, + inFile: match[1] + }; + } else { + var result = { + validForOldPackages: false, + validForNewPackages: false, + warnings: [genericWarning] + }; + var corrected = correct(argument); + if (corrected) { + result.warnings.push( + 'license is similar to the valid expression "' + corrected + '"' + ); + } + return result; + } + } - forEach(readEvents, proxyStream) + if (usesLicenseRef(ast)) { + return { + validForNewPackages: false, + validForOldPackages: false, + spdx: true, + warnings: [genericWarning] + }; + } else { + return { + validForNewPackages: true, + validForOldPackages: true, + spdx: true + }; + } +}; - reader.on("end", handleEnd) - writer.on("drain", function() { - stream.emit("drain") - }) +/***/ }), +/* 363 */ +/***/ (function(module, exports, __webpack_require__) { - writer.on("error", reemit) - reader.on("error", reemit) +var parser = __webpack_require__(364).parser - stream.writable = writer.writable - stream.readable = reader.readable +module.exports = function (argument) { + return parser.parse(argument) +} - return stream - function proxyWriter(methodName) { - stream[methodName] = method +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { - function method() { - return writer[methodName].apply(writer, arguments) - } - } +/* WEBPACK VAR INJECTION */(function(module) {/* parser generated by jison 0.4.17 */ +/* + Returns a Parser object of the following structure: - function proxyReader(methodName) { - stream[methodName] = method + Parser: { + yy: {} + } - function method() { - stream.emit(methodName) - var func = reader[methodName] - if (func) { - return func.apply(reader, arguments) - } - reader.emit(methodName) - } - } - - function proxyStream(methodName) { - reader.on(methodName, reemit) + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), - function reemit() { - var args = slice.call(arguments) - args.unshift(methodName) - stream.emit.apply(stream, args) - } - } + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), - function handleEnd() { - if (ended) { - return - } - ended = true - var args = slice.call(arguments) - args.unshift("end") - stream.emit.apply(stream, args) - } + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, - function reemit(err) { - stream.emit("error", err) + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, } -} - - -/***/ }), -/* 380 */ -/***/ (function(module, exports, __webpack_require__) { - -var map = { - "./af": 88, - "./af.js": 88, - "./ar": 89, - "./ar-dz": 90, - "./ar-dz.js": 90, - "./ar-kw": 91, - "./ar-kw.js": 91, - "./ar-ly": 92, - "./ar-ly.js": 92, - "./ar-ma": 93, - "./ar-ma.js": 93, - "./ar-sa": 94, - "./ar-sa.js": 94, - "./ar-tn": 95, - "./ar-tn.js": 95, - "./ar.js": 89, - "./az": 96, - "./az.js": 96, - "./be": 97, - "./be.js": 97, - "./bg": 98, - "./bg.js": 98, - "./bm": 99, - "./bm.js": 99, - "./bn": 100, - "./bn.js": 100, - "./bo": 101, - "./bo.js": 101, - "./br": 102, - "./br.js": 102, - "./bs": 103, - "./bs.js": 103, - "./ca": 104, - "./ca.js": 104, - "./cs": 105, - "./cs.js": 105, - "./cv": 106, - "./cv.js": 106, - "./cy": 107, - "./cy.js": 107, - "./da": 108, - "./da.js": 108, - "./de": 109, - "./de-at": 110, - "./de-at.js": 110, - "./de-ch": 111, - "./de-ch.js": 111, - "./de.js": 109, - "./dv": 112, - "./dv.js": 112, - "./el": 113, - "./el.js": 113, - "./en-au": 114, - "./en-au.js": 114, - "./en-ca": 115, - "./en-ca.js": 115, - "./en-gb": 116, - "./en-gb.js": 116, - "./en-ie": 117, - "./en-ie.js": 117, - "./en-nz": 118, - "./en-nz.js": 118, - "./eo": 119, - "./eo.js": 119, - "./es": 120, - "./es-do": 121, - "./es-do.js": 121, - "./es-us": 122, - "./es-us.js": 122, - "./es.js": 120, - "./et": 123, - "./et.js": 123, - "./eu": 124, - "./eu.js": 124, - "./fa": 125, - "./fa.js": 125, - "./fi": 126, - "./fi.js": 126, - "./fo": 127, - "./fo.js": 127, - "./fr": 128, - "./fr-ca": 129, - "./fr-ca.js": 129, - "./fr-ch": 130, - "./fr-ch.js": 130, - "./fr.js": 128, - "./fy": 131, - "./fy.js": 131, - "./gd": 132, - "./gd.js": 132, - "./gl": 133, - "./gl.js": 133, - "./gom-latn": 134, - "./gom-latn.js": 134, - "./gu": 135, - "./gu.js": 135, - "./he": 136, - "./he.js": 136, - "./hi": 137, - "./hi.js": 137, - "./hr": 138, - "./hr.js": 138, - "./hu": 139, - "./hu.js": 139, - "./hy-am": 140, - "./hy-am.js": 140, - "./id": 141, - "./id.js": 141, - "./is": 142, - "./is.js": 142, - "./it": 143, - "./it.js": 143, - "./ja": 144, - "./ja.js": 144, - "./jv": 145, - "./jv.js": 145, - "./ka": 146, - "./ka.js": 146, - "./kk": 147, - "./kk.js": 147, - "./km": 148, - "./km.js": 148, - "./kn": 149, - "./kn.js": 149, - "./ko": 150, - "./ko.js": 150, - "./ky": 151, - "./ky.js": 151, - "./lb": 152, - "./lb.js": 152, - "./lo": 153, - "./lo.js": 153, - "./lt": 154, - "./lt.js": 154, - "./lv": 155, - "./lv.js": 155, - "./me": 156, - "./me.js": 156, - "./mi": 157, - "./mi.js": 157, - "./mk": 158, - "./mk.js": 158, - "./ml": 159, - "./ml.js": 159, - "./mr": 160, - "./mr.js": 160, - "./ms": 161, - "./ms-my": 162, - "./ms-my.js": 162, - "./ms.js": 161, - "./mt": 163, - "./mt.js": 163, - "./my": 164, - "./my.js": 164, - "./nb": 165, - "./nb.js": 165, - "./ne": 166, - "./ne.js": 166, - "./nl": 167, - "./nl-be": 168, - "./nl-be.js": 168, - "./nl.js": 167, - "./nn": 169, - "./nn.js": 169, - "./pa-in": 170, - "./pa-in.js": 170, - "./pl": 171, - "./pl.js": 171, - "./pt": 172, - "./pt-br": 173, - "./pt-br.js": 173, - "./pt.js": 172, - "./ro": 174, - "./ro.js": 174, - "./ru": 175, - "./ru.js": 175, - "./sd": 176, - "./sd.js": 176, - "./se": 177, - "./se.js": 177, - "./si": 178, - "./si.js": 178, - "./sk": 179, - "./sk.js": 179, - "./sl": 180, - "./sl.js": 180, - "./sq": 181, - "./sq.js": 181, - "./sr": 182, - "./sr-cyrl": 183, - "./sr-cyrl.js": 183, - "./sr.js": 182, - "./ss": 184, - "./ss.js": 184, - "./sv": 185, - "./sv.js": 185, - "./sw": 186, - "./sw.js": 186, - "./ta": 187, - "./ta.js": 187, - "./te": 188, - "./te.js": 188, - "./tet": 189, - "./tet.js": 189, - "./th": 190, - "./th.js": 190, - "./tl-ph": 191, - "./tl-ph.js": 191, - "./tlh": 192, - "./tlh.js": 192, - "./tr": 193, - "./tr.js": 193, - "./tzl": 194, - "./tzl.js": 194, - "./tzm": 195, - "./tzm-latn": 196, - "./tzm-latn.js": 196, - "./tzm.js": 195, - "./uk": 197, - "./uk.js": 197, - "./ur": 198, - "./ur.js": 198, - "./uz": 199, - "./uz-latn": 200, - "./uz-latn.js": 200, - "./uz.js": 199, - "./vi": 201, - "./vi.js": 201, - "./x-pseudo": 202, - "./x-pseudo.js": 202, - "./yo": 203, - "./yo.js": 203, - "./zh-cn": 204, - "./zh-cn.js": 204, - "./zh-hk": 205, - "./zh-hk.js": 205, - "./zh-tw": 206, - "./zh-tw.js": 206 -}; -function webpackContext(req) { - return __webpack_require__(webpackContextResolve(req)); -}; -function webpackContextResolve(req) { - var id = map[req]; - if(!(id + 1)) // check for number or string - throw new Error("Cannot find module '" + req + "'."); - return id; -}; -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = 380; - -/***/ }), -/* 381 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// Copyright IBM Corp. 2014. All Rights Reserved. -// Node module: strong-log-transformer -// This file is licensed under the Artistic License 2.0. -// License text available at https://opensource.org/licenses/Artistic-2.0 - - - -var minimist = __webpack_require__(382); -var path = __webpack_require__(3); - -var Logger = __webpack_require__(87); -var pkg = __webpack_require__(383); + } -module.exports = cli; -function cli(args) { - var opts = minimist(args.slice(2)); - var $0 = path.basename(args[1]); - var p = console.log.bind(console); - if (opts.v || opts.version) { - version($0, p); - } else if (opts.h || opts.help) { - usage($0, p); - } else { - process.stdin.pipe(Logger(opts)).pipe(process.stdout); + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) } -} -function version($0, p) { - p('%s v%s', pkg.name, pkg.version); -} -function usage($0, p) { - var PADDING = ' '; - var opt, def; - p('Usage: %s [options]', $0); - p(''); - p('%s', pkg.description); - p(''); - p('OPTIONS:'); - for (opt in Logger.DEFAULTS) { - def = Logger.DEFAULTS[opt]; - if (typeof def === 'boolean') - boolOpt(opt, Logger.DEFAULTS[opt]); - else - stdOpt(opt, Logger.DEFAULTS[opt]); + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) } - p(''); - - function boolOpt(name, def) { - name = def ? 'no-' + name : name; - name = name + PADDING.slice(0, 20-name.length); - p(' --%s default: %s', name, def ? 'on' : 'off'); + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) } +*/ +var spdxparse = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, +productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ - function stdOpt(name, def) { - var value = name.toUpperCase() + - PADDING.slice(0, 19 - name.length*2); - p(' --%s %s default: %j', name, value, def); - } +var $0 = $$.length - 1; +switch (yystate) { +case 1: +return this.$ = $$[$0-1] +break; +case 2: case 4: case 5: +this.$ = {license: yytext} +break; +case 3: +this.$ = {license: $$[$0-1], plus: true} +break; +case 6: +this.$ = $$[$0] +break; +case 7: +this.$ = {exception: $$[$0]} +this.$.license = $$[$0-2].license +if ($$[$0-2].hasOwnProperty('plus')) { + this.$.plus = $$[$0-2].plus } - - -/***/ }), -/* 382 */ -/***/ (function(module, exports) { - -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; +break; +case 8: +this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]} +break; +case 9: +this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]} +break; +case 10: +this.$ = $$[$0-1] +break; +} +}, +table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], +defaultActions: {8:[2,1]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + function _parseError (msg, hash) { + this.message = msg; + this.hash = hash; } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } + _parseError.prototype = Error; - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); + throw new _parseError(str, hash); } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; + } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + _token_stack: + var lex = function () { + var token; + token = lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; } - else { - setArg(key, flags.strings[key] ? '' : true); + return token; + }; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); } + action = table[state] && table[state][symbol]; } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); } + return true; +}}; +/* generated by jison-lex 0.3.4 */ +var lexer = (function(){ +var lexer = ({ - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); +EOF:1, - var key = keys[keys.length - 1]; - return key in o; -} +parseError:function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - - - -/***/ }), -/* 383 */ -/***/ (function(module, exports) { - -module.exports = {"name":"strong-log-transformer","version":"1.0.6","description":"Stream transformer that prefixes lines with timestamps and other things.","author":"Ryan Graham ","license":"Artistic-2.0","repository":{"type":"git","url":"git://github.com/strongloop/strong-log-transformer"},"keywords":["logging","streams"],"bugs":{"url":"https://github.com/strongloop/strong-log-transformer/issues"},"homepage":"https://github.com/strongloop/strong-log-transformer","directories":{"test":"test"},"bin":{"sl-log-transformer":"bin/sl-log-transformer.js"},"main":"index.js","scripts":{"test":"tap --coverage --coverage-report=cobertura test/test-*"},"dependencies":{"byline":"^5.0.0","duplexer":"^0.1.1","minimist":"^0.1.0","moment":"^2.6.0","through":"^2.3.4"},"devDependencies":{"tap":"^1.3.2"}} - -/***/ }), -/* 384 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(3); -const loadJsonFile = __webpack_require__(385); -const pathType = __webpack_require__(394); - -module.exports = (fp, opts) => { - if (typeof fp !== 'string') { - opts = fp; - fp = '.'; - } - - opts = opts || {}; - - return pathType.dir(fp) - .then(isDir => { - if (isDir) { - fp = path.join(fp, 'package.json'); - } - - return loadJsonFile(fp); - }) - .then(x => { - if (opts.normalize !== false) { - __webpack_require__(209)(x); - } - - return x; - }); -}; - -module.exports.sync = (fp, opts) => { - if (typeof fp !== 'string') { - opts = fp; - fp = '.'; - } - - opts = opts || {}; - fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; - - const x = loadJsonFile.sync(fp); - - if (opts.normalize !== false) { - __webpack_require__(209)(x); - } - - return x; -}; - - -/***/ }), -/* 385 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(3); -const fs = __webpack_require__(25); -const stripBom = __webpack_require__(389); -const parseJson = __webpack_require__(390); -const pify = __webpack_require__(21); - -const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); +// resets the lexer, sets new input +setInput:function (input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0,0]; + } + this.offset = 0; + return this; + }, -module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp)); -module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp); +// consumes and returns one char from the input +input:function () { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, -/***/ }), -/* 386 */ -/***/ (function(module, exports, __webpack_require__) { +// unshifts one char (or a string) into the input +unput:function (ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); -var fs = __webpack_require__(208) -var constants = __webpack_require__(387) + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); -var origCwd = process.cwd -var cwd = null + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? + (lines.length === oldLines.length ? this.yylloc.first_column : 0) + + oldLines[oldLines.length - lines.length].length - lines[0].length : + this.yylloc.first_column - len + }; -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} +// When called from action, caches matched text and appends it on next action +more:function () { + this._more = true; + return this; + }, -module.exports = patch +// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. +reject:function () { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); -function patch (fs) { - // (re-)implement some things that are known busted or missing. + } + return this; + }, - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } +// retain first n characters of the match +less:function (n) { + this.unput(this.match.slice(n)); + }, - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } +// displays already matched input, i.e. for error messages +pastInput:function () { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); + }, - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. +// displays upcoming input, i.e. for error messages +upcomingInput:function () { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20-next.length); + } + return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) +// displays the character position where the lexing error occurred, i.e. for error messages +showPosition:function () { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) +// test the lexed token: return FALSE when not a match, otherwise return token +test_match:function (match, indexed_rule) { + var token, + lines, + backup; - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) + if (this.options.backtrack_lexer) { + // save context + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? + lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : + this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + // recover context + for (var k in backup) { + this[k] = backup[k]; + } + return false; // rule action called reject() implying the next rule should be tested instead. + } + return false; + }, - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) +// return next match in input +next:function () { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) + var token, + match, + tempMatch, + index; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; // rule action called reject() implying a rule MISmatch. + } else { + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } +// return next match that has a token +lex:function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. +// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) +begin:function begin(condition) { + this.conditionStack.push(condition); + }, - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; +// pop the previously active lexer condition state off the condition stack +popState:function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; } - if (cb) cb(er) - }) - }})(fs.rename) - } + }, - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { return function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) +// produce the lexer rule set which is active for the currently active lexer condition state +_currentRules:function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - }})(fs.read) + }, - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue +// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available +topState:function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; } - throw er - } - } - }})(fs.readSync) -} - -function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } + }, - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } -} - -function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - -function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } -} - -function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - - -function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, cb) { - return orig.call(fs, target, function (er, stats) { - if (!stats) return cb.apply(this, arguments) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - if (cb) cb.apply(this, arguments) - }) - } -} - -function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target) { - var stats = orig.call(fs, target) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - return stats; - } -} - -// ENOSYS means that the fs doesn't support the op. Just ignore -// that, because it doesn't matter. -// -// if there's no getuid, or if getuid() is something other -// than 0, and the error is EINVAL or EPERM, then just ignore -// it. -// -// This specific case is a silent failure in cp, install, tar, -// and most other unix tools that manage permissions. -// -// When running as root, or if other types of errors are -// encountered, then it's strict. -function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false -} - - -/***/ }), -/* 387 */ -/***/ (function(module, exports) { - -module.exports = require("constants"); - -/***/ }), -/* 388 */ -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__(20).Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} - - -/***/ }), -/* 389 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = x => { - if (typeof x !== 'string') { - throw new TypeError('Expected a string, got ' + typeof x); - } - - // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string - // conversion translates it to FEFF (UTF-16 BOM) - if (x.charCodeAt(0) === 0xFEFF) { - return x.slice(1); - } - - return x; -}; - - -/***/ }), -/* 390 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const errorEx = __webpack_require__(391); -const fallback = __webpack_require__(393); - -const JSONError = errorEx('JSONError', { - fileName: errorEx.append('in %s') -}); - -module.exports = (input, reviver, filename) => { - if (typeof reviver === 'string') { - filename = reviver; - reviver = null; - } - - try { - try { - return JSON.parse(input, reviver); - } catch (err) { - fallback(input, reviver); - - throw err; - } - } catch (err) { - err.message = err.message.replace(/\n/g, ''); - - const jsonErr = new JSONError(err); - if (filename) { - jsonErr.fileName = filename; - } - - throw jsonErr; - } -}; - - -/***/ }), -/* 391 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var util = __webpack_require__(13); -var isArrayish = __webpack_require__(392); - -var errorEx = function errorEx(name, properties) { - if (!name || name.constructor !== String) { - properties = name || {}; - name = Error.name; - } - - var errorExError = function ErrorEXError(message) { - if (!this) { - return new ErrorEXError(message); - } - - message = message instanceof Error - ? message.message - : (message || this.message); - - Error.call(this, message); - Error.captureStackTrace(this, errorExError); - - this.name = name; - - Object.defineProperty(this, 'message', { - configurable: true, - enumerable: false, - get: function () { - var newMessage = message.split(/\r?\n/g); - - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - - var modifier = properties[key]; - - if ('message' in modifier) { - newMessage = modifier.message(this[key], newMessage) || newMessage; - if (!isArrayish(newMessage)) { - newMessage = [newMessage]; - } - } - } - - return newMessage.join('\n'); - }, - set: function (v) { - message = v; - } - }); - - var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); - var stackGetter = stackDescriptor.get; - var stackValue = stackDescriptor.value; - delete stackDescriptor.value; - delete stackDescriptor.writable; - - stackDescriptor.get = function () { - var stack = (stackGetter) - ? stackGetter.call(this).split(/\r?\n+/g) - : stackValue.split(/\r?\n+/g); - - // starting in Node 7, the stack builder caches the message. - // just replace it. - stack[0] = this.name + ': ' + this.message; - - var lineCount = 1; - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - - var modifier = properties[key]; - - if ('line' in modifier) { - var line = modifier.line(this[key]); - if (line) { - stack.splice(lineCount++, 0, ' ' + line); - } - } - - if ('stack' in modifier) { - modifier.stack(this[key], stack); - } - } - - return stack.join('\n'); - }; - - Object.defineProperty(this, 'stack', stackDescriptor); - }; - - if (Object.setPrototypeOf) { - Object.setPrototypeOf(errorExError.prototype, Error.prototype); - Object.setPrototypeOf(errorExError, Error); - } else { - util.inherits(errorExError, Error); - } - - return errorExError; -}; - -errorEx.append = function (str, def) { - return { - message: function (v, message) { - v = v || def; - - if (v) { - message[0] += ' ' + str.replace('%s', v.toString()); - } - - return message; - } - }; -}; - -errorEx.line = function (str, def) { - return { - line: function (v) { - v = v || def; - - if (v) { - return str.replace('%s', v.toString()); - } - - return null; - } - }; -}; - -module.exports = errorEx; - - -/***/ }), -/* 392 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = function isArrayish(obj) { - if (!obj) { - return false; - } - - return obj instanceof Array || Array.isArray(obj) || - (obj.length >= 0 && obj.splice instanceof Function); -}; - - -/***/ }), -/* 393 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = parseJson -function parseJson (txt, reviver, context) { - context = context || 20 - try { - return JSON.parse(txt, reviver) - } catch (e) { - const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) - const errIdx = syntaxErr - ? +syntaxErr[1] - : e.message.match(/^Unexpected end of JSON.*/i) - ? txt.length - 1 - : null - if (errIdx != null) { - const start = errIdx <= context - ? 0 - : errIdx - context - const end = errIdx + context >= txt.length - ? txt.length - : errIdx + context - e.message += ` while parsing near '${ - start === 0 ? '' : '...' - }${txt.slice(start, end)}${ - end === txt.length ? '' : '...' - }'` - } else { - e.message += ` while parsing '${txt.slice(0, context * 2)}'` - } - throw e - } -} - - -/***/ }), -/* 394 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const fs = __webpack_require__(7); -const pify = __webpack_require__(21); - -function type(fn, fn2, fp) { - if (typeof fp !== 'string') { - return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`)); - } - - return pify(fs[fn])(fp) - .then(stats => stats[fn2]()) - .catch(err => { - if (err.code === 'ENOENT') { - return false; - } - - throw err; - }); -} - -function typeSync(fn, fn2, fp) { - if (typeof fp !== 'string') { - throw new TypeError(`Expected a string, got ${typeof fp}`); - } - - try { - return fs[fn](fp)[fn2](); - } catch (err) { - if (err.code === 'ENOENT') { - return false; - } - - throw err; - } -} - -exports.file = type.bind(null, 'stat', 'isFile'); -exports.dir = type.bind(null, 'stat', 'isDirectory'); -exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink'); -exports.fileSync = typeSync.bind(null, 'statSync', 'isFile'); -exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); -exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); - - -/***/ }), -/* 395 */ -/***/ (function(module, exports, __webpack_require__) { - -var semver = __webpack_require__(396) -var validateLicense = __webpack_require__(397); -var hostedGitInfo = __webpack_require__(402) -var isBuiltinModule = __webpack_require__(404) -var depTypes = ["dependencies","devDependencies","optionalDependencies"] -var extractDescription = __webpack_require__(406) -var url = __webpack_require__(210) -var typos = __webpack_require__(407) - -var fixer = module.exports = { - // default warning function - warn: function() {}, - - fixRepositoryField: function(data) { - if (data.repositories) { - this.warn("repositories"); - data.repository = data.repositories[0] - } - if (!data.repository) return this.warn("missingRepository") - if (typeof data.repository === "string") { - data.repository = { - type: "git", - url: data.repository - } - } - var r = data.repository.url || "" - if (r) { - var hosted = hostedGitInfo.fromUrl(r) - if (hosted) { - r = data.repository.url - = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() - } - } - - if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { - this.warn("brokenGitUrl", r) - } - } - -, fixTypos: function(data) { - Object.keys(typos.topLevel).forEach(function (d) { - if (data.hasOwnProperty(d)) { - this.warn("typo", d, typos.topLevel[d]) - } - }, this) - } - -, fixScriptsField: function(data) { - if (!data.scripts) return - if (typeof data.scripts !== "object") { - this.warn("nonObjectScripts") - delete data.scripts - return - } - Object.keys(data.scripts).forEach(function (k) { - if (typeof data.scripts[k] !== "string") { - this.warn("nonStringScript") - delete data.scripts[k] - } else if (typos.script[k] && !data.scripts[typos.script[k]]) { - this.warn("typo", k, typos.script[k], "scripts") - } - }, this) - } - -, fixFilesField: function(data) { - var files = data.files - if (files && !Array.isArray(files)) { - this.warn("nonArrayFiles") - delete data.files - } else if (data.files) { - data.files = data.files.filter(function(file) { - if (!file || typeof file !== "string") { - this.warn("invalidFilename", file) - return false - } else { - return true - } - }, this) - } - } - -, fixBinField: function(data) { - if (!data.bin) return; - if (typeof data.bin === "string") { - var b = {} - var match - if (match = data.name.match(/^@[^/]+[/](.*)$/)) { - b[match[1]] = data.bin - } else { - b[data.name] = data.bin - } - data.bin = b - } - } - -, fixManField: function(data) { - if (!data.man) return; - if (typeof data.man === "string") { - data.man = [ data.man ] - } - } -, fixBundleDependenciesField: function(data) { - var bdd = "bundledDependencies" - var bd = "bundleDependencies" - if (data[bdd] && !data[bd]) { - data[bd] = data[bdd] - delete data[bdd] - } - if (data[bd] && !Array.isArray(data[bd])) { - this.warn("nonArrayBundleDependencies") - delete data[bd] - } else if (data[bd]) { - data[bd] = data[bd].filter(function(bd) { - if (!bd || typeof bd !== 'string') { - this.warn("nonStringBundleDependency", bd) - return false - } else { - if (!data.dependencies) { - data.dependencies = {} - } - if (!data.dependencies.hasOwnProperty(bd)) { - this.warn("nonDependencyBundleDependency", bd) - data.dependencies[bd] = "*" - } - return true - } - }, this) - } - } - -, fixDependencies: function(data, strict) { - var loose = !strict - objectifyDeps(data, this.warn) - addOptionalDepsToDeps(data, this.warn) - this.fixBundleDependenciesField(data) - - ;['dependencies','devDependencies'].forEach(function(deps) { - if (!(deps in data)) return - if (!data[deps] || typeof data[deps] !== "object") { - this.warn("nonObjectDependencies", deps) - delete data[deps] - return - } - Object.keys(data[deps]).forEach(function (d) { - var r = data[deps][d] - if (typeof r !== 'string') { - this.warn("nonStringDependency", d, JSON.stringify(r)) - delete data[deps][d] - } - var hosted = hostedGitInfo.fromUrl(data[deps][d]) - if (hosted) data[deps][d] = hosted.toString() - }, this) - }, this) - } - -, fixModulesField: function (data) { - if (data.modules) { - this.warn("deprecatedModules") - delete data.modules - } - } - -, fixKeywordsField: function (data) { - if (typeof data.keywords === "string") { - data.keywords = data.keywords.split(/,\s+/) - } - if (data.keywords && !Array.isArray(data.keywords)) { - delete data.keywords - this.warn("nonArrayKeywords") - } else if (data.keywords) { - data.keywords = data.keywords.filter(function(kw) { - if (typeof kw !== "string" || !kw) { - this.warn("nonStringKeyword"); - return false - } else { - return true - } - }, this) - } - } - -, fixVersionField: function(data, strict) { - // allow "loose" semver 1.0 versions in non-strict mode - // enforce strict semver 2.0 compliance in strict mode - var loose = !strict - if (!data.version) { - data.version = "" - return true - } - if (!semver.valid(data.version, loose)) { - throw new Error('Invalid version: "'+ data.version + '"') - } - data.version = semver.clean(data.version, loose) - return true - } - -, fixPeople: function(data) { - modifyPeople(data, unParsePerson) - modifyPeople(data, parsePerson) - } - -, fixNameField: function(data, options) { - if (typeof options === "boolean") options = {strict: options} - else if (typeof options === "undefined") options = {} - var strict = options.strict - if (!data.name && !strict) { - data.name = "" - return - } - if (typeof data.name !== "string") { - throw new Error("name field must be a string.") - } - if (!strict) - data.name = data.name.trim() - ensureValidName(data.name, strict, options.allowLegacyCase) - if (isBuiltinModule(data.name)) - this.warn("conflictingName", data.name) - } - - -, fixDescriptionField: function (data) { - if (data.description && typeof data.description !== 'string') { - this.warn("nonStringDescription") - delete data.description - } - if (data.readme && !data.description) - data.description = extractDescription(data.readme) - if(data.description === undefined) delete data.description; - if (!data.description) this.warn("missingDescription") - } - -, fixReadmeField: function (data) { - if (!data.readme) { - this.warn("missingReadme") - data.readme = "ERROR: No README data found!" - } - } - -, fixBugsField: function(data) { - if (!data.bugs && data.repository && data.repository.url) { - var hosted = hostedGitInfo.fromUrl(data.repository.url) - if(hosted && hosted.bugs()) { - data.bugs = {url: hosted.bugs()} - } - } - else if(data.bugs) { - var emailRe = /^.+@.*\..+$/ - if(typeof data.bugs == "string") { - if(emailRe.test(data.bugs)) - data.bugs = {email:data.bugs} - else if(url.parse(data.bugs).protocol) - data.bugs = {url: data.bugs} - else - this.warn("nonEmailUrlBugsString") - } - else { - bugsTypos(data.bugs, this.warn) - var oldBugs = data.bugs - data.bugs = {} - if(oldBugs.url) { - if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) - data.bugs.url = oldBugs.url - else - this.warn("nonUrlBugsUrlField") - } - if(oldBugs.email) { - if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) - data.bugs.email = oldBugs.email - else - this.warn("nonEmailBugsEmailField") - } - } - if(!data.bugs.email && !data.bugs.url) { - delete data.bugs - this.warn("emptyNormalizedBugs") - } - } - } - -, fixHomepageField: function(data) { - if (!data.homepage && data.repository && data.repository.url) { - var hosted = hostedGitInfo.fromUrl(data.repository.url) - if (hosted && hosted.docs()) data.homepage = hosted.docs() - } - if (!data.homepage) return - - if(typeof data.homepage !== "string") { - this.warn("nonUrlHomepage") - return delete data.homepage - } - if(!url.parse(data.homepage).protocol) { - data.homepage = "http://" + data.homepage - } - } - -, fixLicenseField: function(data) { - if (!data.license) { - return this.warn("missingLicense") - } else{ - if ( - typeof(data.license) !== 'string' || - data.license.length < 1 - ) { - this.warn("invalidLicense") - } else { - if (!validateLicense(data.license).validForNewPackages) - this.warn("invalidLicense") - } - } - } -} - -function isValidScopedPackageName(spec) { - if (spec.charAt(0) !== '@') return false - - var rest = spec.slice(1).split('/') - if (rest.length !== 2) return false - - return rest[0] && rest[1] && - rest[0] === encodeURIComponent(rest[0]) && - rest[1] === encodeURIComponent(rest[1]) -} - -function isCorrectlyEncodedName(spec) { - return !spec.match(/[\/@\s\+%:]/) && - spec === encodeURIComponent(spec) -} - -function ensureValidName (name, strict, allowLegacyCase) { - if (name.charAt(0) === "." || - !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || - (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || - name.toLowerCase() === "node_modules" || - name.toLowerCase() === "favicon.ico") { - throw new Error("Invalid name: " + JSON.stringify(name)) - } -} - -function modifyPeople (data, fn) { - if (data.author) data.author = fn(data.author) - ;["maintainers", "contributors"].forEach(function (set) { - if (!Array.isArray(data[set])) return; - data[set] = data[set].map(fn) - }) - return data -} - -function unParsePerson (person) { - if (typeof person === "string") return person - var name = person.name || "" - var u = person.url || person.web - var url = u ? (" ("+u+")") : "" - var e = person.email || person.mail - var email = e ? (" <"+e+">") : "" - return name+email+url -} - -function parsePerson (person) { - if (typeof person !== "string") return person - var name = person.match(/^([^\(<]+)/) - var url = person.match(/\(([^\)]+)\)/) - var email = person.match(/<([^>]+)>/) - var obj = {} - if (name && name[0].trim()) obj.name = name[0].trim() - if (email) obj.email = email[1]; - if (url) obj.url = url[1]; - return obj -} - -function addOptionalDepsToDeps (data, warn) { - var o = data.optionalDependencies - if (!o) return; - var d = data.dependencies || {} - Object.keys(o).forEach(function (k) { - d[k] = o[k] - }) - data.dependencies = d -} - -function depObjectify (deps, type, warn) { - if (!deps) return {} - if (typeof deps === "string") { - deps = deps.trim().split(/[\n\r\s\t ,]+/) - } - if (!Array.isArray(deps)) return deps - warn("deprecatedArrayDependencies", type) - var o = {} - deps.filter(function (d) { - return typeof d === "string" - }).forEach(function(d) { - d = d.trim().split(/(:?[@\s><=])/) - var dn = d.shift() - var dv = d.join("") - dv = dv.trim() - dv = dv.replace(/^@/, "") - o[dn] = dv - }) - return o -} - -function objectifyDeps (data, warn) { - depTypes.forEach(function (type) { - if (!data[type]) return; - data[type] = depObjectify(data[type], type, warn) - }) -} - -function bugsTypos(bugs, warn) { - if (!bugs) return - Object.keys(bugs).forEach(function (k) { - if (typos.bugs[k]) { - warn("typo", k, typos.bugs[k], "bugs") - bugs[typos.bugs[k]] = bugs[k] - delete bugs[k] - } - }) -} - - -/***/ }), -/* 396 */ -/***/ (function(module, exports) { - -exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -var MAX_LENGTH = 256; -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++; -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - if (version instanceof SemVer) - return version; - - if (typeof version !== 'string') - return null; - - if (version.length > MAX_LENGTH) - return null; - - var r = loose ? re[LOOSE] : re[FULL]; - if (!r.test(version)) - return null; - - try { - return new SemVer(version, loose); - } catch (er) { - return null; - } -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version.trim().replace(/^[=v]+/, ''), loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); - } - - if (version.length > MAX_LENGTH) - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - debug('SemVer', version, loose); - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) - throw new TypeError('Invalid major version') - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) - throw new TypeError('Invalid minor version') - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) - throw new TypeError('Invalid patch version') - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) - return num; - } - return id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.loose, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc('pre', identifier); - break; - case 'preminor': - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc('pre', identifier); - break; - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0; - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) - this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) - this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) - this.prerelease = [identifier, 0]; - } else - this.prerelease = [identifier, 0]; - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - this.raw = this.version; - return this; -}; - -exports.inc = inc; -function inc(version, release, loose, identifier) { - if (typeof(loose) === 'string') { - identifier = loose; - loose = undefined; - } - - try { - return new SemVer(version, loose).inc(release, identifier).version; - } catch (er) { - return null; - } -} - -exports.diff = diff; -function diff(version1, version2) { - if (eq(version1, version2)) { - return null; - } else { - var v1 = parse(version1); - var v2 = parse(version2); - if (v1.prerelease.length || v2.prerelease.length) { - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return 'pre'+key; - } - } - } - return 'prerelease'; - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return key; - } - } - } - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.major = major; -function major(a, loose) { - return new SemVer(a, loose).major; -} - -exports.minor = minor; -function minor(a, loose) { - return new SemVer(a, loose).minor; -} - -exports.patch = patch; -function patch(a, loose) { - return new SemVer(a, loose).patch; -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a === b; - break; - case '!==': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a !== b; - break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - debug('comparator', comp, loose); - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; - - debug('comp', this); -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else - this.semver = new SemVer(m[2], this.loose); -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.loose); - - if (this.semver === ANY) - return true; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - return cmp(version, this.operator, this.semver, this.loose); -}; - -Comparator.prototype.intersects = function(comp, loose) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required'); - } - - var rangeTmp; - - if (this.operator === '') { - rangeTmp = new Range(comp.value, loose); - return satisfies(this.value, rangeTmp, loose); - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, loose); - return satisfies(comp.semver, rangeTmp, loose); - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>'); - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<'); - var sameSemVer = this.semver.version === comp.semver.version; - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<='); - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, loose) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')); - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, loose) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')); - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; -}; - - -exports.Range = Range; -function Range(range, loose) { - if (range instanceof Range) { - if (range.loose === loose) { - return range; - } else { - return new Range(range.raw, loose); - } - } - - if (range instanceof Comparator) { - return new Range(range.value, loose); - } - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - debug('range', range, loose); - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -Range.prototype.intersects = function(range, loose) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required'); - } - - return this.set.some(function(thisComparators) { - return thisComparators.every(function(thisComparator) { - return range.set.some(function(rangeComparators) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, loose); - }); - }); - }); - }); -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - debug('comp', comp); - comp = replaceCarets(comp, loose); - debug('caret', comp); - comp = replaceTildes(comp, loose); - debug('tildes', comp); - comp = replaceXRanges(comp, loose); - debug('xrange', comp); - comp = replaceStars(comp, loose); - debug('stars', comp); - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - - debug('tilde return', ret); - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - debug('caret', comp, loose); - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; - } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0'; - } else { - debug('no pr'); - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0'; - } - - debug('caret return', ret); - return ret; - }); -} - -function replaceXRanges(comp, loose) { - debug('replaceXRanges', comp, loose); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0'; - } else { - // nothing is forbidden - ret = '*'; - } - } else if (gtlt && anyX) { - // replace X with 0 - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>='; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<'; - if (xm) - M = +M + 1; - else - m = +m + 1; - } - - ret = gtlt + M + '.' + m + '.' + p; - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - } - - debug('xRange return', ret); - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - debug('replaceStars', comp, loose); - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - - if (version.prerelease.length) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (var i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === ANY) - continue; - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver; - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) - return true; - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false; - } - - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - var max = null; - var maxSV = null; - try { - var rangeObj = new Range(range, loose); - } catch (er) { - return null; - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, loose) - if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) - max = v; - maxSV = new SemVer(max, loose); - } - } - }) - return max; -} - -exports.minSatisfying = minSatisfying; -function minSatisfying(versions, range, loose) { - var min = null; - var minSV = null; - try { - var rangeObj = new Range(range, loose); - } catch (er) { - return null; - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, loose) - if (!min || minSV.compare(v) === 1) { // compare(min, v, true) - min = v; - minSV = new SemVer(min, loose); - } - } - }) - return min; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -exports.prerelease = prerelease; -function prerelease(version, loose) { - var parsed = parse(version, loose); - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; -} - -exports.intersects = intersects; -function intersects(r1, r2, loose) { - r1 = new Range(r1, loose) - r2 = new Range(r2, loose) - return r1.intersects(r2) -} - -exports.coerce = coerce; -function coerce(version) { - if (version instanceof SemVer) - return version; - - if (typeof version !== 'string') - return null; - - var match = version.match(re[COERCE]); - - if (match == null) - return null; - - return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); -} - - -/***/ }), -/* 397 */ -/***/ (function(module, exports, __webpack_require__) { - -var parse = __webpack_require__(398); -var correct = __webpack_require__(400); - -var genericWarning = ( - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "' -); - -var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - -function startsWith(prefix, string) { - return string.slice(0, prefix.length) === prefix; -} - -function usesLicenseRef(ast) { - if (ast.hasOwnProperty('license')) { - var license = ast.license; - return ( - startsWith('LicenseRef', license) || - startsWith('DocumentRef', license) - ); - } else { - return ( - usesLicenseRef(ast.left) || - usesLicenseRef(ast.right) - ); - } -} - -module.exports = function(argument) { - var ast; - - try { - ast = parse(argument); - } catch (e) { - var match - if ( - argument === 'UNLICENSED' || - argument === 'UNLICENCED' - ) { - return { - validForOldPackages: true, - validForNewPackages: true, - unlicensed: true - }; - } else if (match = fileReferenceRE.exec(argument)) { - return { - validForOldPackages: true, - validForNewPackages: true, - inFile: match[1] - }; - } else { - var result = { - validForOldPackages: false, - validForNewPackages: false, - warnings: [genericWarning] - }; - var corrected = correct(argument); - if (corrected) { - result.warnings.push( - 'license is similar to the valid expression "' + corrected + '"' - ); - } - return result; - } - } - - if (usesLicenseRef(ast)) { - return { - validForNewPackages: false, - validForOldPackages: false, - spdx: true, - warnings: [genericWarning] - }; - } else { - return { - validForNewPackages: true, - validForOldPackages: true, - spdx: true - }; - } -}; - - -/***/ }), -/* 398 */ -/***/ (function(module, exports, __webpack_require__) { - -var parser = __webpack_require__(399).parser - -module.exports = function (argument) { - return parser.parse(argument) -} - - -/***/ }), -/* 399 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {/* parser generated by jison 0.4.17 */ -/* - Returns a Parser object of the following structure: - - Parser: { - yy: {} - } - - Parser.prototype: { - yy: {}, - trace: function(), - symbols_: {associative list: name ==> number}, - terminals_: {associative list: number ==> name}, - productions_: [...], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), - table: [...], - defaultActions: {...}, - parseError: function(str, hash), - parse: function(input), - - lexer: { - EOF: 1, - parseError: function(str, hash), - setInput: function(input), - input: function(), - unput: function(str), - more: function(), - less: function(n), - pastInput: function(), - upcomingInput: function(), - showPosition: function(), - test_match: function(regex_match_array, rule_index), - next: function(), - lex: function(), - begin: function(condition), - popState: function(), - _currentRules: function(), - topState: function(), - pushState: function(condition), - - options: { - ranges: boolean (optional: true ==> token location info will include a .range[] member) - flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) - backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) - }, - - performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), - rules: [...], - conditions: {associative list: name ==> set}, - } - } - - - token location info (@$, _$, etc.): { - first_line: n, - last_line: n, - first_column: n, - last_column: n, - range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) - } - - - the parseError function receives a 'hash' object with these members for lexer and parser errors: { - text: (matched text) - token: (the produced terminal token, if any) - line: (yylineno) - } - while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { - loc: (yylloc) - expected: (string describing the set of expected tokens) - recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) - } -*/ -var spdxparse = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,5],$V1=[1,6],$V2=[1,7],$V3=[1,4],$V4=[1,9],$V5=[1,10],$V6=[5,14,15,17],$V7=[5,12,14,15,17]; -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"start":3,"expression":4,"EOS":5,"simpleExpression":6,"LICENSE":7,"PLUS":8,"LICENSEREF":9,"DOCUMENTREF":10,"COLON":11,"WITH":12,"EXCEPTION":13,"AND":14,"OR":15,"OPEN":16,"CLOSE":17,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOS",7:"LICENSE",8:"PLUS",9:"LICENSEREF",10:"DOCUMENTREF",11:"COLON",12:"WITH",13:"EXCEPTION",14:"AND",15:"OR",16:"OPEN",17:"CLOSE"}, -productions_: [0,[3,2],[6,1],[6,2],[6,1],[6,3],[4,1],[4,3],[4,3],[4,3],[4,3]], -performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { -/* this == yyval */ - -var $0 = $$.length - 1; -switch (yystate) { -case 1: -return this.$ = $$[$0-1] -break; -case 2: case 4: case 5: -this.$ = {license: yytext} -break; -case 3: -this.$ = {license: $$[$0-1], plus: true} -break; -case 6: -this.$ = $$[$0] -break; -case 7: -this.$ = {exception: $$[$0]} -this.$.license = $$[$0-2].license -if ($$[$0-2].hasOwnProperty('plus')) { - this.$.plus = $$[$0-2].plus -} -break; -case 8: -this.$ = {conjunction: 'and', left: $$[$0-2], right: $$[$0]} -break; -case 9: -this.$ = {conjunction: 'or', left: $$[$0-2], right: $$[$0]} -break; -case 10: -this.$ = $$[$0-1] -break; -} -}, -table: [{3:1,4:2,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{1:[3]},{5:[1,8],14:$V4,15:$V5},o($V6,[2,6],{12:[1,11]}),{4:12,6:3,7:$V0,9:$V1,10:$V2,16:$V3},o($V7,[2,2],{8:[1,13]}),o($V7,[2,4]),{11:[1,14]},{1:[2,1]},{4:15,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{4:16,6:3,7:$V0,9:$V1,10:$V2,16:$V3},{13:[1,17]},{14:$V4,15:$V5,17:[1,18]},o($V7,[2,3]),{9:[1,19]},o($V6,[2,8]),o([5,15,17],[2,9],{14:$V4}),o($V6,[2,7]),o($V6,[2,10]),o($V7,[2,5])], -defaultActions: {8:[2,1]}, -parseError: function parseError(str, hash) { - if (hash.recoverable) { - this.trace(str); - } else { - function _parseError (msg, hash) { - this.message = msg; - this.hash = hash; - } - _parseError.prototype = Error; - - throw new _parseError(str, hash); - } -}, -parse: function parse(input) { - var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - var args = lstack.slice.call(arguments, 1); - var lexer = Object.create(this.lexer); - var sharedState = { yy: {} }; - for (var k in this.yy) { - if (Object.prototype.hasOwnProperty.call(this.yy, k)) { - sharedState.yy[k] = this.yy[k]; - } - } - lexer.setInput(input, sharedState.yy); - sharedState.yy.lexer = lexer; - sharedState.yy.parser = this; - if (typeof lexer.yylloc == 'undefined') { - lexer.yylloc = {}; - } - var yyloc = lexer.yylloc; - lstack.push(yyloc); - var ranges = lexer.options && lexer.options.ranges; - if (typeof sharedState.yy.parseError === 'function') { - this.parseError = sharedState.yy.parseError; - } else { - this.parseError = Object.getPrototypeOf(this).parseError; - } - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - _token_stack: - var lex = function () { - var token; - token = lexer.lex() || EOF; - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - }; - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == 'undefined') { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === 'undefined' || !action.length || !action[0]) { - var errStr = ''; - expected = []; - for (p in table[state]) { - if (this.terminals_[p] && p > TERROR) { - expected.push('\'' + this.terminals_[p] + '\''); - } - } - if (lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); - } - this.parseError(errStr, { - text: lexer.match, - token: this.terminals_[symbol] || symbol, - line: lexer.yylineno, - loc: yyloc, - expected: expected - }); - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(lexer.yytext); - lstack.push(lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = lexer.yyleng; - yytext = lexer.yytext; - yylineno = lexer.yylineno; - yyloc = lexer.yylloc; - if (recovering > 0) { - recovering--; - } - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - if (ranges) { - yyval._$.range = [ - lstack[lstack.length - (len || 1)].range[0], - lstack[lstack.length - 1].range[1] - ]; - } - r = this.performAction.apply(yyval, [ - yytext, - yyleng, - yylineno, - sharedState.yy, - action[1], - vstack, - lstack - ].concat(args)); - if (typeof r !== 'undefined') { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -}}; -/* generated by jison-lex 0.3.4 */ -var lexer = (function(){ -var lexer = ({ - -EOF:1, - -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - -// resets the lexer, sets new input -setInput:function (input, yy) { - this.yy = yy || this.yy || {}; - this._input = input; - this._more = this._backtrack = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - if (this.options.ranges) { - this.yylloc.range = [0,0]; - } - this.offset = 0; - return this; - }, - -// consumes and returns one char from the input -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) { - this.yylloc.range[1]++; - } - - this._input = this._input.slice(1); - return ch; - }, - -// unshifts one char (or a string) into the input -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) { - this.yylineno -= lines.length - 1; - } - var r = this.yylloc.range; - - this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) - + oldLines[oldLines.length - lines.length].length - lines[0].length : - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - this.yyleng = this.yytext.length; - return this; - }, - -// When called from action, caches matched text and appends it on next action -more:function () { - this._more = true; - return this; - }, - -// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. -reject:function () { - if (this.options.backtrack_lexer) { - this._backtrack = true; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - - } - return this; - }, - -// retain first n characters of the match -less:function (n) { - this.unput(this.match.slice(n)); - }, - -// displays already matched input, i.e. for error messages -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, - -// displays upcoming input, i.e. for error messages -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - -// displays the character position where the lexing error occurred, i.e. for error messages -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - -// test the lexed token: return FALSE when not a match, otherwise return token -test_match:function (match, indexed_rule) { - var token, - lines, - backup; - - if (this.options.backtrack_lexer) { - // save context - backup = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }; - if (this.options.ranges) { - backup.yylloc.range = this.yylloc.range.slice(0); - } - } - - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno += lines.length; - } - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? - lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : - this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._backtrack = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) { - this.done = false; - } - if (token) { - return token; - } else if (this._backtrack) { - // recover context - for (var k in backup) { - this[k] = backup[k]; - } - return false; // rule action called reject() implying the next rule should be tested instead. - } - return false; - }, - -// return next match in input -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) { - this.done = true; - } - - var token, - match, - tempMatch, - index; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (this.options.backtrack_lexer) { - token = this.test_match(tempMatch, rules[i]); - if (token !== false) { - return token; - } else if (this._backtrack) { - match = false; - continue; // rule action called reject() implying a rule MISmatch. - } else { - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - } else if (!this.options.flex) { - break; - } - } - } - if (match) { - token = this.test_match(match, rules[index]); - if (token !== false) { - return token; - } - // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace) - return false; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - } - }, - -// return next match that has a token -lex:function lex() { - var r = this.next(); - if (r) { - return r; - } else { - return this.lex(); - } - }, - -// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) -begin:function begin(condition) { - this.conditionStack.push(condition); - }, - -// pop the previously active lexer condition state off the condition stack -popState:function popState() { - var n = this.conditionStack.length - 1; - if (n > 0) { - return this.conditionStack.pop(); - } else { - return this.conditionStack[0]; - } - }, - -// produce the lexer rule set which is active for the currently active lexer condition state -_currentRules:function _currentRules() { - if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - } else { - return this.conditions["INITIAL"].rules; - } - }, - -// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available -topState:function topState(n) { - n = this.conditionStack.length - 1 - Math.abs(n || 0); - if (n >= 0) { - return this.conditionStack[n]; - } else { - return "INITIAL"; - } - }, - -// alias for begin(condition) -pushState:function pushState(condition) { - this.begin(condition); - }, +// alias for begin(condition) +pushState:function pushState(condition) { + this.begin(condition); + }, // return the number of states currently on the stack stateStackSize:function stateStackSize() { @@ -45760,1517 +43219,4336 @@ break; case 364:return 7 break; } -}, -rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-SA-3\.0)/,/^(?:Artistic-1\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-ND-1\.0)/,/^(?:BSD-4-Clause)/,/^(?:BSD-3-Clause)/,/^(?:BSD-2-Clause)/,/^(?:CC-BY-NC-1\.0)/,/^(?:bzip2-1\.0\.6)/,/^(?:Unicode-TOU)/,/^(?:CNRI-Jython)/,/^(?:ImageMagick)/,/^(?:Adobe-Glyph)/,/^(?:CUA-OPL-1\.0)/,/^(?:OLDAP-2\.2\.2)/,/^(?:LiLiQ-R-1\.1)/,/^(?:bzip2-1\.0\.5)/,/^(?:LiLiQ-P-1\.1)/,/^(?:OLDAP-2\.0\.1)/,/^(?:OLDAP-2\.2\.1)/,/^(?:CNRI-Python)/,/^(?:XFree86-1\.1)/,/^(?:OSET-PL-2\.1)/,/^(?:Apache-2\.0)/,/^(?:Watcom-1\.0)/,/^(?:PostgreSQL)/,/^(?:Python-2\.0)/,/^(?:RHeCos-1\.1)/,/^(?:EUDatagrid)/,/^(?:Spencer-99)/,/^(?:Intel-ACPI)/,/^(?:CECILL-1\.0)/,/^(?:CECILL-1\.1)/,/^(?:JasPer-2\.0)/,/^(?:CECILL-2\.0)/,/^(?:CECILL-2\.1)/,/^(?:gSOAP-1\.3b)/,/^(?:Spencer-94)/,/^(?:Apache-1\.1)/,/^(?:Spencer-86)/,/^(?:Apache-1\.0)/,/^(?:ClArtistic)/,/^(?:TORQUE-1\.1)/,/^(?:CATOSL-1\.1)/,/^(?:Adobe-2006)/,/^(?:Zimbra-1\.4)/,/^(?:Zimbra-1\.3)/,/^(?:Condor-1\.1)/,/^(?:CC-BY-3\.0)/,/^(?:CC-BY-2\.5)/,/^(?:OLDAP-2\.4)/,/^(?:SGI-B-1\.1)/,/^(?:SISSL-1\.2)/,/^(?:SGI-B-1\.0)/,/^(?:OLDAP-2\.3)/,/^(?:CC-BY-4\.0)/,/^(?:Crossword)/,/^(?:SimPL-2\.0)/,/^(?:OLDAP-2\.2)/,/^(?:OLDAP-2\.1)/,/^(?:ErlPL-1\.1)/,/^(?:LPPL-1\.3a)/,/^(?:LPPL-1\.3c)/,/^(?:OLDAP-2\.0)/,/^(?:Leptonica)/,/^(?:CPOL-1\.02)/,/^(?:OLDAP-1\.4)/,/^(?:OLDAP-1\.3)/,/^(?:CC-BY-2\.0)/,/^(?:Unlicense)/,/^(?:OLDAP-2\.8)/,/^(?:OLDAP-1\.2)/,/^(?:MakeIndex)/,/^(?:OLDAP-2\.7)/,/^(?:OLDAP-1\.1)/,/^(?:Sleepycat)/,/^(?:D-FSL-1\.0)/,/^(?:CC-BY-1\.0)/,/^(?:OLDAP-2\.6)/,/^(?:WXwindows)/,/^(?:NPOSL-3\.0)/,/^(?:FreeImage)/,/^(?:SGI-B-2\.0)/,/^(?:OLDAP-2\.5)/,/^(?:Beerware)/,/^(?:Newsletr)/,/^(?:NBPL-1\.0)/,/^(?:NASA-1\.3)/,/^(?:NLOD-1\.0)/,/^(?:AGPL-1\.0)/,/^(?:OCLC-2\.0)/,/^(?:ODbL-1\.0)/,/^(?:PDDL-1\.0)/,/^(?:Motosoto)/,/^(?:Afmparse)/,/^(?:ANTLR-PD)/,/^(?:LPL-1\.02)/,/^(?:Abstyles)/,/^(?:eCos-2\.0)/,/^(?:APSL-1\.0)/,/^(?:LPPL-1\.2)/,/^(?:LPPL-1\.1)/,/^(?:LPPL-1\.0)/,/^(?:APSL-1\.1)/,/^(?:APSL-2\.0)/,/^(?:Info-ZIP)/,/^(?:Zend-2\.0)/,/^(?:IBM-pibs)/,/^(?:LGPL-2\.0)/,/^(?:LGPL-3\.0)/,/^(?:LGPL-2\.1)/,/^(?:GFDL-1\.3)/,/^(?:PHP-3\.01)/,/^(?:GFDL-1\.2)/,/^(?:GFDL-1\.1)/,/^(?:AGPL-3\.0)/,/^(?:Giftware)/,/^(?:EUPL-1\.1)/,/^(?:RPSL-1\.0)/,/^(?:EUPL-1\.0)/,/^(?:MIT-enna)/,/^(?:CECILL-B)/,/^(?:diffmark)/,/^(?:CECILL-C)/,/^(?:CDDL-1\.0)/,/^(?:Sendmail)/,/^(?:CDDL-1\.1)/,/^(?:CPAL-1\.0)/,/^(?:APSL-1\.2)/,/^(?:NPL-1\.1)/,/^(?:AFL-1\.2)/,/^(?:Caldera)/,/^(?:AFL-2\.0)/,/^(?:FSFULLR)/,/^(?:AFL-2\.1)/,/^(?:VSL-1\.0)/,/^(?:VOSTROM)/,/^(?:UPL-1\.0)/,/^(?:Dotseqn)/,/^(?:CPL-1\.0)/,/^(?:dvipdfm)/,/^(?:EPL-1\.0)/,/^(?:OCCT-PL)/,/^(?:ECL-1\.0)/,/^(?:Latex2e)/,/^(?:ECL-2\.0)/,/^(?:GPL-1\.0)/,/^(?:GPL-2\.0)/,/^(?:GPL-3\.0)/,/^(?:AFL-3\.0)/,/^(?:LAL-1\.2)/,/^(?:LAL-1\.3)/,/^(?:EFL-1\.0)/,/^(?:EFL-2\.0)/,/^(?:gnuplot)/,/^(?:Aladdin)/,/^(?:LPL-1\.0)/,/^(?:libtiff)/,/^(?:Entessa)/,/^(?:AMDPLPA)/,/^(?:IPL-1\.0)/,/^(?:OPL-1\.0)/,/^(?:OSL-1\.0)/,/^(?:OSL-1\.1)/,/^(?:OSL-2\.0)/,/^(?:OSL-2\.1)/,/^(?:OSL-3\.0)/,/^(?:OpenSSL)/,/^(?:ZPL-2\.1)/,/^(?:PHP-3\.0)/,/^(?:ZPL-2\.0)/,/^(?:ZPL-1\.1)/,/^(?:CC0-1\.0)/,/^(?:SPL-1\.0)/,/^(?:psutils)/,/^(?:MPL-1\.0)/,/^(?:QPL-1\.0)/,/^(?:MPL-1\.1)/,/^(?:MPL-2\.0)/,/^(?:APL-1\.0)/,/^(?:RPL-1\.1)/,/^(?:RPL-1\.5)/,/^(?:MIT-CMU)/,/^(?:Multics)/,/^(?:Eurosym)/,/^(?:BSL-1\.0)/,/^(?:MIT-feh)/,/^(?:Saxpath)/,/^(?:Borceux)/,/^(?:OFL-1\.1)/,/^(?:OFL-1\.0)/,/^(?:AFL-1\.1)/,/^(?:YPL-1\.1)/,/^(?:YPL-1\.0)/,/^(?:NPL-1\.0)/,/^(?:iMatix)/,/^(?:mpich2)/,/^(?:APAFML)/,/^(?:Bahyph)/,/^(?:RSA-MD)/,/^(?:psfrag)/,/^(?:Plexus)/,/^(?:eGenix)/,/^(?:Glulxe)/,/^(?:SAX-PD)/,/^(?:Imlib2)/,/^(?:Wsuipa)/,/^(?:LGPLLR)/,/^(?:Libpng)/,/^(?:xinetd)/,/^(?:MITNFA)/,/^(?:NetCDF)/,/^(?:Naumen)/,/^(?:SMPPL)/,/^(?:Nunit)/,/^(?:FSFUL)/,/^(?:GL2PS)/,/^(?:SMLNJ)/,/^(?:Rdisc)/,/^(?:Noweb)/,/^(?:Nokia)/,/^(?:SISSL)/,/^(?:Qhull)/,/^(?:Intel)/,/^(?:Glide)/,/^(?:Xerox)/,/^(?:AMPAS)/,/^(?:WTFPL)/,/^(?:MS-PL)/,/^(?:XSkat)/,/^(?:MS-RL)/,/^(?:MirOS)/,/^(?:RSCPL)/,/^(?:TMate)/,/^(?:OGTSL)/,/^(?:FSFAP)/,/^(?:NCSA)/,/^(?:Zlib)/,/^(?:SCEA)/,/^(?:SNIA)/,/^(?:NGPL)/,/^(?:NOSL)/,/^(?:ADSL)/,/^(?:MTLL)/,/^(?:NLPL)/,/^(?:Ruby)/,/^(?:JSON)/,/^(?:Barr)/,/^(?:0BSD)/,/^(?:Xnet)/,/^(?:Cube)/,/^(?:curl)/,/^(?:DSDP)/,/^(?:Fair)/,/^(?:HPND)/,/^(?:TOSL)/,/^(?:IJG)/,/^(?:SWL)/,/^(?:Vim)/,/^(?:FTL)/,/^(?:ICU)/,/^(?:OML)/,/^(?:NRL)/,/^(?:DOC)/,/^(?:TCL)/,/^(?:W3C)/,/^(?:NTP)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:X11)/,/^(?:AAL)/,/^(?:AML)/,/^(?:xpp)/,/^(?:Zed)/,/^(?:MIT)/,/^(?:Mup)/], -conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}} -}); -return lexer; -})(); -parser.lexer = lexer; -function Parser () { - this.yy = {}; +}, +rules: [/^(?:$)/,/^(?:\s+)/,/^(?:\+)/,/^(?:\()/,/^(?:\))/,/^(?::)/,/^(?:DocumentRef-([0-9A-Za-z-+.]+))/,/^(?:LicenseRef-([0-9A-Za-z-+.]+))/,/^(?:AND)/,/^(?:OR)/,/^(?:WITH)/,/^(?:BSD-3-Clause-No-Nuclear-License-2014)/,/^(?:BSD-3-Clause-No-Nuclear-Warranty)/,/^(?:GPL-2\.0-with-classpath-exception)/,/^(?:GPL-3\.0-with-autoconf-exception)/,/^(?:GPL-2\.0-with-autoconf-exception)/,/^(?:BSD-3-Clause-No-Nuclear-License)/,/^(?:MPL-2\.0-no-copyleft-exception)/,/^(?:GPL-2\.0-with-bison-exception)/,/^(?:GPL-2\.0-with-font-exception)/,/^(?:GPL-2\.0-with-GCC-exception)/,/^(?:CNRI-Python-GPL-Compatible)/,/^(?:GPL-3\.0-with-GCC-exception)/,/^(?:BSD-3-Clause-Attribution)/,/^(?:Classpath-exception-2\.0)/,/^(?:WxWindows-exception-3\.1)/,/^(?:freertos-exception-2\.0)/,/^(?:Autoconf-exception-3\.0)/,/^(?:i2p-gpl-java-exception)/,/^(?:gnu-javamail-exception)/,/^(?:Nokia-Qt-exception-1\.1)/,/^(?:Autoconf-exception-2\.0)/,/^(?:BSD-2-Clause-FreeBSD)/,/^(?:u-boot-exception-2\.0)/,/^(?:zlib-acknowledgement)/,/^(?:Bison-exception-2\.2)/,/^(?:BSD-2-Clause-NetBSD)/,/^(?:CLISP-exception-2\.0)/,/^(?:eCos-exception-2\.0)/,/^(?:BSD-3-Clause-Clear)/,/^(?:Font-exception-2\.0)/,/^(?:FLTK-exception-2\.0)/,/^(?:GCC-exception-2\.0)/,/^(?:Qwt-exception-1\.0)/,/^(?:Libtool-exception)/,/^(?:BSD-3-Clause-LBNL)/,/^(?:GCC-exception-3\.1)/,/^(?:Artistic-1\.0-Perl)/,/^(?:Artistic-1\.0-cl8)/,/^(?:CC-BY-NC-SA-2\.5)/,/^(?:MIT-advertising)/,/^(?:BSD-Source-Code)/,/^(?:CC-BY-NC-SA-4\.0)/,/^(?:LiLiQ-Rplus-1\.1)/,/^(?:CC-BY-NC-SA-3\.0)/,/^(?:BSD-4-Clause-UC)/,/^(?:CC-BY-NC-SA-2\.0)/,/^(?:CC-BY-NC-SA-1\.0)/,/^(?:CC-BY-NC-ND-4\.0)/,/^(?:CC-BY-NC-ND-3\.0)/,/^(?:CC-BY-NC-ND-2\.5)/,/^(?:CC-BY-NC-ND-2\.0)/,/^(?:CC-BY-NC-ND-1\.0)/,/^(?:LZMA-exception)/,/^(?:BitTorrent-1\.1)/,/^(?:CrystalStacker)/,/^(?:FLTK-exception)/,/^(?:SugarCRM-1\.1\.3)/,/^(?:BSD-Protection)/,/^(?:BitTorrent-1\.0)/,/^(?:HaskellReport)/,/^(?:Interbase-1\.0)/,/^(?:StandardML-NJ)/,/^(?:mif-exception)/,/^(?:Frameworx-1\.0)/,/^(?:389-exception)/,/^(?:CC-BY-NC-2\.0)/,/^(?:CC-BY-NC-2\.5)/,/^(?:CC-BY-NC-3\.0)/,/^(?:CC-BY-NC-4\.0)/,/^(?:W3C-19980720)/,/^(?:CC-BY-SA-1\.0)/,/^(?:CC-BY-SA-2\.0)/,/^(?:CC-BY-SA-2\.5)/,/^(?:CC-BY-ND-2\.0)/,/^(?:CC-BY-SA-4\.0)/,/^(?:CC-BY-SA-3\.0)/,/^(?:Artistic-1\.0)/,/^(?:Artistic-2\.0)/,/^(?:CC-BY-ND-2\.5)/,/^(?:CC-BY-ND-3\.0)/,/^(?:CC-BY-ND-4\.0)/,/^(?:CC-BY-ND-1\.0)/,/^(?:BSD-4-Clause)/,/^(?:BSD-3-Clause)/,/^(?:BSD-2-Clause)/,/^(?:CC-BY-NC-1\.0)/,/^(?:bzip2-1\.0\.6)/,/^(?:Unicode-TOU)/,/^(?:CNRI-Jython)/,/^(?:ImageMagick)/,/^(?:Adobe-Glyph)/,/^(?:CUA-OPL-1\.0)/,/^(?:OLDAP-2\.2\.2)/,/^(?:LiLiQ-R-1\.1)/,/^(?:bzip2-1\.0\.5)/,/^(?:LiLiQ-P-1\.1)/,/^(?:OLDAP-2\.0\.1)/,/^(?:OLDAP-2\.2\.1)/,/^(?:CNRI-Python)/,/^(?:XFree86-1\.1)/,/^(?:OSET-PL-2\.1)/,/^(?:Apache-2\.0)/,/^(?:Watcom-1\.0)/,/^(?:PostgreSQL)/,/^(?:Python-2\.0)/,/^(?:RHeCos-1\.1)/,/^(?:EUDatagrid)/,/^(?:Spencer-99)/,/^(?:Intel-ACPI)/,/^(?:CECILL-1\.0)/,/^(?:CECILL-1\.1)/,/^(?:JasPer-2\.0)/,/^(?:CECILL-2\.0)/,/^(?:CECILL-2\.1)/,/^(?:gSOAP-1\.3b)/,/^(?:Spencer-94)/,/^(?:Apache-1\.1)/,/^(?:Spencer-86)/,/^(?:Apache-1\.0)/,/^(?:ClArtistic)/,/^(?:TORQUE-1\.1)/,/^(?:CATOSL-1\.1)/,/^(?:Adobe-2006)/,/^(?:Zimbra-1\.4)/,/^(?:Zimbra-1\.3)/,/^(?:Condor-1\.1)/,/^(?:CC-BY-3\.0)/,/^(?:CC-BY-2\.5)/,/^(?:OLDAP-2\.4)/,/^(?:SGI-B-1\.1)/,/^(?:SISSL-1\.2)/,/^(?:SGI-B-1\.0)/,/^(?:OLDAP-2\.3)/,/^(?:CC-BY-4\.0)/,/^(?:Crossword)/,/^(?:SimPL-2\.0)/,/^(?:OLDAP-2\.2)/,/^(?:OLDAP-2\.1)/,/^(?:ErlPL-1\.1)/,/^(?:LPPL-1\.3a)/,/^(?:LPPL-1\.3c)/,/^(?:OLDAP-2\.0)/,/^(?:Leptonica)/,/^(?:CPOL-1\.02)/,/^(?:OLDAP-1\.4)/,/^(?:OLDAP-1\.3)/,/^(?:CC-BY-2\.0)/,/^(?:Unlicense)/,/^(?:OLDAP-2\.8)/,/^(?:OLDAP-1\.2)/,/^(?:MakeIndex)/,/^(?:OLDAP-2\.7)/,/^(?:OLDAP-1\.1)/,/^(?:Sleepycat)/,/^(?:D-FSL-1\.0)/,/^(?:CC-BY-1\.0)/,/^(?:OLDAP-2\.6)/,/^(?:WXwindows)/,/^(?:NPOSL-3\.0)/,/^(?:FreeImage)/,/^(?:SGI-B-2\.0)/,/^(?:OLDAP-2\.5)/,/^(?:Beerware)/,/^(?:Newsletr)/,/^(?:NBPL-1\.0)/,/^(?:NASA-1\.3)/,/^(?:NLOD-1\.0)/,/^(?:AGPL-1\.0)/,/^(?:OCLC-2\.0)/,/^(?:ODbL-1\.0)/,/^(?:PDDL-1\.0)/,/^(?:Motosoto)/,/^(?:Afmparse)/,/^(?:ANTLR-PD)/,/^(?:LPL-1\.02)/,/^(?:Abstyles)/,/^(?:eCos-2\.0)/,/^(?:APSL-1\.0)/,/^(?:LPPL-1\.2)/,/^(?:LPPL-1\.1)/,/^(?:LPPL-1\.0)/,/^(?:APSL-1\.1)/,/^(?:APSL-2\.0)/,/^(?:Info-ZIP)/,/^(?:Zend-2\.0)/,/^(?:IBM-pibs)/,/^(?:LGPL-2\.0)/,/^(?:LGPL-3\.0)/,/^(?:LGPL-2\.1)/,/^(?:GFDL-1\.3)/,/^(?:PHP-3\.01)/,/^(?:GFDL-1\.2)/,/^(?:GFDL-1\.1)/,/^(?:AGPL-3\.0)/,/^(?:Giftware)/,/^(?:EUPL-1\.1)/,/^(?:RPSL-1\.0)/,/^(?:EUPL-1\.0)/,/^(?:MIT-enna)/,/^(?:CECILL-B)/,/^(?:diffmark)/,/^(?:CECILL-C)/,/^(?:CDDL-1\.0)/,/^(?:Sendmail)/,/^(?:CDDL-1\.1)/,/^(?:CPAL-1\.0)/,/^(?:APSL-1\.2)/,/^(?:NPL-1\.1)/,/^(?:AFL-1\.2)/,/^(?:Caldera)/,/^(?:AFL-2\.0)/,/^(?:FSFULLR)/,/^(?:AFL-2\.1)/,/^(?:VSL-1\.0)/,/^(?:VOSTROM)/,/^(?:UPL-1\.0)/,/^(?:Dotseqn)/,/^(?:CPL-1\.0)/,/^(?:dvipdfm)/,/^(?:EPL-1\.0)/,/^(?:OCCT-PL)/,/^(?:ECL-1\.0)/,/^(?:Latex2e)/,/^(?:ECL-2\.0)/,/^(?:GPL-1\.0)/,/^(?:GPL-2\.0)/,/^(?:GPL-3\.0)/,/^(?:AFL-3\.0)/,/^(?:LAL-1\.2)/,/^(?:LAL-1\.3)/,/^(?:EFL-1\.0)/,/^(?:EFL-2\.0)/,/^(?:gnuplot)/,/^(?:Aladdin)/,/^(?:LPL-1\.0)/,/^(?:libtiff)/,/^(?:Entessa)/,/^(?:AMDPLPA)/,/^(?:IPL-1\.0)/,/^(?:OPL-1\.0)/,/^(?:OSL-1\.0)/,/^(?:OSL-1\.1)/,/^(?:OSL-2\.0)/,/^(?:OSL-2\.1)/,/^(?:OSL-3\.0)/,/^(?:OpenSSL)/,/^(?:ZPL-2\.1)/,/^(?:PHP-3\.0)/,/^(?:ZPL-2\.0)/,/^(?:ZPL-1\.1)/,/^(?:CC0-1\.0)/,/^(?:SPL-1\.0)/,/^(?:psutils)/,/^(?:MPL-1\.0)/,/^(?:QPL-1\.0)/,/^(?:MPL-1\.1)/,/^(?:MPL-2\.0)/,/^(?:APL-1\.0)/,/^(?:RPL-1\.1)/,/^(?:RPL-1\.5)/,/^(?:MIT-CMU)/,/^(?:Multics)/,/^(?:Eurosym)/,/^(?:BSL-1\.0)/,/^(?:MIT-feh)/,/^(?:Saxpath)/,/^(?:Borceux)/,/^(?:OFL-1\.1)/,/^(?:OFL-1\.0)/,/^(?:AFL-1\.1)/,/^(?:YPL-1\.1)/,/^(?:YPL-1\.0)/,/^(?:NPL-1\.0)/,/^(?:iMatix)/,/^(?:mpich2)/,/^(?:APAFML)/,/^(?:Bahyph)/,/^(?:RSA-MD)/,/^(?:psfrag)/,/^(?:Plexus)/,/^(?:eGenix)/,/^(?:Glulxe)/,/^(?:SAX-PD)/,/^(?:Imlib2)/,/^(?:Wsuipa)/,/^(?:LGPLLR)/,/^(?:Libpng)/,/^(?:xinetd)/,/^(?:MITNFA)/,/^(?:NetCDF)/,/^(?:Naumen)/,/^(?:SMPPL)/,/^(?:Nunit)/,/^(?:FSFUL)/,/^(?:GL2PS)/,/^(?:SMLNJ)/,/^(?:Rdisc)/,/^(?:Noweb)/,/^(?:Nokia)/,/^(?:SISSL)/,/^(?:Qhull)/,/^(?:Intel)/,/^(?:Glide)/,/^(?:Xerox)/,/^(?:AMPAS)/,/^(?:WTFPL)/,/^(?:MS-PL)/,/^(?:XSkat)/,/^(?:MS-RL)/,/^(?:MirOS)/,/^(?:RSCPL)/,/^(?:TMate)/,/^(?:OGTSL)/,/^(?:FSFAP)/,/^(?:NCSA)/,/^(?:Zlib)/,/^(?:SCEA)/,/^(?:SNIA)/,/^(?:NGPL)/,/^(?:NOSL)/,/^(?:ADSL)/,/^(?:MTLL)/,/^(?:NLPL)/,/^(?:Ruby)/,/^(?:JSON)/,/^(?:Barr)/,/^(?:0BSD)/,/^(?:Xnet)/,/^(?:Cube)/,/^(?:curl)/,/^(?:DSDP)/,/^(?:Fair)/,/^(?:HPND)/,/^(?:TOSL)/,/^(?:IJG)/,/^(?:SWL)/,/^(?:Vim)/,/^(?:FTL)/,/^(?:ICU)/,/^(?:OML)/,/^(?:NRL)/,/^(?:DOC)/,/^(?:TCL)/,/^(?:W3C)/,/^(?:NTP)/,/^(?:IPA)/,/^(?:ISC)/,/^(?:X11)/,/^(?:AAL)/,/^(?:AML)/,/^(?:xpp)/,/^(?:Zed)/,/^(?:MIT)/,/^(?:Mup)/], +conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364],"inclusive":true}} +}); +return lexer; +})(); +parser.lexer = lexer; +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (true) { +exports.parser = spdxparse; +exports.Parser = spdxparse.Parser; +exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; +exports.main = function commonjsMain(args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = __webpack_require__(7).readFileSync(__webpack_require__(3).normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) { + exports.main(process.argv.slice(1)); +} +} + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(53)(module))) + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +var licenseIDs = __webpack_require__(366); + +function valid(string) { + return licenseIDs.indexOf(string) > -1; +} + +// Common transpositions of license identifier acronyms +var transpositions = [ + ['APGL', 'AGPL'], + ['Gpl', 'GPL'], + ['GLP', 'GPL'], + ['APL', 'Apache'], + ['ISD', 'ISC'], + ['GLP', 'GPL'], + ['IST', 'ISC'], + ['Claude', 'Clause'], + [' or later', '+'], + [' International', ''], + ['GNU', 'GPL'], + ['GUN', 'GPL'], + ['+', ''], + ['GNU GPL', 'GPL'], + ['GNU/GPL', 'GPL'], + ['GNU GLP', 'GPL'], + ['GNU General Public License', 'GPL'], + ['Gnu public license', 'GPL'], + ['GNU Public License', 'GPL'], + ['GNU GENERAL PUBLIC LICENSE', 'GPL'], + ['MTI', 'MIT'], + ['Mozilla Public License', 'MPL'], + ['WTH', 'WTF'], + ['-License', ''] +]; + +var TRANSPOSED = 0; +var CORRECT = 1; + +// Simple corrections to nearly valid identifiers. +var transforms = [ + // e.g. 'mit' + function(argument) { + return argument.toUpperCase(); + }, + // e.g. 'MIT ' + function(argument) { + return argument.trim(); + }, + // e.g. 'M.I.T.' + function(argument) { + return argument.replace(/\./g, ''); + }, + // e.g. 'Apache- 2.0' + function(argument) { + return argument.replace(/\s+/g, ''); + }, + // e.g. 'CC BY 4.0'' + function(argument) { + return argument.replace(/\s+/g, '-'); + }, + // e.g. 'LGPLv2.1' + function(argument) { + return argument.replace('v', '-'); + }, + // e.g. 'Apache 2.0' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1'); + }, + // e.g. 'GPL 2' + function(argument) { + return argument.replace(/,?\s*(\d)/, '-$1.0'); + }, + // e.g. 'Apache Version 2.0' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); + }, + // e.g. 'Apache Version 2' + function(argument) { + return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); + }, + // e.g. 'ZLIB' + function(argument) { + return argument[0].toUpperCase() + argument.slice(1); + }, + // e.g. 'MPL/2.0' + function(argument) { + return argument.replace('/', '-'); + }, + // e.g. 'Apache 2' + function(argument) { + return argument + .replace(/\s*V\s*(\d)/, '-$1') + .replace(/(\d)$/, '$1.0'); + }, + // e.g. 'GPL-2.0-' + function(argument) { + return argument.slice(0, argument.length - 1); + }, + // e.g. 'GPL2' + function(argument) { + return argument.replace(/(\d)$/, '-$1.0'); + }, + // e.g. 'BSD 3' + function(argument) { + return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); + }, + // e.g. 'BSD clause 3' + function(argument) { + return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); + }, + // e.g. 'BY-NC-4.0' + function(argument) { + return 'CC-' + argument; + }, + // e.g. 'BY-NC' + function(argument) { + return 'CC-' + argument + '-4.0'; + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, ''); + }, + // e.g. 'Attribution-NonCommercial' + function(argument) { + return 'CC-' + + argument + .replace('Attribution', 'BY') + .replace('NonCommercial', 'NC') + .replace('NoDerivatives', 'ND') + .replace(/ (\d)/, '-$1') + .replace(/ ?International/, '') + + '-4.0'; + } +]; + +// If all else fails, guess that strings containing certain substrings +// meant to identify certain licenses. +var lastResorts = [ + ['UNLI', 'Unlicense'], + ['WTF', 'WTFPL'], + ['2 CLAUSE', 'BSD-2-Clause'], + ['2-CLAUSE', 'BSD-2-Clause'], + ['3 CLAUSE', 'BSD-3-Clause'], + ['3-CLAUSE', 'BSD-3-Clause'], + ['AFFERO', 'AGPL-3.0'], + ['AGPL', 'AGPL-3.0'], + ['APACHE', 'Apache-2.0'], + ['ARTISTIC', 'Artistic-2.0'], + ['Affero', 'AGPL-3.0'], + ['BEER', 'Beerware'], + ['BOOST', 'BSL-1.0'], + ['BSD', 'BSD-2-Clause'], + ['ECLIPSE', 'EPL-1.0'], + ['FUCK', 'WTFPL'], + ['GNU', 'GPL-3.0'], + ['LGPL', 'LGPL-3.0'], + ['GPL', 'GPL-3.0'], + ['MIT', 'MIT'], + ['MPL', 'MPL-2.0'], + ['X11', 'X11'], + ['ZLIB', 'Zlib'] +]; + +var SUBSTRING = 0; +var IDENTIFIER = 1; + +var validTransformation = function(identifier) { + for (var i = 0; i < transforms.length; i++) { + var transformed = transforms[i](identifier); + if (transformed !== identifier && valid(transformed)) { + return transformed; + } + } + return null; +}; + +var validLastResort = function(identifier) { + var upperCased = identifier.toUpperCase(); + for (var i = 0; i < lastResorts.length; i++) { + var lastResort = lastResorts[i]; + if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { + return lastResort[IDENTIFIER]; + } + } + return null; +}; + +var anyCorrection = function(identifier, check) { + for (var i = 0; i < transpositions.length; i++) { + var transposition = transpositions[i]; + var transposed = transposition[TRANSPOSED]; + if (identifier.indexOf(transposed) > -1) { + var corrected = identifier.replace( + transposed, + transposition[CORRECT] + ); + var checked = check(corrected); + if (checked !== null) { + return checked; + } + } + } + return null; +}; + +module.exports = function(identifier) { + identifier = identifier.replace(/\+$/, ''); + if (valid(identifier)) { + return identifier; + } + var transformed = validTransformation(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, function(argument) { + if (valid(argument)) { + return argument; + } + return validTransformation(argument); + }); + if (transformed !== null) { + return transformed; + } + transformed = validLastResort(identifier); + if (transformed !== null) { + return transformed; + } + transformed = anyCorrection(identifier, validLastResort); + if (transformed !== null) { + return transformed; + } + return null; +}; + + +/***/ }), +/* 366 */ +/***/ (function(module, exports) { + +module.exports = ["Glide","Abstyles","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AMPAS","APL-1.0","Adobe-Glyph","APAFML","Adobe-2006","AGPL-1.0","Afmparse","Aladdin","ADSL","AMDPLPA","ANTLR-PD","Apache-1.0","Apache-1.1","Apache-2.0","AML","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","AAL","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","BSL-1.0","Borceux","BSD-2-Clause","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","BSD-3-Clause","BSD-3-Clause-Clear","BSD-4-Clause","BSD-Protection","BSD-Source-Code","BSD-3-Clause-Attribution","0BSD","BSD-4-Clause-UC","bzip2-1.0.5","bzip2-1.0.6","Caldera","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","ClArtistic","MIT-CMU","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","CPOL-1.02","CDDL-1.0","CDDL-1.1","CPAL-1.0","CPL-1.0","CATOSL-1.1","Condor-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-3.0","CC-BY-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-4.0","CC0-1.0","Crossword","CrystalStacker","CUA-OPL-1.0","Cube","curl","D-FSL-1.0","diffmark","WTFPL","DOC","Dotseqn","DSDP","dvipdfm","EPL-1.0","ECL-1.0","ECL-2.0","eGenix","EFL-1.0","EFL-2.0","MIT-advertising","MIT-enna","Entessa","ErlPL-1.1","EUDatagrid","EUPL-1.0","EUPL-1.1","Eurosym","Fair","MIT-feh","Frameworx-1.0","FreeImage","FTL","FSFAP","FSFUL","FSFULLR","Giftware","GL2PS","Glulxe","AGPL-3.0","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-3.0","LGPL-2.1","LGPL-3.0","LGPL-2.0","gnuplot","gSOAP-1.3b","HaskellReport","HPND","IBM-pibs","IPL-1.0","ICU","ImageMagick","iMatix","Imlib2","IJG","Info-ZIP","Intel-ACPI","Intel","Interbase-1.0","IPA","ISC","JasPer-2.0","JSON","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","Latex2e","BSD-3-Clause-LBNL","Leptonica","LGPLLR","Libpng","libtiff","LAL-1.2","LAL-1.3","LiLiQ-P-1.1","LiLiQ-Rplus-1.1","LiLiQ-R-1.1","LPL-1.02","LPL-1.0","MakeIndex","MTLL","MS-PL","MS-RL","MirOS","MITNFA","MIT","Motosoto","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","mpich2","Multics","Mup","NASA-1.3","Naumen","NBPL-1.0","NetCDF","NGPL","NOSL","NPL-1.0","NPL-1.1","Newsletr","NLPL","Nokia","NPOSL-3.0","NLOD-1.0","Noweb","NRL","NTP","Nunit","OCLC-2.0","ODbL-1.0","PDDL-1.0","OCCT-PL","OGTSL","OLDAP-2.2.2","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OML","OPL-1.0","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenSSL","OSET-PL-2.1","PHP-3.0","PHP-3.01","Plexus","PostgreSQL","psfrag","psutils","Python-2.0","QPL-1.0","Qhull","Rdisc","RPSL-1.0","RPL-1.1","RPL-1.5","RHeCos-1.1","RSCPL","RSA-MD","Ruby","SAX-PD","Saxpath","SCEA","SWL","SMPPL","Sendmail","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","OFL-1.0","OFL-1.1","SimPL-2.0","Sleepycat","SNIA","Spencer-86","Spencer-94","Spencer-99","SMLNJ","SugarCRM-1.1.3","SISSL","SISSL-1.2","SPL-1.0","Watcom-1.0","TCL","Unlicense","TMate","TORQUE-1.1","TOSL","Unicode-TOU","UPL-1.0","NCSA","Vim","VOSTROM","VSL-1.0","W3C-19980720","W3C","Wsuipa","Xnet","X11","Xerox","XFree86-1.1","xinetd","xpp","XSkat","YPL-1.0","YPL-1.1","Zed","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","zlib-acknowledgement","ZPL-1.1","ZPL-2.0","ZPL-2.1","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-No-Nuclear-License-2014","eCos-2.0","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-2.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","GPL-3.0-with-GCC-exception","StandardML-NJ","WXwindows"] + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var url = __webpack_require__(88) +var gitHosts = __webpack_require__(89) +var GitHost = module.exports = __webpack_require__(368) + +var protocolToRepresentationMap = { + 'git+ssh': 'sshurl', + 'git+https': 'https', + 'ssh': 'sshurl', + 'git': 'git' +} + +function protocolToRepresentation (protocol) { + if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1) + return protocolToRepresentationMap[protocol] || protocol +} + +var authProtocols = { + 'git:': true, + 'https:': true, + 'git+https:': true, + 'http:': true, + 'git+http:': true +} + +var cache = {} + +module.exports.fromUrl = function (giturl, opts) { + var key = giturl + JSON.stringify(opts || {}) + + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) + } + + return cache[key] +} + +function fromUrl (giturl, opts) { + if (giturl == null || giturl === '') return + var url = fixupUnqualifiedGist( + isGitHubShorthand(giturl) ? 'github:' + giturl : giturl + ) + var parsed = parseGitUrl(url) + var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) + var matches = Object.keys(gitHosts).map(function (gitHostName) { + try { + var gitHostInfo = gitHosts[gitHostName] + var auth = null + if (parsed.auth && authProtocols[parsed.protocol]) { + auth = decodeURIComponent(parsed.auth) + } + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null + var user = null + var project = null + var defaultRepresentation = null + if (shortcutMatch && shortcutMatch[1] === gitHostName) { + user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) + project = decodeURIComponent(shortcutMatch[3]) + defaultRepresentation = 'shortcut' + } else { + if (parsed.host !== gitHostInfo.domain) return + if (!gitHostInfo.protocols_re.test(parsed.protocol)) return + if (!parsed.path) return + var pathmatch = gitHostInfo.pathmatch + var matched = parsed.path.match(pathmatch) + if (!matched) return + if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, '')) + if (matched[2] != null) project = decodeURIComponent(matched[2]) + defaultRepresentation = protocolToRepresentation(parsed.protocol) + } + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) + } catch (ex) { + if (!(ex instanceof URIError)) throw ex + } + }).filter(function (gitHostInfo) { return gitHostInfo }) + if (matches.length !== 1) return + return matches[0] +} + +function isGitHubShorthand (arg) { + // Note: This does not fully test the git ref format. + // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html + // + // The only way to do this properly would be to shell out to + // git-check-ref-format, and as this is a fast sync function, + // we don't want to do that. Just let git fail if it turns + // out that the commit-ish is invalid. + // GH usernames cannot start with . or - + return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) +} + +function fixupUnqualifiedGist (giturl) { + // necessary for round-tripping gists + var parsed = url.parse(giturl) + if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { + return parsed.protocol + '/' + parsed.host + } else { + return giturl + } +} + +function parseGitUrl (giturl) { + if (typeof giturl !== 'string') giturl = '' + giturl + var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) + if (!matched) return url.parse(giturl) + return { + protocol: 'git+ssh:', + slashes: true, + auth: matched[1], + host: matched[2], + port: null, + hostname: matched[2], + hash: matched[4], + search: null, + query: null, + pathname: '/' + matched[3], + path: '/' + matched[3], + href: 'git+ssh://' + matched[1] + '@' + matched[2] + + '/' + matched[3] + (matched[4] || '') + } +} + + +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var gitHosts = __webpack_require__(89) +var extend = Object.assign || __webpack_require__(13)._extend + +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { + var gitHostInfo = this + gitHostInfo.type = type + Object.keys(gitHosts[type]).forEach(function (key) { + gitHostInfo[key] = gitHosts[type][key] + }) + gitHostInfo.user = user + gitHostInfo.auth = auth + gitHostInfo.project = project + gitHostInfo.committish = committish + gitHostInfo.default = defaultRepresentation + gitHostInfo.opts = opts || {} +} +GitHost.prototype = {} + +GitHost.prototype.hash = function () { + return this.committish ? '#' + this.committish : '' +} + +GitHost.prototype._fill = function (template, opts) { + if (!template) return + var vars = extend({}, opts) + opts = extend(extend({}, this.opts), opts) + var self = this + Object.keys(this).forEach(function (key) { + if (self[key] != null && vars[key] == null) vars[key] = self[key] + }) + var rawAuth = vars.auth + var rawComittish = vars.committish + Object.keys(vars).forEach(function (key) { + vars[key] = encodeURIComponent(vars[key]) + }) + vars['auth@'] = rawAuth ? rawAuth + '@' : '' + if (opts.noCommittish) { + vars['#committish'] = '' + vars['/tree/committish'] = '' + vars['/comittish'] = '' + vars.comittish = '' + } else { + vars['#committish'] = rawComittish ? '#' + rawComittish : '' + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish + : '' + vars['/committish'] = vars.committish ? '/' + vars.committish : '' + vars.committish = vars.committish || 'master' + } + var res = template + Object.keys(vars).forEach(function (key) { + res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) + }) + if (opts.noGitPlus) { + return res.replace(/^git[+]/, '') + } else { + return res + } +} + +GitHost.prototype.ssh = function (opts) { + return this._fill(this.sshtemplate, opts) +} + +GitHost.prototype.sshurl = function (opts) { + return this._fill(this.sshurltemplate, opts) +} + +GitHost.prototype.browse = function (opts) { + return this._fill(this.browsetemplate, opts) +} + +GitHost.prototype.docs = function (opts) { + return this._fill(this.docstemplate, opts) +} + +GitHost.prototype.bugs = function (opts) { + return this._fill(this.bugstemplate, opts) +} + +GitHost.prototype.https = function (opts) { + return this._fill(this.httpstemplate, opts) +} + +GitHost.prototype.git = function (opts) { + return this._fill(this.gittemplate, opts) +} + +GitHost.prototype.shortcut = function (opts) { + return this._fill(this.shortcuttemplate, opts) +} + +GitHost.prototype.path = function (opts) { + return this._fill(this.pathtemplate, opts) +} + +GitHost.prototype.tarball = function (opts) { + return this._fill(this.tarballtemplate, opts) +} + +GitHost.prototype.file = function (P, opts) { + return this._fill(this.filetemplate, extend({ + path: P.replace(/^[/]+/g, '') + }, opts)) +} + +GitHost.prototype.getDefaultRepresentation = function () { + return this.default +} + +GitHost.prototype.toString = function (opts) { + return (this[this.default] || this.sshurl).call(this, opts) +} + + +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var builtinModules = __webpack_require__(370); + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return builtinModules.indexOf(str) !== -1; +}; + + +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var blacklist = [ + 'freelist', + 'sys' +]; + +module.exports = Object.keys(process.binding('natives')).filter(function (el) { + return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; +}).sort(); + + +/***/ }), +/* 371 */ +/***/ (function(module, exports) { + +module.exports = extractDescription + +// Extracts description from contents of a readme file in markdown format +function extractDescription (d) { + if (!d) return; + if (d === "ERROR: No README data found!") return; + // the first block of text before the first heading + // that isn't the first line heading + d = d.trim().split('\n') + for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); + var l = d.length + for (var e = s + 1; e < l && d[e].trim(); e ++); + return d.slice(s, e).join(' ').trim() +} + + +/***/ }), +/* 372 */ +/***/ (function(module, exports) { + +module.exports = {"topLevel":{"dependancies":"dependencies","dependecies":"dependencies","depdenencies":"dependencies","devEependencies":"devDependencies","depends":"dependencies","dev-dependencies":"devDependencies","devDependences":"devDependencies","devDepenencies":"devDependencies","devdependencies":"devDependencies","repostitory":"repository","repo":"repository","prefereGlobal":"preferGlobal","hompage":"homepage","hampage":"homepage","autohr":"author","autor":"author","contributers":"contributors","publicationConfig":"publishConfig","script":"scripts"},"bugs":{"web":"url","name":"url"},"script":{"server":"start","tests":"test"}} + +/***/ }), +/* 373 */ +/***/ (function(module, exports, __webpack_require__) { + +var util = __webpack_require__(13) +var messages = __webpack_require__(374) + +module.exports = function() { + var args = Array.prototype.slice.call(arguments, 0) + var warningName = args.shift() + if (warningName == "typo") { + return makeTypoWarning.apply(null,args) + } + else { + var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" + args.unshift(msgTemplate) + return util.format.apply(null, args) + } +} + +function makeTypoWarning (providedName, probableName, field) { + if (field) { + providedName = field + "['" + providedName + "']" + probableName = field + "['" + probableName + "']" + } + return util.format(messages.typo, providedName, probableName) +} + + +/***/ }), +/* 374 */ +/***/ (function(module, exports) { + +module.exports = {"repositories":"'repositories' (plural) Not supported. Please pick one as the 'repository' field","missingRepository":"No repository field.","brokenGitUrl":"Probably broken git url: %s","nonObjectScripts":"scripts must be an object","nonStringScript":"script values must be string commands","nonArrayFiles":"Invalid 'files' member","invalidFilename":"Invalid filename in 'files' list: %s","nonArrayBundleDependencies":"Invalid 'bundleDependencies' list. Must be array of package names","nonStringBundleDependency":"Invalid bundleDependencies member: %s","nonDependencyBundleDependency":"Non-dependency in bundleDependencies: %s","nonObjectDependencies":"%s field must be an object","nonStringDependency":"Invalid dependency: %s %s","deprecatedArrayDependencies":"specifying %s as array is deprecated","deprecatedModules":"modules field is deprecated","nonArrayKeywords":"keywords should be an array of strings","nonStringKeyword":"keywords should be an array of strings","conflictingName":"%s is also the name of a node core module.","nonStringDescription":"'description' field should be a string","missingDescription":"No description","missingReadme":"No README data","missingLicense":"No license field.","nonEmailUrlBugsString":"Bug string field must be url, email, or {email,url}","nonUrlBugsUrlField":"bugs.url field must be a string url. Deleted.","nonEmailBugsEmailField":"bugs.email field must be a string email. Deleted.","emptyNormalizedBugs":"Normalized value of bugs field is an empty object. Deleted.","nonUrlHomepage":"homepage field must be a string url. Deleted.","invalidLicense":"license should be a valid SPDX license expression","typo":"%s should probably be %s."} + +/***/ }), +/* 375 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(3); +const writeJsonFile = __webpack_require__(376); +const sortKeys = __webpack_require__(90); + +const opts = {detectIndent: true}; + +const dependencyKeys = new Set([ + 'dependencies', + 'devDependencies', + 'optionalDependencies', + 'peerDependencies' +]); + +function normalize(pkg) { + const ret = {}; + + for (const key of Object.keys(pkg)) { + if (!dependencyKeys.has(key)) { + ret[key] = pkg[key]; + } else if (Object.keys(pkg[key]).length !== 0) { + ret[key] = sortKeys(pkg[key]); + } + } + + return ret; +} + +module.exports = (fp, data) => { + if (typeof fp !== 'string') { + data = fp; + fp = '.'; + } + + fp = path.basename(fp) === 'package.json' ? fp : path.join(fp, 'package.json'); + + data = normalize(data); + + return writeJsonFile(fp, data, opts); +}; + +module.exports.sync = (fp, data) => { + if (typeof fp !== 'string') { + data = fp; + fp = '.'; + } + + fp = path.basename(fp) === 'package.json' ? fp : path.join(fp, 'package.json'); + + data = normalize(data); + + writeJsonFile.sync(fp, data, opts); +}; + + +/***/ }), +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(3); +const fs = __webpack_require__(23); +const writeFileAtomic = __webpack_require__(377); +const sortKeys = __webpack_require__(90); +const makeDir = __webpack_require__(91); +const pify = __webpack_require__(22); +const detectIndent = __webpack_require__(381); + +const init = (fn, fp, data, opts) => { + if (!fp) { + throw new TypeError('Expected a filepath'); + } + + if (data === undefined) { + throw new TypeError('Expected data to stringify'); + } + + opts = Object.assign({ + indent: '\t', + sortKeys: false + }, opts); + + if (opts.sortKeys) { + data = sortKeys(data, { + deep: true, + compare: typeof opts.sortKeys === 'function' && opts.sortKeys + }); + } + + return fn(fp, data, opts); +}; + +const readFile = fp => pify(fs.readFile)(fp, 'utf8').catch(() => {}); + +const main = (fp, data, opts) => { + return (opts.detectIndent ? readFile(fp) : Promise.resolve()) + .then(str => { + const indent = str ? detectIndent(str).indent : opts.indent; + const json = JSON.stringify(data, opts.replacer, indent); + + return pify(writeFileAtomic)(fp, `${json}\n`, {mode: opts.mode}); + }); +}; + +const mainSync = (fp, data, opts) => { + let indent = opts.indent; + + if (opts.detectIndent) { + try { + const file = fs.readFileSync(fp, 'utf8'); + indent = detectIndent(file).indent; + } catch (err) { + if (err.code !== 'ENOENT') { + throw err; + } + } + } + + const json = JSON.stringify(data, opts.replacer, indent); + + return writeFileAtomic.sync(fp, `${json}\n`, {mode: opts.mode}); +}; + +module.exports = (fp, data, opts) => { + return makeDir(path.dirname(fp), {fs}) + .then(() => init(main, fp, data, opts)); +}; + +module.exports.sync = (fp, data, opts) => { + makeDir.sync(path.dirname(fp), {fs}); + init(mainSync, fp, data, opts); +}; + + +/***/ }), +/* 377 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = writeFile +module.exports.sync = writeFileSync +module.exports._getTmpname = getTmpname // for testing +module.exports._cleanupOnExit = cleanupOnExit + +var fs = __webpack_require__(23) +var MurmurHash3 = __webpack_require__(378) +var onExit = __webpack_require__(59) +var path = __webpack_require__(3) +var activeFiles = {} + +var invocations = 0 +function getTmpname (filename) { + return filename + '.' + + MurmurHash3(__filename) + .hash(String(process.pid)) + .hash(String(++invocations)) + .result() +} + +function cleanupOnExit (tmpfile) { + return function () { + try { + fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile) + } catch (_) {} + } +} + +function writeFile (filename, data, options, callback) { + if (options instanceof Function) { + callback = options + options = null + } + if (!options) options = {} + + var Promise = options.Promise || global.Promise + var truename + var fd + var tmpfile + var removeOnExit = cleanupOnExit(() => tmpfile) + var absoluteName = path.resolve(filename) + + new Promise(function serializeSameFile (resolve) { + // make a queue if it doesn't already exist + if (!activeFiles[absoluteName]) activeFiles[absoluteName] = [] + + activeFiles[absoluteName].push(resolve) // add this job to the queue + if (activeFiles[absoluteName].length === 1) resolve() // kick off the first one + }).then(function getRealPath () { + return new Promise(function (resolve) { + fs.realpath(filename, function (_, realname) { + truename = realname || filename + tmpfile = getTmpname(truename) + resolve() + }) + }) + }).then(function stat () { + return new Promise(function stat (resolve) { + if (options.mode && options.chown) resolve() + else { + // Either mode or chown is not explicitly set + // Default behavior is to copy it from original file + fs.stat(truename, function (err, stats) { + if (err || !stats) resolve() + else { + options = Object.assign({}, options) + + if (!options.mode) { + options.mode = stats.mode + } + if (!options.chown && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid } + } + resolve() + } + }) + } + }) + }).then(function thenWriteFile () { + return new Promise(function (resolve, reject) { + fs.open(tmpfile, 'w', options.mode, function (err, _fd) { + fd = _fd + if (err) reject(err) + else resolve() + }) + }) + }).then(function write () { + return new Promise(function (resolve, reject) { + if (Buffer.isBuffer(data)) { + fs.write(fd, data, 0, data.length, 0, function (err) { + if (err) reject(err) + else resolve() + }) + } else if (data != null) { + fs.write(fd, String(data), 0, String(options.encoding || 'utf8'), function (err) { + if (err) reject(err) + else resolve() + }) + } else resolve() + }) + }).then(function syncAndClose () { + if (options.fsync !== false) { + return new Promise(function (resolve, reject) { + fs.fsync(fd, function (err) { + if (err) reject(err) + else fs.close(fd, resolve) + }) + }) + } + }).then(function chown () { + if (options.chown) { + return new Promise(function (resolve, reject) { + fs.chown(tmpfile, options.chown.uid, options.chown.gid, function (err) { + if (err) reject(err) + else resolve() + }) + }) + } + }).then(function chmod () { + if (options.mode) { + return new Promise(function (resolve, reject) { + fs.chmod(tmpfile, options.mode, function (err) { + if (err) reject(err) + else resolve() + }) + }) + } + }).then(function rename () { + return new Promise(function (resolve, reject) { + fs.rename(tmpfile, truename, function (err) { + if (err) reject(err) + else resolve() + }) + }) + }).then(function success () { + removeOnExit() + callback() + }).catch(function fail (err) { + removeOnExit() + fs.unlink(tmpfile, function () { + callback(err) + }) + }).then(function checkQueue () { + activeFiles[absoluteName].shift() // remove the element added by serializeSameFile + if (activeFiles[absoluteName].length > 0) { + activeFiles[absoluteName][0]() // start next job if one is pending + } else delete activeFiles[absoluteName] + }) +} + +function writeFileSync (filename, data, options) { + if (!options) options = {} + try { + filename = fs.realpathSync(filename) + } catch (ex) { + // it's ok, it'll happen on a not yet existing file + } + var tmpfile = getTmpname(filename) + + try { + if (!options.mode || !options.chown) { + // Either mode or chown is not explicitly set + // Default behavior is to copy it from original file + try { + var stats = fs.statSync(filename) + options = Object.assign({}, options) + if (!options.mode) { + options.mode = stats.mode + } + if (!options.chown && process.getuid) { + options.chown = { uid: stats.uid, gid: stats.gid } + } + } catch (ex) { + // ignore stat errors + } + } + + var removeOnExit = onExit(cleanupOnExit(tmpfile)) + var fd = fs.openSync(tmpfile, 'w', options.mode) + if (Buffer.isBuffer(data)) { + fs.writeSync(fd, data, 0, data.length, 0) + } else if (data != null) { + fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8')) + } + if (options.fsync !== false) { + fs.fsyncSync(fd) + } + fs.closeSync(fd) + if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid) + if (options.mode) fs.chmodSync(tmpfile, options.mode) + fs.renameSync(tmpfile, filename) + removeOnExit() + } catch (err) { + removeOnExit() + try { fs.unlinkSync(tmpfile) } catch (e) {} + throw err + } +} + + +/***/ }), +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @preserve + * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) + * + * @author Jens Taylor + * @see http://github.com/homebrewing/brauhaus-diff + * @author Gary Court + * @see http://github.com/garycourt/murmurhash-js + * @author Austin Appleby + * @see http://sites.google.com/site/murmurhash/ + */ +(function(){ + var cache; + + // Call this function without `new` to use the cached object (good for + // single-threaded environments), or with `new` to create a new object. + // + // @param {string} key A UTF-16 or ASCII string + // @param {number} seed An optional positive integer + // @return {object} A MurmurHash3 object for incremental hashing + function MurmurHash3(key, seed) { + var m = this instanceof MurmurHash3 ? this : cache; + m.reset(seed) + if (typeof key === 'string' && key.length > 0) { + m.hash(key); + } + + if (m !== this) { + return m; + } + }; + + // Incrementally add a string to this hash + // + // @param {string} key A UTF-16 or ASCII string + // @return {object} this + MurmurHash3.prototype.hash = function(key) { + var h1, k1, i, top, len; + + len = key.length; + this.len += len; + + k1 = this.k1; + i = 0; + switch (this.rem) { + case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; + case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; + case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; + case 3: + k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; + k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; + } + + this.rem = (len + this.rem) & 3; // & 3 is same as % 4 + len -= this.rem; + if (len > 0) { + h1 = this.h1; + while (1) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + + h1 ^= k1; + h1 = (h1 << 13) | (h1 >>> 19); + h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; + + if (i >= len) { + break; + } + + k1 = ((key.charCodeAt(i++) & 0xffff)) ^ + ((key.charCodeAt(i++) & 0xffff) << 8) ^ + ((key.charCodeAt(i++) & 0xffff) << 16); + top = key.charCodeAt(i++); + k1 ^= ((top & 0xff) << 24) ^ + ((top & 0xff00) >> 8); + } + + k1 = 0; + switch (this.rem) { + case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; + case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; + case 1: k1 ^= (key.charCodeAt(i) & 0xffff); + } + + this.h1 = h1; + } + + this.k1 = k1; + return this; + }; + + // Get the result of this hash + // + // @return {number} The 32-bit hash + MurmurHash3.prototype.result = function() { + var k1, h1; + + k1 = this.k1; + h1 = this.h1; + + if (k1 > 0) { + k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; + k1 = (k1 << 15) | (k1 >>> 17); + k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; + h1 ^= k1; + } + + h1 ^= this.len; + + h1 ^= h1 >>> 16; + h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; + h1 ^= h1 >>> 13; + h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; + h1 ^= h1 >>> 16; + + return h1 >>> 0; + }; + + // Reset the hash object for reuse + // + // @param {number} seed An optional positive integer + MurmurHash3.prototype.reset = function(seed) { + this.h1 = typeof seed === 'number' ? seed : 0; + this.rem = this.k1 = this.len = 0; + return this; + }; + + // A cached object to use. This can be safely used if you're in a single- + // threaded environment, otherwise you need to create new hashes to use. + cache = new MurmurHash3(); + + if (true) { + module.exports = MurmurHash3; + } else { + this.MurmurHash3 = MurmurHash3; + } +}()); + + +/***/ }), +/* 379 */ +/***/ (function(module, exports) { + +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +// +// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised +// artificially, inherently leave the process in a +// state from which it is not safe to try and enter JS +// listeners. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGHUP', + 'SIGINT', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} + + +/***/ }), +/* 380 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toString = Object.prototype.toString; + +module.exports = function (x) { + var prototype; + return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); +}; + + +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// detect either spaces or tabs but not both to properly handle tabs +// for indentation and spaces for alignment +const INDENT_RE = /^(?:( )+|\t+)/; + +function getMostUsed(indents) { + let result = 0; + let maxUsed = 0; + let maxWeight = 0; + + for (const entry of indents) { + // TODO: use destructuring when targeting Node.js 6 + const key = entry[0]; + const val = entry[1]; + + const u = val[0]; + const w = val[1]; + + if (u > maxUsed || (u === maxUsed && w > maxWeight)) { + maxUsed = u; + maxWeight = w; + result = Number(key); + } + } + + return result; +} + +module.exports = str => { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + // used to see if tabs or spaces are the most used + let tabs = 0; + let spaces = 0; + + // remember the size of previous line's indentation + let prev = 0; + + // remember how many indents/unindents as occurred for a given size + // and how much lines follow a given indentation + // + // indents = { + // 3: [1, 0], + // 4: [1, 5], + // 5: [1, 0], + // 12: [1, 0], + // } + const indents = new Map(); + + // pointer to the array of last used indent + let current; + + // whether the last action was an indent (opposed to an unindent) + let isIndent; + + for (const line of str.split(/\n/g)) { + if (!line) { + // ignore empty lines + continue; + } + + let indent; + const matches = line.match(INDENT_RE); + + if (matches) { + indent = matches[0].length; + + if (matches[1]) { + spaces++; + } else { + tabs++; + } + } else { + indent = 0; + } + + const diff = indent - prev; + prev = indent; + + if (diff) { + // an indent or unindent has been detected + + isIndent = diff > 0; + + current = indents.get(isIndent ? diff : -diff); + + if (current) { + current[0]++; + } else { + current = [1, 0]; + indents.set(diff, current); + } + } else if (current) { + // if the last action was an indent, increment the weight + current[1] += Number(isIndent); + } + } + + const amount = getMostUsed(indents); + + let type; + let indent; + if (!amount) { + type = null; + indent = ''; + } else if (spaces >= tabs) { + type = 'space'; + indent = ' '.repeat(amount); + } else { + type = 'tab'; + indent = '\t'.repeat(amount); + } + + return { + amount, + type, + indent + }; +}; + + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.runScriptInPackage = exports.installInDir = undefined; + +/** + * Install all dependencies in the given directory + */ +let installInDir = exports.installInDir = (() => { + var _ref = _asyncToGenerator(function* (directory, extraArgs = []) { + const options = ['install', '--non-interactive', '--mutex file', ...extraArgs]; + // We pass the mutex flag to ensure only one instance of yarn runs at any + // given time (e.g. to avoid conflicts). + yield (0, _child_process.spawn)('yarn', options, { + cwd: directory + }); + }); + + return function installInDir(_x) { + return _ref.apply(this, arguments); + }; +})(); +/** + * Run script in the given directory + */ + + +let runScriptInPackage = exports.runScriptInPackage = (() => { + var _ref2 = _asyncToGenerator(function* (script, args, pkg) { + const execOpts = { + cwd: pkg.path + }; + yield (0, _child_process.spawn)('yarn', ['run', script, ...args], execOpts); + }); + + return function runScriptInPackage(_x2, _x3, _x4) { + return _ref2.apply(this, arguments); + }; +})(); +/** + * Run script in the given directory + */ + + +exports.runScriptInPackageStreaming = runScriptInPackageStreaming; + +var _child_process = __webpack_require__(383); + +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +function runScriptInPackageStreaming(script, args, pkg) { + const execOpts = { + cwd: pkg.path + }; + return (0, _child_process.spawnStreaming)('yarn', ['run', script, ...args], execOpts, { + prefix: pkg.name + }); +} + +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +exports.spawn = spawn; +exports.spawnStreaming = spawnStreaming; + +var _chalk = __webpack_require__(14); + +var _chalk2 = _interopRequireDefault(_chalk); + +var _execa = __webpack_require__(384); + +var _execa2 = _interopRequireDefault(_execa); + +var _logSymbols = __webpack_require__(95); + +var _logSymbols2 = _interopRequireDefault(_logSymbols); + +var _strongLogTransformer = __webpack_require__(410); + +var _strongLogTransformer2 = _interopRequireDefault(_strongLogTransformer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function generateColors() { + const colorWheel = [_chalk2.default.cyan, _chalk2.default.magenta, _chalk2.default.blue, _chalk2.default.yellow, _chalk2.default.green, _chalk2.default.red]; + const count = colorWheel.length; + let children = 0; + return () => colorWheel[children++ % count]; +} +function spawn(command, args, opts) { + return (0, _execa2.default)(command, args, _extends({}, opts, { + stdio: 'inherit' + })); +} +const nextColor = generateColors(); +function spawnStreaming(command, args, opts, { prefix }) { + const spawned = (0, _execa2.default)(command, args, _extends({}, opts, { + stdio: ['ignore', 'pipe', 'pipe'] + })); + const color = nextColor(); + const prefixedStdout = (0, _strongLogTransformer2.default)({ tag: `${color.bold(prefix)}:` }); + const prefixedStderr = (0, _strongLogTransformer2.default)({ + mergeMultiline: true, + tag: `${_logSymbols2.default.error} ${color.bold(prefix)}:` + }); + spawned.stdout.pipe(prefixedStdout).pipe(process.stdout); + spawned.stderr.pipe(prefixedStderr).pipe(process.stderr); + return spawned; +} + +/***/ }), +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(3); +const childProcess = __webpack_require__(60); +const util = __webpack_require__(13); +const crossSpawn = __webpack_require__(385); +const stripEof = __webpack_require__(401); +const npmRunPath = __webpack_require__(402); +const isStream = __webpack_require__(404); +const _getStream = __webpack_require__(405); +const pFinally = __webpack_require__(407); +const onExit = __webpack_require__(59); +const errname = __webpack_require__(408); +const stdio = __webpack_require__(409); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: cmd + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, opts) { + const input = opts.input; + + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, encoding, maxBuffer) { + if (!process[stream]) { + return null; + } + + let ret; + + if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const stdout = result.stdout; + const stderr = result.stderr; + + let err = result.error; + const code = result.code; + const signal = result.signal; + + const parsed = options.parsed; + const joinedCmd = options.joinedCmd; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const encoding = parsed.opts.encoding; + const maxBuffer = parsed.opts.maxBuffer; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanupTimeout = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanupTimeout(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanupTimeout(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanupTimeout(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', encoding, maxBuffer), + getStream(spawned, 'stderr', encoding, maxBuffer) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (removeExitHandler) { + removeExitHandler(); + } + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +module.exports.stdout = function () { + // TODO: set `stderr: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(x => x.stdout); +}; + +module.exports.stderr = function () { + // TODO: set `stdout: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(x => x.stderr); +}; + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; + + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); + +module.exports.spawn = util.deprecate(module.exports, 'execa.spawn() is deprecated. Use execa() instead.'); + + +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var cp = __webpack_require__(60); +var parse = __webpack_require__(386); +var enoent = __webpack_require__(399); + +var cpSpawnSync = cp.spawnSync; + +function spawn(command, args, options) { + var parsed; + var spawned; + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + var parsed; + var result; + + if (!cpSpawnSync) { + try { + cpSpawnSync = __webpack_require__(400); // eslint-disable-line global-require + } catch (ex) { + throw new Error( + 'In order to use spawnSync on node 0.10 or older, you must ' + + 'install spawn-sync:\n\n' + + ' npm install spawn-sync --save' + ); + } + } + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + result = cpSpawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; + + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var resolveCommand = __webpack_require__(92); +var hasEmptyArgumentBug = __webpack_require__(394); +var escapeArgument = __webpack_require__(94); +var escapeCommand = __webpack_require__(395); +var readShebang = __webpack_require__(396); + +var isWin = process.platform === 'win32'; +var skipShellRegExp = /\.(?:com|exe)$/i; + +// Supported in Node >= 6 and >= 4.8 +var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 || + parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8; + +function parseNonShell(parsed) { + var shebang; + var needsShell; + var applyQuotes; + + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + parsed.file = resolveCommand(parsed.command); + parsed.file = parsed.file || resolveCommand(parsed.command, true); + shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true)); + } else { + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file); + } + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + if (needsShell) { + // Escape command & arguments + applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command + parsed.command = escapeCommand(parsed.command); + parsed.args = parsed.args.map(function (arg) { + return escapeArgument(arg, applyQuotes); + }); + + // Make use of cmd.exe + parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"']; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + var shellCommand; + + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"']; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +// ------------------------------------------------ + +function parse(command, args, options) { + var parsed; + + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = options || {}; + + // Build our parsed object + parsed = { + command: command, + args: args, + options: options, + file: undefined, + original: command, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; + + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = __webpack_require__(3) +var COLON = isWindows ? ';' : ':' +var isexe = __webpack_require__(388) + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + if (opt.nothrow) + return null + + throw getNotFoundError(cmd) +} + + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +var fs = __webpack_require__(7) +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = __webpack_require__(389) +} else { + core = __webpack_require__(390) +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} + + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = isexe +isexe.sync = sync + +var fs = __webpack_require__(7) + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} + + +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = isexe +isexe.sync = sync + +var fs = __webpack_require__(7) + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} + + +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { + +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = __webpack_require__(392) +} + + +/***/ }), +/* 392 */ +/***/ (function(module, exports) { + +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) } -Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); -if (true) { -exports.parser = spdxparse; -exports.Parser = spdxparse.Parser; -exports.parse = function () { return spdxparse.parse.apply(spdxparse, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); +/***/ }), +/* 393 */ +/***/ (function(module, exports) { + +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) } - var source = __webpack_require__(7).readFileSync(__webpack_require__(3).normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && __webpack_require__.c[__webpack_require__.s] === module) { - exports.main(process.argv.slice(1)); + } + + return self } + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52)(module))) +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } -/***/ }), -/* 400 */ -/***/ (function(module, exports, __webpack_require__) { + if (node.list) { + node.list.removeNode(node) + } -var licenseIDs = __webpack_require__(401); + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } -function valid(string) { - return licenseIDs.indexOf(string) > -1; + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ } -// Common transpositions of license identifier acronyms -var transpositions = [ - ['APGL', 'AGPL'], - ['Gpl', 'GPL'], - ['GLP', 'GPL'], - ['APL', 'Apache'], - ['ISD', 'ISC'], - ['GLP', 'GPL'], - ['IST', 'ISC'], - ['Claude', 'Clause'], - [' or later', '+'], - [' International', ''], - ['GNU', 'GPL'], - ['GUN', 'GPL'], - ['+', ''], - ['GNU GPL', 'GPL'], - ['GNU/GPL', 'GPL'], - ['GNU GLP', 'GPL'], - ['GNU General Public License', 'GPL'], - ['Gnu public license', 'GPL'], - ['GNU Public License', 'GPL'], - ['GNU GENERAL PUBLIC LICENSE', 'GPL'], - ['MTI', 'MIT'], - ['Mozilla Public License', 'MPL'], - ['WTH', 'WTF'], - ['-License', ''] -]; +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } -var TRANSPOSED = 0; -var CORRECT = 1; + if (node.list) { + node.list.removeNode(node) + } -// Simple corrections to nearly valid identifiers. -var transforms = [ - // e.g. 'mit' - function(argument) { - return argument.toUpperCase(); - }, - // e.g. 'MIT ' - function(argument) { - return argument.trim(); - }, - // e.g. 'M.I.T.' - function(argument) { - return argument.replace(/\./g, ''); - }, - // e.g. 'Apache- 2.0' - function(argument) { - return argument.replace(/\s+/g, ''); - }, - // e.g. 'CC BY 4.0'' - function(argument) { - return argument.replace(/\s+/g, '-'); - }, - // e.g. 'LGPLv2.1' - function(argument) { - return argument.replace('v', '-'); - }, - // e.g. 'Apache 2.0' - function(argument) { - return argument.replace(/,?\s*(\d)/, '-$1'); - }, - // e.g. 'GPL 2' - function(argument) { - return argument.replace(/,?\s*(\d)/, '-$1.0'); - }, - // e.g. 'Apache Version 2.0' - function(argument) { - return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2'); - }, - // e.g. 'Apache Version 2' - function(argument) { - return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0'); - }, - // e.g. 'ZLIB' - function(argument) { - return argument[0].toUpperCase() + argument.slice(1); - }, - // e.g. 'MPL/2.0' - function(argument) { - return argument.replace('/', '-'); - }, - // e.g. 'Apache 2' - function(argument) { - return argument - .replace(/\s*V\s*(\d)/, '-$1') - .replace(/(\d)$/, '$1.0'); - }, - // e.g. 'GPL-2.0-' - function(argument) { - return argument.slice(0, argument.length - 1); - }, - // e.g. 'GPL2' - function(argument) { - return argument.replace(/(\d)$/, '-$1.0'); - }, - // e.g. 'BSD 3' - function(argument) { - return argument.replace(/(-| )?(\d)$/, '-$2-Clause'); - }, - // e.g. 'BSD clause 3' - function(argument) { - return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause'); - }, - // e.g. 'BY-NC-4.0' - function(argument) { - return 'CC-' + argument; - }, - // e.g. 'BY-NC' - function(argument) { - return 'CC-' + argument + '-4.0'; - }, - // e.g. 'Attribution-NonCommercial' - function(argument) { - return argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, ''); - }, - // e.g. 'Attribution-NonCommercial' - function(argument) { - return 'CC-' + - argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') + - '-4.0'; + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node } -]; -// If all else fails, guess that strings containing certain substrings -// meant to identify certain licenses. -var lastResorts = [ - ['UNLI', 'Unlicense'], - ['WTF', 'WTFPL'], - ['2 CLAUSE', 'BSD-2-Clause'], - ['2-CLAUSE', 'BSD-2-Clause'], - ['3 CLAUSE', 'BSD-3-Clause'], - ['3-CLAUSE', 'BSD-3-Clause'], - ['AFFERO', 'AGPL-3.0'], - ['AGPL', 'AGPL-3.0'], - ['APACHE', 'Apache-2.0'], - ['ARTISTIC', 'Artistic-2.0'], - ['Affero', 'AGPL-3.0'], - ['BEER', 'Beerware'], - ['BOOST', 'BSL-1.0'], - ['BSD', 'BSD-2-Clause'], - ['ECLIPSE', 'EPL-1.0'], - ['FUCK', 'WTFPL'], - ['GNU', 'GPL-3.0'], - ['LGPL', 'LGPL-3.0'], - ['GPL', 'GPL-3.0'], - ['MIT', 'MIT'], - ['MPL', 'MPL-2.0'], - ['X11', 'X11'], - ['ZLIB', 'Zlib'] -]; + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} -var SUBSTRING = 0; -var IDENTIFIER = 1; +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} -var validTransformation = function(identifier) { - for (var i = 0; i < transforms.length; i++) { - var transformed = transforms[i](identifier); - if (transformed !== identifier && valid(transformed)) { - return transformed; - } +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) } - return null; -}; + return this.length +} -var validLastResort = function(identifier) { - var upperCased = identifier.toUpperCase(); - for (var i = 0; i < lastResorts.length; i++) { - var lastResort = lastResorts[i]; - if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { - return lastResort[IDENTIFIER]; - } +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev } - return null; -}; + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} -var anyCorrection = function(identifier, check) { - for (var i = 0; i < transpositions.length; i++) { - var transposition = transpositions[i]; - var transposed = transposition[TRANSPOSED]; - if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace( - transposed, - transposition[CORRECT] - ); - var checked = check(corrected); - if (checked !== null) { - return checked; - } - } +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p } - return null; -}; + this.head = tail + this.tail = head + return this +} -module.exports = function(identifier) { - identifier = identifier.replace(/\+$/, ''); - if (valid(identifier)) { - return identifier; +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail } - var transformed = validTransformation(identifier); - if (transformed !== null) { - return transformed; + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head } - transformed = anyCorrection(identifier, function(argument) { - if (valid(argument)) { - return argument; - } - return validTransformation(argument); - }); - if (transformed !== null) { - return transformed; + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) } - transformed = validLastResort(identifier); - if (transformed !== null) { - return transformed; + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null } - transformed = anyCorrection(identifier, validLastResort); - if (transformed !== null) { - return transformed; + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null } - return null; -}; +} /***/ }), -/* 401 */ -/***/ (function(module, exports) { +/* 394 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455 +function hasEmptyArgumentBug() { + var nodeVer; + + if (process.platform !== 'win32') { + return false; + } + + nodeVer = process.version.substr(1).split('.').map(function (num) { + return parseInt(num, 10); + }); + + return (nodeVer[0] === 0 && nodeVer[1] < 12); +} + +module.exports = hasEmptyArgumentBug(); -module.exports = ["Glide","Abstyles","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AMPAS","APL-1.0","Adobe-Glyph","APAFML","Adobe-2006","AGPL-1.0","Afmparse","Aladdin","ADSL","AMDPLPA","ANTLR-PD","Apache-1.0","Apache-1.1","Apache-2.0","AML","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","AAL","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","BSL-1.0","Borceux","BSD-2-Clause","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","BSD-3-Clause","BSD-3-Clause-Clear","BSD-4-Clause","BSD-Protection","BSD-Source-Code","BSD-3-Clause-Attribution","0BSD","BSD-4-Clause-UC","bzip2-1.0.5","bzip2-1.0.6","Caldera","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","ClArtistic","MIT-CMU","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","CPOL-1.02","CDDL-1.0","CDDL-1.1","CPAL-1.0","CPL-1.0","CATOSL-1.1","Condor-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-3.0","CC-BY-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-4.0","CC0-1.0","Crossword","CrystalStacker","CUA-OPL-1.0","Cube","curl","D-FSL-1.0","diffmark","WTFPL","DOC","Dotseqn","DSDP","dvipdfm","EPL-1.0","ECL-1.0","ECL-2.0","eGenix","EFL-1.0","EFL-2.0","MIT-advertising","MIT-enna","Entessa","ErlPL-1.1","EUDatagrid","EUPL-1.0","EUPL-1.1","Eurosym","Fair","MIT-feh","Frameworx-1.0","FreeImage","FTL","FSFAP","FSFUL","FSFULLR","Giftware","GL2PS","Glulxe","AGPL-3.0","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-3.0","LGPL-2.1","LGPL-3.0","LGPL-2.0","gnuplot","gSOAP-1.3b","HaskellReport","HPND","IBM-pibs","IPL-1.0","ICU","ImageMagick","iMatix","Imlib2","IJG","Info-ZIP","Intel-ACPI","Intel","Interbase-1.0","IPA","ISC","JasPer-2.0","JSON","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","Latex2e","BSD-3-Clause-LBNL","Leptonica","LGPLLR","Libpng","libtiff","LAL-1.2","LAL-1.3","LiLiQ-P-1.1","LiLiQ-Rplus-1.1","LiLiQ-R-1.1","LPL-1.02","LPL-1.0","MakeIndex","MTLL","MS-PL","MS-RL","MirOS","MITNFA","MIT","Motosoto","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","mpich2","Multics","Mup","NASA-1.3","Naumen","NBPL-1.0","NetCDF","NGPL","NOSL","NPL-1.0","NPL-1.1","Newsletr","NLPL","Nokia","NPOSL-3.0","NLOD-1.0","Noweb","NRL","NTP","Nunit","OCLC-2.0","ODbL-1.0","PDDL-1.0","OCCT-PL","OGTSL","OLDAP-2.2.2","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OML","OPL-1.0","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenSSL","OSET-PL-2.1","PHP-3.0","PHP-3.01","Plexus","PostgreSQL","psfrag","psutils","Python-2.0","QPL-1.0","Qhull","Rdisc","RPSL-1.0","RPL-1.1","RPL-1.5","RHeCos-1.1","RSCPL","RSA-MD","Ruby","SAX-PD","Saxpath","SCEA","SWL","SMPPL","Sendmail","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","OFL-1.0","OFL-1.1","SimPL-2.0","Sleepycat","SNIA","Spencer-86","Spencer-94","Spencer-99","SMLNJ","SugarCRM-1.1.3","SISSL","SISSL-1.2","SPL-1.0","Watcom-1.0","TCL","Unlicense","TMate","TORQUE-1.1","TOSL","Unicode-TOU","UPL-1.0","NCSA","Vim","VOSTROM","VSL-1.0","W3C-19980720","W3C","Wsuipa","Xnet","X11","Xerox","XFree86-1.1","xinetd","xpp","XSkat","YPL-1.0","YPL-1.1","Zed","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","zlib-acknowledgement","ZPL-1.1","ZPL-2.0","ZPL-2.1","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-No-Nuclear-License-2014","eCos-2.0","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-2.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","GPL-3.0-with-GCC-exception","StandardML-NJ","WXwindows"] /***/ }), -/* 402 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var url = __webpack_require__(210) -var gitHosts = __webpack_require__(211) -var GitHost = module.exports = __webpack_require__(403) -var protocolToRepresentationMap = { - 'git+ssh': 'sshurl', - 'git+https': 'https', - 'ssh': 'sshurl', - 'git': 'git' -} +var escapeArgument = __webpack_require__(94); -function protocolToRepresentation (protocol) { - if (protocol.substr(-1) === ':') protocol = protocol.slice(0, -1) - return protocolToRepresentationMap[protocol] || protocol +function escapeCommand(command) { + // Do not escape if this command is not dangerous.. + // We do this so that commands like "echo" or "ifconfig" work + // Quoting them, will make them unaccessible + return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true); } -var authProtocols = { - 'git:': true, - 'https:': true, - 'git+https:': true, - 'http:': true, - 'git+http:': true -} +module.exports = escapeCommand; -var cache = {} -module.exports.fromUrl = function (giturl, opts) { - var key = giturl + JSON.stringify(opts || {}) +/***/ }), +/* 396 */ +/***/ (function(module, exports, __webpack_require__) { - if (!(key in cache)) { - cache[key] = fromUrl(giturl, opts) - } +"use strict"; - return cache[key] -} -function fromUrl (giturl, opts) { - if (giturl == null || giturl === '') return - var url = fixupUnqualifiedGist( - isGitHubShorthand(giturl) ? 'github:' + giturl : giturl - ) - var parsed = parseGitUrl(url) - var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) - var matches = Object.keys(gitHosts).map(function (gitHostName) { - try { - var gitHostInfo = gitHosts[gitHostName] - var auth = null - if (parsed.auth && authProtocols[parsed.protocol]) { - auth = decodeURIComponent(parsed.auth) - } - var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null - var user = null - var project = null - var defaultRepresentation = null - if (shortcutMatch && shortcutMatch[1] === gitHostName) { - user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) - project = decodeURIComponent(shortcutMatch[3]) - defaultRepresentation = 'shortcut' - } else { - if (parsed.host !== gitHostInfo.domain) return - if (!gitHostInfo.protocols_re.test(parsed.protocol)) return - if (!parsed.path) return - var pathmatch = gitHostInfo.pathmatch - var matched = parsed.path.match(pathmatch) - if (!matched) return - if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, '')) - if (matched[2] != null) project = decodeURIComponent(matched[2]) - defaultRepresentation = protocolToRepresentation(parsed.protocol) - } - return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) - } catch (ex) { - if (!(ex instanceof URIError)) throw ex +var fs = __webpack_require__(7); +var LRU = __webpack_require__(93); +var shebangCommand = __webpack_require__(397); + +var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function readShebang(command) { + var buffer; + var fd; + var shebang; + + // Check if it is in the cache first + if (shebangCache.has(command)) { + return shebangCache.get(command); } - }).filter(function (gitHostInfo) { return gitHostInfo }) - if (matches.length !== 1) return - return matches[0] -} -function isGitHubShorthand (arg) { - // Note: This does not fully test the git ref format. - // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html - // - // The only way to do this properly would be to shell out to - // git-check-ref-format, and as this is a fast sync function, - // we don't want to do that. Just let git fail if it turns - // out that the commit-ish is invalid. - // GH usernames cannot start with . or - - return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) -} + // Read the first 150 bytes from the file + buffer = new Buffer(150); -function fixupUnqualifiedGist (giturl) { - // necessary for round-tripping gists - var parsed = url.parse(giturl) - if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { - return parsed.protocol + '/' + parsed.host - } else { - return giturl - } -} + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, 150, 0); + fs.closeSync(fd); + } catch (e) { /* empty */ } -function parseGitUrl (giturl) { - if (typeof giturl !== 'string') giturl = '' + giturl - var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) - if (!matched) return url.parse(giturl) - return { - protocol: 'git+ssh:', - slashes: true, - auth: matched[1], - host: matched[2], - port: null, - hostname: matched[2], - hash: matched[4], - search: null, - query: null, - pathname: '/' + matched[3], - path: '/' + matched[3], - href: 'git+ssh://' + matched[1] + '@' + matched[2] + - '/' + matched[3] + (matched[4] || '') - } + // Attempt to extract shebang (null is returned if not a shebang) + shebang = shebangCommand(buffer.toString()); + + // Store the shebang in the cache + shebangCache.set(command, shebang); + + return shebang; } +module.exports = readShebang; + /***/ }), -/* 403 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var gitHosts = __webpack_require__(211) -var extend = Object.assign || __webpack_require__(13)._extend +var shebangRegex = __webpack_require__(398); -var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { - var gitHostInfo = this - gitHostInfo.type = type - Object.keys(gitHosts[type]).forEach(function (key) { - gitHostInfo[key] = gitHosts[type][key] - }) - gitHostInfo.user = user - gitHostInfo.auth = auth - gitHostInfo.project = project - gitHostInfo.committish = committish - gitHostInfo.default = defaultRepresentation - gitHostInfo.opts = opts || {} -} -GitHost.prototype = {} +module.exports = function (str) { + var match = str.match(shebangRegex); -GitHost.prototype.hash = function () { - return this.committish ? '#' + this.committish : '' -} + if (!match) { + return null; + } -GitHost.prototype._fill = function (template, opts) { - if (!template) return - var vars = extend({}, opts) - opts = extend(extend({}, this.opts), opts) - var self = this - Object.keys(this).forEach(function (key) { - if (self[key] != null && vars[key] == null) vars[key] = self[key] - }) - var rawAuth = vars.auth - var rawComittish = vars.committish - Object.keys(vars).forEach(function (key) { - vars[key] = encodeURIComponent(vars[key]) - }) - vars['auth@'] = rawAuth ? rawAuth + '@' : '' - if (opts.noCommittish) { - vars['#committish'] = '' - vars['/tree/committish'] = '' - vars['/comittish'] = '' - vars.comittish = '' - } else { - vars['#committish'] = rawComittish ? '#' + rawComittish : '' - vars['/tree/committish'] = vars.committish - ? '/' + vars.treepath + '/' + vars.committish - : '' - vars['/committish'] = vars.committish ? '/' + vars.committish : '' - vars.committish = vars.committish || 'master' - } - var res = template - Object.keys(vars).forEach(function (key) { - res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) - }) - if (opts.noGitPlus) { - return res.replace(/^git[+]/, '') - } else { - return res - } -} + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; -GitHost.prototype.ssh = function (opts) { - return this._fill(this.sshtemplate, opts) -} + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; -GitHost.prototype.sshurl = function (opts) { - return this._fill(this.sshurltemplate, opts) -} -GitHost.prototype.browse = function (opts) { - return this._fill(this.browsetemplate, opts) -} +/***/ }), +/* 398 */ +/***/ (function(module, exports, __webpack_require__) { -GitHost.prototype.docs = function (opts) { - return this._fill(this.docstemplate, opts) -} +"use strict"; -GitHost.prototype.bugs = function (opts) { - return this._fill(this.bugstemplate, opts) -} +module.exports = /^#!.*/; -GitHost.prototype.https = function (opts) { - return this._fill(this.httpstemplate, opts) -} -GitHost.prototype.git = function (opts) { - return this._fill(this.gittemplate, opts) -} +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { -GitHost.prototype.shortcut = function (opts) { - return this._fill(this.shortcuttemplate, opts) -} +"use strict"; -GitHost.prototype.path = function (opts) { - return this._fill(this.pathtemplate, opts) -} -GitHost.prototype.tarball = function (opts) { - return this._fill(this.tarballtemplate, opts) +var isWin = process.platform === 'win32'; +var resolveCommand = __webpack_require__(92); + +var isNode10 = process.version.indexOf('v0.10.') === 0; + +function notFoundError(command, syscall) { + var err; + + err = new Error(syscall + ' ' + command + ' ENOENT'); + err.code = err.errno = 'ENOENT'; + err.syscall = syscall + ' ' + command; + + return err; } -GitHost.prototype.file = function (P, opts) { - return this._fill(this.filetemplate, extend({ - path: P.replace(/^[/]+/g, '') - }, opts)) +function hookChildProcess(cp, parsed) { + var originalEmit; + + if (!isWin) { + return; + } + + originalEmit = cp.emit; + cp.emit = function (name, arg1) { + var err; + + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); + }; } -GitHost.prototype.getDefaultRepresentation = function () { - return this.default +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; } -GitHost.prototype.toString = function (opts) { - return (this[this.default] || this.sshurl).call(this, opts) +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + // If we are in node 10, then we are using spawn-sync; if it exited + // with -1 it probably means that the command does not exist + if (isNode10 && status === -1) { + parsed.file = isWin ? parsed.file : resolveCommand(parsed.original); + + if (!parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + } + + return null; } +module.exports.hookChildProcess = hookChildProcess; +module.exports.verifyENOENT = verifyENOENT; +module.exports.verifyENOENTSync = verifyENOENTSync; +module.exports.notFoundError = notFoundError; + + +/***/ }), +/* 400 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(60).spawnSync; + + +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function (x) { + var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); + var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); + + if (x[x.length - 1] === lf) { + x = x.slice(0, x.length - 1); + } + + if (x[x.length - 1] === cr) { + x = x.slice(0, x.length - 1); + } + + return x; +}; + + +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(3); +const pathKey = __webpack_require__(403); + +module.exports = opts => { + opts = Object.assign({ + cwd: process.cwd(), + path: process.env[pathKey()] + }, opts); + + let prev; + let pth = path.resolve(opts.cwd); + const ret = []; + + while (prev !== pth) { + ret.push(path.join(pth, 'node_modules/.bin')); + prev = pth; + pth = path.resolve(pth, '..'); + } + + // ensure the running `node` binary is used + ret.push(path.dirname(process.execPath)); + + return ret.concat(opts.path).join(path.delimiter); +}; + +module.exports.env = opts => { + opts = Object.assign({ + env: process.env + }, opts); + + const env = Object.assign({}, opts.env); + const path = pathKey({env}); + + opts.path = env[path]; + env[path] = module.exports(opts); + + return env; +}; + /***/ }), -/* 404 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var builtinModules = __webpack_require__(405); +module.exports = opts => { + opts = opts || {}; -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); + const env = opts.env || process.env; + const platform = opts.platform || process.platform; + + if (platform !== 'win32') { + return 'PATH'; } - return builtinModules.indexOf(str) !== -1; + return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; }; /***/ }), -/* 405 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var blacklist = [ - 'freelist', - 'sys' -]; +var isStream = module.exports = function (stream) { + return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; +}; -module.exports = Object.keys(process.binding('natives')).filter(function (el) { - return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; -}).sort(); +isStream.writable = function (stream) { + return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; +}; + +isStream.readable = function (stream) { + return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; +}; + +isStream.duplex = function (stream) { + return isStream.writable(stream) && isStream.readable(stream); +}; + +isStream.transform = function (stream) { + return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; +}; /***/ }), -/* 406 */ -/***/ (function(module, exports) { +/* 405 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = extractDescription +"use strict"; -// Extracts description from contents of a readme file in markdown format -function extractDescription (d) { - if (!d) return; - if (d === "ERROR: No README data found!") return; - // the first block of text before the first heading - // that isn't the first line heading - d = d.trim().split('\n') - for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); - var l = d.length - for (var e = s + 1; e < l && d[e].trim(); e ++); - return d.slice(s, e).join(' ').trim() -} +const bufferStream = __webpack_require__(406); + +function getStream(inputStream, opts) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + opts = Object.assign({maxBuffer: Infinity}, opts); -/***/ }), -/* 407 */ -/***/ (function(module, exports) { + const maxBuffer = opts.maxBuffer; + let stream; + let clean; -module.exports = {"topLevel":{"dependancies":"dependencies","dependecies":"dependencies","depdenencies":"dependencies","devEependencies":"devDependencies","depends":"dependencies","dev-dependencies":"devDependencies","devDependences":"devDependencies","devDepenencies":"devDependencies","devdependencies":"devDependencies","repostitory":"repository","repo":"repository","prefereGlobal":"preferGlobal","hompage":"homepage","hampage":"homepage","autohr":"author","autor":"author","contributers":"contributors","publicationConfig":"publishConfig","script":"scripts"},"bugs":{"web":"url","name":"url"},"script":{"server":"start","tests":"test"}} + const p = new Promise((resolve, reject) => { + const error = err => { + if (err) { // null check + err.bufferedData = stream.getBufferedValue(); + } -/***/ }), -/* 408 */ -/***/ (function(module, exports, __webpack_require__) { + reject(err); + }; -var util = __webpack_require__(13) -var messages = __webpack_require__(409) + stream = bufferStream(opts); + inputStream.once('error', error); + inputStream.pipe(stream); -module.exports = function() { - var args = Array.prototype.slice.call(arguments, 0) - var warningName = args.shift() - if (warningName == "typo") { - return makeTypoWarning.apply(null,args) - } - else { - var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" - args.unshift(msgTemplate) - return util.format.apply(null, args) - } -} + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + reject(new Error('maxBuffer exceeded')); + } + }); + stream.once('error', error); + stream.on('end', resolve); -function makeTypoWarning (providedName, probableName, field) { - if (field) { - providedName = field + "['" + providedName + "']" - probableName = field + "['" + probableName + "']" - } - return util.format(messages.typo, providedName, probableName) -} + clean = () => { + // some streams doesn't implement the `stream.Readable` interface correctly + if (inputStream.unpipe) { + inputStream.unpipe(stream); + } + }; + }); + p.then(clean, clean); -/***/ }), -/* 409 */ -/***/ (function(module, exports) { + return p.then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, opts) => getStream(stream, Object.assign({}, opts, {encoding: 'buffer'})); +module.exports.array = (stream, opts) => getStream(stream, Object.assign({}, opts, {array: true})); -module.exports = {"repositories":"'repositories' (plural) Not supported. Please pick one as the 'repository' field","missingRepository":"No repository field.","brokenGitUrl":"Probably broken git url: %s","nonObjectScripts":"scripts must be an object","nonStringScript":"script values must be string commands","nonArrayFiles":"Invalid 'files' member","invalidFilename":"Invalid filename in 'files' list: %s","nonArrayBundleDependencies":"Invalid 'bundleDependencies' list. Must be array of package names","nonStringBundleDependency":"Invalid bundleDependencies member: %s","nonDependencyBundleDependency":"Non-dependency in bundleDependencies: %s","nonObjectDependencies":"%s field must be an object","nonStringDependency":"Invalid dependency: %s %s","deprecatedArrayDependencies":"specifying %s as array is deprecated","deprecatedModules":"modules field is deprecated","nonArrayKeywords":"keywords should be an array of strings","nonStringKeyword":"keywords should be an array of strings","conflictingName":"%s is also the name of a node core module.","nonStringDescription":"'description' field should be a string","missingDescription":"No description","missingReadme":"No README data","missingLicense":"No license field.","nonEmailUrlBugsString":"Bug string field must be url, email, or {email,url}","nonUrlBugsUrlField":"bugs.url field must be a string url. Deleted.","nonEmailBugsEmailField":"bugs.email field must be a string email. Deleted.","emptyNormalizedBugs":"Normalized value of bugs field is an empty object. Deleted.","nonUrlHomepage":"homepage field must be a string url. Deleted.","invalidLicense":"license should be a valid SPDX license expression","typo":"%s should probably be %s."} /***/ }), -/* 410 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const path = __webpack_require__(3); -const writeJsonFile = __webpack_require__(411); -const sortKeys = __webpack_require__(212); +const PassThrough = __webpack_require__(21).PassThrough; -const opts = {detectIndent: true}; +module.exports = opts => { + opts = Object.assign({}, opts); -const dependencyKeys = new Set([ - 'dependencies', - 'devDependencies', - 'optionalDependencies', - 'peerDependencies' -]); + const array = opts.array; + let encoding = opts.encoding; + const buffer = encoding === 'buffer'; + let objectMode = false; -function normalize(pkg) { - const ret = {}; + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } - for (const key of Object.keys(pkg)) { - if (!dependencyKeys.has(key)) { - ret[key] = pkg[key]; - } else if (Object.keys(pkg[key]).length !== 0) { - ret[key] = sortKeys(pkg[key]); - } + if (buffer) { + encoding = null; } - return ret; -} + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); -module.exports = (fp, data) => { - if (typeof fp !== 'string') { - data = fp; - fp = '.'; + if (encoding) { + stream.setEncoding(encoding); } - fp = path.basename(fp) === 'package.json' ? fp : path.join(fp, 'package.json'); - - data = normalize(data); + stream.on('data', chunk => { + ret.push(chunk); - return writeJsonFile(fp, data, opts); -}; + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); -module.exports.sync = (fp, data) => { - if (typeof fp !== 'string') { - data = fp; - fp = '.'; - } + stream.getBufferedValue = () => { + if (array) { + return ret; + } - fp = path.basename(fp) === 'package.json' ? fp : path.join(fp, 'package.json'); + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; - data = normalize(data); + stream.getBufferedLength = () => len; - writeJsonFile.sync(fp, data, opts); + return stream; }; /***/ }), -/* 411 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const path = __webpack_require__(3); -const fs = __webpack_require__(25); -const writeFileAtomic = __webpack_require__(412); -const sortKeys = __webpack_require__(212); -const makeDir = __webpack_require__(213); -const pify = __webpack_require__(21); -const detectIndent = __webpack_require__(415); - -const init = (fn, fp, data, opts) => { - if (!fp) { - throw new TypeError('Expected a filepath'); - } - - if (data === undefined) { - throw new TypeError('Expected data to stringify'); - } +module.exports = (promise, onFinally) => { + onFinally = onFinally || (() => {}); - opts = Object.assign({ - indent: '\t', - sortKeys: false - }, opts); + return promise.then( + val => new Promise(resolve => { + resolve(onFinally()); + }).then(() => val), + err => new Promise(resolve => { + resolve(onFinally()); + }).then(() => { + throw err; + }) + ); +}; - if (opts.sortKeys) { - data = sortKeys(data, { - deep: true, - compare: typeof opts.sortKeys === 'function' && opts.sortKeys - }); - } - return fn(fp, data, opts); -}; +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { -const readFile = fp => pify(fs.readFile)(fp, 'utf8').catch(() => {}); +"use strict"; -const main = (fp, data, opts) => { - return (opts.detectIndent ? readFile(fp) : Promise.resolve()) - .then(str => { - const indent = str ? detectIndent(str).indent : opts.indent; - const json = JSON.stringify(data, opts.replacer, indent); +// The Node team wants to deprecate `process.bind(...)`. +// https://github.com/nodejs/node/pull/2768 +// +// However, we need the 'uv' binding for errname support. +// This is a defensive wrapper around it so `execa` will not fail entirely if it stops working someday. +// +// If this ever stops working. See: https://github.com/sindresorhus/execa/issues/31#issuecomment-215939939 for another possible solution. +let uv; - return pify(writeFileAtomic)(fp, `${json}\n`, {mode: opts.mode}); - }); -}; +try { + uv = process.binding('uv'); -const mainSync = (fp, data, opts) => { - let indent = opts.indent; + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } +} catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; +} - if (opts.detectIndent) { - try { - const file = fs.readFileSync(fp, 'utf8'); - indent = detectIndent(file).indent; - } catch (err) { - if (err.code !== 'ENOENT') { - throw err; - } - } +function errname(uv, code) { + if (uv) { + return uv.errname(code); } - const json = JSON.stringify(data, opts.replacer, indent); + if (!(code < 0)) { + throw new Error('err >= 0'); + } - return writeFileAtomic.sync(fp, `${json}\n`, {mode: opts.mode}); -}; + return `Unknown system error ${code}`; +} -module.exports = (fp, data, opts) => { - return makeDir(path.dirname(fp), {fs}) - .then(() => init(main, fp, data, opts)); -}; +module.exports = code => errname(uv, code); -module.exports.sync = (fp, data, opts) => { - makeDir.sync(path.dirname(fp), {fs}); - init(mainSync, fp, data, opts); -}; +// Used for testing the fallback behavior +module.exports.__test__ = errname; /***/ }), -/* 412 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = writeFile -module.exports.sync = writeFileSync -module.exports._getTmpname = getTmpname // for testing -module.exports._cleanupOnExit = cleanupOnExit - -var fs = __webpack_require__(25) -var MurmurHash3 = __webpack_require__(413) -var onExit = __webpack_require__(57) -var path = __webpack_require__(3) -var activeFiles = {} - -var invocations = 0 -function getTmpname (filename) { - return filename + '.' + - MurmurHash3(__filename) - .hash(String(process.pid)) - .hash(String(++invocations)) - .result() -} +const alias = ['stdin', 'stdout', 'stderr']; -function cleanupOnExit (tmpfile) { - return function () { - try { - fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile) - } catch (_) {} - } -} +const hasAlias = opts => alias.some(x => Boolean(opts[x])); -function writeFile (filename, data, options, callback) { - if (options instanceof Function) { - callback = options - options = null - } - if (!options) options = {} +module.exports = opts => { + if (!opts) { + return null; + } - var Promise = options.Promise || global.Promise - var truename - var fd - var tmpfile - var removeOnExit = cleanupOnExit(() => tmpfile) - var absoluteName = path.resolve(filename) + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } - new Promise(function serializeSameFile (resolve) { - // make a queue if it doesn't already exist - if (!activeFiles[absoluteName]) activeFiles[absoluteName] = [] + if (typeof opts.stdio === 'string') { + return opts.stdio; + } - activeFiles[absoluteName].push(resolve) // add this job to the queue - if (activeFiles[absoluteName].length === 1) resolve() // kick off the first one - }).then(function getRealPath () { - return new Promise(function (resolve) { - fs.realpath(filename, function (_, realname) { - truename = realname || filename - tmpfile = getTmpname(truename) - resolve() - }) - }) - }).then(function stat () { - return new Promise(function stat (resolve) { - if (options.mode && options.chown) resolve() - else { - // Either mode or chown is not explicitly set - // Default behavior is to copy it from original file - fs.stat(truename, function (err, stats) { - if (err || !stats) resolve() - else { - options = Object.assign({}, options) + const stdio = opts.stdio || []; - if (!options.mode) { - options.mode = stats.mode - } - if (!options.chown && process.getuid) { - options.chown = { uid: stats.uid, gid: stats.gid } - } - resolve() - } - }) - } - }) - }).then(function thenWriteFile () { - return new Promise(function (resolve, reject) { - fs.open(tmpfile, 'w', options.mode, function (err, _fd) { - fd = _fd - if (err) reject(err) - else resolve() - }) - }) - }).then(function write () { - return new Promise(function (resolve, reject) { - if (Buffer.isBuffer(data)) { - fs.write(fd, data, 0, data.length, 0, function (err) { - if (err) reject(err) - else resolve() - }) - } else if (data != null) { - fs.write(fd, String(data), 0, String(options.encoding || 'utf8'), function (err) { - if (err) reject(err) - else resolve() - }) - } else resolve() - }) - }).then(function syncAndClose () { - if (options.fsync !== false) { - return new Promise(function (resolve, reject) { - fs.fsync(fd, function (err) { - if (err) reject(err) - else fs.close(fd, resolve) - }) - }) - } - }).then(function chown () { - if (options.chown) { - return new Promise(function (resolve, reject) { - fs.chown(tmpfile, options.chown.uid, options.chown.gid, function (err) { - if (err) reject(err) - else resolve() - }) - }) - } - }).then(function chmod () { - if (options.mode) { - return new Promise(function (resolve, reject) { - fs.chmod(tmpfile, options.mode, function (err) { - if (err) reject(err) - else resolve() - }) - }) - } - }).then(function rename () { - return new Promise(function (resolve, reject) { - fs.rename(tmpfile, truename, function (err) { - if (err) reject(err) - else resolve() - }) - }) - }).then(function success () { - removeOnExit() - callback() - }).catch(function fail (err) { - removeOnExit() - fs.unlink(tmpfile, function () { - callback(err) - }) - }).then(function checkQueue () { - activeFiles[absoluteName].shift() // remove the element added by serializeSameFile - if (activeFiles[absoluteName].length > 0) { - activeFiles[absoluteName][0]() // start next job if one is pending - } else delete activeFiles[absoluteName] - }) -} + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } -function writeFileSync (filename, data, options) { - if (!options) options = {} - try { - filename = fs.realpathSync(filename) - } catch (ex) { - // it's ok, it'll happen on a not yet existing file - } - var tmpfile = getTmpname(filename) + const result = []; + const len = Math.max(stdio.length, alias.length); - try { - if (!options.mode || !options.chown) { - // Either mode or chown is not explicitly set - // Default behavior is to copy it from original file - try { - var stats = fs.statSync(filename) - options = Object.assign({}, options) - if (!options.mode) { - options.mode = stats.mode - } - if (!options.chown && process.getuid) { - options.chown = { uid: stats.uid, gid: stats.gid } - } - } catch (ex) { - // ignore stat errors - } - } + for (let i = 0; i < len; i++) { + let value = null; - var removeOnExit = onExit(cleanupOnExit(tmpfile)) - var fd = fs.openSync(tmpfile, 'w', options.mode) - if (Buffer.isBuffer(data)) { - fs.writeSync(fd, data, 0, data.length, 0) - } else if (data != null) { - fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8')) - } - if (options.fsync !== false) { - fs.fsyncSync(fd) - } - fs.closeSync(fd) - if (options.chown) fs.chownSync(tmpfile, options.chown.uid, options.chown.gid) - if (options.mode) fs.chmodSync(tmpfile, options.mode) - fs.renameSync(tmpfile, filename) - removeOnExit() - } catch (err) { - removeOnExit() - try { fs.unlinkSync(tmpfile) } catch (e) {} - throw err - } -} + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; /***/ }), -/* 413 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @preserve - * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) - * - * @author Jens Taylor - * @see http://github.com/homebrewing/brauhaus-diff - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - */ -(function(){ - var cache; +// Copyright IBM Corp. 2014. All Rights Reserved. +// Node module: strong-log-transformer +// This file is licensed under the Artistic License 2.0. +// License text available at https://opensource.org/licenses/Artistic-2.0 - // Call this function without `new` to use the cached object (good for - // single-threaded environments), or with `new` to create a new object. - // - // @param {string} key A UTF-16 or ASCII string - // @param {number} seed An optional positive integer - // @return {object} A MurmurHash3 object for incremental hashing - function MurmurHash3(key, seed) { - var m = this instanceof MurmurHash3 ? this : cache; - m.reset(seed) - if (typeof key === 'string' && key.length > 0) { - m.hash(key); - } +module.exports = __webpack_require__(96); +module.exports.cli = __webpack_require__(416); - if (m !== this) { - return m; - } - }; - // Incrementally add a string to this hash - // - // @param {string} key A UTF-16 or ASCII string - // @return {object} this - MurmurHash3.prototype.hash = function(key) { - var h1, k1, i, top, len; +/***/ }), +/* 411 */ +/***/ (function(module, exports, __webpack_require__) { - len = key.length; - this.len += len; +// Copyright (C) 2011-2015 John Hewson +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// IN THE SOFTWARE. - k1 = this.k1; - i = 0; - switch (this.rem) { - case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; - case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; - case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; - case 3: - k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; - k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; - } +var stream = __webpack_require__(21), + util = __webpack_require__(13), + timers = __webpack_require__(412); - this.rem = (len + this.rem) & 3; // & 3 is same as % 4 - len -= this.rem; - if (len > 0) { - h1 = this.h1; - while (1) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; +// convinience API +module.exports = function(readStream, options) { + return module.exports.createStream(readStream, options); +}; - h1 ^= k1; - h1 = (h1 << 13) | (h1 >>> 19); - h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; +// basic API +module.exports.createStream = function(readStream, options) { + if (readStream) { + return createLineStream(readStream, options); + } else { + return new LineStream(options); + } +}; - if (i >= len) { - break; - } +// deprecated API +module.exports.createLineStream = function(readStream) { + console.log('WARNING: byline#createLineStream is deprecated and will be removed soon'); + return createLineStream(readStream); +}; - k1 = ((key.charCodeAt(i++) & 0xffff)) ^ - ((key.charCodeAt(i++) & 0xffff) << 8) ^ - ((key.charCodeAt(i++) & 0xffff) << 16); - top = key.charCodeAt(i++); - k1 ^= ((top & 0xff) << 24) ^ - ((top & 0xff00) >> 8); - } +function createLineStream(readStream, options) { + if (!readStream) { + throw new Error('expected readStream'); + } + if (!readStream.readable) { + throw new Error('readStream must be readable'); + } + var ls = new LineStream(options); + readStream.pipe(ls); + return ls; +} - k1 = 0; - switch (this.rem) { - case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; - case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; - case 1: k1 ^= (key.charCodeAt(i) & 0xffff); - } +// +// using the new node v0.10 "streams2" API +// - this.h1 = h1; - } +module.exports.LineStream = LineStream; - this.k1 = k1; - return this; - }; +function LineStream(options) { + stream.Transform.call(this, options); + options = options || {}; - // Get the result of this hash - // - // @return {number} The 32-bit hash - MurmurHash3.prototype.result = function() { - var k1, h1; - - k1 = this.k1; - h1 = this.h1; + // use objectMode to stop the output from being buffered + // which re-concatanates the lines, just without newlines. + this._readableState.objectMode = true; + this._lineBuffer = []; + this._keepEmptyLines = options.keepEmptyLines || false; + this._lastChunkEndedWithCR = false; - if (k1 > 0) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - h1 ^= k1; - } + // take the source's encoding if we don't have one + var self = this; + this.on('pipe', function(src) { + if (!self.encoding) { + // but we can't do this for old-style streams + if (src instanceof stream.Readable) { + self.encoding = src._readableState.encoding; + } + } + }); +} +util.inherits(LineStream, stream.Transform); - h1 ^= this.len; +LineStream.prototype._transform = function(chunk, encoding, done) { + // decode binary chunks as UTF-8 + encoding = encoding || 'utf8'; + + if (Buffer.isBuffer(chunk)) { + if (encoding == 'buffer') { + chunk = chunk.toString(); // utf8 + encoding = 'utf8'; + } + else { + chunk = chunk.toString(encoding); + } + } + this._chunkEncoding = encoding; + + // see: http://www.unicode.org/reports/tr18/#Line_Boundaries + var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); + + // don't split CRLF which spans chunks + if (this._lastChunkEndedWithCR && chunk[0] == '\n') { + lines.shift(); + } + + if (this._lineBuffer.length > 0) { + this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; + lines.shift(); + } - h1 ^= h1 >>> 16; - h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; - h1 ^= h1 >>> 13; - h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; - h1 ^= h1 >>> 16; + this._lastChunkEndedWithCR = chunk[chunk.length - 1] == '\r'; + this._lineBuffer = this._lineBuffer.concat(lines); + this._pushBuffer(encoding, 1, done); +}; - return h1 >>> 0; - }; +LineStream.prototype._pushBuffer = function(encoding, keep, done) { + // always buffer the last (possibly partial) line + while (this._lineBuffer.length > keep) { + var line = this._lineBuffer.shift(); + // skip empty lines + if (this._keepEmptyLines || line.length > 0 ) { + if (!this.push(this._reencode(line, encoding))) { + // when the high-water mark is reached, defer pushes until the next tick + var self = this; + timers.setImmediate(function() { + self._pushBuffer(encoding, keep, done); + }); + return; + } + } + } + done(); +}; - // Reset the hash object for reuse - // - // @param {number} seed An optional positive integer - MurmurHash3.prototype.reset = function(seed) { - this.h1 = typeof seed === 'number' ? seed : 0; - this.rem = this.k1 = this.len = 0; - return this; - }; +LineStream.prototype._flush = function(done) { + this._pushBuffer(this._chunkEncoding, 0, done); +}; - // A cached object to use. This can be safely used if you're in a single- - // threaded environment, otherwise you need to create new hashes to use. - cache = new MurmurHash3(); +// see Readable::push +LineStream.prototype._reencode = function(line, chunkEncoding) { + if (this.encoding && this.encoding != chunkEncoding) { + return new Buffer(line, chunkEncoding).toString(this.encoding); + } + else if (this.encoding) { + // this should be the most common case, i.e. we're using an encoded source stream + return line; + } + else { + return new Buffer(line, chunkEncoding); + } +}; - if (true) { - module.exports = MurmurHash3; - } else { - this.MurmurHash3 = MurmurHash3; - } -}()); +/***/ }), +/* 412 */ +/***/ (function(module, exports) { + +module.exports = require("timers"); /***/ }), -/* 414 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Stream = __webpack_require__(21) -var toString = Object.prototype.toString; +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) -module.exports = function (x) { - var prototype; - return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({})); -}; +exports = module.exports = through +through.through = through +//create a readable writable stream. -/***/ }), -/* 415 */ -/***/ (function(module, exports, __webpack_require__) { +function through (write, end, opts) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } -"use strict"; + var ended = false, destroyed = false, buffer = [], _ended = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false +// stream.autoPause = !(opts && opts.autoPause === false) + stream.autoDestroy = !(opts && opts.autoDestroy === false) -// detect either spaces or tabs but not both to properly handle tabs -// for indentation and spaces for alignment -const INDENT_RE = /^(?:( )+|\t+)/; + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } -function getMostUsed(indents) { - let result = 0; - let maxUsed = 0; - let maxWeight = 0; + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } - for (const entry of indents) { - // TODO: use destructuring when targeting Node.js 6 - const key = entry[0]; - const val = entry[1]; + stream.queue = stream.push = function (data) { +// console.error(ended) + if(_ended) return stream + if(data === null) _ended = true + buffer.push(data) + drain() + return stream + } - const u = val[0]; - const w = val[1]; + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' - if (u > maxUsed || (u === maxUsed && w > maxWeight)) { - maxUsed = u; - maxWeight = w; - result = Number(key); - } - } + stream.on('end', function () { + stream.readable = false + if(!stream.writable && stream.autoDestroy) + process.nextTick(function () { + stream.destroy() + }) + }) - return result; -} + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable && stream.autoDestroy) + stream.destroy() + } -module.exports = str => { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } - // used to see if tabs or spaces are the most used - let tabs = 0; - let spaces = 0; + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } - // remember the size of previous line's indentation - let prev = 0; + stream.pause = function () { + if(stream.paused) return + stream.paused = true + return stream + } - // remember how many indents/unindents as occurred for a given size - // and how much lines follow a given indentation - // - // indents = { - // 3: [1, 0], - // 4: [1, 5], - // 5: [1, 0], - // 12: [1, 0], - // } - const indents = new Map(); + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('resume') + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} - // pointer to the array of last used indent - let current; - // whether the last action was an indent (opposed to an unindent) - let isIndent; - for (const line of str.split(/\n/g)) { - if (!line) { - // ignore empty lines - continue; - } +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { - let indent; - const matches = line.match(INDENT_RE); +var Stream = __webpack_require__(21) +var writeMethods = ["write", "end", "destroy"] +var readMethods = ["resume", "pause"] +var readEvents = ["data", "close"] +var slice = Array.prototype.slice - if (matches) { - indent = matches[0].length; +module.exports = duplex - if (matches[1]) { - spaces++; - } else { - tabs++; - } - } else { - indent = 0; - } +function forEach (arr, fn) { + if (arr.forEach) { + return arr.forEach(fn) + } - const diff = indent - prev; - prev = indent; + for (var i = 0; i < arr.length; i++) { + fn(arr[i], i) + } +} - if (diff) { - // an indent or unindent has been detected +function duplex(writer, reader) { + var stream = new Stream() + var ended = false - isIndent = diff > 0; + forEach(writeMethods, proxyWriter) - current = indents.get(isIndent ? diff : -diff); + forEach(readMethods, proxyReader) - if (current) { - current[0]++; - } else { - current = [1, 0]; - indents.set(diff, current); - } - } else if (current) { - // if the last action was an indent, increment the weight - current[1] += Number(isIndent); - } - } + forEach(readEvents, proxyStream) - const amount = getMostUsed(indents); + reader.on("end", handleEnd) - let type; - let indent; - if (!amount) { - type = null; - indent = ''; - } else if (spaces >= tabs) { - type = 'space'; - indent = ' '.repeat(amount); - } else { - type = 'tab'; - indent = '\t'.repeat(amount); - } + writer.on("drain", function() { + stream.emit("drain") + }) - return { - amount, - type, - indent - }; -}; + writer.on("error", reemit) + reader.on("error", reemit) + stream.writable = writer.writable + stream.readable = reader.readable -/***/ }), -/* 416 */ -/***/ (function(module, exports, __webpack_require__) { + return stream -"use strict"; + function proxyWriter(methodName) { + stream[methodName] = method + function method() { + return writer[methodName].apply(writer, arguments) + } + } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.linkProjectExecutables = undefined; + function proxyReader(methodName) { + stream[methodName] = method -/** - * Yarn does not link the executables from dependencies that are installed - * using `link:` https://github.com/yarnpkg/yarn/pull/5046 - * - * We simulate this functionality by walking through each project's project - * dependencies, and manually linking their executables if defined. The logic - * for linking was mostly adapted from lerna: https://github.com/lerna/lerna/blob/1d7eb9eeff65d5a7de64dea73613b1bf6bfa8d57/src/PackageUtilities.js#L348 - */ -let linkProjectExecutables = exports.linkProjectExecutables = (() => { - var _ref = _asyncToGenerator(function* (projectsByName, projectGraph) { - for (const [projectName, projectDeps] of projectGraph) { - const project = projectsByName.get(projectName); - const binsDir = (0, _path.resolve)(project.nodeModulesLocation, '.bin'); - for (const projectDep of projectDeps) { - const executables = projectDep.getExecutables(); - for (const name of Object.keys(executables)) { - const srcPath = executables[name]; - // existing logic from lerna -- ensure that the bin we are going to - // point to exists or ignore it - if (!(yield (0, _fs.isFile)(srcPath))) { - continue; - } - const dest = (0, _path.resolve)(binsDir, name); - // Get relative project path with normalized path separators. - const projectRelativePath = (0, _path.relative)(project.path, srcPath).split(_path.sep).join('/'); - console.log(_chalk2.default`{dim [${project.name}]} ${name} -> {dim ${projectRelativePath}}`); - yield (0, _fs.mkdirp)((0, _path.dirname)(dest)); - yield (0, _fs.createSymlink)(srcPath, dest, 'exec'); - yield (0, _fs.chmod)(dest, '755'); - } + function method() { + stream.emit(methodName) + var func = reader[methodName] + if (func) { + return func.apply(reader, arguments) } + reader.emit(methodName) } - }); + } - return function linkProjectExecutables(_x, _x2) { - return _ref.apply(this, arguments); - }; -})(); + function proxyStream(methodName) { + reader.on(methodName, reemit) -var _path = __webpack_require__(3); + function reemit() { + var args = slice.call(arguments) + args.unshift(methodName) + stream.emit.apply(stream, args) + } + } -var _chalk = __webpack_require__(14); + function handleEnd() { + if (ended) { + return + } + ended = true + var args = slice.call(arguments) + args.unshift("end") + stream.emit.apply(stream, args) + } -var _chalk2 = _interopRequireDefault(_chalk); + function reemit(err) { + stream.emit("error", err) + } +} -var _fs = __webpack_require__(58); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/***/ }), +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +var map = { + "./af": 97, + "./af.js": 97, + "./ar": 98, + "./ar-dz": 99, + "./ar-dz.js": 99, + "./ar-kw": 100, + "./ar-kw.js": 100, + "./ar-ly": 101, + "./ar-ly.js": 101, + "./ar-ma": 102, + "./ar-ma.js": 102, + "./ar-sa": 103, + "./ar-sa.js": 103, + "./ar-tn": 104, + "./ar-tn.js": 104, + "./ar.js": 98, + "./az": 105, + "./az.js": 105, + "./be": 106, + "./be.js": 106, + "./bg": 107, + "./bg.js": 107, + "./bm": 108, + "./bm.js": 108, + "./bn": 109, + "./bn.js": 109, + "./bo": 110, + "./bo.js": 110, + "./br": 111, + "./br.js": 111, + "./bs": 112, + "./bs.js": 112, + "./ca": 113, + "./ca.js": 113, + "./cs": 114, + "./cs.js": 114, + "./cv": 115, + "./cv.js": 115, + "./cy": 116, + "./cy.js": 116, + "./da": 117, + "./da.js": 117, + "./de": 118, + "./de-at": 119, + "./de-at.js": 119, + "./de-ch": 120, + "./de-ch.js": 120, + "./de.js": 118, + "./dv": 121, + "./dv.js": 121, + "./el": 122, + "./el.js": 122, + "./en-au": 123, + "./en-au.js": 123, + "./en-ca": 124, + "./en-ca.js": 124, + "./en-gb": 125, + "./en-gb.js": 125, + "./en-ie": 126, + "./en-ie.js": 126, + "./en-nz": 127, + "./en-nz.js": 127, + "./eo": 128, + "./eo.js": 128, + "./es": 129, + "./es-do": 130, + "./es-do.js": 130, + "./es-us": 131, + "./es-us.js": 131, + "./es.js": 129, + "./et": 132, + "./et.js": 132, + "./eu": 133, + "./eu.js": 133, + "./fa": 134, + "./fa.js": 134, + "./fi": 135, + "./fi.js": 135, + "./fo": 136, + "./fo.js": 136, + "./fr": 137, + "./fr-ca": 138, + "./fr-ca.js": 138, + "./fr-ch": 139, + "./fr-ch.js": 139, + "./fr.js": 137, + "./fy": 140, + "./fy.js": 140, + "./gd": 141, + "./gd.js": 141, + "./gl": 142, + "./gl.js": 142, + "./gom-latn": 143, + "./gom-latn.js": 143, + "./gu": 144, + "./gu.js": 144, + "./he": 145, + "./he.js": 145, + "./hi": 146, + "./hi.js": 146, + "./hr": 147, + "./hr.js": 147, + "./hu": 148, + "./hu.js": 148, + "./hy-am": 149, + "./hy-am.js": 149, + "./id": 150, + "./id.js": 150, + "./is": 151, + "./is.js": 151, + "./it": 152, + "./it.js": 152, + "./ja": 153, + "./ja.js": 153, + "./jv": 154, + "./jv.js": 154, + "./ka": 155, + "./ka.js": 155, + "./kk": 156, + "./kk.js": 156, + "./km": 157, + "./km.js": 157, + "./kn": 158, + "./kn.js": 158, + "./ko": 159, + "./ko.js": 159, + "./ky": 160, + "./ky.js": 160, + "./lb": 161, + "./lb.js": 161, + "./lo": 162, + "./lo.js": 162, + "./lt": 163, + "./lt.js": 163, + "./lv": 164, + "./lv.js": 164, + "./me": 165, + "./me.js": 165, + "./mi": 166, + "./mi.js": 166, + "./mk": 167, + "./mk.js": 167, + "./ml": 168, + "./ml.js": 168, + "./mr": 169, + "./mr.js": 169, + "./ms": 170, + "./ms-my": 171, + "./ms-my.js": 171, + "./ms.js": 170, + "./mt": 172, + "./mt.js": 172, + "./my": 173, + "./my.js": 173, + "./nb": 174, + "./nb.js": 174, + "./ne": 175, + "./ne.js": 175, + "./nl": 176, + "./nl-be": 177, + "./nl-be.js": 177, + "./nl.js": 176, + "./nn": 178, + "./nn.js": 178, + "./pa-in": 179, + "./pa-in.js": 179, + "./pl": 180, + "./pl.js": 180, + "./pt": 181, + "./pt-br": 182, + "./pt-br.js": 182, + "./pt.js": 181, + "./ro": 183, + "./ro.js": 183, + "./ru": 184, + "./ru.js": 184, + "./sd": 185, + "./sd.js": 185, + "./se": 186, + "./se.js": 186, + "./si": 187, + "./si.js": 187, + "./sk": 188, + "./sk.js": 188, + "./sl": 189, + "./sl.js": 189, + "./sq": 190, + "./sq.js": 190, + "./sr": 191, + "./sr-cyrl": 192, + "./sr-cyrl.js": 192, + "./sr.js": 191, + "./ss": 193, + "./ss.js": 193, + "./sv": 194, + "./sv.js": 194, + "./sw": 195, + "./sw.js": 195, + "./ta": 196, + "./ta.js": 196, + "./te": 197, + "./te.js": 197, + "./tet": 198, + "./tet.js": 198, + "./th": 199, + "./th.js": 199, + "./tl-ph": 200, + "./tl-ph.js": 200, + "./tlh": 201, + "./tlh.js": 201, + "./tr": 202, + "./tr.js": 202, + "./tzl": 203, + "./tzl.js": 203, + "./tzm": 204, + "./tzm-latn": 205, + "./tzm-latn.js": 205, + "./tzm.js": 204, + "./uk": 206, + "./uk.js": 206, + "./ur": 207, + "./ur.js": 207, + "./uz": 208, + "./uz-latn": 209, + "./uz-latn.js": 209, + "./uz.js": 208, + "./vi": 210, + "./vi.js": 210, + "./x-pseudo": 211, + "./x-pseudo.js": 211, + "./yo": 212, + "./yo.js": 212, + "./zh-cn": 213, + "./zh-cn.js": 213, + "./zh-hk": 214, + "./zh-hk.js": 214, + "./zh-tw": 215, + "./zh-tw.js": 215 +}; +function webpackContext(req) { + return __webpack_require__(webpackContextResolve(req)); +}; +function webpackContextResolve(req) { + var id = map[req]; + if(!(id + 1)) // check for number or string + throw new Error("Cannot find module '" + req + "'."); + return id; +}; +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = 415; /***/ }), -/* 417 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { -// On windows, create a .cmd file. -// Read the #! in the file to see what it uses. The vast majority -// of the time, this will be either: -// "#!/usr/bin/env " -// or: -// "#! " -// -// Write a binroot/pkg.bin + ".cmd" file that has this line in it: -// @ %~dp0 %* +"use strict"; +// Copyright IBM Corp. 2014. All Rights Reserved. +// Node module: strong-log-transformer +// This file is licensed under the Artistic License 2.0. +// License text available at https://opensource.org/licenses/Artistic-2.0 -module.exports = cmdShim -cmdShim.ifExists = cmdShimIfExists -var fs = __webpack_require__(25) -var mkdir = __webpack_require__(214) - , path = __webpack_require__(3) - , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ +var minimist = __webpack_require__(417); +var path = __webpack_require__(3); -function cmdShimIfExists (from, to, cb) { - fs.stat(from, function (er) { - if (er) return cb() - cmdShim(from, to, cb) - }) -} +var Logger = __webpack_require__(96); +var pkg = __webpack_require__(418); -// Try to unlink, but ignore errors. -// Any problems will surface later. -function rm (path, cb) { - fs.unlink(path, function(er) { - cb() - }) -} +module.exports = cli; -function cmdShim (from, to, cb) { - fs.stat(from, function (er, stat) { - if (er) - return cb(er) +function cli(args) { + var opts = minimist(args.slice(2)); + var $0 = path.basename(args[1]); + var p = console.log.bind(console); + if (opts.v || opts.version) { + version($0, p); + } else if (opts.h || opts.help) { + usage($0, p); + } else { + process.stdin.pipe(Logger(opts)).pipe(process.stdout); + } +} - cmdShim_(from, to, cb) - }) +function version($0, p) { + p('%s v%s', pkg.name, pkg.version); } -function cmdShim_ (from, to, cb) { - var then = times(2, next, cb) - rm(to, then) - rm(to + ".cmd", then) +function usage($0, p) { + var PADDING = ' '; + var opt, def; + p('Usage: %s [options]', $0); + p(''); + p('%s', pkg.description); + p(''); + p('OPTIONS:'); + for (opt in Logger.DEFAULTS) { + def = Logger.DEFAULTS[opt]; + if (typeof def === 'boolean') + boolOpt(opt, Logger.DEFAULTS[opt]); + else + stdOpt(opt, Logger.DEFAULTS[opt]); + } + p(''); - function next(er) { - writeShim(from, to, cb) + function boolOpt(name, def) { + name = def ? 'no-' + name : name; + name = name + PADDING.slice(0, 20-name.length); + p(' --%s default: %s', name, def ? 'on' : 'off'); } -} -function writeShim (from, to, cb) { - // make a cmd file and a sh script - // First, check if the bin is a #! of some sort. - // If not, then assume it's something that'll be compiled, or some other - // sort of script, and just call it directly. - mkdir(path.dirname(to), function (er) { - if (er) - return cb(er) - fs.readFile(from, "utf8", function (er, data) { - if (er) return writeShim_(from, to, null, null, cb) - var firstLine = data.trim().split(/\r*\n/)[0] - , shebang = firstLine.match(shebangExpr) - if (!shebang) return writeShim_(from, to, null, null, cb) - var prog = shebang[1] - , args = shebang[2] || "" - return writeShim_(from, to, prog, args, cb) - }) - }) + function stdOpt(name, def) { + var value = name.toUpperCase() + + PADDING.slice(0, 19 - name.length*2); + p(' --%s %s default: %j', name, value, def); + } } -function writeShim_ (from, to, prog, args, cb) { - var shTarget = path.relative(path.dirname(to), from) - , target = shTarget.split("/").join("\\") - , longProg - , shProg = prog && prog.split("\\").join("/") - , shLongProg - shTarget = shTarget.split("\\").join("/") - args = args || "" - if (!prog) { - prog = "\"%~dp0\\" + target + "\"" - shProg = "\"$basedir/" + shTarget + "\"" - args = "" - target = "" - shTarget = "" - } else { - longProg = "\"%~dp0\\" + prog + ".exe\"" - shLongProg = "\"$basedir/" + prog + "\"" - target = "\"%~dp0\\" + target + "\"" - shTarget = "\"$basedir/" + shTarget + "\"" - } - // @IF EXIST "%~dp0\node.exe" ( - // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // ) ELSE ( - // SETLOCAL - // SET PATHEXT=%PATHEXT:;.JS;=;% - // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // ) - var cmd - if (longProg) { - cmd = "@IF EXIST " + longProg + " (\r\n" - + " " + longProg + " " + args + " " + target + " %*\r\n" - + ") ELSE (\r\n" - + " @SETLOCAL\r\n" - + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" - + " " + prog + " " + args + " " + target + " %*\r\n" - + ")" - } else { - cmd = "@" + prog + " " + args + " " + target + " %*\r\n" - } +/***/ }), +/* 417 */ +/***/ (function(module, exports) { - // #!/bin/sh - // basedir=`dirname "$0"` - // - // case `uname` in - // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; - // esac - // - // if [ -x "$basedir/node.exe" ]; then - // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // else - // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // fi - // exit $ret +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); - var sh = "#!/bin/sh\n" + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); - if (shLongProg) { - sh = sh - + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" - + "\n" - + "case `uname` in\n" - + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" - + "esac\n" - + "\n" + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; - sh = sh - + "if [ -x "+shLongProg+" ]; then\n" - + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "else \n" - + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "fi\n" - + "exit $ret\n" - } else { - sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" - + "exit $?\n" - } + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } - var then = times(2, next, cb) - fs.writeFile(to + ".cmd", cmd, "utf8", then) - fs.writeFile(to, sh, "utf8", then) - function next () { - chmodShim(to, cb) - } -} + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } -function chmodShim (to, cb) { - var then = times(2, cb, cb) - fs.chmod(to, 0755, then) - fs.chmod(to + ".cmd", 0755, then) + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; } -function times(n, ok, cb) { - var errState = null - return function(er) { - if (!errState) { - if (er) - cb(errState = er) - else if (--n === 0) - ok() +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; } - } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); } + /***/ }), /* 418 */ +/***/ (function(module, exports) { + +module.exports = {"name":"strong-log-transformer","version":"1.0.6","description":"Stream transformer that prefixes lines with timestamps and other things.","author":"Ryan Graham ","license":"Artistic-2.0","repository":{"type":"git","url":"git://github.com/strongloop/strong-log-transformer"},"keywords":["logging","streams"],"bugs":{"url":"https://github.com/strongloop/strong-log-transformer/issues"},"homepage":"https://github.com/strongloop/strong-log-transformer","directories":{"test":"test"},"bin":{"sl-log-transformer":"bin/sl-log-transformer.js"},"main":"index.js","scripts":{"test":"tap --coverage --coverage-report=cobertura test/test-*"},"dependencies":{"byline":"^5.0.0","duplexer":"^0.1.1","minimist":"^0.1.0","moment":"^2.6.0","through":"^2.3.4"},"devDependencies":{"tap":"^1.3.2"}} + +/***/ }), +/* 419 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47281,29 +47559,49 @@ Object.defineProperty(exports, "__esModule", { }); exports.CleanCommand = undefined; -var _del = __webpack_require__(215); - -var _del2 = _interopRequireDefault(_del); - var _chalk = __webpack_require__(14); var _chalk2 = _interopRequireDefault(_chalk); -var _path = __webpack_require__(3); +var _del = __webpack_require__(216); + +var _del2 = _interopRequireDefault(_del); -var _ora = __webpack_require__(429); +var _ora = __webpack_require__(430); var _ora2 = _interopRequireDefault(_ora); -var _fs = __webpack_require__(58); +var _path = __webpack_require__(3); + +var _fs = __webpack_require__(54); + +var _log = __webpack_require__(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + const CleanCommand = exports.CleanCommand = { - name: 'clean', description: 'Remove the node_modules and target directories from all projects.', + name: 'clean', run(projects, projectGraph, { rootPath }) { return _asyncToGenerator(function* () { const directoriesToDelete = []; @@ -47316,9 +47614,9 @@ const CleanCommand = exports.CleanCommand = { } } if (directoriesToDelete.length === 0) { - console.log(_chalk2.default.bold.green('\n\nNo directories to delete')); + _log.log.write(_chalk2.default.bold.green('\n\nNo directories to delete')); } else { - console.log(_chalk2.default.bold.red('\n\nDeleting directories:\n')); + _log.log.write(_chalk2.default.bold.red('\n\nDeleting directories:\n')); for (const dir of directoriesToDelete) { const deleting = (0, _del2.default)(dir, { force: true }); _ora2.default.promise(deleting, (0, _path.relative)(rootPath, dir)); @@ -47330,16 +47628,16 @@ const CleanCommand = exports.CleanCommand = { }; /***/ }), -/* 419 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Promise = __webpack_require__(216); -var arrayUnion = __webpack_require__(217); -var objectAssign = __webpack_require__(218); -var glob = __webpack_require__(23); -var pify = __webpack_require__(422); +var Promise = __webpack_require__(217); +var arrayUnion = __webpack_require__(218); +var objectAssign = __webpack_require__(219); +var glob = __webpack_require__(26); +var pify = __webpack_require__(423); var globP = pify(glob, Promise).bind(glob); @@ -47425,7 +47723,7 @@ module.exports.hasMagic = function (patterns, opts) { /***/ }), -/* 420 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47724,7 +48022,7 @@ module.exports = Promise; /***/ }), -/* 421 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47793,7 +48091,7 @@ if ('Set' in global) { /***/ }), -/* 422 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47868,7 +48166,7 @@ pify.all = pify; /***/ }), -/* 423 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47881,12 +48179,12 @@ module.exports = function (str) { /***/ }), -/* 424 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isPathInside = __webpack_require__(425); +var isPathInside = __webpack_require__(426); module.exports = function (str) { return isPathInside(str, process.cwd()); @@ -47894,13 +48192,13 @@ module.exports = function (str) { /***/ }), -/* 425 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(3); -var pathIsInside = __webpack_require__(426); +var pathIsInside = __webpack_require__(427); module.exports = function (a, b) { a = path.resolve(a); @@ -47915,7 +48213,7 @@ module.exports = function (a, b) { /***/ }), -/* 426 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47950,7 +48248,7 @@ function stripTrailingSep(thePath) { /***/ }), -/* 427 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { module.exports = rimraf @@ -47959,7 +48257,7 @@ rimraf.sync = rimrafSync var assert = __webpack_require__(24) var path = __webpack_require__(3) var fs = __webpack_require__(7) -var glob = __webpack_require__(23) +var glob = __webpack_require__(26) var _0666 = parseInt('666', 8) var defaultGlobOpts = { @@ -48320,7 +48618,7 @@ function rmkidsSync (p, options) { /***/ }), -/* 428 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48394,15 +48692,15 @@ module.exports = (iterable, mapper, opts) => new Promise((resolve, reject) => { /***/ }), -/* 429 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const chalk = __webpack_require__(14); -const cliCursor = __webpack_require__(430); -const cliSpinners = __webpack_require__(434); -const logSymbols = __webpack_require__(207); +const cliCursor = __webpack_require__(431); +const cliSpinners = __webpack_require__(435); +const logSymbols = __webpack_require__(95); class Ora { constructor(options) { @@ -48549,12 +48847,12 @@ module.exports.promise = (action, options) => { /***/ }), -/* 430 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(431); +const restoreCursor = __webpack_require__(432); let hidden = false; @@ -48595,13 +48893,13 @@ exports.toggle = (force, stream) => { /***/ }), -/* 431 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const onetime = __webpack_require__(432); -const signalExit = __webpack_require__(57); +const onetime = __webpack_require__(433); +const signalExit = __webpack_require__(59); module.exports = onetime(() => { signalExit(() => { @@ -48611,12 +48909,12 @@ module.exports = onetime(() => { /***/ }), -/* 432 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const mimicFn = __webpack_require__(433); +const mimicFn = __webpack_require__(434); module.exports = (fn, opts) => { // TODO: Remove this in v3 @@ -48657,7 +48955,7 @@ module.exports = (fn, opts) => { /***/ }), -/* 433 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48673,22 +48971,22 @@ module.exports = (to, from) => { /***/ }), -/* 434 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(435); +module.exports = __webpack_require__(436); /***/ }), -/* 435 */ +/* 436 */ /***/ (function(module, exports) { module.exports = {"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"line":{"interval":130,"frames":["-","\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]}} /***/ }), -/* 436 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48703,27 +49001,47 @@ var _chalk = __webpack_require__(14); var _chalk2 = _interopRequireDefault(_chalk); -var _projects = __webpack_require__(22); +var _log = __webpack_require__(17); + +var _parallelize = __webpack_require__(55); -var _parallelize = __webpack_require__(59); +var _projects = __webpack_require__(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + const RunCommand = exports.RunCommand = { - name: 'run', description: 'Run script defined in package.json in each package that contains that script.', + name: 'run', run(projects, projectGraph, { extraArgs }) { return _asyncToGenerator(function* () { const batchedProjects = (0, _projects.topologicallyBatchProjects)(projects, projectGraph); if (extraArgs.length === 0) { - console.log(_chalk2.default.red.bold('\nNo script specified')); + _log.log.write(_chalk2.default.red.bold('\nNo script specified')); process.exit(1); } const scriptName = extraArgs[0]; const scriptArgs = extraArgs.slice(1); - console.log(_chalk2.default.bold(`\nRunning script [${_chalk2.default.green(scriptName)}] in batched topological order\n`)); + _log.log.write(_chalk2.default.bold(`\nRunning script [${_chalk2.default.green(scriptName)}] in batched topological order\n`)); yield (0, _parallelize.parallelizeBatches)(batchedProjects, (() => { var _ref = _asyncToGenerator(function* (pkg) { if (pkg.hasScript(scriptName)) { @@ -48740,7 +49058,7 @@ const RunCommand = exports.RunCommand = { }; /***/ }), -/* 437 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48755,15 +49073,35 @@ var _chalk = __webpack_require__(14); var _chalk2 = _interopRequireDefault(_chalk); -var _projects = __webpack_require__(22); +var _log = __webpack_require__(17); -var _parallelize = __webpack_require__(59); +var _parallelize = __webpack_require__(55); -var _watch = __webpack_require__(438); +var _projects = __webpack_require__(25); + +var _watch = __webpack_require__(439); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + /** * Name of the script in the package/project package.json file to run during `kbn watch`. @@ -48784,8 +49122,8 @@ const kibanaProjectName = 'kibana'; * `webpack` and `tsc` only, for the rest we rely on predefined timeouts. */ const WatchCommand = exports.WatchCommand = { - name: 'watch', description: 'Runs `kbn:watch` script for every project.', + name: 'watch', run(projects, projectGraph) { return _asyncToGenerator(function* () { const projectsToWatch = new Map(); @@ -48796,11 +49134,11 @@ const WatchCommand = exports.WatchCommand = { } } if (projectsToWatch.size === 0) { - console.log(_chalk2.default.red(`\nThere are no projects to watch found. Make sure that projects define 'kbn:watch' script in 'package.json'.\n`)); + _log.log.write(_chalk2.default.red(`\nThere are no projects to watch found. Make sure that projects define 'kbn:watch' script in 'package.json'.\n`)); return; } const projectNames = Array.from(projectsToWatch.keys()); - console.log(_chalk2.default.bold(_chalk2.default.green(`Running ${watchScriptName} scripts for [${projectNames.join(', ')}].`))); + _log.log.write(_chalk2.default.bold(_chalk2.default.green(`Running ${watchScriptName} scripts for [${projectNames.join(', ')}].`))); // Kibana should always be run the last, so we don't rely on automatic // topological batching and push it to the last one-entry batch manually. const shouldWatchKibanaProject = projectsToWatch.delete(kibanaProjectName); @@ -48811,7 +49149,7 @@ const WatchCommand = exports.WatchCommand = { yield (0, _parallelize.parallelizeBatches)(batchedProjects, (() => { var _ref = _asyncToGenerator(function* (pkg) { const completionHint = yield (0, _watch.waitUntilWatchIsReady)(pkg.runScriptStreaming(watchScriptName).stdout); - console.log(_chalk2.default.bold(`[${_chalk2.default.green(pkg.name)}] Initial build completed (${completionHint}).`)); + _log.log.write(_chalk2.default.bold(`[${_chalk2.default.green(pkg.name)}] Initial build completed (${completionHint}).`)); }); return function (_x) { @@ -48823,7 +49161,7 @@ const WatchCommand = exports.WatchCommand = { }; /***/ }), -/* 438 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48834,7 +49172,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.waitUntilWatchIsReady = waitUntilWatchIsReady; -var _rxjs = __webpack_require__(439); +var _rxjs = __webpack_require__(440); /** * Number of milliseconds we wait before we fall back to the default watch handler. @@ -48844,6 +49182,24 @@ const defaultHandlerDelay = 3000; * If default watch handler is used, then it's the number of milliseconds we wait for * any build output before we consider watch task ready. */ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ const defaultHandlerReadinessTimeout = 2000; function getWatchHandlers(buildOutput$, { handlerDelay = defaultHandlerDelay, handlerReadinessTimeout = defaultHandlerReadinessTimeout }) { const typescriptHandler = buildOutput$.first(data => data.includes('$ tsc')).map(() => buildOutput$.first(data => data.includes('Compilation complete.')).mapTo('tsc')); @@ -48868,7 +49224,7 @@ function waitUntilWatchIsReady(stream, opts = {}) { } /***/ }), -/* 439 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48885,184 +49241,184 @@ var Observable_1 = __webpack_require__(0); exports.Observable = Observable_1.Observable; // statics /* tslint:disable:no-use-before-declare */ -__webpack_require__(441); -__webpack_require__(444); -__webpack_require__(447); -__webpack_require__(450); -__webpack_require__(453); -__webpack_require__(456); -__webpack_require__(458); -__webpack_require__(461); +__webpack_require__(442); +__webpack_require__(445); +__webpack_require__(448); +__webpack_require__(451); +__webpack_require__(454); +__webpack_require__(457); +__webpack_require__(459); __webpack_require__(462); -__webpack_require__(465); -__webpack_require__(468); -__webpack_require__(470); -__webpack_require__(473); -__webpack_require__(476); -__webpack_require__(481); +__webpack_require__(463); +__webpack_require__(466); +__webpack_require__(469); +__webpack_require__(471); +__webpack_require__(474); +__webpack_require__(477); __webpack_require__(482); __webpack_require__(483); -__webpack_require__(486); +__webpack_require__(484); __webpack_require__(487); -__webpack_require__(489); -__webpack_require__(492); -__webpack_require__(495); -__webpack_require__(498); -__webpack_require__(501); -__webpack_require__(503); +__webpack_require__(488); +__webpack_require__(490); +__webpack_require__(493); +__webpack_require__(496); +__webpack_require__(499); +__webpack_require__(502); +__webpack_require__(504); //dom -__webpack_require__(505); -__webpack_require__(507); +__webpack_require__(506); +__webpack_require__(508); //operators -__webpack_require__(513); -__webpack_require__(515); -__webpack_require__(517); -__webpack_require__(519); -__webpack_require__(521); -__webpack_require__(523); -__webpack_require__(525); -__webpack_require__(527); -__webpack_require__(529); -__webpack_require__(531); -__webpack_require__(533); -__webpack_require__(535); -__webpack_require__(537); -__webpack_require__(539); -__webpack_require__(541); -__webpack_require__(543); -__webpack_require__(545); -__webpack_require__(547); -__webpack_require__(549); -__webpack_require__(551); -__webpack_require__(554); -__webpack_require__(556); -__webpack_require__(558); -__webpack_require__(560); -__webpack_require__(562); -__webpack_require__(564); -__webpack_require__(566); -__webpack_require__(568); -__webpack_require__(570); -__webpack_require__(572); -__webpack_require__(574); -__webpack_require__(576); -__webpack_require__(578); -__webpack_require__(583); -__webpack_require__(585); -__webpack_require__(587); -__webpack_require__(589); -__webpack_require__(591); -__webpack_require__(593); -__webpack_require__(595); -__webpack_require__(597); -__webpack_require__(599); -__webpack_require__(601); -__webpack_require__(603); -__webpack_require__(605); -__webpack_require__(607); -__webpack_require__(609); -__webpack_require__(611); -__webpack_require__(613); -__webpack_require__(615); -__webpack_require__(617); -__webpack_require__(619); -__webpack_require__(621); -__webpack_require__(623); -__webpack_require__(625); -__webpack_require__(628); -__webpack_require__(630); -__webpack_require__(632); -__webpack_require__(634); -__webpack_require__(636); -__webpack_require__(638); -__webpack_require__(640); -__webpack_require__(642); -__webpack_require__(644); -__webpack_require__(646); -__webpack_require__(648); -__webpack_require__(650); -__webpack_require__(652); -__webpack_require__(654); -__webpack_require__(656); -__webpack_require__(658); -__webpack_require__(660); -__webpack_require__(662); -__webpack_require__(664); -__webpack_require__(666); -__webpack_require__(668); -__webpack_require__(670); -__webpack_require__(672); -__webpack_require__(674); -__webpack_require__(681); -__webpack_require__(683); -__webpack_require__(685); -__webpack_require__(687); -__webpack_require__(689); -__webpack_require__(691); -__webpack_require__(693); -__webpack_require__(695); -__webpack_require__(697); -__webpack_require__(699); +__webpack_require__(514); +__webpack_require__(516); +__webpack_require__(518); +__webpack_require__(520); +__webpack_require__(522); +__webpack_require__(524); +__webpack_require__(526); +__webpack_require__(528); +__webpack_require__(530); +__webpack_require__(532); +__webpack_require__(534); +__webpack_require__(536); +__webpack_require__(538); +__webpack_require__(540); +__webpack_require__(542); +__webpack_require__(544); +__webpack_require__(546); +__webpack_require__(548); +__webpack_require__(550); +__webpack_require__(552); +__webpack_require__(555); +__webpack_require__(557); +__webpack_require__(559); +__webpack_require__(561); +__webpack_require__(563); +__webpack_require__(565); +__webpack_require__(567); +__webpack_require__(569); +__webpack_require__(571); +__webpack_require__(573); +__webpack_require__(575); +__webpack_require__(577); +__webpack_require__(579); +__webpack_require__(584); +__webpack_require__(586); +__webpack_require__(588); +__webpack_require__(590); +__webpack_require__(592); +__webpack_require__(594); +__webpack_require__(596); +__webpack_require__(598); +__webpack_require__(600); +__webpack_require__(602); +__webpack_require__(604); +__webpack_require__(606); +__webpack_require__(608); +__webpack_require__(610); +__webpack_require__(612); +__webpack_require__(614); +__webpack_require__(616); +__webpack_require__(618); +__webpack_require__(620); +__webpack_require__(622); +__webpack_require__(624); +__webpack_require__(626); +__webpack_require__(629); +__webpack_require__(631); +__webpack_require__(633); +__webpack_require__(635); +__webpack_require__(637); +__webpack_require__(639); +__webpack_require__(641); +__webpack_require__(643); +__webpack_require__(645); +__webpack_require__(647); +__webpack_require__(649); +__webpack_require__(651); +__webpack_require__(653); +__webpack_require__(655); +__webpack_require__(657); +__webpack_require__(659); +__webpack_require__(661); +__webpack_require__(663); +__webpack_require__(665); +__webpack_require__(667); +__webpack_require__(669); +__webpack_require__(671); +__webpack_require__(673); +__webpack_require__(675); +__webpack_require__(682); +__webpack_require__(684); +__webpack_require__(686); +__webpack_require__(688); +__webpack_require__(690); +__webpack_require__(692); +__webpack_require__(694); +__webpack_require__(696); +__webpack_require__(698); __webpack_require__(700); -__webpack_require__(702); -__webpack_require__(704); -__webpack_require__(706); -__webpack_require__(708); +__webpack_require__(701); +__webpack_require__(703); +__webpack_require__(705); +__webpack_require__(707); __webpack_require__(709); -__webpack_require__(711); -__webpack_require__(713); -__webpack_require__(715); -__webpack_require__(717); -__webpack_require__(719); -__webpack_require__(721); -__webpack_require__(723); +__webpack_require__(710); +__webpack_require__(712); +__webpack_require__(714); +__webpack_require__(716); +__webpack_require__(718); +__webpack_require__(720); +__webpack_require__(722); +__webpack_require__(724); /* tslint:disable:no-unused-variable */ var Subscription_1 = __webpack_require__(8); exports.Subscription = Subscription_1.Subscription; var Subscriber_1 = __webpack_require__(2); exports.Subscriber = Subscriber_1.Subscriber; -var AsyncSubject_1 = __webpack_require__(42); +var AsyncSubject_1 = __webpack_require__(43); exports.AsyncSubject = AsyncSubject_1.AsyncSubject; -var ReplaySubject_1 = __webpack_require__(49); +var ReplaySubject_1 = __webpack_require__(50); exports.ReplaySubject = ReplaySubject_1.ReplaySubject; -var BehaviorSubject_1 = __webpack_require__(277); +var BehaviorSubject_1 = __webpack_require__(278); exports.BehaviorSubject = BehaviorSubject_1.BehaviorSubject; -var ConnectableObservable_1 = __webpack_require__(271); +var ConnectableObservable_1 = __webpack_require__(272); exports.ConnectableObservable = ConnectableObservable_1.ConnectableObservable; -var Notification_1 = __webpack_require__(28); +var Notification_1 = __webpack_require__(29); exports.Notification = Notification_1.Notification; -var EmptyError_1 = __webpack_require__(50); +var EmptyError_1 = __webpack_require__(51); exports.EmptyError = EmptyError_1.EmptyError; -var ArgumentOutOfRangeError_1 = __webpack_require__(34); +var ArgumentOutOfRangeError_1 = __webpack_require__(35); exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; -var ObjectUnsubscribedError_1 = __webpack_require__(41); +var ObjectUnsubscribedError_1 = __webpack_require__(42); exports.ObjectUnsubscribedError = ObjectUnsubscribedError_1.ObjectUnsubscribedError; -var TimeoutError_1 = __webpack_require__(306); +var TimeoutError_1 = __webpack_require__(307); exports.TimeoutError = TimeoutError_1.TimeoutError; -var UnsubscriptionError_1 = __webpack_require__(220); +var UnsubscriptionError_1 = __webpack_require__(221); exports.UnsubscriptionError = UnsubscriptionError_1.UnsubscriptionError; -var timeInterval_1 = __webpack_require__(303); +var timeInterval_1 = __webpack_require__(304); exports.TimeInterval = timeInterval_1.TimeInterval; -var timestamp_1 = __webpack_require__(76); +var timestamp_1 = __webpack_require__(77); exports.Timestamp = timestamp_1.Timestamp; -var TestScheduler_1 = __webpack_require__(725); +var TestScheduler_1 = __webpack_require__(726); exports.TestScheduler = TestScheduler_1.TestScheduler; -var VirtualTimeScheduler_1 = __webpack_require__(319); +var VirtualTimeScheduler_1 = __webpack_require__(320); exports.VirtualTimeScheduler = VirtualTimeScheduler_1.VirtualTimeScheduler; -var AjaxObservable_1 = __webpack_require__(231); +var AjaxObservable_1 = __webpack_require__(232); exports.AjaxResponse = AjaxObservable_1.AjaxResponse; exports.AjaxError = AjaxObservable_1.AjaxError; exports.AjaxTimeoutError = AjaxObservable_1.AjaxTimeoutError; -var pipe_1 = __webpack_require__(60); +var pipe_1 = __webpack_require__(61); exports.pipe = pipe_1.pipe; -var asap_1 = __webpack_require__(296); +var asap_1 = __webpack_require__(297); var async_1 = __webpack_require__(6); -var queue_1 = __webpack_require__(232); -var animationFrame_1 = __webpack_require__(728); -var rxSubscriber_1 = __webpack_require__(39); -var iterator_1 = __webpack_require__(26); -var observable_1 = __webpack_require__(40); -var _operators = __webpack_require__(732); +var queue_1 = __webpack_require__(233); +var animationFrame_1 = __webpack_require__(729); +var rxSubscriber_1 = __webpack_require__(40); +var iterator_1 = __webpack_require__(27); +var observable_1 = __webpack_require__(41); +var _operators = __webpack_require__(733); exports.operators = _operators; /* tslint:enable:no-unused-variable */ /** @@ -49107,14 +49463,14 @@ exports.Symbol = Symbol; //# sourceMappingURL=Rx.js.map /***/ }), -/* 440 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Subscriber_1 = __webpack_require__(2); -var rxSubscriber_1 = __webpack_require__(39); -var Observer_1 = __webpack_require__(221); +var rxSubscriber_1 = __webpack_require__(40); +var Observer_1 = __webpack_require__(222); function toSubscriber(nextOrObserver, error, complete) { if (nextOrObserver) { if (nextOrObserver instanceof Subscriber_1.Subscriber) { @@ -49133,28 +49489,28 @@ exports.toSubscriber = toSubscriber; //# sourceMappingURL=toSubscriber.js.map /***/ }), -/* 441 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var bindCallback_1 = __webpack_require__(442); +var bindCallback_1 = __webpack_require__(443); Observable_1.Observable.bindCallback = bindCallback_1.bindCallback; //# sourceMappingURL=bindCallback.js.map /***/ }), -/* 442 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var BoundCallbackObservable_1 = __webpack_require__(443); +var BoundCallbackObservable_1 = __webpack_require__(444); exports.bindCallback = BoundCallbackObservable_1.BoundCallbackObservable.create; //# sourceMappingURL=bindCallback.js.map /***/ }), -/* 443 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49167,7 +49523,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Observable_1 = __webpack_require__(0); var tryCatch_1 = __webpack_require__(11); var errorObject_1 = __webpack_require__(10); -var AsyncSubject_1 = __webpack_require__(42); +var AsyncSubject_1 = __webpack_require__(43); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -49424,28 +49780,28 @@ function dispatchError(arg) { //# sourceMappingURL=BoundCallbackObservable.js.map /***/ }), -/* 444 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var bindNodeCallback_1 = __webpack_require__(445); +var bindNodeCallback_1 = __webpack_require__(446); Observable_1.Observable.bindNodeCallback = bindNodeCallback_1.bindNodeCallback; //# sourceMappingURL=bindNodeCallback.js.map /***/ }), -/* 445 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var BoundNodeCallbackObservable_1 = __webpack_require__(446); +var BoundNodeCallbackObservable_1 = __webpack_require__(447); exports.bindNodeCallback = BoundNodeCallbackObservable_1.BoundNodeCallbackObservable.create; //# sourceMappingURL=bindNodeCallback.js.map /***/ }), -/* 446 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49458,7 +49814,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Observable_1 = __webpack_require__(0); var tryCatch_1 = __webpack_require__(11); var errorObject_1 = __webpack_require__(10); -var AsyncSubject_1 = __webpack_require__(42); +var AsyncSubject_1 = __webpack_require__(43); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -49714,26 +50070,26 @@ function dispatchError(arg) { //# sourceMappingURL=BoundNodeCallbackObservable.js.map /***/ }), -/* 447 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var combineLatest_1 = __webpack_require__(448); +var combineLatest_1 = __webpack_require__(449); Observable_1.Observable.combineLatest = combineLatest_1.combineLatest; //# sourceMappingURL=combineLatest.js.map /***/ }), -/* 448 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var isScheduler_1 = __webpack_require__(15); var isArray_1 = __webpack_require__(16); -var ArrayObservable_1 = __webpack_require__(17); -var combineLatest_1 = __webpack_require__(43); +var ArrayObservable_1 = __webpack_require__(18); +var combineLatest_1 = __webpack_require__(44); /* tslint:enable:max-line-length */ /** * Combines multiple Observables to create an Observable whose values are @@ -49867,7 +50223,7 @@ exports.combineLatest = combineLatest; //# sourceMappingURL=combineLatest.js.map /***/ }), -/* 449 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49909,18 +50265,18 @@ exports.InnerSubscriber = InnerSubscriber; //# sourceMappingURL=InnerSubscriber.js.map /***/ }), -/* 450 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var concat_1 = __webpack_require__(27); +var concat_1 = __webpack_require__(28); Observable_1.Observable.concat = concat_1.concat; //# sourceMappingURL=concat.js.map /***/ }), -/* 451 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49932,7 +50288,7 @@ var __extends = (this && this.__extends) || function (d, b) { }; var root_1 = __webpack_require__(12); var Observable_1 = __webpack_require__(0); -var iterator_1 = __webpack_require__(26); +var iterator_1 = __webpack_require__(27); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -50089,7 +50445,7 @@ function sign(value) { //# sourceMappingURL=IteratorObservable.js.map /***/ }), -/* 452 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50100,8 +50456,8 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var ScalarObservable_1 = __webpack_require__(62); -var EmptyObservable_1 = __webpack_require__(18); +var ScalarObservable_1 = __webpack_require__(63); +var EmptyObservable_1 = __webpack_require__(19); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -50165,28 +50521,28 @@ exports.ArrayLikeObservable = ArrayLikeObservable; //# sourceMappingURL=ArrayLikeObservable.js.map /***/ }), -/* 453 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var defer_1 = __webpack_require__(454); +var defer_1 = __webpack_require__(455); Observable_1.Observable.defer = defer_1.defer; //# sourceMappingURL=defer.js.map /***/ }), -/* 454 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var DeferObservable_1 = __webpack_require__(455); +var DeferObservable_1 = __webpack_require__(456); exports.defer = DeferObservable_1.DeferObservable.create; //# sourceMappingURL=defer.js.map /***/ }), -/* 455 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50291,49 +50647,49 @@ var DeferSubscriber = (function (_super) { //# sourceMappingURL=DeferObservable.js.map /***/ }), -/* 456 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var empty_1 = __webpack_require__(457); +var empty_1 = __webpack_require__(458); Observable_1.Observable.empty = empty_1.empty; //# sourceMappingURL=empty.js.map /***/ }), -/* 457 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var EmptyObservable_1 = __webpack_require__(18); +var EmptyObservable_1 = __webpack_require__(19); exports.empty = EmptyObservable_1.EmptyObservable.create; //# sourceMappingURL=empty.js.map /***/ }), -/* 458 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var forkJoin_1 = __webpack_require__(459); +var forkJoin_1 = __webpack_require__(460); Observable_1.Observable.forkJoin = forkJoin_1.forkJoin; //# sourceMappingURL=forkJoin.js.map /***/ }), -/* 459 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ForkJoinObservable_1 = __webpack_require__(460); +var ForkJoinObservable_1 = __webpack_require__(461); exports.forkJoin = ForkJoinObservable_1.ForkJoinObservable.create; //# sourceMappingURL=forkJoin.js.map /***/ }), -/* 460 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50344,7 +50700,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var EmptyObservable_1 = __webpack_require__(18); +var EmptyObservable_1 = __webpack_require__(19); var isArray_1 = __webpack_require__(16); var subscribeToResult_1 = __webpack_require__(5); var OuterSubscriber_1 = __webpack_require__(4); @@ -50541,39 +50897,39 @@ var ForkJoinSubscriber = (function (_super) { //# sourceMappingURL=ForkJoinObservable.js.map /***/ }), -/* 461 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var from_1 = __webpack_require__(226); +var from_1 = __webpack_require__(227); Observable_1.Observable.from = from_1.from; //# sourceMappingURL=from.js.map /***/ }), -/* 462 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var fromEvent_1 = __webpack_require__(463); +var fromEvent_1 = __webpack_require__(464); Observable_1.Observable.fromEvent = fromEvent_1.fromEvent; //# sourceMappingURL=fromEvent.js.map /***/ }), -/* 463 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var FromEventObservable_1 = __webpack_require__(464); +var FromEventObservable_1 = __webpack_require__(465); exports.fromEvent = FromEventObservable_1.FromEventObservable.create; //# sourceMappingURL=fromEvent.js.map /***/ }), -/* 464 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50585,7 +50941,7 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Observable_1 = __webpack_require__(0); var tryCatch_1 = __webpack_require__(11); -var isFunction_1 = __webpack_require__(38); +var isFunction_1 = __webpack_require__(39); var errorObject_1 = __webpack_require__(10); var Subscription_1 = __webpack_require__(8); var toString = Object.prototype.toString; @@ -50795,28 +51151,28 @@ exports.FromEventObservable = FromEventObservable; //# sourceMappingURL=FromEventObservable.js.map /***/ }), -/* 465 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var fromEventPattern_1 = __webpack_require__(466); +var fromEventPattern_1 = __webpack_require__(467); Observable_1.Observable.fromEventPattern = fromEventPattern_1.fromEventPattern; //# sourceMappingURL=fromEventPattern.js.map /***/ }), -/* 466 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var FromEventPatternObservable_1 = __webpack_require__(467); +var FromEventPatternObservable_1 = __webpack_require__(468); exports.fromEventPattern = FromEventPatternObservable_1.FromEventPatternObservable.create; //# sourceMappingURL=fromEventPattern.js.map /***/ }), -/* 467 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50826,7 +51182,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var isFunction_1 = __webpack_require__(38); +var isFunction_1 = __webpack_require__(39); var Observable_1 = __webpack_require__(0); var Subscription_1 = __webpack_require__(8); /** @@ -50935,49 +51291,49 @@ exports.FromEventPatternObservable = FromEventPatternObservable; //# sourceMappingURL=FromEventPatternObservable.js.map /***/ }), -/* 468 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var fromPromise_1 = __webpack_require__(469); +var fromPromise_1 = __webpack_require__(470); Observable_1.Observable.fromPromise = fromPromise_1.fromPromise; //# sourceMappingURL=fromPromise.js.map /***/ }), -/* 469 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var PromiseObservable_1 = __webpack_require__(228); +var PromiseObservable_1 = __webpack_require__(229); exports.fromPromise = PromiseObservable_1.PromiseObservable.create; //# sourceMappingURL=fromPromise.js.map /***/ }), -/* 470 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var generate_1 = __webpack_require__(471); +var generate_1 = __webpack_require__(472); Observable_1.Observable.generate = generate_1.generate; //# sourceMappingURL=generate.js.map /***/ }), -/* 471 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var GenerateObservable_1 = __webpack_require__(472); +var GenerateObservable_1 = __webpack_require__(473); exports.generate = GenerateObservable_1.GenerateObservable.create; //# sourceMappingURL=generate.js.map /***/ }), -/* 472 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51118,28 +51474,28 @@ exports.GenerateObservable = GenerateObservable; //# sourceMappingURL=GenerateObservable.js.map /***/ }), -/* 473 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var if_1 = __webpack_require__(474); +var if_1 = __webpack_require__(475); Observable_1.Observable.if = if_1._if; //# sourceMappingURL=if.js.map /***/ }), -/* 474 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var IfObservable_1 = __webpack_require__(475); +var IfObservable_1 = __webpack_require__(476); exports._if = IfObservable_1.IfObservable.create; //# sourceMappingURL=if.js.map /***/ }), -/* 475 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51206,28 +51562,28 @@ var IfSubscriber = (function (_super) { //# sourceMappingURL=IfObservable.js.map /***/ }), -/* 476 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var interval_1 = __webpack_require__(477); +var interval_1 = __webpack_require__(478); Observable_1.Observable.interval = interval_1.interval; //# sourceMappingURL=interval.js.map /***/ }), -/* 477 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var IntervalObservable_1 = __webpack_require__(478); +var IntervalObservable_1 = __webpack_require__(479); exports.interval = IntervalObservable_1.IntervalObservable.create; //# sourceMappingURL=interval.js.map /***/ }), -/* 478 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51237,7 +51593,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var isNumeric_1 = __webpack_require__(30); +var isNumeric_1 = __webpack_require__(31); var Observable_1 = __webpack_require__(0); var async_1 = __webpack_require__(6); /** @@ -51321,7 +51677,7 @@ exports.IntervalObservable = IntervalObservable; //# sourceMappingURL=IntervalObservable.js.map /***/ }), -/* 479 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51371,7 +51727,7 @@ exports.Action = Action; //# sourceMappingURL=Action.js.map /***/ }), -/* 480 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51426,50 +51782,50 @@ exports.Scheduler = Scheduler; //# sourceMappingURL=Scheduler.js.map /***/ }), -/* 481 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var merge_1 = __webpack_require__(46); +var merge_1 = __webpack_require__(47); Observable_1.Observable.merge = merge_1.merge; //# sourceMappingURL=merge.js.map /***/ }), -/* 482 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var race_1 = __webpack_require__(64); +var race_1 = __webpack_require__(65); Observable_1.Observable.race = race_1.race; //# sourceMappingURL=race.js.map /***/ }), -/* 483 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var never_1 = __webpack_require__(484); +var never_1 = __webpack_require__(485); Observable_1.Observable.never = never_1.never; //# sourceMappingURL=never.js.map /***/ }), -/* 484 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var NeverObservable_1 = __webpack_require__(485); +var NeverObservable_1 = __webpack_require__(486); exports.never = NeverObservable_1.NeverObservable.create; //# sourceMappingURL=never.js.map /***/ }), -/* 485 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51480,7 +51836,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var noop_1 = __webpack_require__(61); +var noop_1 = __webpack_require__(62); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -51534,60 +51890,60 @@ exports.NeverObservable = NeverObservable; //# sourceMappingURL=NeverObservable.js.map /***/ }), -/* 486 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var of_1 = __webpack_require__(225); +var of_1 = __webpack_require__(226); Observable_1.Observable.of = of_1.of; //# sourceMappingURL=of.js.map /***/ }), -/* 487 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var onErrorResumeNext_1 = __webpack_require__(488); +var onErrorResumeNext_1 = __webpack_require__(489); Observable_1.Observable.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext; //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), -/* 488 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var onErrorResumeNext_1 = __webpack_require__(65); +var onErrorResumeNext_1 = __webpack_require__(66); exports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNextStatic; //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), -/* 489 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var pairs_1 = __webpack_require__(490); +var pairs_1 = __webpack_require__(491); Observable_1.Observable.pairs = pairs_1.pairs; //# sourceMappingURL=pairs.js.map /***/ }), -/* 490 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var PairsObservable_1 = __webpack_require__(491); +var PairsObservable_1 = __webpack_require__(492); exports.pairs = PairsObservable_1.PairsObservable.create; //# sourceMappingURL=pairs.js.map /***/ }), -/* 491 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51678,28 +52034,28 @@ exports.PairsObservable = PairsObservable; //# sourceMappingURL=PairsObservable.js.map /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var range_1 = __webpack_require__(493); +var range_1 = __webpack_require__(494); Observable_1.Observable.range = range_1.range; //# sourceMappingURL=range.js.map /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var RangeObservable_1 = __webpack_require__(494); +var RangeObservable_1 = __webpack_require__(495); exports.range = RangeObservable_1.RangeObservable.create; //# sourceMappingURL=range.js.map /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51801,28 +52157,28 @@ exports.RangeObservable = RangeObservable; //# sourceMappingURL=RangeObservable.js.map /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var using_1 = __webpack_require__(496); +var using_1 = __webpack_require__(497); Observable_1.Observable.using = using_1.using; //# sourceMappingURL=using.js.map /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var UsingObservable_1 = __webpack_require__(497); +var UsingObservable_1 = __webpack_require__(498); exports.using = UsingObservable_1.UsingObservable.create; //# sourceMappingURL=using.js.map /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51889,28 +52245,28 @@ var UsingSubscriber = (function (_super) { //# sourceMappingURL=UsingObservable.js.map /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var throw_1 = __webpack_require__(499); +var throw_1 = __webpack_require__(500); Observable_1.Observable.throw = throw_1._throw; //# sourceMappingURL=throw.js.map /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ErrorObservable_1 = __webpack_require__(500); +var ErrorObservable_1 = __webpack_require__(501); exports._throw = ErrorObservable_1.ErrorObservable.create; //# sourceMappingURL=throw.js.map /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51999,18 +52355,18 @@ exports.ErrorObservable = ErrorObservable; //# sourceMappingURL=ErrorObservable.js.map /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var timer_1 = __webpack_require__(230); +var timer_1 = __webpack_require__(231); Observable_1.Observable.timer = timer_1.timer; //# sourceMappingURL=timer.js.map /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52020,11 +52376,11 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var isNumeric_1 = __webpack_require__(30); +var isNumeric_1 = __webpack_require__(31); var Observable_1 = __webpack_require__(0); var async_1 = __webpack_require__(6); var isScheduler_1 = __webpack_require__(15); -var isDate_1 = __webpack_require__(47); +var isDate_1 = __webpack_require__(48); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -52123,70 +52479,70 @@ exports.TimerObservable = TimerObservable; //# sourceMappingURL=TimerObservable.js.map /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var zip_1 = __webpack_require__(504); +var zip_1 = __webpack_require__(505); Observable_1.Observable.zip = zip_1.zip; //# sourceMappingURL=zip.js.map /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var zip_1 = __webpack_require__(48); +var zip_1 = __webpack_require__(49); exports.zip = zip_1.zipStatic; //# sourceMappingURL=zip.js.map /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var ajax_1 = __webpack_require__(506); +var ajax_1 = __webpack_require__(507); Observable_1.Observable.ajax = ajax_1.ajax; //# sourceMappingURL=ajax.js.map /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var AjaxObservable_1 = __webpack_require__(231); +var AjaxObservable_1 = __webpack_require__(232); exports.ajax = AjaxObservable_1.AjaxObservable.create; //# sourceMappingURL=ajax.js.map /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var webSocket_1 = __webpack_require__(508); +var webSocket_1 = __webpack_require__(509); Observable_1.Observable.webSocket = webSocket_1.webSocket; //# sourceMappingURL=webSocket.js.map /***/ }), -/* 508 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var WebSocketSubject_1 = __webpack_require__(509); +var WebSocketSubject_1 = __webpack_require__(510); exports.webSocket = WebSocketSubject_1.WebSocketSubject.create; //# sourceMappingURL=webSocket.js.map /***/ }), -/* 509 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52201,10 +52557,10 @@ var Subscriber_1 = __webpack_require__(2); var Observable_1 = __webpack_require__(0); var Subscription_1 = __webpack_require__(8); var root_1 = __webpack_require__(12); -var ReplaySubject_1 = __webpack_require__(49); +var ReplaySubject_1 = __webpack_require__(50); var tryCatch_1 = __webpack_require__(11); var errorObject_1 = __webpack_require__(10); -var assign_1 = __webpack_require__(512); +var assign_1 = __webpack_require__(513); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -52442,7 +52798,7 @@ exports.WebSocketSubject = WebSocketSubject; //# sourceMappingURL=WebSocketSubject.js.map /***/ }), -/* 510 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52452,7 +52808,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var AsyncAction_1 = __webpack_require__(31); +var AsyncAction_1 = __webpack_require__(32); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -52497,7 +52853,7 @@ exports.QueueAction = QueueAction; //# sourceMappingURL=QueueAction.js.map /***/ }), -/* 511 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52507,7 +52863,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var AsyncScheduler_1 = __webpack_require__(32); +var AsyncScheduler_1 = __webpack_require__(33); var QueueScheduler = (function (_super) { __extends(QueueScheduler, _super); function QueueScheduler() { @@ -52519,7 +52875,7 @@ exports.QueueScheduler = QueueScheduler; //# sourceMappingURL=QueueScheduler.js.map /***/ }), -/* 512 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52551,23 +52907,23 @@ exports.assign = getAssign(root_1.root); //# sourceMappingURL=assign.js.map /***/ }), -/* 513 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var buffer_1 = __webpack_require__(514); +var buffer_1 = __webpack_require__(515); Observable_1.Observable.prototype.buffer = buffer_1.buffer; //# sourceMappingURL=buffer.js.map /***/ }), -/* 514 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var buffer_1 = __webpack_require__(233); +var buffer_1 = __webpack_require__(234); /** * Buffers the source Observable values until `closingNotifier` emits. * @@ -52607,23 +52963,23 @@ exports.buffer = buffer; //# sourceMappingURL=buffer.js.map /***/ }), -/* 515 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var bufferCount_1 = __webpack_require__(516); +var bufferCount_1 = __webpack_require__(517); Observable_1.Observable.prototype.bufferCount = bufferCount_1.bufferCount; //# sourceMappingURL=bufferCount.js.map /***/ }), -/* 516 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var bufferCount_1 = __webpack_require__(234); +var bufferCount_1 = __webpack_require__(235); /** * Buffers the source Observable values until the size hits the maximum * `bufferSize` given. @@ -52673,25 +53029,25 @@ exports.bufferCount = bufferCount; //# sourceMappingURL=bufferCount.js.map /***/ }), -/* 517 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var bufferTime_1 = __webpack_require__(518); +var bufferTime_1 = __webpack_require__(519); Observable_1.Observable.prototype.bufferTime = bufferTime_1.bufferTime; //# sourceMappingURL=bufferTime.js.map /***/ }), -/* 518 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); var isScheduler_1 = __webpack_require__(15); -var bufferTime_1 = __webpack_require__(235); +var bufferTime_1 = __webpack_require__(236); /* tslint:enable:max-line-length */ /** * Buffers the source Observable values for a specific time period. @@ -52757,23 +53113,23 @@ exports.bufferTime = bufferTime; //# sourceMappingURL=bufferTime.js.map /***/ }), -/* 519 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var bufferToggle_1 = __webpack_require__(520); +var bufferToggle_1 = __webpack_require__(521); Observable_1.Observable.prototype.bufferToggle = bufferToggle_1.bufferToggle; //# sourceMappingURL=bufferToggle.js.map /***/ }), -/* 520 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var bufferToggle_1 = __webpack_require__(236); +var bufferToggle_1 = __webpack_require__(237); /** * Buffers the source Observable values starting from an emission from * `openings` and ending when the output of `closingSelector` emits. @@ -52819,23 +53175,23 @@ exports.bufferToggle = bufferToggle; //# sourceMappingURL=bufferToggle.js.map /***/ }), -/* 521 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var bufferWhen_1 = __webpack_require__(522); +var bufferWhen_1 = __webpack_require__(523); Observable_1.Observable.prototype.bufferWhen = bufferWhen_1.bufferWhen; //# sourceMappingURL=bufferWhen.js.map /***/ }), -/* 522 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var bufferWhen_1 = __webpack_require__(237); +var bufferWhen_1 = __webpack_require__(238); /** * Buffers the source Observable values, using a factory function of closing * Observables to determine when to close, emit, and reset the buffer. @@ -52876,24 +53232,24 @@ exports.bufferWhen = bufferWhen; //# sourceMappingURL=bufferWhen.js.map /***/ }), -/* 523 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var catch_1 = __webpack_require__(524); +var catch_1 = __webpack_require__(525); Observable_1.Observable.prototype.catch = catch_1._catch; Observable_1.Observable.prototype._catch = catch_1._catch; //# sourceMappingURL=catch.js.map /***/ }), -/* 524 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var catchError_1 = __webpack_require__(238); +var catchError_1 = __webpack_require__(239); /** * Catches errors on the observable to be handled by returning a new observable or throwing an error. * @@ -52960,23 +53316,23 @@ exports._catch = _catch; //# sourceMappingURL=catch.js.map /***/ }), -/* 525 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var combineAll_1 = __webpack_require__(526); +var combineAll_1 = __webpack_require__(527); Observable_1.Observable.prototype.combineAll = combineAll_1.combineAll; //# sourceMappingURL=combineAll.js.map /***/ }), -/* 526 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var combineAll_1 = __webpack_require__(239); +var combineAll_1 = __webpack_require__(240); /** * Converts a higher-order Observable into a first-order Observable by waiting * for the outer Observable to complete, then applying {@link combineLatest}. @@ -53024,23 +53380,23 @@ exports.combineAll = combineAll; //# sourceMappingURL=combineAll.js.map /***/ }), -/* 527 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var combineLatest_1 = __webpack_require__(528); +var combineLatest_1 = __webpack_require__(529); Observable_1.Observable.prototype.combineLatest = combineLatest_1.combineLatest; //# sourceMappingURL=combineLatest.js.map /***/ }), -/* 528 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var combineLatest_1 = __webpack_require__(43); +var combineLatest_1 = __webpack_require__(44); /* tslint:enable:max-line-length */ /** * Combines multiple Observables to create an Observable whose values are @@ -53096,24 +53452,24 @@ exports.combineLatest = combineLatest; //# sourceMappingURL=combineLatest.js.map /***/ }), -/* 529 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var concat_1 = __webpack_require__(530); +var concat_1 = __webpack_require__(531); Observable_1.Observable.prototype.concat = concat_1.concat; //# sourceMappingURL=concat.js.map /***/ }), -/* 530 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var concat_1 = __webpack_require__(240); -var concat_2 = __webpack_require__(27); +var concat_1 = __webpack_require__(241); +var concat_2 = __webpack_require__(28); exports.concatStatic = concat_2.concat; /* tslint:enable:max-line-length */ /** @@ -53176,23 +53532,23 @@ exports.concat = concat; //# sourceMappingURL=concat.js.map /***/ }), -/* 531 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var concatAll_1 = __webpack_require__(532); +var concatAll_1 = __webpack_require__(533); Observable_1.Observable.prototype.concatAll = concatAll_1.concatAll; //# sourceMappingURL=concatAll.js.map /***/ }), -/* 532 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var concatAll_1 = __webpack_require__(63); +var concatAll_1 = __webpack_require__(64); /* tslint:enable:max-line-length */ /** * Converts a higher-order Observable into a first-order Observable by @@ -53249,23 +53605,23 @@ exports.concatAll = concatAll; //# sourceMappingURL=concatAll.js.map /***/ }), -/* 533 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var concatMap_1 = __webpack_require__(534); +var concatMap_1 = __webpack_require__(535); Observable_1.Observable.prototype.concatMap = concatMap_1.concatMap; //# sourceMappingURL=concatMap.js.map /***/ }), -/* 534 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var concatMap_1 = __webpack_require__(66); +var concatMap_1 = __webpack_require__(67); /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output @@ -53333,23 +53689,23 @@ exports.concatMap = concatMap; //# sourceMappingURL=concatMap.js.map /***/ }), -/* 535 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var concatMapTo_1 = __webpack_require__(536); +var concatMapTo_1 = __webpack_require__(537); Observable_1.Observable.prototype.concatMapTo = concatMapTo_1.concatMapTo; //# sourceMappingURL=concatMapTo.js.map /***/ }), -/* 536 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var concatMapTo_1 = __webpack_require__(241); +var concatMapTo_1 = __webpack_require__(242); /* tslint:enable:max-line-length */ /** * Projects each source value to the same Observable which is merged multiple @@ -53414,23 +53770,23 @@ exports.concatMapTo = concatMapTo; //# sourceMappingURL=concatMapTo.js.map /***/ }), -/* 537 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var count_1 = __webpack_require__(538); +var count_1 = __webpack_require__(539); Observable_1.Observable.prototype.count = count_1.count; //# sourceMappingURL=count.js.map /***/ }), -/* 538 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var count_1 = __webpack_require__(242); +var count_1 = __webpack_require__(243); /** * Counts the number of emissions on the source and emits that number when the * source completes. @@ -53486,23 +53842,23 @@ exports.count = count; //# sourceMappingURL=count.js.map /***/ }), -/* 539 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var dematerialize_1 = __webpack_require__(540); +var dematerialize_1 = __webpack_require__(541); Observable_1.Observable.prototype.dematerialize = dematerialize_1.dematerialize; //# sourceMappingURL=dematerialize.js.map /***/ }), -/* 540 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var dematerialize_1 = __webpack_require__(243); +var dematerialize_1 = __webpack_require__(244); /** * Converts an Observable of {@link Notification} objects into the emissions * that they represent. @@ -53550,23 +53906,23 @@ exports.dematerialize = dematerialize; //# sourceMappingURL=dematerialize.js.map /***/ }), -/* 541 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var debounce_1 = __webpack_require__(542); +var debounce_1 = __webpack_require__(543); Observable_1.Observable.prototype.debounce = debounce_1.debounce; //# sourceMappingURL=debounce.js.map /***/ }), -/* 542 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var debounce_1 = __webpack_require__(244); +var debounce_1 = __webpack_require__(245); /** * Emits a value from the source Observable only after a particular time span * determined by another Observable has passed without another source emission. @@ -53616,24 +53972,24 @@ exports.debounce = debounce; //# sourceMappingURL=debounce.js.map /***/ }), -/* 543 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var debounceTime_1 = __webpack_require__(544); +var debounceTime_1 = __webpack_require__(545); Observable_1.Observable.prototype.debounceTime = debounceTime_1.debounceTime; //# sourceMappingURL=debounceTime.js.map /***/ }), -/* 544 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var debounceTime_1 = __webpack_require__(245); +var debounceTime_1 = __webpack_require__(246); /** * Emits a value from the source Observable only after a particular time span * has passed without another source emission. @@ -53688,23 +54044,23 @@ exports.debounceTime = debounceTime; //# sourceMappingURL=debounceTime.js.map /***/ }), -/* 545 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var defaultIfEmpty_1 = __webpack_require__(546); +var defaultIfEmpty_1 = __webpack_require__(547); Observable_1.Observable.prototype.defaultIfEmpty = defaultIfEmpty_1.defaultIfEmpty; //# sourceMappingURL=defaultIfEmpty.js.map /***/ }), -/* 546 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var defaultIfEmpty_1 = __webpack_require__(67); +var defaultIfEmpty_1 = __webpack_require__(68); /* tslint:enable:max-line-length */ /** * Emits a given value if the source Observable completes without emitting any @@ -53744,24 +54100,24 @@ exports.defaultIfEmpty = defaultIfEmpty; //# sourceMappingURL=defaultIfEmpty.js.map /***/ }), -/* 547 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var delay_1 = __webpack_require__(548); +var delay_1 = __webpack_require__(549); Observable_1.Observable.prototype.delay = delay_1.delay; //# sourceMappingURL=delay.js.map /***/ }), -/* 548 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var delay_1 = __webpack_require__(246); +var delay_1 = __webpack_require__(247); /** * Delays the emission of items from the source Observable by a given timeout or * until a given Date. @@ -53809,23 +54165,23 @@ exports.delay = delay; //# sourceMappingURL=delay.js.map /***/ }), -/* 549 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var delayWhen_1 = __webpack_require__(550); +var delayWhen_1 = __webpack_require__(551); Observable_1.Observable.prototype.delayWhen = delayWhen_1.delayWhen; //# sourceMappingURL=delayWhen.js.map /***/ }), -/* 550 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var delayWhen_1 = __webpack_require__(247); +var delayWhen_1 = __webpack_require__(248); /** * Delays the emission of items from the source Observable by a given time span * determined by the emissions of another Observable. @@ -53878,23 +54234,23 @@ exports.delayWhen = delayWhen; //# sourceMappingURL=delayWhen.js.map /***/ }), -/* 551 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var distinct_1 = __webpack_require__(552); +var distinct_1 = __webpack_require__(553); Observable_1.Observable.prototype.distinct = distinct_1.distinct; //# sourceMappingURL=distinct.js.map /***/ }), -/* 552 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var distinct_1 = __webpack_require__(248); +var distinct_1 = __webpack_require__(249); /** * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. * @@ -53947,7 +54303,7 @@ exports.distinct = distinct; //# sourceMappingURL=distinct.js.map /***/ }), -/* 553 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53986,23 +54342,23 @@ exports.Set = root_1.root.Set || minimalSetImpl(); //# sourceMappingURL=Set.js.map /***/ }), -/* 554 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var distinctUntilChanged_1 = __webpack_require__(555); +var distinctUntilChanged_1 = __webpack_require__(556); Observable_1.Observable.prototype.distinctUntilChanged = distinctUntilChanged_1.distinctUntilChanged; //# sourceMappingURL=distinctUntilChanged.js.map /***/ }), -/* 555 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var distinctUntilChanged_1 = __webpack_require__(68); +var distinctUntilChanged_1 = __webpack_require__(69); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item. @@ -54050,23 +54406,23 @@ exports.distinctUntilChanged = distinctUntilChanged; //# sourceMappingURL=distinctUntilChanged.js.map /***/ }), -/* 556 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var distinctUntilKeyChanged_1 = __webpack_require__(557); +var distinctUntilKeyChanged_1 = __webpack_require__(558); Observable_1.Observable.prototype.distinctUntilKeyChanged = distinctUntilKeyChanged_1.distinctUntilKeyChanged; //# sourceMappingURL=distinctUntilKeyChanged.js.map /***/ }), -/* 557 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var distinctUntilKeyChanged_1 = __webpack_require__(249); +var distinctUntilKeyChanged_1 = __webpack_require__(250); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item, @@ -54132,24 +54488,24 @@ exports.distinctUntilKeyChanged = distinctUntilKeyChanged; //# sourceMappingURL=distinctUntilKeyChanged.js.map /***/ }), -/* 558 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var do_1 = __webpack_require__(559); +var do_1 = __webpack_require__(560); Observable_1.Observable.prototype.do = do_1._do; Observable_1.Observable.prototype._do = do_1._do; //# sourceMappingURL=do.js.map /***/ }), -/* 559 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var tap_1 = __webpack_require__(250); +var tap_1 = __webpack_require__(251); /* tslint:enable:max-line-length */ /** * Perform a side effect for every emission on the source Observable, but return @@ -54201,23 +54557,23 @@ exports._do = _do; //# sourceMappingURL=do.js.map /***/ }), -/* 560 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var exhaust_1 = __webpack_require__(561); +var exhaust_1 = __webpack_require__(562); Observable_1.Observable.prototype.exhaust = exhaust_1.exhaust; //# sourceMappingURL=exhaust.js.map /***/ }), -/* 561 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var exhaust_1 = __webpack_require__(251); +var exhaust_1 = __webpack_require__(252); /** * Converts a higher-order Observable into a first-order Observable by dropping * inner Observables while the previous inner Observable has not yet completed. @@ -54260,23 +54616,23 @@ exports.exhaust = exhaust; //# sourceMappingURL=exhaust.js.map /***/ }), -/* 562 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var exhaustMap_1 = __webpack_require__(563); +var exhaustMap_1 = __webpack_require__(564); Observable_1.Observable.prototype.exhaustMap = exhaustMap_1.exhaustMap; //# sourceMappingURL=exhaustMap.js.map /***/ }), -/* 563 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var exhaustMap_1 = __webpack_require__(252); +var exhaustMap_1 = __webpack_require__(253); /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output @@ -54330,23 +54686,23 @@ exports.exhaustMap = exhaustMap; //# sourceMappingURL=exhaustMap.js.map /***/ }), -/* 564 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var expand_1 = __webpack_require__(565); +var expand_1 = __webpack_require__(566); Observable_1.Observable.prototype.expand = expand_1.expand; //# sourceMappingURL=expand.js.map /***/ }), -/* 565 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var expand_1 = __webpack_require__(253); +var expand_1 = __webpack_require__(254); /* tslint:enable:max-line-length */ /** * Recursively projects each source value to an Observable which is merged in @@ -54403,23 +54759,23 @@ exports.expand = expand; //# sourceMappingURL=expand.js.map /***/ }), -/* 566 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var elementAt_1 = __webpack_require__(567); +var elementAt_1 = __webpack_require__(568); Observable_1.Observable.prototype.elementAt = elementAt_1.elementAt; //# sourceMappingURL=elementAt.js.map /***/ }), -/* 567 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var elementAt_1 = __webpack_require__(254); +var elementAt_1 = __webpack_require__(255); /** * Emits the single value at the specified `index` in a sequence of emissions * from the source Observable. @@ -54469,23 +54825,23 @@ exports.elementAt = elementAt; //# sourceMappingURL=elementAt.js.map /***/ }), -/* 568 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var filter_1 = __webpack_require__(569); +var filter_1 = __webpack_require__(570); Observable_1.Observable.prototype.filter = filter_1.filter; //# sourceMappingURL=filter.js.map /***/ }), -/* 569 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var filter_1 = __webpack_require__(69); +var filter_1 = __webpack_require__(70); /* tslint:enable:max-line-length */ /** * Filter items emitted by the source Observable by only emitting those that @@ -54533,24 +54889,24 @@ exports.filter = filter; //# sourceMappingURL=filter.js.map /***/ }), -/* 570 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var finally_1 = __webpack_require__(571); +var finally_1 = __webpack_require__(572); Observable_1.Observable.prototype.finally = finally_1._finally; Observable_1.Observable.prototype._finally = finally_1._finally; //# sourceMappingURL=finally.js.map /***/ }), -/* 571 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var finalize_1 = __webpack_require__(255); +var finalize_1 = __webpack_require__(256); /** * Returns an Observable that mirrors the source Observable, but will call a specified function when * the source terminates on complete or error. @@ -54566,23 +54922,23 @@ exports._finally = _finally; //# sourceMappingURL=finally.js.map /***/ }), -/* 572 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var find_1 = __webpack_require__(573); +var find_1 = __webpack_require__(574); Observable_1.Observable.prototype.find = find_1.find; //# sourceMappingURL=find.js.map /***/ }), -/* 573 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var find_1 = __webpack_require__(70); +var find_1 = __webpack_require__(71); /* tslint:enable:max-line-length */ /** * Emits only the first value emitted by the source Observable that meets some @@ -54624,23 +54980,23 @@ exports.find = find; //# sourceMappingURL=find.js.map /***/ }), -/* 574 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var findIndex_1 = __webpack_require__(575); +var findIndex_1 = __webpack_require__(576); Observable_1.Observable.prototype.findIndex = findIndex_1.findIndex; //# sourceMappingURL=findIndex.js.map /***/ }), -/* 575 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var findIndex_1 = __webpack_require__(256); +var findIndex_1 = __webpack_require__(257); /** * Emits only the index of the first value emitted by the source Observable that * meets some condition. @@ -54682,23 +55038,23 @@ exports.findIndex = findIndex; //# sourceMappingURL=findIndex.js.map /***/ }), -/* 576 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var first_1 = __webpack_require__(577); +var first_1 = __webpack_require__(578); Observable_1.Observable.prototype.first = first_1.first; //# sourceMappingURL=first.js.map /***/ }), -/* 577 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var first_1 = __webpack_require__(257); +var first_1 = __webpack_require__(258); /** * Emits only the first value (or the first value that meets some condition) * emitted by the source Observable. @@ -54755,23 +55111,23 @@ exports.first = first; //# sourceMappingURL=first.js.map /***/ }), -/* 578 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var groupBy_1 = __webpack_require__(579); +var groupBy_1 = __webpack_require__(580); Observable_1.Observable.prototype.groupBy = groupBy_1.groupBy; //# sourceMappingURL=groupBy.js.map /***/ }), -/* 579 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var groupBy_1 = __webpack_require__(258); +var groupBy_1 = __webpack_require__(259); exports.GroupedObservable = groupBy_1.GroupedObservable; /* tslint:enable:max-line-length */ /** @@ -54848,18 +55204,18 @@ exports.groupBy = groupBy; //# sourceMappingURL=groupBy.js.map /***/ }), -/* 580 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var root_1 = __webpack_require__(12); -var MapPolyfill_1 = __webpack_require__(581); +var MapPolyfill_1 = __webpack_require__(582); exports.Map = root_1.root.Map || (function () { return MapPolyfill_1.MapPolyfill; })(); //# sourceMappingURL=Map.js.map /***/ }), -/* 581 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54912,7 +55268,7 @@ exports.MapPolyfill = MapPolyfill; //# sourceMappingURL=MapPolyfill.js.map /***/ }), -/* 582 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54949,23 +55305,23 @@ exports.FastMap = FastMap; //# sourceMappingURL=FastMap.js.map /***/ }), -/* 583 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var ignoreElements_1 = __webpack_require__(584); +var ignoreElements_1 = __webpack_require__(585); Observable_1.Observable.prototype.ignoreElements = ignoreElements_1.ignoreElements; //# sourceMappingURL=ignoreElements.js.map /***/ }), -/* 584 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ignoreElements_1 = __webpack_require__(259); +var ignoreElements_1 = __webpack_require__(260); /** * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. * @@ -54984,23 +55340,23 @@ exports.ignoreElements = ignoreElements; //# sourceMappingURL=ignoreElements.js.map /***/ }), -/* 585 */ +/* 586 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var isEmpty_1 = __webpack_require__(586); +var isEmpty_1 = __webpack_require__(587); Observable_1.Observable.prototype.isEmpty = isEmpty_1.isEmpty; //# sourceMappingURL=isEmpty.js.map /***/ }), -/* 586 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isEmpty_1 = __webpack_require__(260); +var isEmpty_1 = __webpack_require__(261); /** * If the source Observable is empty it returns an Observable that emits true, otherwise it emits false. * @@ -55017,23 +55373,23 @@ exports.isEmpty = isEmpty; //# sourceMappingURL=isEmpty.js.map /***/ }), -/* 587 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var audit_1 = __webpack_require__(588); +var audit_1 = __webpack_require__(589); Observable_1.Observable.prototype.audit = audit_1.audit; //# sourceMappingURL=audit.js.map /***/ }), -/* 588 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var audit_1 = __webpack_require__(71); +var audit_1 = __webpack_require__(72); /** * Ignores source values for a duration determined by another Observable, then * emits the most recent value from the source Observable, then repeats this @@ -55081,24 +55437,24 @@ exports.audit = audit; //# sourceMappingURL=audit.js.map /***/ }), -/* 589 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var auditTime_1 = __webpack_require__(590); +var auditTime_1 = __webpack_require__(591); Observable_1.Observable.prototype.auditTime = auditTime_1.auditTime; //# sourceMappingURL=auditTime.js.map /***/ }), -/* 590 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var auditTime_1 = __webpack_require__(261); +var auditTime_1 = __webpack_require__(262); /** * Ignores source values for `duration` milliseconds, then emits the most recent * value from the source Observable, then repeats this process. @@ -55149,23 +55505,23 @@ exports.auditTime = auditTime; //# sourceMappingURL=auditTime.js.map /***/ }), -/* 591 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var last_1 = __webpack_require__(592); +var last_1 = __webpack_require__(593); Observable_1.Observable.prototype.last = last_1.last; //# sourceMappingURL=last.js.map /***/ }), -/* 592 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var last_1 = __webpack_require__(262); +var last_1 = __webpack_require__(263); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits only the last item emitted by the source Observable. @@ -55191,19 +55547,19 @@ exports.last = last; //# sourceMappingURL=last.js.map /***/ }), -/* 593 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var let_1 = __webpack_require__(594); +var let_1 = __webpack_require__(595); Observable_1.Observable.prototype.let = let_1.letProto; Observable_1.Observable.prototype.letBind = let_1.letProto; //# sourceMappingURL=let.js.map /***/ }), -/* 594 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55221,23 +55577,23 @@ exports.letProto = letProto; //# sourceMappingURL=let.js.map /***/ }), -/* 595 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var every_1 = __webpack_require__(596); +var every_1 = __webpack_require__(597); Observable_1.Observable.prototype.every = every_1.every; //# sourceMappingURL=every.js.map /***/ }), -/* 596 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var every_1 = __webpack_require__(263); +var every_1 = __webpack_require__(264); /** * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. * @@ -55259,23 +55615,23 @@ exports.every = every; //# sourceMappingURL=every.js.map /***/ }), -/* 597 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var map_1 = __webpack_require__(598); +var map_1 = __webpack_require__(599); Observable_1.Observable.prototype.map = map_1.map; //# sourceMappingURL=map.js.map /***/ }), -/* 598 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var map_1 = __webpack_require__(33); +var map_1 = __webpack_require__(34); /** * Applies a given `project` function to each value emitted by the source * Observable, and emits the resulting values as an Observable. @@ -55316,23 +55672,23 @@ exports.map = map; //# sourceMappingURL=map.js.map /***/ }), -/* 599 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var mapTo_1 = __webpack_require__(600); +var mapTo_1 = __webpack_require__(601); Observable_1.Observable.prototype.mapTo = mapTo_1.mapTo; //# sourceMappingURL=mapTo.js.map /***/ }), -/* 600 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mapTo_1 = __webpack_require__(264); +var mapTo_1 = __webpack_require__(265); /** * Emits the given constant value on the output Observable every time the source * Observable emits a value. @@ -55366,23 +55722,23 @@ exports.mapTo = mapTo; //# sourceMappingURL=mapTo.js.map /***/ }), -/* 601 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var materialize_1 = __webpack_require__(602); +var materialize_1 = __webpack_require__(603); Observable_1.Observable.prototype.materialize = materialize_1.materialize; //# sourceMappingURL=materialize.js.map /***/ }), -/* 602 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var materialize_1 = __webpack_require__(265); +var materialize_1 = __webpack_require__(266); /** * Represents all of the notifications from the source Observable as `next` * emissions marked with their original types within {@link Notification} @@ -55434,23 +55790,23 @@ exports.materialize = materialize; //# sourceMappingURL=materialize.js.map /***/ }), -/* 603 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var max_1 = __webpack_require__(604); +var max_1 = __webpack_require__(605); Observable_1.Observable.prototype.max = max_1.max; //# sourceMappingURL=max.js.map /***/ }), -/* 604 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var max_1 = __webpack_require__(266); +var max_1 = __webpack_require__(267); /** * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), * and when source Observable completes it emits a single item: the item with the largest value. @@ -55489,24 +55845,24 @@ exports.max = max; //# sourceMappingURL=max.js.map /***/ }), -/* 605 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var merge_1 = __webpack_require__(606); +var merge_1 = __webpack_require__(607); Observable_1.Observable.prototype.merge = merge_1.merge; //# sourceMappingURL=merge.js.map /***/ }), -/* 606 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var merge_1 = __webpack_require__(267); -var merge_2 = __webpack_require__(46); +var merge_1 = __webpack_require__(268); +var merge_2 = __webpack_require__(47); exports.mergeStatic = merge_2.merge; /* tslint:enable:max-line-length */ /** @@ -55566,23 +55922,23 @@ exports.merge = merge; //# sourceMappingURL=merge.js.map /***/ }), -/* 607 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var mergeAll_1 = __webpack_require__(608); +var mergeAll_1 = __webpack_require__(609); Observable_1.Observable.prototype.mergeAll = mergeAll_1.mergeAll; //# sourceMappingURL=mergeAll.js.map /***/ }), -/* 608 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeAll_1 = __webpack_require__(45); +var mergeAll_1 = __webpack_require__(46); /** * Converts a higher-order Observable into a first-order Observable which * concurrently delivers all values that are emitted on the inner Observables. @@ -55635,24 +55991,24 @@ exports.mergeAll = mergeAll; //# sourceMappingURL=mergeAll.js.map /***/ }), -/* 609 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var mergeMap_1 = __webpack_require__(610); +var mergeMap_1 = __webpack_require__(611); Observable_1.Observable.prototype.mergeMap = mergeMap_1.mergeMap; Observable_1.Observable.prototype.flatMap = mergeMap_1.mergeMap; //# sourceMappingURL=mergeMap.js.map /***/ }), -/* 610 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeMap_1 = __webpack_require__(29); +var mergeMap_1 = __webpack_require__(30); /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output @@ -55720,24 +56076,24 @@ exports.mergeMap = mergeMap; //# sourceMappingURL=mergeMap.js.map /***/ }), -/* 611 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var mergeMapTo_1 = __webpack_require__(612); +var mergeMapTo_1 = __webpack_require__(613); Observable_1.Observable.prototype.flatMapTo = mergeMapTo_1.mergeMapTo; Observable_1.Observable.prototype.mergeMapTo = mergeMapTo_1.mergeMapTo; //# sourceMappingURL=mergeMapTo.js.map /***/ }), -/* 612 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeMapTo_1 = __webpack_require__(268); +var mergeMapTo_1 = __webpack_require__(269); /* tslint:enable:max-line-length */ /** * Projects each source value to the same Observable which is merged multiple @@ -55790,23 +56146,23 @@ exports.mergeMapTo = mergeMapTo; //# sourceMappingURL=mergeMapTo.js.map /***/ }), -/* 613 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var mergeScan_1 = __webpack_require__(614); +var mergeScan_1 = __webpack_require__(615); Observable_1.Observable.prototype.mergeScan = mergeScan_1.mergeScan; //# sourceMappingURL=mergeScan.js.map /***/ }), -/* 614 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var mergeScan_1 = __webpack_require__(269); +var mergeScan_1 = __webpack_require__(270); /** * Applies an accumulator function over the source Observable where the * accumulator function itself returns an Observable, then each intermediate @@ -55846,23 +56202,23 @@ exports.mergeScan = mergeScan; //# sourceMappingURL=mergeScan.js.map /***/ }), -/* 615 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var min_1 = __webpack_require__(616); +var min_1 = __webpack_require__(617); Observable_1.Observable.prototype.min = min_1.min; //# sourceMappingURL=min.js.map /***/ }), -/* 616 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var min_1 = __webpack_require__(270); +var min_1 = __webpack_require__(271); /** * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), * and when source Observable completes it emits a single item: the item with the smallest value. @@ -55901,23 +56257,23 @@ exports.min = min; //# sourceMappingURL=min.js.map /***/ }), -/* 617 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var multicast_1 = __webpack_require__(618); +var multicast_1 = __webpack_require__(619); Observable_1.Observable.prototype.multicast = multicast_1.multicast; //# sourceMappingURL=multicast.js.map /***/ }), -/* 618 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var multicast_1 = __webpack_require__(19); +var multicast_1 = __webpack_require__(20); /* tslint:enable:max-line-length */ /** * Allows source Observable to be subscribed only once with a Subject of choice, @@ -56020,23 +56376,23 @@ exports.multicast = multicast; //# sourceMappingURL=multicast.js.map /***/ }), -/* 619 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var observeOn_1 = __webpack_require__(620); +var observeOn_1 = __webpack_require__(621); Observable_1.Observable.prototype.observeOn = observeOn_1.observeOn; //# sourceMappingURL=observeOn.js.map /***/ }), -/* 620 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var observeOn_1 = __webpack_require__(44); +var observeOn_1 = __webpack_require__(45); /** * * Re-emits all notifications from source Observable with specified scheduler. @@ -56091,23 +56447,23 @@ exports.observeOn = observeOn; //# sourceMappingURL=observeOn.js.map /***/ }), -/* 621 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var onErrorResumeNext_1 = __webpack_require__(622); +var onErrorResumeNext_1 = __webpack_require__(623); Observable_1.Observable.prototype.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext; //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), -/* 622 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var onErrorResumeNext_1 = __webpack_require__(65); +var onErrorResumeNext_1 = __webpack_require__(66); /* tslint:enable:max-line-length */ /** * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one @@ -56181,23 +56537,23 @@ exports.onErrorResumeNext = onErrorResumeNext; //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), -/* 623 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var pairwise_1 = __webpack_require__(624); +var pairwise_1 = __webpack_require__(625); Observable_1.Observable.prototype.pairwise = pairwise_1.pairwise; //# sourceMappingURL=pairwise.js.map /***/ }), -/* 624 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var pairwise_1 = __webpack_require__(272); +var pairwise_1 = __webpack_require__(273); /** * Groups pairs of consecutive emissions together and emits them as an array of * two values. @@ -56240,23 +56596,23 @@ exports.pairwise = pairwise; //# sourceMappingURL=pairwise.js.map /***/ }), -/* 625 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var partition_1 = __webpack_require__(626); +var partition_1 = __webpack_require__(627); Observable_1.Observable.prototype.partition = partition_1.partition; //# sourceMappingURL=partition.js.map /***/ }), -/* 626 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var partition_1 = __webpack_require__(273); +var partition_1 = __webpack_require__(274); /** * Splits the source Observable into two, one with values that satisfy a * predicate, and another with values that don't satisfy the predicate. @@ -56305,7 +56661,7 @@ exports.partition = partition; //# sourceMappingURL=partition.js.map /***/ }), -/* 627 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56322,23 +56678,23 @@ exports.not = not; //# sourceMappingURL=not.js.map /***/ }), -/* 628 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var pluck_1 = __webpack_require__(629); +var pluck_1 = __webpack_require__(630); Observable_1.Observable.prototype.pluck = pluck_1.pluck; //# sourceMappingURL=pluck.js.map /***/ }), -/* 629 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var pluck_1 = __webpack_require__(274); +var pluck_1 = __webpack_require__(275); /** * Maps each source value (an object) to its specified nested property. * @@ -56376,23 +56732,23 @@ exports.pluck = pluck; //# sourceMappingURL=pluck.js.map /***/ }), -/* 630 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var publish_1 = __webpack_require__(631); +var publish_1 = __webpack_require__(632); Observable_1.Observable.prototype.publish = publish_1.publish; //# sourceMappingURL=publish.js.map /***/ }), -/* 631 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var publish_1 = __webpack_require__(275); +var publish_1 = __webpack_require__(276); /* tslint:enable:max-line-length */ /** * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called @@ -56414,23 +56770,23 @@ exports.publish = publish; //# sourceMappingURL=publish.js.map /***/ }), -/* 632 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var publishBehavior_1 = __webpack_require__(633); +var publishBehavior_1 = __webpack_require__(634); Observable_1.Observable.prototype.publishBehavior = publishBehavior_1.publishBehavior; //# sourceMappingURL=publishBehavior.js.map /***/ }), -/* 633 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var publishBehavior_1 = __webpack_require__(276); +var publishBehavior_1 = __webpack_require__(277); /** * @param value * @return {ConnectableObservable} @@ -56444,23 +56800,23 @@ exports.publishBehavior = publishBehavior; //# sourceMappingURL=publishBehavior.js.map /***/ }), -/* 634 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var publishReplay_1 = __webpack_require__(635); +var publishReplay_1 = __webpack_require__(636); Observable_1.Observable.prototype.publishReplay = publishReplay_1.publishReplay; //# sourceMappingURL=publishReplay.js.map /***/ }), -/* 635 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var publishReplay_1 = __webpack_require__(278); +var publishReplay_1 = __webpack_require__(279); /* tslint:enable:max-line-length */ /** * @param bufferSize @@ -56478,23 +56834,23 @@ exports.publishReplay = publishReplay; //# sourceMappingURL=publishReplay.js.map /***/ }), -/* 636 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var publishLast_1 = __webpack_require__(637); +var publishLast_1 = __webpack_require__(638); Observable_1.Observable.prototype.publishLast = publishLast_1.publishLast; //# sourceMappingURL=publishLast.js.map /***/ }), -/* 637 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var publishLast_1 = __webpack_require__(279); +var publishLast_1 = __webpack_require__(280); /** * @return {ConnectableObservable} * @method publishLast @@ -56508,25 +56864,25 @@ exports.publishLast = publishLast; //# sourceMappingURL=publishLast.js.map /***/ }), -/* 638 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var race_1 = __webpack_require__(639); +var race_1 = __webpack_require__(640); Observable_1.Observable.prototype.race = race_1.race; //# sourceMappingURL=race.js.map /***/ }), -/* 639 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var race_1 = __webpack_require__(280); +var race_1 = __webpack_require__(281); // NOTE: to support backwards compatability with 5.4.* and lower -var race_2 = __webpack_require__(64); +var race_2 = __webpack_require__(65); exports.raceStatic = race_2.race; /* tslint:enable:max-line-length */ /** @@ -56548,23 +56904,23 @@ exports.race = race; //# sourceMappingURL=race.js.map /***/ }), -/* 640 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var reduce_1 = __webpack_require__(641); +var reduce_1 = __webpack_require__(642); Observable_1.Observable.prototype.reduce = reduce_1.reduce; //# sourceMappingURL=reduce.js.map /***/ }), -/* 641 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reduce_1 = __webpack_require__(35); +var reduce_1 = __webpack_require__(36); /* tslint:enable:max-line-length */ /** * Applies an accumulator function over the source Observable, and returns the @@ -56625,23 +56981,23 @@ exports.reduce = reduce; //# sourceMappingURL=reduce.js.map /***/ }), -/* 642 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var repeat_1 = __webpack_require__(643); +var repeat_1 = __webpack_require__(644); Observable_1.Observable.prototype.repeat = repeat_1.repeat; //# sourceMappingURL=repeat.js.map /***/ }), -/* 643 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var repeat_1 = __webpack_require__(281); +var repeat_1 = __webpack_require__(282); /** * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times. * @@ -56662,23 +57018,23 @@ exports.repeat = repeat; //# sourceMappingURL=repeat.js.map /***/ }), -/* 644 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var repeatWhen_1 = __webpack_require__(645); +var repeatWhen_1 = __webpack_require__(646); Observable_1.Observable.prototype.repeatWhen = repeatWhen_1.repeatWhen; //# sourceMappingURL=repeatWhen.js.map /***/ }), -/* 645 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var repeatWhen_1 = __webpack_require__(282); +var repeatWhen_1 = __webpack_require__(283); /** * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable @@ -56700,23 +57056,23 @@ exports.repeatWhen = repeatWhen; //# sourceMappingURL=repeatWhen.js.map /***/ }), -/* 646 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var retry_1 = __webpack_require__(647); +var retry_1 = __webpack_require__(648); Observable_1.Observable.prototype.retry = retry_1.retry; //# sourceMappingURL=retry.js.map /***/ }), -/* 647 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var retry_1 = __webpack_require__(283); +var retry_1 = __webpack_require__(284); /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable * calls `error`, this method will resubscribe to the source Observable for a maximum of `count` resubscriptions (given @@ -56741,23 +57097,23 @@ exports.retry = retry; //# sourceMappingURL=retry.js.map /***/ }), -/* 648 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var retryWhen_1 = __webpack_require__(649); +var retryWhen_1 = __webpack_require__(650); Observable_1.Observable.prototype.retryWhen = retryWhen_1.retryWhen; //# sourceMappingURL=retryWhen.js.map /***/ }), -/* 649 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var retryWhen_1 = __webpack_require__(284); +var retryWhen_1 = __webpack_require__(285); /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable * calls `error`, this method will emit the Throwable that caused the error to the Observable returned from `notifier`. @@ -56779,23 +57135,23 @@ exports.retryWhen = retryWhen; //# sourceMappingURL=retryWhen.js.map /***/ }), -/* 650 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var sample_1 = __webpack_require__(651); +var sample_1 = __webpack_require__(652); Observable_1.Observable.prototype.sample = sample_1.sample; //# sourceMappingURL=sample.js.map /***/ }), -/* 651 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var sample_1 = __webpack_require__(285); +var sample_1 = __webpack_require__(286); /** * Emits the most recently emitted value from the source Observable whenever * another Observable, the `notifier`, emits. @@ -56837,24 +57193,24 @@ exports.sample = sample; //# sourceMappingURL=sample.js.map /***/ }), -/* 652 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var sampleTime_1 = __webpack_require__(653); +var sampleTime_1 = __webpack_require__(654); Observable_1.Observable.prototype.sampleTime = sampleTime_1.sampleTime; //# sourceMappingURL=sampleTime.js.map /***/ }), -/* 653 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var sampleTime_1 = __webpack_require__(286); +var sampleTime_1 = __webpack_require__(287); /** * Emits the most recently emitted value from the source Observable within * periodic time intervals. @@ -56899,23 +57255,23 @@ exports.sampleTime = sampleTime; //# sourceMappingURL=sampleTime.js.map /***/ }), -/* 654 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var scan_1 = __webpack_require__(655); +var scan_1 = __webpack_require__(656); Observable_1.Observable.prototype.scan = scan_1.scan; //# sourceMappingURL=scan.js.map /***/ }), -/* 655 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var scan_1 = __webpack_require__(72); +var scan_1 = __webpack_require__(73); /* tslint:enable:max-line-length */ /** * Applies an accumulator function over the source Observable, and returns each @@ -56964,23 +57320,23 @@ exports.scan = scan; //# sourceMappingURL=scan.js.map /***/ }), -/* 656 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var sequenceEqual_1 = __webpack_require__(657); +var sequenceEqual_1 = __webpack_require__(658); Observable_1.Observable.prototype.sequenceEqual = sequenceEqual_1.sequenceEqual; //# sourceMappingURL=sequenceEqual.js.map /***/ }), -/* 657 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var sequenceEqual_1 = __webpack_require__(287); +var sequenceEqual_1 = __webpack_require__(288); /** * Compares all values of two observables in sequence using an optional comparor function * and returns an observable of a single boolean value representing whether or not the two sequences @@ -57040,23 +57396,23 @@ exports.sequenceEqual = sequenceEqual; //# sourceMappingURL=sequenceEqual.js.map /***/ }), -/* 658 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var share_1 = __webpack_require__(659); +var share_1 = __webpack_require__(660); Observable_1.Observable.prototype.share = share_1.share; //# sourceMappingURL=share.js.map /***/ }), -/* 659 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var share_1 = __webpack_require__(288); +var share_1 = __webpack_require__(289); /** * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will @@ -57081,23 +57437,23 @@ exports.share = share; //# sourceMappingURL=share.js.map /***/ }), -/* 660 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var shareReplay_1 = __webpack_require__(661); +var shareReplay_1 = __webpack_require__(662); Observable_1.Observable.prototype.shareReplay = shareReplay_1.shareReplay; //# sourceMappingURL=shareReplay.js.map /***/ }), -/* 661 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var shareReplay_1 = __webpack_require__(289); +var shareReplay_1 = __webpack_require__(290); /** * @method shareReplay * @owner Observable @@ -57110,23 +57466,23 @@ exports.shareReplay = shareReplay; //# sourceMappingURL=shareReplay.js.map /***/ }), -/* 662 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var single_1 = __webpack_require__(663); +var single_1 = __webpack_require__(664); Observable_1.Observable.prototype.single = single_1.single; //# sourceMappingURL=single.js.map /***/ }), -/* 663 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var single_1 = __webpack_require__(290); +var single_1 = __webpack_require__(291); /** * Returns an Observable that emits the single item emitted by the source Observable that matches a specified * predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no @@ -57150,23 +57506,23 @@ exports.single = single; //# sourceMappingURL=single.js.map /***/ }), -/* 664 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var skip_1 = __webpack_require__(665); +var skip_1 = __webpack_require__(666); Observable_1.Observable.prototype.skip = skip_1.skip; //# sourceMappingURL=skip.js.map /***/ }), -/* 665 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var skip_1 = __webpack_require__(291); +var skip_1 = __webpack_require__(292); /** * Returns an Observable that skips the first `count` items emitted by the source Observable. * @@ -57185,23 +57541,23 @@ exports.skip = skip; //# sourceMappingURL=skip.js.map /***/ }), -/* 666 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var skipLast_1 = __webpack_require__(667); +var skipLast_1 = __webpack_require__(668); Observable_1.Observable.prototype.skipLast = skipLast_1.skipLast; //# sourceMappingURL=skipLast.js.map /***/ }), -/* 667 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var skipLast_1 = __webpack_require__(292); +var skipLast_1 = __webpack_require__(293); /** * Skip the last `count` values emitted by the source Observable. * @@ -57241,23 +57597,23 @@ exports.skipLast = skipLast; //# sourceMappingURL=skipLast.js.map /***/ }), -/* 668 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var skipUntil_1 = __webpack_require__(669); +var skipUntil_1 = __webpack_require__(670); Observable_1.Observable.prototype.skipUntil = skipUntil_1.skipUntil; //# sourceMappingURL=skipUntil.js.map /***/ }), -/* 669 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var skipUntil_1 = __webpack_require__(293); +var skipUntil_1 = __webpack_require__(294); /** * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. * @@ -57277,23 +57633,23 @@ exports.skipUntil = skipUntil; //# sourceMappingURL=skipUntil.js.map /***/ }), -/* 670 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var skipWhile_1 = __webpack_require__(671); +var skipWhile_1 = __webpack_require__(672); Observable_1.Observable.prototype.skipWhile = skipWhile_1.skipWhile; //# sourceMappingURL=skipWhile.js.map /***/ }), -/* 671 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var skipWhile_1 = __webpack_require__(294); +var skipWhile_1 = __webpack_require__(295); /** * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds * true, but emits all further source items as soon as the condition becomes false. @@ -57313,23 +57669,23 @@ exports.skipWhile = skipWhile; //# sourceMappingURL=skipWhile.js.map /***/ }), -/* 672 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var startWith_1 = __webpack_require__(673); +var startWith_1 = __webpack_require__(674); Observable_1.Observable.prototype.startWith = startWith_1.startWith; //# sourceMappingURL=startWith.js.map /***/ }), -/* 673 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var startWith_1 = __webpack_require__(295); +var startWith_1 = __webpack_require__(296); /* tslint:enable:max-line-length */ /** * Returns an Observable that emits the items you specify as arguments before it begins to emit @@ -57356,23 +57712,23 @@ exports.startWith = startWith; //# sourceMappingURL=startWith.js.map /***/ }), -/* 674 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var subscribeOn_1 = __webpack_require__(675); +var subscribeOn_1 = __webpack_require__(676); Observable_1.Observable.prototype.subscribeOn = subscribeOn_1.subscribeOn; //# sourceMappingURL=subscribeOn.js.map /***/ }), -/* 675 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var subscribeOn_1 = __webpack_require__(676); +var subscribeOn_1 = __webpack_require__(677); /** * Asynchronously subscribes Observers to this Observable on the specified IScheduler. * @@ -57392,12 +57748,12 @@ exports.subscribeOn = subscribeOn; //# sourceMappingURL=subscribeOn.js.map /***/ }), -/* 676 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var SubscribeOnObservable_1 = __webpack_require__(677); +var SubscribeOnObservable_1 = __webpack_require__(678); /** * Asynchronously subscribes Observers to this Observable on the specified IScheduler. * @@ -57429,7 +57785,7 @@ var SubscribeOnOperator = (function () { //# sourceMappingURL=subscribeOn.js.map /***/ }), -/* 677 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57440,8 +57796,8 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var asap_1 = __webpack_require__(296); -var isNumeric_1 = __webpack_require__(30); +var asap_1 = __webpack_require__(297); +var isNumeric_1 = __webpack_require__(31); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -57486,7 +57842,7 @@ exports.SubscribeOnObservable = SubscribeOnObservable; //# sourceMappingURL=SubscribeOnObservable.js.map /***/ }), -/* 678 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57496,8 +57852,8 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var Immediate_1 = __webpack_require__(679); -var AsyncAction_1 = __webpack_require__(31); +var Immediate_1 = __webpack_require__(680); +var AsyncAction_1 = __webpack_require__(32); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -57547,7 +57903,7 @@ exports.AsapAction = AsapAction; //# sourceMappingURL=AsapAction.js.map /***/ }), -/* 679 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57762,7 +58118,7 @@ exports.Immediate = new ImmediateDefinition(root_1.root); //# sourceMappingURL=Immediate.js.map /***/ }), -/* 680 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -57772,7 +58128,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var AsyncScheduler_1 = __webpack_require__(32); +var AsyncScheduler_1 = __webpack_require__(33); var AsapScheduler = (function (_super) { __extends(AsapScheduler, _super); function AsapScheduler() { @@ -57805,24 +58161,24 @@ exports.AsapScheduler = AsapScheduler; //# sourceMappingURL=AsapScheduler.js.map /***/ }), -/* 681 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var switch_1 = __webpack_require__(682); +var switch_1 = __webpack_require__(683); Observable_1.Observable.prototype.switch = switch_1._switch; Observable_1.Observable.prototype._switch = switch_1._switch; //# sourceMappingURL=switch.js.map /***/ }), -/* 682 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var switchAll_1 = __webpack_require__(297); +var switchAll_1 = __webpack_require__(298); /** * Converts a higher-order Observable into a first-order Observable by * subscribing to only the most recently emitted of those inner Observables. @@ -57872,23 +58228,23 @@ exports._switch = _switch; //# sourceMappingURL=switch.js.map /***/ }), -/* 683 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var switchMap_1 = __webpack_require__(684); +var switchMap_1 = __webpack_require__(685); Observable_1.Observable.prototype.switchMap = switchMap_1.switchMap; //# sourceMappingURL=switchMap.js.map /***/ }), -/* 684 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var switchMap_1 = __webpack_require__(75); +var switchMap_1 = __webpack_require__(76); /* tslint:enable:max-line-length */ /** * Projects each source value to an Observable which is merged in the output @@ -57944,23 +58300,23 @@ exports.switchMap = switchMap; //# sourceMappingURL=switchMap.js.map /***/ }), -/* 685 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var switchMapTo_1 = __webpack_require__(686); +var switchMapTo_1 = __webpack_require__(687); Observable_1.Observable.prototype.switchMapTo = switchMapTo_1.switchMapTo; //# sourceMappingURL=switchMapTo.js.map /***/ }), -/* 686 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var switchMapTo_1 = __webpack_require__(298); +var switchMapTo_1 = __webpack_require__(299); /* tslint:enable:max-line-length */ /** * Projects each source value to the same Observable which is flattened multiple @@ -58011,23 +58367,23 @@ exports.switchMapTo = switchMapTo; //# sourceMappingURL=switchMapTo.js.map /***/ }), -/* 687 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var take_1 = __webpack_require__(688); +var take_1 = __webpack_require__(689); Observable_1.Observable.prototype.take = take_1.take; //# sourceMappingURL=take.js.map /***/ }), -/* 688 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var take_1 = __webpack_require__(299); +var take_1 = __webpack_require__(300); /** * Emits only the first `count` values emitted by the source Observable. * @@ -58068,23 +58424,23 @@ exports.take = take; //# sourceMappingURL=take.js.map /***/ }), -/* 689 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var takeLast_1 = __webpack_require__(690); +var takeLast_1 = __webpack_require__(691); Observable_1.Observable.prototype.takeLast = takeLast_1.takeLast; //# sourceMappingURL=takeLast.js.map /***/ }), -/* 690 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var takeLast_1 = __webpack_require__(73); +var takeLast_1 = __webpack_require__(74); /** * Emits only the last `count` values emitted by the source Observable. * @@ -58128,23 +58484,23 @@ exports.takeLast = takeLast; //# sourceMappingURL=takeLast.js.map /***/ }), -/* 691 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var takeUntil_1 = __webpack_require__(692); +var takeUntil_1 = __webpack_require__(693); Observable_1.Observable.prototype.takeUntil = takeUntil_1.takeUntil; //# sourceMappingURL=takeUntil.js.map /***/ }), -/* 692 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var takeUntil_1 = __webpack_require__(300); +var takeUntil_1 = __webpack_require__(301); /** * Emits the values emitted by the source Observable until a `notifier` * Observable emits a value. @@ -58185,23 +58541,23 @@ exports.takeUntil = takeUntil; //# sourceMappingURL=takeUntil.js.map /***/ }), -/* 693 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var takeWhile_1 = __webpack_require__(694); +var takeWhile_1 = __webpack_require__(695); Observable_1.Observable.prototype.takeWhile = takeWhile_1.takeWhile; //# sourceMappingURL=takeWhile.js.map /***/ }), -/* 694 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var takeWhile_1 = __webpack_require__(301); +var takeWhile_1 = __webpack_require__(302); /** * Emits values emitted by the source Observable so long as each value satisfies * the given `predicate`, and then completes as soon as this `predicate` is not @@ -58245,23 +58601,23 @@ exports.takeWhile = takeWhile; //# sourceMappingURL=takeWhile.js.map /***/ }), -/* 695 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var throttle_1 = __webpack_require__(696); +var throttle_1 = __webpack_require__(697); Observable_1.Observable.prototype.throttle = throttle_1.throttle; //# sourceMappingURL=throttle.js.map /***/ }), -/* 696 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var throttle_1 = __webpack_require__(51); +var throttle_1 = __webpack_require__(52); /** * Emits a value from the source Observable, then ignores subsequent source * values for a duration determined by another Observable, then repeats this @@ -58310,25 +58666,25 @@ exports.throttle = throttle; //# sourceMappingURL=throttle.js.map /***/ }), -/* 697 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var throttleTime_1 = __webpack_require__(698); +var throttleTime_1 = __webpack_require__(699); Observable_1.Observable.prototype.throttleTime = throttleTime_1.throttleTime; //# sourceMappingURL=throttleTime.js.map /***/ }), -/* 698 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var throttle_1 = __webpack_require__(51); -var throttleTime_1 = __webpack_require__(302); +var throttle_1 = __webpack_require__(52); +var throttleTime_1 = __webpack_require__(303); /** * Emits a value from the source Observable, then ignores subsequent source * values for `duration` milliseconds, then repeats this process. @@ -58377,35 +58733,35 @@ exports.throttleTime = throttleTime; //# sourceMappingURL=throttleTime.js.map /***/ }), -/* 699 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var timeInterval_1 = __webpack_require__(303); +var timeInterval_1 = __webpack_require__(304); Observable_1.Observable.prototype.timeInterval = timeInterval_1.timeInterval; //# sourceMappingURL=timeInterval.js.map /***/ }), -/* 700 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var timeout_1 = __webpack_require__(701); +var timeout_1 = __webpack_require__(702); Observable_1.Observable.prototype.timeout = timeout_1.timeout; //# sourceMappingURL=timeout.js.map /***/ }), -/* 701 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var timeout_1 = __webpack_require__(305); +var timeout_1 = __webpack_require__(306); /** * * Errors if Observable does not emit a value in given time span. @@ -58479,24 +58835,24 @@ exports.timeout = timeout; //# sourceMappingURL=timeout.js.map /***/ }), -/* 702 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var timeoutWith_1 = __webpack_require__(703); +var timeoutWith_1 = __webpack_require__(704); Observable_1.Observable.prototype.timeoutWith = timeoutWith_1.timeoutWith; //# sourceMappingURL=timeoutWith.js.map /***/ }), -/* 703 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var timeoutWith_1 = __webpack_require__(307); +var timeoutWith_1 = __webpack_require__(308); /* tslint:enable:max-line-length */ /** * @@ -58553,24 +58909,24 @@ exports.timeoutWith = timeoutWith; //# sourceMappingURL=timeoutWith.js.map /***/ }), -/* 704 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var timestamp_1 = __webpack_require__(705); +var timestamp_1 = __webpack_require__(706); Observable_1.Observable.prototype.timestamp = timestamp_1.timestamp; //# sourceMappingURL=timestamp.js.map /***/ }), -/* 705 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var timestamp_1 = __webpack_require__(76); +var timestamp_1 = __webpack_require__(77); /** * @param scheduler * @return {Observable>|WebSocketSubject|Observable} @@ -58585,23 +58941,23 @@ exports.timestamp = timestamp; //# sourceMappingURL=timestamp.js.map /***/ }), -/* 706 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var toArray_1 = __webpack_require__(707); +var toArray_1 = __webpack_require__(708); Observable_1.Observable.prototype.toArray = toArray_1.toArray; //# sourceMappingURL=toArray.js.map /***/ }), -/* 707 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var toArray_1 = __webpack_require__(308); +var toArray_1 = __webpack_require__(309); /** * Collects all source emissions and emits them as an array when the source completes. * @@ -58632,7 +58988,7 @@ exports.toArray = toArray; //# sourceMappingURL=toArray.js.map /***/ }), -/* 708 */ +/* 709 */ /***/ (function(module, exports) { // HACK: does nothing, because `toPromise` now lives on the `Observable` itself. @@ -58640,23 +58996,23 @@ exports.toArray = toArray; //# sourceMappingURL=toPromise.js.map /***/ }), -/* 709 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var window_1 = __webpack_require__(710); +var window_1 = __webpack_require__(711); Observable_1.Observable.prototype.window = window_1.window; //# sourceMappingURL=window.js.map /***/ }), -/* 710 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var window_1 = __webpack_require__(309); +var window_1 = __webpack_require__(310); /** * Branch out the source Observable values as a nested Observable whenever * `windowBoundaries` emits. @@ -58700,23 +59056,23 @@ exports.window = window; //# sourceMappingURL=window.js.map /***/ }), -/* 711 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var windowCount_1 = __webpack_require__(712); +var windowCount_1 = __webpack_require__(713); Observable_1.Observable.prototype.windowCount = windowCount_1.windowCount; //# sourceMappingURL=windowCount.js.map /***/ }), -/* 712 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var windowCount_1 = __webpack_require__(310); +var windowCount_1 = __webpack_require__(311); /** * Branch out the source Observable values as a nested Observable with each * nested Observable emitting at most `windowSize` values. @@ -58773,26 +59129,26 @@ exports.windowCount = windowCount; //# sourceMappingURL=windowCount.js.map /***/ }), -/* 713 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var windowTime_1 = __webpack_require__(714); +var windowTime_1 = __webpack_require__(715); Observable_1.Observable.prototype.windowTime = windowTime_1.windowTime; //# sourceMappingURL=windowTime.js.map /***/ }), -/* 714 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var async_1 = __webpack_require__(6); -var isNumeric_1 = __webpack_require__(30); +var isNumeric_1 = __webpack_require__(31); var isScheduler_1 = __webpack_require__(15); -var windowTime_1 = __webpack_require__(311); +var windowTime_1 = __webpack_require__(312); function windowTime(windowTimeSpan) { var scheduler = async_1.async; var windowCreationInterval = null; @@ -58818,23 +59174,23 @@ exports.windowTime = windowTime; //# sourceMappingURL=windowTime.js.map /***/ }), -/* 715 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var windowToggle_1 = __webpack_require__(716); +var windowToggle_1 = __webpack_require__(717); Observable_1.Observable.prototype.windowToggle = windowToggle_1.windowToggle; //# sourceMappingURL=windowToggle.js.map /***/ }), -/* 716 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var windowToggle_1 = __webpack_require__(312); +var windowToggle_1 = __webpack_require__(313); /** * Branch out the source Observable values as a nested Observable starting from * an emission from `openings` and ending when the output of `closingSelector` @@ -58883,23 +59239,23 @@ exports.windowToggle = windowToggle; //# sourceMappingURL=windowToggle.js.map /***/ }), -/* 717 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var windowWhen_1 = __webpack_require__(718); +var windowWhen_1 = __webpack_require__(719); Observable_1.Observable.prototype.windowWhen = windowWhen_1.windowWhen; //# sourceMappingURL=windowWhen.js.map /***/ }), -/* 718 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var windowWhen_1 = __webpack_require__(313); +var windowWhen_1 = __webpack_require__(314); /** * Branch out the source Observable values as a nested Observable using a * factory function of closing Observables to determine when to start a new @@ -58945,23 +59301,23 @@ exports.windowWhen = windowWhen; //# sourceMappingURL=windowWhen.js.map /***/ }), -/* 719 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var withLatestFrom_1 = __webpack_require__(720); +var withLatestFrom_1 = __webpack_require__(721); Observable_1.Observable.prototype.withLatestFrom = withLatestFrom_1.withLatestFrom; //# sourceMappingURL=withLatestFrom.js.map /***/ }), -/* 720 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var withLatestFrom_1 = __webpack_require__(314); +var withLatestFrom_1 = __webpack_require__(315); /* tslint:enable:max-line-length */ /** * Combines the source Observable with other Observables to create an Observable @@ -59012,23 +59368,23 @@ exports.withLatestFrom = withLatestFrom; //# sourceMappingURL=withLatestFrom.js.map /***/ }), -/* 721 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var zip_1 = __webpack_require__(722); +var zip_1 = __webpack_require__(723); Observable_1.Observable.prototype.zip = zip_1.zipProto; //# sourceMappingURL=zip.js.map /***/ }), -/* 722 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var zip_1 = __webpack_require__(48); +var zip_1 = __webpack_require__(49); /* tslint:enable:max-line-length */ /** * @param observables @@ -59047,23 +59403,23 @@ exports.zipProto = zipProto; //# sourceMappingURL=zip.js.map /***/ }), -/* 723 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Observable_1 = __webpack_require__(0); -var zipAll_1 = __webpack_require__(724); +var zipAll_1 = __webpack_require__(725); Observable_1.Observable.prototype.zipAll = zipAll_1.zipAll; //# sourceMappingURL=zipAll.js.map /***/ }), -/* 724 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var zipAll_1 = __webpack_require__(315); +var zipAll_1 = __webpack_require__(316); /** * @param project * @return {Observable|WebSocketSubject|Observable} @@ -59077,7 +59433,7 @@ exports.zipAll = zipAll; //# sourceMappingURL=zipAll.js.map /***/ }), -/* 725 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59088,11 +59444,11 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var Notification_1 = __webpack_require__(28); -var ColdObservable_1 = __webpack_require__(726); -var HotObservable_1 = __webpack_require__(727); -var SubscriptionLog_1 = __webpack_require__(317); -var VirtualTimeScheduler_1 = __webpack_require__(319); +var Notification_1 = __webpack_require__(29); +var ColdObservable_1 = __webpack_require__(727); +var HotObservable_1 = __webpack_require__(728); +var SubscriptionLog_1 = __webpack_require__(318); +var VirtualTimeScheduler_1 = __webpack_require__(320); var defaultMaxFrame = 750; var TestScheduler = (function (_super) { __extends(TestScheduler, _super); @@ -59306,7 +59662,7 @@ exports.TestScheduler = TestScheduler; //# sourceMappingURL=TestScheduler.js.map /***/ }), -/* 726 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59318,8 +59674,8 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Observable_1 = __webpack_require__(0); var Subscription_1 = __webpack_require__(8); -var SubscriptionLoggable_1 = __webpack_require__(316); -var applyMixins_1 = __webpack_require__(318); +var SubscriptionLoggable_1 = __webpack_require__(317); +var applyMixins_1 = __webpack_require__(319); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -59358,7 +59714,7 @@ applyMixins_1.applyMixins(ColdObservable, [SubscriptionLoggable_1.SubscriptionLo //# sourceMappingURL=ColdObservable.js.map /***/ }), -/* 727 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59370,8 +59726,8 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Subject_1 = __webpack_require__(9); var Subscription_1 = __webpack_require__(8); -var SubscriptionLoggable_1 = __webpack_require__(316); -var applyMixins_1 = __webpack_require__(318); +var SubscriptionLoggable_1 = __webpack_require__(317); +var applyMixins_1 = __webpack_require__(319); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -59412,13 +59768,13 @@ applyMixins_1.applyMixins(HotObservable, [SubscriptionLoggable_1.SubscriptionLog //# sourceMappingURL=HotObservable.js.map /***/ }), -/* 728 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var AnimationFrameAction_1 = __webpack_require__(729); -var AnimationFrameScheduler_1 = __webpack_require__(731); +var AnimationFrameAction_1 = __webpack_require__(730); +var AnimationFrameScheduler_1 = __webpack_require__(732); /** * * Animation Frame Scheduler @@ -59453,7 +59809,7 @@ exports.animationFrame = new AnimationFrameScheduler_1.AnimationFrameScheduler(A //# sourceMappingURL=animationFrame.js.map /***/ }), -/* 729 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59463,8 +59819,8 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var AsyncAction_1 = __webpack_require__(31); -var AnimationFrame_1 = __webpack_require__(730); +var AsyncAction_1 = __webpack_require__(32); +var AnimationFrame_1 = __webpack_require__(731); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -59514,7 +59870,7 @@ exports.AnimationFrameAction = AnimationFrameAction; //# sourceMappingURL=AnimationFrameAction.js.map /***/ }), -/* 730 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59554,7 +59910,7 @@ exports.AnimationFrame = new RequestAnimationFrameDefinition(root_1.root); //# sourceMappingURL=AnimationFrame.js.map /***/ }), -/* 731 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59564,7 +59920,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var AsyncScheduler_1 = __webpack_require__(32); +var AsyncScheduler_1 = __webpack_require__(33); var AnimationFrameScheduler = (function (_super) { __extends(AnimationFrameScheduler, _super); function AnimationFrameScheduler() { @@ -59597,166 +59953,166 @@ exports.AnimationFrameScheduler = AnimationFrameScheduler; //# sourceMappingURL=AnimationFrameScheduler.js.map /***/ }), -/* 732 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var audit_1 = __webpack_require__(71); +var audit_1 = __webpack_require__(72); exports.audit = audit_1.audit; -var auditTime_1 = __webpack_require__(261); +var auditTime_1 = __webpack_require__(262); exports.auditTime = auditTime_1.auditTime; -var buffer_1 = __webpack_require__(233); +var buffer_1 = __webpack_require__(234); exports.buffer = buffer_1.buffer; -var bufferCount_1 = __webpack_require__(234); +var bufferCount_1 = __webpack_require__(235); exports.bufferCount = bufferCount_1.bufferCount; -var bufferTime_1 = __webpack_require__(235); +var bufferTime_1 = __webpack_require__(236); exports.bufferTime = bufferTime_1.bufferTime; -var bufferToggle_1 = __webpack_require__(236); +var bufferToggle_1 = __webpack_require__(237); exports.bufferToggle = bufferToggle_1.bufferToggle; -var bufferWhen_1 = __webpack_require__(237); +var bufferWhen_1 = __webpack_require__(238); exports.bufferWhen = bufferWhen_1.bufferWhen; -var catchError_1 = __webpack_require__(238); +var catchError_1 = __webpack_require__(239); exports.catchError = catchError_1.catchError; -var combineAll_1 = __webpack_require__(239); +var combineAll_1 = __webpack_require__(240); exports.combineAll = combineAll_1.combineAll; -var combineLatest_1 = __webpack_require__(43); +var combineLatest_1 = __webpack_require__(44); exports.combineLatest = combineLatest_1.combineLatest; -var concat_1 = __webpack_require__(240); +var concat_1 = __webpack_require__(241); exports.concat = concat_1.concat; -var concatAll_1 = __webpack_require__(63); +var concatAll_1 = __webpack_require__(64); exports.concatAll = concatAll_1.concatAll; -var concatMap_1 = __webpack_require__(66); +var concatMap_1 = __webpack_require__(67); exports.concatMap = concatMap_1.concatMap; -var concatMapTo_1 = __webpack_require__(241); +var concatMapTo_1 = __webpack_require__(242); exports.concatMapTo = concatMapTo_1.concatMapTo; -var count_1 = __webpack_require__(242); +var count_1 = __webpack_require__(243); exports.count = count_1.count; -var debounce_1 = __webpack_require__(244); +var debounce_1 = __webpack_require__(245); exports.debounce = debounce_1.debounce; -var debounceTime_1 = __webpack_require__(245); +var debounceTime_1 = __webpack_require__(246); exports.debounceTime = debounceTime_1.debounceTime; -var defaultIfEmpty_1 = __webpack_require__(67); +var defaultIfEmpty_1 = __webpack_require__(68); exports.defaultIfEmpty = defaultIfEmpty_1.defaultIfEmpty; -var delay_1 = __webpack_require__(246); +var delay_1 = __webpack_require__(247); exports.delay = delay_1.delay; -var delayWhen_1 = __webpack_require__(247); +var delayWhen_1 = __webpack_require__(248); exports.delayWhen = delayWhen_1.delayWhen; -var dematerialize_1 = __webpack_require__(243); +var dematerialize_1 = __webpack_require__(244); exports.dematerialize = dematerialize_1.dematerialize; -var distinct_1 = __webpack_require__(248); +var distinct_1 = __webpack_require__(249); exports.distinct = distinct_1.distinct; -var distinctUntilChanged_1 = __webpack_require__(68); +var distinctUntilChanged_1 = __webpack_require__(69); exports.distinctUntilChanged = distinctUntilChanged_1.distinctUntilChanged; -var distinctUntilKeyChanged_1 = __webpack_require__(249); +var distinctUntilKeyChanged_1 = __webpack_require__(250); exports.distinctUntilKeyChanged = distinctUntilKeyChanged_1.distinctUntilKeyChanged; -var elementAt_1 = __webpack_require__(254); +var elementAt_1 = __webpack_require__(255); exports.elementAt = elementAt_1.elementAt; -var every_1 = __webpack_require__(263); +var every_1 = __webpack_require__(264); exports.every = every_1.every; -var exhaust_1 = __webpack_require__(251); +var exhaust_1 = __webpack_require__(252); exports.exhaust = exhaust_1.exhaust; -var exhaustMap_1 = __webpack_require__(252); +var exhaustMap_1 = __webpack_require__(253); exports.exhaustMap = exhaustMap_1.exhaustMap; -var expand_1 = __webpack_require__(253); +var expand_1 = __webpack_require__(254); exports.expand = expand_1.expand; -var filter_1 = __webpack_require__(69); +var filter_1 = __webpack_require__(70); exports.filter = filter_1.filter; -var finalize_1 = __webpack_require__(255); +var finalize_1 = __webpack_require__(256); exports.finalize = finalize_1.finalize; -var find_1 = __webpack_require__(70); +var find_1 = __webpack_require__(71); exports.find = find_1.find; -var findIndex_1 = __webpack_require__(256); +var findIndex_1 = __webpack_require__(257); exports.findIndex = findIndex_1.findIndex; -var first_1 = __webpack_require__(257); +var first_1 = __webpack_require__(258); exports.first = first_1.first; -var groupBy_1 = __webpack_require__(258); +var groupBy_1 = __webpack_require__(259); exports.groupBy = groupBy_1.groupBy; -var ignoreElements_1 = __webpack_require__(259); +var ignoreElements_1 = __webpack_require__(260); exports.ignoreElements = ignoreElements_1.ignoreElements; -var isEmpty_1 = __webpack_require__(260); +var isEmpty_1 = __webpack_require__(261); exports.isEmpty = isEmpty_1.isEmpty; -var last_1 = __webpack_require__(262); +var last_1 = __webpack_require__(263); exports.last = last_1.last; -var map_1 = __webpack_require__(33); +var map_1 = __webpack_require__(34); exports.map = map_1.map; -var mapTo_1 = __webpack_require__(264); +var mapTo_1 = __webpack_require__(265); exports.mapTo = mapTo_1.mapTo; -var materialize_1 = __webpack_require__(265); +var materialize_1 = __webpack_require__(266); exports.materialize = materialize_1.materialize; -var max_1 = __webpack_require__(266); +var max_1 = __webpack_require__(267); exports.max = max_1.max; -var merge_1 = __webpack_require__(267); +var merge_1 = __webpack_require__(268); exports.merge = merge_1.merge; -var mergeAll_1 = __webpack_require__(45); +var mergeAll_1 = __webpack_require__(46); exports.mergeAll = mergeAll_1.mergeAll; -var mergeMap_1 = __webpack_require__(29); +var mergeMap_1 = __webpack_require__(30); exports.mergeMap = mergeMap_1.mergeMap; -var mergeMap_2 = __webpack_require__(29); +var mergeMap_2 = __webpack_require__(30); exports.flatMap = mergeMap_2.mergeMap; -var mergeMapTo_1 = __webpack_require__(268); +var mergeMapTo_1 = __webpack_require__(269); exports.mergeMapTo = mergeMapTo_1.mergeMapTo; -var mergeScan_1 = __webpack_require__(269); +var mergeScan_1 = __webpack_require__(270); exports.mergeScan = mergeScan_1.mergeScan; -var min_1 = __webpack_require__(270); +var min_1 = __webpack_require__(271); exports.min = min_1.min; -var multicast_1 = __webpack_require__(19); +var multicast_1 = __webpack_require__(20); exports.multicast = multicast_1.multicast; -var observeOn_1 = __webpack_require__(44); +var observeOn_1 = __webpack_require__(45); exports.observeOn = observeOn_1.observeOn; -var onErrorResumeNext_1 = __webpack_require__(65); +var onErrorResumeNext_1 = __webpack_require__(66); exports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext; -var pairwise_1 = __webpack_require__(272); +var pairwise_1 = __webpack_require__(273); exports.pairwise = pairwise_1.pairwise; -var partition_1 = __webpack_require__(273); +var partition_1 = __webpack_require__(274); exports.partition = partition_1.partition; -var pluck_1 = __webpack_require__(274); +var pluck_1 = __webpack_require__(275); exports.pluck = pluck_1.pluck; -var publish_1 = __webpack_require__(275); +var publish_1 = __webpack_require__(276); exports.publish = publish_1.publish; -var publishBehavior_1 = __webpack_require__(276); +var publishBehavior_1 = __webpack_require__(277); exports.publishBehavior = publishBehavior_1.publishBehavior; -var publishLast_1 = __webpack_require__(279); +var publishLast_1 = __webpack_require__(280); exports.publishLast = publishLast_1.publishLast; -var publishReplay_1 = __webpack_require__(278); +var publishReplay_1 = __webpack_require__(279); exports.publishReplay = publishReplay_1.publishReplay; -var race_1 = __webpack_require__(280); +var race_1 = __webpack_require__(281); exports.race = race_1.race; -var reduce_1 = __webpack_require__(35); +var reduce_1 = __webpack_require__(36); exports.reduce = reduce_1.reduce; -var repeat_1 = __webpack_require__(281); +var repeat_1 = __webpack_require__(282); exports.repeat = repeat_1.repeat; -var repeatWhen_1 = __webpack_require__(282); +var repeatWhen_1 = __webpack_require__(283); exports.repeatWhen = repeatWhen_1.repeatWhen; -var retry_1 = __webpack_require__(283); +var retry_1 = __webpack_require__(284); exports.retry = retry_1.retry; -var retryWhen_1 = __webpack_require__(284); +var retryWhen_1 = __webpack_require__(285); exports.retryWhen = retryWhen_1.retryWhen; -var refCount_1 = __webpack_require__(74); +var refCount_1 = __webpack_require__(75); exports.refCount = refCount_1.refCount; -var sample_1 = __webpack_require__(285); +var sample_1 = __webpack_require__(286); exports.sample = sample_1.sample; -var sampleTime_1 = __webpack_require__(286); +var sampleTime_1 = __webpack_require__(287); exports.sampleTime = sampleTime_1.sampleTime; -var scan_1 = __webpack_require__(72); +var scan_1 = __webpack_require__(73); exports.scan = scan_1.scan; -var sequenceEqual_1 = __webpack_require__(287); +var sequenceEqual_1 = __webpack_require__(288); exports.sequenceEqual = sequenceEqual_1.sequenceEqual; -var share_1 = __webpack_require__(288); +var share_1 = __webpack_require__(289); exports.share = share_1.share; -var shareReplay_1 = __webpack_require__(289); +var shareReplay_1 = __webpack_require__(290); exports.shareReplay = shareReplay_1.shareReplay; -var single_1 = __webpack_require__(290); +var single_1 = __webpack_require__(291); exports.single = single_1.single; -var skip_1 = __webpack_require__(291); +var skip_1 = __webpack_require__(292); exports.skip = skip_1.skip; -var skipLast_1 = __webpack_require__(292); +var skipLast_1 = __webpack_require__(293); exports.skipLast = skipLast_1.skipLast; -var skipUntil_1 = __webpack_require__(293); +var skipUntil_1 = __webpack_require__(294); exports.skipUntil = skipUntil_1.skipUntil; -var skipWhile_1 = __webpack_require__(294); +var skipWhile_1 = __webpack_require__(295); exports.skipWhile = skipWhile_1.skipWhile; -var startWith_1 = __webpack_require__(295); +var startWith_1 = __webpack_require__(296); exports.startWith = startWith_1.startWith; /** * TODO(https://github.com/ReactiveX/rxjs/issues/2900): Add back subscribeOn once it can be @@ -59765,56 +60121,56 @@ exports.startWith = startWith_1.startWith; * Immediate, root, and other supporting code. */ // export { subscribeOn } from './operators/subscribeOn'; -var switchAll_1 = __webpack_require__(297); +var switchAll_1 = __webpack_require__(298); exports.switchAll = switchAll_1.switchAll; -var switchMap_1 = __webpack_require__(75); +var switchMap_1 = __webpack_require__(76); exports.switchMap = switchMap_1.switchMap; -var switchMapTo_1 = __webpack_require__(298); +var switchMapTo_1 = __webpack_require__(299); exports.switchMapTo = switchMapTo_1.switchMapTo; -var take_1 = __webpack_require__(299); +var take_1 = __webpack_require__(300); exports.take = take_1.take; -var takeLast_1 = __webpack_require__(73); +var takeLast_1 = __webpack_require__(74); exports.takeLast = takeLast_1.takeLast; -var takeUntil_1 = __webpack_require__(300); +var takeUntil_1 = __webpack_require__(301); exports.takeUntil = takeUntil_1.takeUntil; -var takeWhile_1 = __webpack_require__(301); +var takeWhile_1 = __webpack_require__(302); exports.takeWhile = takeWhile_1.takeWhile; -var tap_1 = __webpack_require__(250); +var tap_1 = __webpack_require__(251); exports.tap = tap_1.tap; -var throttle_1 = __webpack_require__(51); +var throttle_1 = __webpack_require__(52); exports.throttle = throttle_1.throttle; -var throttleTime_1 = __webpack_require__(302); +var throttleTime_1 = __webpack_require__(303); exports.throttleTime = throttleTime_1.throttleTime; -var timeInterval_1 = __webpack_require__(304); +var timeInterval_1 = __webpack_require__(305); exports.timeInterval = timeInterval_1.timeInterval; -var timeout_1 = __webpack_require__(305); +var timeout_1 = __webpack_require__(306); exports.timeout = timeout_1.timeout; -var timeoutWith_1 = __webpack_require__(307); +var timeoutWith_1 = __webpack_require__(308); exports.timeoutWith = timeoutWith_1.timeoutWith; -var timestamp_1 = __webpack_require__(76); +var timestamp_1 = __webpack_require__(77); exports.timestamp = timestamp_1.timestamp; -var toArray_1 = __webpack_require__(308); +var toArray_1 = __webpack_require__(309); exports.toArray = toArray_1.toArray; -var window_1 = __webpack_require__(309); +var window_1 = __webpack_require__(310); exports.window = window_1.window; -var windowCount_1 = __webpack_require__(310); +var windowCount_1 = __webpack_require__(311); exports.windowCount = windowCount_1.windowCount; -var windowTime_1 = __webpack_require__(311); +var windowTime_1 = __webpack_require__(312); exports.windowTime = windowTime_1.windowTime; -var windowToggle_1 = __webpack_require__(312); +var windowToggle_1 = __webpack_require__(313); exports.windowToggle = windowToggle_1.windowToggle; -var windowWhen_1 = __webpack_require__(313); +var windowWhen_1 = __webpack_require__(314); exports.windowWhen = windowWhen_1.windowWhen; -var withLatestFrom_1 = __webpack_require__(314); +var withLatestFrom_1 = __webpack_require__(315); exports.withLatestFrom = withLatestFrom_1.withLatestFrom; -var zip_1 = __webpack_require__(48); +var zip_1 = __webpack_require__(49); exports.zip = zip_1.zip; -var zipAll_1 = __webpack_require__(315); +var zipAll_1 = __webpack_require__(316); exports.zipAll = zipAll_1.zipAll; //# sourceMappingURL=operators.js.map /***/ }), -/* 733 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59828,36 +60184,36 @@ exports.runCommand = undefined; let runCommand = exports.runCommand = (() => { var _ref = _asyncToGenerator(function* (command, config) { try { - console.log(_chalk2.default.bold(`Running [${_chalk2.default.green(command.name)}] command from [${_chalk2.default.yellow(config.rootPath)}]:\n`)); + _log.log.write(_chalk2.default.bold(`Running [${_chalk2.default.green(command.name)}] command from [${_chalk2.default.yellow(config.rootPath)}]:\n`)); const projectPaths = (0, _config.getProjectPaths)(config.rootPath, config.options); const projects = yield (0, _projects.getProjects)(config.rootPath, projectPaths, { exclude: toArray(config.options.exclude), include: toArray(config.options.include) }); if (projects.size === 0) { - console.log(_chalk2.default.red(`There are no projects found. Double check project name(s) in '-i/--include' and '-e/--exclude' filters.\n`)); + _log.log.write(_chalk2.default.red(`There are no projects found. Double check project name(s) in '-i/--include' and '-e/--exclude' filters.\n`)); return process.exit(1); } const projectGraph = (0, _projects.buildProjectGraph)(projects); - console.log(_chalk2.default.bold(`Found [${_chalk2.default.green(projects.size.toString())}] projects:\n`)); - console.log((0, _projects_tree.renderProjectsTree)(config.rootPath, projects)); + _log.log.write(_chalk2.default.bold(`Found [${_chalk2.default.green(projects.size.toString())}] projects:\n`)); + _log.log.write((0, _projects_tree.renderProjectsTree)(config.rootPath, projects)); yield command.run(projects, projectGraph, config); } catch (e) { - console.log(_chalk2.default.bold.red(`\n[${command.name}] failed:\n`)); + _log.log.write(_chalk2.default.bold.red(`\n[${command.name}] failed:\n`)); if (e instanceof _errors.CliError) { const msg = _chalk2.default.red(`CliError: ${e.message}\n`); - console.log((0, _wrapAnsi2.default)(msg, 80)); + _log.log.write((0, _wrapAnsi2.default)(msg, 80)); const keys = Object.keys(e.meta); if (keys.length > 0) { const metaOutput = keys.map(function (key) { const value = e.meta[key]; return `${key}: ${value}`; }); - console.log('Additional debugging info:\n'); - console.log((0, _indentString2.default)(metaOutput.join('\n'), 3)); + _log.log.write('Additional debugging info:\n'); + _log.log.write((0, _indentString2.default)(metaOutput.join('\n'), 3)); } } else { - console.log(e.stack); + _log.log.write(e.stack); } process.exit(1); } @@ -59872,25 +60228,45 @@ var _chalk = __webpack_require__(14); var _chalk2 = _interopRequireDefault(_chalk); -var _wrapAnsi = __webpack_require__(734); +var _indentString = __webpack_require__(735); -var _wrapAnsi2 = _interopRequireDefault(_wrapAnsi); +var _indentString2 = _interopRequireDefault(_indentString); -var _indentString = __webpack_require__(738); +var _wrapAnsi = __webpack_require__(736); -var _indentString2 = _interopRequireDefault(_indentString); +var _wrapAnsi2 = _interopRequireDefault(_wrapAnsi); + +var _config = __webpack_require__(322); -var _errors = __webpack_require__(55); +var _errors = __webpack_require__(58); -var _projects = __webpack_require__(22); +var _log = __webpack_require__(17); -var _projects_tree = __webpack_require__(739); +var _projects = __webpack_require__(25); -var _config = __webpack_require__(321); +var _projects_tree = __webpack_require__(740); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + function toArray(value) { if (value == null) { @@ -59900,13 +60276,47 @@ function toArray(value) { } /***/ }), -/* 734 */ +/* 735 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = (str, count, opts) => { + // Support older versions: use the third parameter as options.indent + // TODO: Remove the workaround in the next major version + const options = typeof opts === 'object' ? Object.assign({indent: ' '}, opts) : {indent: opts || ' '}; + count = count === undefined ? 1 : count; + + if (typeof str !== 'string') { + throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof str}\``); + } + + if (typeof count !== 'number') { + throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``); + } + + if (typeof options.indent !== 'string') { + throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``); + } + + if (count === 0) { + return str; + } + + const regex = options.includeEmptyLines ? /^/mg : /^(?!\s*$)/mg; + return str.replace(regex, options.indent.repeat(count)); +} +; + + +/***/ }), +/* 736 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringWidth = __webpack_require__(735); -const stripAnsi = __webpack_require__(320); +const stringWidth = __webpack_require__(737); +const stripAnsi = __webpack_require__(321); const ESCAPES = new Set([ '\u001B', @@ -60100,13 +60510,13 @@ module.exports = (str, cols, opts) => { /***/ }), -/* 735 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stripAnsi = __webpack_require__(320); -const isFullwidthCodePoint = __webpack_require__(737); +const stripAnsi = __webpack_require__(321); +const isFullwidthCodePoint = __webpack_require__(739); module.exports = str => { if (typeof str !== 'string' || str.length === 0) { @@ -60143,7 +60553,7 @@ module.exports = str => { /***/ }), -/* 736 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60160,7 +60570,7 @@ module.exports = () => { /***/ }), -/* 737 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60213,41 +60623,7 @@ module.exports = x => { /***/ }), -/* 738 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = (str, count, opts) => { - // Support older versions: use the third parameter as options.indent - // TODO: Remove the workaround in the next major version - const options = typeof opts === 'object' ? Object.assign({indent: ' '}, opts) : {indent: opts || ' '}; - count = count === undefined ? 1 : count; - - if (typeof str !== 'string') { - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof str}\``); - } - - if (typeof count !== 'number') { - throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``); - } - - if (typeof options.indent !== 'string') { - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``); - } - - if (count === 0) { - return str; - } - - const regex = options.includeEmptyLines ? /^/mg : /^(?!\s*$)/mg; - return str.replace(regex, options.indent.repeat(count)); -} -; - - -/***/ }), -/* 739 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60258,38 +60634,56 @@ Object.defineProperty(exports, "__esModule", { }); exports.renderProjectsTree = renderProjectsTree; -var _path = __webpack_require__(3); - -var _path2 = _interopRequireDefault(_path); - var _chalk = __webpack_require__(14); var _chalk2 = _interopRequireDefault(_chalk); +var _path = __webpack_require__(3); + +var _path2 = _interopRequireDefault(_path); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ const projectKey = Symbol('__project'); function renderProjectsTree(rootPath, projects) { const projectsTree = buildProjectsTree(rootPath, projects); return treeToString(createTreeStructure(projectsTree)); } function treeToString(tree) { - return [tree.name].concat(childrenToString(tree.children, '')).join('\n'); + return [tree.name].concat(childrenToStrings(tree.children, '')).join('\n'); } -function childrenToString(tree, treePrefix) { +function childrenToStrings(tree, treePrefix) { if (tree === undefined) { return []; } - let string = []; + let strings = []; tree.forEach((node, index) => { const isLastNode = tree.length - 1 === index; const nodePrefix = isLastNode ? '└── ' : '├── '; const childPrefix = isLastNode ? ' ' : '│ '; const childrenPrefix = treePrefix + childPrefix; - string.push(`${treePrefix}${nodePrefix}${node.name}`); - string = string.concat(childrenToString(node.children, childrenPrefix)); + strings.push(`${treePrefix}${nodePrefix}${node.name}`); + strings = strings.concat(childrenToStrings(node.children, childrenPrefix)); }); - return string; + return strings; } function createTreeStructure(tree) { let name; @@ -60307,8 +60701,8 @@ function createTreeStructure(tree) { if (project.size === 1 && project.has(projectKey)) { const projectName = project.get(projectKey); children.push({ - name: dirOrProjectName(dir, projectName), - children: [] + children: [], + name: dirOrProjectName(dir, projectName) }); continue; } @@ -60318,8 +60712,8 @@ function createTreeStructure(tree) { if (subtree.name !== undefined) { const projectName = subtree.name; children.push({ - name: dirOrProjectName(dir, projectName), - children: subtree.children + children: subtree.children, + name: dirOrProjectName(dir, projectName) }); continue; } @@ -60330,14 +60724,14 @@ function createTreeStructure(tree) { const child = subtree.children[0]; const newName = _chalk2.default.dim(_path2.default.join(dir.toString(), child.name)); children.push({ - name: newName, - children: child.children + children: child.children, + name: newName }); continue; } children.push({ - name: _chalk2.default.dim(dir.toString()), - children: subtree.children + children: subtree.children, + name: _chalk2.default.dim(dir.toString()) }); } return { name, children }; @@ -60371,7 +60765,7 @@ function addProjectToTree(tree, pathParts, project) { } /***/ }), -/* 740 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60381,7 +60775,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _build_production_projects = __webpack_require__(741); +var _build_production_projects = __webpack_require__(742); Object.defineProperty(exports, 'buildProductionProjects', { enumerable: true, @@ -60390,7 +60784,7 @@ Object.defineProperty(exports, 'buildProductionProjects', { } }); -var _prepare_project_dependencies = __webpack_require__(752); +var _prepare_project_dependencies = __webpack_require__(753); Object.defineProperty(exports, 'prepareExternalProjectDependencies', { enumerable: true, @@ -60400,7 +60794,7 @@ Object.defineProperty(exports, 'prepareExternalProjectDependencies', { }); /***/ }), -/* 741 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60419,7 +60813,7 @@ let buildProductionProjects = exports.buildProductionProjects = (() => { const projectNames = [...projects.values()].map(function (project) { return project.name; }); - console.log(`Preparing production build for [${projectNames.join(', ')}]`); + _log.log.write(`Preparing production build for [${projectNames.join(', ')}]`); for (const batch of batchedProjects) { for (const project of batch) { yield deleteTarget(project); @@ -60500,9 +60894,9 @@ let copyToBuild = (() => { const buildProjectPath = (0, _path.resolve)(buildRoot, relativeProjectPath); yield (0, _cpy2.default)(['**/*', '!node_modules/**'], buildProjectPath, { cwd: project.getIntermediateBuildDirectory(), - parents: true, + dot: true, nodir: true, - dot: true + parents: true }); // If a project is using an intermediate build directory, we special-case our // handling of `package.json`, as the project build process might have copied @@ -60521,40 +60915,59 @@ let copyToBuild = (() => { }; })(); -var _del = __webpack_require__(215); +var _cpy = __webpack_require__(743); + +var _cpy2 = _interopRequireDefault(_cpy); + +var _del = __webpack_require__(216); var _del2 = _interopRequireDefault(_del); var _path = __webpack_require__(3); -var _cpy = __webpack_require__(742); - -var _cpy2 = _interopRequireDefault(_cpy); +var _config = __webpack_require__(322); -var _config = __webpack_require__(321); +var _fs = __webpack_require__(54); -var _projects = __webpack_require__(22); +var _log = __webpack_require__(17); -var _package_json = __webpack_require__(37); +var _package_json = __webpack_require__(38); -var _fs = __webpack_require__(58); +var _projects = __webpack_require__(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /***/ }), -/* 742 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const EventEmitter = __webpack_require__(36); +const EventEmitter = __webpack_require__(37); const path = __webpack_require__(3); -const arrify = __webpack_require__(743); -const globby = __webpack_require__(744); -const cpFile = __webpack_require__(746); -const CpyError = __webpack_require__(751); +const arrify = __webpack_require__(744); +const globby = __webpack_require__(745); +const cpFile = __webpack_require__(747); +const CpyError = __webpack_require__(752); const preprocessSrcPath = (srcPath, opts) => opts.cwd ? path.resolve(opts.cwd, srcPath) : srcPath; @@ -60648,7 +61061,7 @@ module.exports = (src, dest, opts) => { /***/ }), -/* 743 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60663,16 +61076,16 @@ module.exports = function (val) { /***/ }), -/* 744 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Promise = __webpack_require__(216); -var arrayUnion = __webpack_require__(217); -var objectAssign = __webpack_require__(218); -var glob = __webpack_require__(23); -var pify = __webpack_require__(745); +var Promise = __webpack_require__(217); +var arrayUnion = __webpack_require__(218); +var objectAssign = __webpack_require__(219); +var glob = __webpack_require__(26); +var pify = __webpack_require__(746); var globP = pify(glob, Promise).bind(glob); @@ -60758,7 +61171,7 @@ module.exports.hasMagic = function (patterns, opts) { /***/ }), -/* 745 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60833,17 +61246,17 @@ pify.all = pify; /***/ }), -/* 746 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(3); const fsConstants = __webpack_require__(7).constants; -const Buffer = __webpack_require__(747).Buffer; -const CpFileError = __webpack_require__(322); -const fs = __webpack_require__(749); -const ProgressEmitter = __webpack_require__(750); +const Buffer = __webpack_require__(748).Buffer; +const CpFileError = __webpack_require__(323); +const fs = __webpack_require__(750); +const ProgressEmitter = __webpack_require__(751); module.exports = (src, dest, opts) => { if (!src || !dest) { @@ -60993,11 +61406,11 @@ module.exports.sync = (src, dest, opts) => { /***/ }), -/* 747 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /* eslint-disable node/no-deprecated-api */ -var buffer = __webpack_require__(748) +var buffer = __webpack_require__(749) var Buffer = buffer.Buffer // alternative to using Object.keys for old browsers @@ -61061,21 +61474,21 @@ SafeBuffer.allocUnsafeSlow = function (size) { /***/ }), -/* 748 */ +/* 749 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 749 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const fs = __webpack_require__(25); -const makeDir = __webpack_require__(213); -const pify = __webpack_require__(21); -const CpFileError = __webpack_require__(322); +const fs = __webpack_require__(23); +const makeDir = __webpack_require__(91); +const pify = __webpack_require__(22); +const CpFileError = __webpack_require__(323); const fsP = pify(fs); @@ -61220,12 +61633,12 @@ if (fs.copyFileSync) { /***/ }), -/* 750 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const EventEmitter = __webpack_require__(36); +const EventEmitter = __webpack_require__(37); const written = new WeakMap(); @@ -61262,12 +61675,12 @@ module.exports = ProgressEmitter; /***/ }), -/* 751 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(323); +const NestedError = __webpack_require__(324); class CpyError extends NestedError { constructor(message, nested) { @@ -61281,7 +61694,7 @@ module.exports = CpyError; /***/ }), -/* 752 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61321,11 +61734,29 @@ let prepareExternalProjectDependencies = exports.prepareExternalProjectDependenc }; })(); -var _project = __webpack_require__(83); +var _package_json = __webpack_require__(38); + +var _project = __webpack_require__(86); + +function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ -var _package_json = __webpack_require__(37); - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } /** * All external projects are located within `../kibana-extra/{plugin}` relative